Hello, please help with solving the problem: I wrote the code based on the AOT which, in theory, should analyze the word and issue all its forms. Here is my code
#include <stdio.h> #include <comdef.h> #include "windows.h" #include <iostream> #import "C:\Rml\Bin\Lemmatizer.tlb" using namespace std; using namespace LEMMATIZERLib; int main(int argc, char *argv[]) { _bstr_t main_form; CoInitialize(NULL); // creating and loading Russian dictionary ILemmatizerPtr piLemmatizer; HRESULT hr = piLemmatizer.CreateInstance(__uuidof(LemmatizerRussian)); if (FAILED(hr)) { cout << "Fatal Error: Lemmatizer creation failed"; return 1; } // loading dictionary into the memory hr = piLemmatizer->LoadDictionariesRegistry(); if (FAILED(hr)) { cout << "Fatal Error: Lemmatizer loading failed"; return 1; } // lemmatizing a word { IParadigmCollectionPtr piParadigmCollection = piLemmatizer->CreateParadigmCollectionFromForm("мыла", 0, 0); // print possible lemmas for (int j = 0; j < piParadigmCollection->Count; j++) { main_form = _bstr_t(piParadigmCollection->Item[j]->Norm); CharToOem(main_form, main_form); cout << main_form << endl; }; } { IParadigmCollectionPtr piParadigmCollection2 = piLemmatizer->CreateParadigmCollectionFromNorm(main_form, 1, 1); cout << piParadigmCollection2->Count << endl; for (int i = 0; i < piParadigmCollection2->Count; ++i) { _bstr_t form = _bstr_t(piParadigmCollection2->Item[i]->Norm); CharToOem(form, form); cout << form << endl; }; } // destroy the dictionary piLemmatizer = 0; CoUninitialize(); system("pause"); return 0; } But the results of executing CreateParadigmCollectionFromNorm is just the main form. How to make it give out all the forms?
Current console output:
МЫЛО МЫТЬ 1 МЫТЬ Для продолжения нажмите любую клавишу . . .