Lexicon API - morphological categories of word entry

int sol_GetEntryCoordState( HGREN hEngine, int EntryID, int CategoryID )


hEngine - grammatical dictionary instance handle.

EntryID - word entry ID.

CategoryID - ID of grammatical category.

Return value:

-1 - there is no information about the grammatical category.

value>=0 - the primary key (id) of the grammatical attribute.


There are symbolic constants for the IDs of almost all grammatical categories. They are declared in _sg_api.* files for C, C++, C# and Delphi languages. For example, ASPECT_ru stands for the aspect of Russian verb.

Dictionary instance is a result of sol_CreateGrammarEngine or sol_LoadDictionary call.

WordEntry class in ORM Library has public enumerable property attrs. This property is a collection of grammatical attributes.


C++ sample - the gender of noun:

#include "solarix_grammar_engine.h"


HGREN hEngine = sol_CreateGrammarEngineW(L"..\\..\\bin-windows\\dictionary.xml");


int entry_id = sol_FindEntry( hEngine, L"МАМА", NOUN_ru, RUSSIAN_LANGUAGE );
int gender = sol_GetEntryCoordState( hEngine, entry_id, GENDER_ru );

// ...

C# sample - the aspect of verb:

IntPtr gren = SolarixGrammarEngineNET.GrammarEngine.sol_CreateGrammarEngineW("..\\..\\bin-windows\\dictionary.xml");

// ...

int entry_id = SolarixGrammarEngineNET.GrammarEngine.sol_FindEntry( hEngine, "ДЕЛАТЬ", -1, -1 );
int gender = SolarixGrammarEngineNET.GrammarEngine.sol_GetEntryCoordState( hEngine, entry_id, GENDER_ru );

// ...

Related topics

Purchase the Grammatical Dictionary SDK

WordEntry class - word entry representation in ORM library

Russian version of this page

API layer C++ source code: grammar_engine_api.cpp

Back to the list of API calls

  © Козиев Илья 2019
changed 04-Apr-11