Lexicon API - part of speech identification

int sol_GetEntryClass( HGREN hEngine, int EntryID )


hEngine - grammatical dictionary instance handle.

EntryID - word entry ID.

Return value:

Part of speech ID.


There are symbolic constants for the IDs of almost all parts of speech, for example NOUN_ru is Russian noun, VERB_ru is Russian verb. They are declared in _sg_api.* files for C, C++, C# and Delphi languages.

Dictionary instance is a result of sol_CreateGrammarEngine or sol_LoadDictionary call.

WordEntry class in ORM Library has public property partofspeech that references the PartOfSpeech.


C++ sample:

#include "solarix_grammar_engine.h"


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


int entry_id = sol_FindEntry( hEngine, L"МАМА", -1, -1 );
int part_of_speech = sol_GetEntryClass( hEngine, entry_id );

// ...

C# sample:

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

// ...

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

// ...

Related topics

Purchase the Grammatical Dictionary SDK

Word entries


Parts of speech

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