#include <MorphAutomat.h>
CMorphAutomat::CMorphAutomat | ( | MorphLanguageEnum | Language, | |
BYTE | AnnotChar | |||
) |
References m_NodesCount, m_pNodes, m_pRelations, and m_RelationsCount.
CMorphAutomat::~CMorphAutomat | ( | ) |
void CMorphAutomat::DumpAllStringsRecursive | ( | FILE * | fp, | |
int | NodeNo, | |||
string | CurrPath | |||
) | const [protected] |
References CMorphAutomRelation::GetChildNo(), GetChildren(), GetChildrenCount(), CMorphAutomRelation::GetRelationalChar(), and m_pNodes.
Referenced by DumpAllStrings().
void CMorphAutomat::BuildChildrenCache | ( | ) | [protected] |
References ChildrenCacheSize, CMorphAutomRelation::GetChildNo(), GetChildrenCount(), CMorphAutomNode::GetChildrenStart(), CMorphAutomRelation::GetRelationalChar(), CABCEncoder::m_Alphabet2Code, m_ChildrenCache, m_NodesCount, m_pNodes, m_pRelations, and MaxAlphabetSize.
Referenced by Load().
void CMorphAutomat::GetAllMorphInterpsRecursive | ( | int | NodeNo, | |
string & | curr_path, | |||
vector< CAutomAnnotationInner > & | Infos | |||
) | const [protected] |
References CABCEncoder::DecodeFromAlphabet(), DecodeMorphAutomatInfo(), CMorphAutomRelation::GetChildNo(), GetChildren(), GetChildrenCount(), CMorphAutomRelation::GetRelationalChar(), CMorphAutomNode::IsFinal(), CAutomAnnotationInner::m_ItemNo, CAutomAnnotationInner::m_ModelNo, m_pNodes, and CAutomAnnotationInner::m_PrefixNo.
Referenced by GetInnerMorphInfos().
int CMorphAutomat::FindStringAndPassAnnotChar | ( | const string & | Text, | |
size_t | TextPos | |||
) | const [protected] |
References CABCEncoder::m_AnnotChar, and NextNode().
Referenced by GetFirstResult(), and GetInnerMorphInfos().
void CMorphAutomat::Clear | ( | ) | [protected] |
References m_NodesCount, m_pNodes, m_pRelations, and m_RelationsCount.
Referenced by CMorphAutomatBuilder::ConvertBuildRelationsToRelations(), Load(), and ~CMorphAutomat().
bool CMorphAutomat::Load | ( | string | GrammarFileName | ) |
References BuildChildrenCache(), Clear(), ErrorMessage(), Format(), GetStringByLanguage(), CABCEncoder::m_Alphabet2Code, CABCEncoder::m_Language, m_NodesCount, m_pNodes, m_pRelations, and m_RelationsCount.
Referenced by CPredictBase::Load(), and CMorphDict::Load().
bool CMorphAutomat::Save | ( | string | GrammarFileName | ) | const |
References ErrorMessage(), Format(), CABCEncoder::m_Alphabet2Code, m_NodesCount, m_pNodes, m_pRelations, and m_RelationsCount.
Referenced by CMorphDict::Save().
bool CMorphAutomat::DumpAllStrings | ( | string | FileName | ) | const |
void CMorphAutomat::GetInnerMorphInfos | ( | const string & | Text, | |
size_t | TextPos, | |||
vector< CAutomAnnotationInner > & | Infos | |||
) | const |
References FindStringAndPassAnnotChar(), and GetAllMorphInterpsRecursive().
Referenced by CLemmatizer::LemmatizeWord(), and CMorphDict::PredictBySuffix().
const CMorphAutomRelation * CMorphAutomat::GetChildren | ( | size_t | NodeNo | ) | const |
References CMorphAutomNode::GetChildrenStart(), m_pNodes, and m_pRelations.
Referenced by DumpAllStringsRecursive(), CPredictBase::FindRecursive(), GetAllMorphInterpsRecursive(), and GetFirstResult().
int CMorphAutomat::NextNode | ( | int | NodeNo, | |
BYTE | Child | |||
) | const |
References ChildrenCacheSize, CMorphAutomRelation::GetChildNo(), GetChildrenCount(), CMorphAutomNode::GetChildrenStart(), CMorphAutomRelation::GetRelationalChar(), CABCEncoder::m_Alphabet2Code, m_ChildrenCache, m_pNodes, m_pRelations, and MaxAlphabetSize.
Referenced by CPredictBase::Find(), and FindStringAndPassAnnotChar().
size_t CMorphAutomat::GetChildrenCount | ( | size_t | NodeNo | ) | const |
References CMorphAutomNode::GetChildrenStart(), m_NodesCount, m_pNodes, and m_RelationsCount.
Referenced by BuildChildrenCache(), DumpAllStringsRecursive(), CPredictBase::FindRecursive(), GetAllMorphInterpsRecursive(), and NextNode().
const CMorphAutomNode& CMorphAutomat::GetNode | ( | int | NodeNo | ) | const [inline] |
References m_pNodes.
Referenced by CPredictBase::FindRecursive().
DWORD CMorphAutomat::EncodeMorphAutomatInfo | ( | size_t | ModelNo, | |
size_t | ItemNo, | |||
size_t | PrefixNo | |||
) | const |
void CMorphAutomat::DecodeMorphAutomatInfo | ( | DWORD | Info, | |
size_t & | ModelNo, | |||
size_t & | ItemNo, | |||
size_t & | PrefixNo | |||
) | const |
Referenced by CMorphDictBuilder::CreateAutomat(), and GetAllMorphInterpsRecursive().
string CMorphAutomat::GetFirstResult | ( | const string & | Text | ) | const |
References FindStringAndPassAnnotChar(), CMorphAutomRelation::GetChildNo(), GetChildren(), CMorphAutomRelation::GetRelationalChar(), and m_pNodes.
CMorphAutomNode* CMorphAutomat::m_pNodes [protected] |
size_t CMorphAutomat::m_NodesCount [protected] |
CMorphAutomRelation* CMorphAutomat::m_pRelations [protected] |
size_t CMorphAutomat::m_RelationsCount [protected] |
Referenced by Clear(), CMorphAutomat(), CMorphAutomatBuilder::ConvertBuildRelationsToRelations(), GetChildrenCount(), Load(), and Save().
vector<int> CMorphAutomat::m_ChildrenCache [protected] |
Referenced by BuildChildrenCache(), and NextNode().