ddc
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
CMorphAutomat Class Reference

#include <MorphAutomat.h>

Inheritance diagram for CMorphAutomat:
Inheritance graph
[legend]
Collaboration diagram for CMorphAutomat:
Collaboration graph
[legend]

Public Member Functions

 CMorphAutomat (MorphLanguageEnum Language, BYTE AnnotChar)
 
 ~CMorphAutomat ()
 
bool Load (string GrammarFileName)
 
bool Save (string GrammarFileName) const
 
bool DumpAllStrings (string FileName) const
 
void GetInnerMorphInfos (const string &Text, size_t TextPos, vector< CAutomAnnotationInner > &Infos) const
 
const CMorphAutomRelationGetChildren (size_t NodeNo) const
 
int NextNode (int NodeNo, BYTE Child) const
 
size_t GetChildrenCount (size_t NodeNo) const
 
const CMorphAutomNodeGetNode (int NodeNo) const
 
DWORD EncodeMorphAutomatInfo (size_t ModelNo, size_t ItemNo, size_t PrefixNo) const
 
void DecodeMorphAutomatInfo (DWORD Info, size_t &ModelNo, size_t &ItemNo, size_t &PrefixNo) const
 
string GetFirstResult (const string &Text) const
 
- Public Member Functions inherited from CABCEncoder
bool CheckABCWithAnnotator (const string &WordForm) const
 
bool CheckABCWithoutAnnotator (const string &WordForm) const
 
string EncodeIntToAlphabet (DWORD v) const
 
DWORD DecodeFromAlphabet (const string &v) const
 
string GetCriticalNounLetterPack () const
 
 CABCEncoder (MorphLanguageEnum Language, BYTE AnnotChar)
 

Protected Member Functions

void DumpAllStringsRecursive (FILE *fp, int NodeNo, string CurrPath) const
 
void BuildChildrenCache ()
 
void GetAllMorphInterpsRecursive (int NodeNo, string &curr_path, vector< CAutomAnnotationInner > &Infos) const
 
int FindStringAndPassAnnotChar (const string &Text, size_t TextPos) const
 
void Clear ()
 

Protected Attributes

CMorphAutomNodem_pNodes
 
size_t m_NodesCount
 
CMorphAutomRelationm_pRelations
 
size_t m_RelationsCount
 
vector< int > m_ChildrenCache
 

Additional Inherited Members

- Public Attributes inherited from CABCEncoder
MorphLanguageEnum m_Language
 
const BYTE m_AnnotChar
 
int m_AlphabetSize
 
int m_Alphabet2Code [256]
 
int m_Code2Alphabet [MaxAlphabetSize]
 
int m_AlphabetSizeWithoutAnnotator
 
int m_Alphabet2CodeWithoutAnnotator [256]
 
int m_Code2AlphabetWithoutAnnotator [MaxAlphabetSize]
 

Constructor & Destructor Documentation

◆ CMorphAutomat()

CMorphAutomat::CMorphAutomat ( MorphLanguageEnum  Language,
BYTE  AnnotChar 
)

◆ ~CMorphAutomat()

CMorphAutomat::~CMorphAutomat ( )

References Clear().

Here is the call graph for this function:

Member Function Documentation

◆ DumpAllStringsRecursive()

void CMorphAutomat::DumpAllStringsRecursive ( FILE *  fp,
int  NodeNo,
string  CurrPath 
) const
protected

References CMorphAutomRelation::GetChildNo(), GetChildren(), GetChildrenCount(), CMorphAutomRelation::GetRelationalChar(), and m_pNodes.

Referenced by DumpAllStrings().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ BuildChildrenCache()

void CMorphAutomat::BuildChildrenCache ( )
protected

◆ GetAllMorphInterpsRecursive()

void CMorphAutomat::GetAllMorphInterpsRecursive ( int  NodeNo,
string &  curr_path,
vector< CAutomAnnotationInner > &  Infos 
) const
protected

◆ FindStringAndPassAnnotChar()

int CMorphAutomat::FindStringAndPassAnnotChar ( const string &  Text,
size_t  TextPos 
) const
protected

References CABCEncoder::m_AnnotChar, and NextNode().

Referenced by GetFirstResult(), and GetInnerMorphInfos().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Clear()

void CMorphAutomat::Clear ( )
protected

References m_NodesCount, m_pNodes, m_pRelations, and m_RelationsCount.

Referenced by CMorphAutomatBuilder::ConvertBuildRelationsToRelations(), Load(), and ~CMorphAutomat().

Here is the caller graph for this function:

◆ Load()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Save()

bool CMorphAutomat::Save ( string  GrammarFileName) const

References ErrorMessage(), Format(), CABCEncoder::m_Alphabet2Code, m_NodesCount, m_pNodes, m_pRelations, and m_RelationsCount.

Referenced by CMorphDictBuilder::GenPredictIdx(), and CMorphDict::Save().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DumpAllStrings()

bool CMorphAutomat::DumpAllStrings ( string  FileName) const

References DumpAllStringsRecursive(), and m_NodesCount.

Here is the call graph for this function:

◆ GetInnerMorphInfos()

void CMorphAutomat::GetInnerMorphInfos ( const string &  Text,
size_t  TextPos,
vector< CAutomAnnotationInner > &  Infos 
) const

References FindStringAndPassAnnotChar(), and GetAllMorphInterpsRecursive().

Referenced by CLemmatizer::LemmatizeWord(), and CMorphDict::PredictBySuffix().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetChildren()

const CMorphAutomRelation * CMorphAutomat::GetChildren ( size_t  NodeNo) const

References CMorphAutomNode::GetChildrenStart(), m_pNodes, and m_pRelations.

Referenced by DumpAllStringsRecursive(), CPredictBase::FindRecursive(), GetAllMorphInterpsRecursive(), and GetFirstResult().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ NextNode()

int CMorphAutomat::NextNode ( int  NodeNo,
BYTE  Child 
) const

◆ GetChildrenCount()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetNode()

const CMorphAutomNode& CMorphAutomat::GetNode ( int  NodeNo) const
inline

Referenced by CPredictBase::FindRecursive().

Here is the caller graph for this function:

◆ EncodeMorphAutomatInfo()

DWORD CMorphAutomat::EncodeMorphAutomatInfo ( size_t  ModelNo,
size_t  ItemNo,
size_t  PrefixNo 
) const

Referenced by CMorphDictBuilder::CreateAutomat().

Here is the caller graph for this function:

◆ DecodeMorphAutomatInfo()

void CMorphAutomat::DecodeMorphAutomatInfo ( DWORD  Info,
size_t &  ModelNo,
size_t &  ItemNo,
size_t &  PrefixNo 
) const

Referenced by CMorphDictBuilder::CreateAutomat(), and GetAllMorphInterpsRecursive().

Here is the caller graph for this function:

◆ GetFirstResult()

string CMorphAutomat::GetFirstResult ( const string &  Text) const

Member Data Documentation

◆ m_pNodes

CMorphAutomNode* CMorphAutomat::m_pNodes
protected

◆ m_NodesCount

size_t CMorphAutomat::m_NodesCount
protected

◆ m_pRelations

CMorphAutomRelation* CMorphAutomat::m_pRelations
protected

◆ m_RelationsCount

size_t CMorphAutomat::m_RelationsCount
protected

◆ m_ChildrenCache

vector<int> CMorphAutomat::m_ChildrenCache
protected

Referenced by BuildChildrenCache(), and NextNode().


The documentation for this class was generated from the following files: