#include <MorphAutomBuilder.h>
CMorphAutomatBuilder::CMorphAutomatBuilder | ( | MorphLanguageEnum | Language, | |
BYTE | AnnotChar | |||
) |
References m_pRoot.
CMorphAutomatBuilder::~CMorphAutomatBuilder | ( | ) |
void CMorphAutomatBuilder::ClearBuildNodes | ( | ) | [private] |
References DeleteNode(), m_DeletedNodes, and m_pRoot.
Referenced by InitTrie(), and ~CMorphAutomatBuilder().
CTrieNodeBuild * CMorphAutomatBuilder::CreateNode | ( | ) | [private] |
References CTrieNodeBuild::Initialize(), and m_DeletedNodes.
Referenced by AddSuffix(), CloneNode(), and InitTrie().
void CMorphAutomatBuilder::DeleteNode | ( | CTrieNodeBuild * | pNode | ) | [private] |
References CTrieNodeBuild::m_Children, m_DeletedNodes, CTrieNodeBuild::m_FirstChildNo, CTrieNodeBuild::m_IncomingRelationsCount, and MaxAlphabetSize.
Referenced by ClearBuildNodes(), and ReplaceOrRegister().
CTrieNodeBuild * CMorphAutomatBuilder::CloneNode | ( | const CTrieNodeBuild * | pPrototype | ) | [private] |
copying children and incrementing m_IncomingRelationsCount
References CreateNode(), CTrieNodeBuild::m_bFinal, CTrieNodeBuild::m_bRegistered, CTrieNodeBuild::m_Children, CTrieNodeBuild::m_FirstChildNo, CTrieNodeBuild::m_IncomingRelationsCount, CTrieNodeBuild::m_SecondChildNo, MaxAlphabetSize, and CTrieNodeBuild::SetFinal().
Referenced by AddStringDaciuk().
void CMorphAutomatBuilder::UpdateCommonPrefix | ( | const string & | WordForm | ) | [private] |
References CABCEncoder::m_Alphabet2Code, m_Prefix, and m_pRoot.
Referenced by AddStringDaciuk().
CTrieNodeBuild * CMorphAutomatBuilder::AddSuffix | ( | CTrieNodeBuild * | pParentNodeNo, | |
const char * | WordForm | |||
) | [private] |
References CTrieNodeBuild::AddChild(), CreateNode(), CABCEncoder::m_Alphabet2Code, CTrieNodeBuild::m_bRegistered, ReplaceOrRegister(), and CTrieNodeBuild::SetFinal().
Referenced by AddStringDaciuk().
CTrieNodeBuild * CMorphAutomatBuilder::ReplaceOrRegister | ( | CTrieNodeBuild * | pNode | ) | [private] |
References DeleteNode(), GetRegister(), CTrieNodeBuild::m_bRegistered, CTrieNodeBuild::m_pRegister, and RegisterSize.
Referenced by AddStringDaciuk(), and AddSuffix().
void CMorphAutomatBuilder::DeleteFromRegister | ( | CTrieNodeBuild * | pNode | ) | [private] |
int CMorphAutomatBuilder::GetFirstConfluenceState | ( | ) | const [private] |
void CMorphAutomatBuilder::UnregisterNode | ( | CTrieNodeBuild * | pNode | ) | [private] |
References GetRegister(), CTrieNodeBuild::m_bRegistered, CTrieNodeBuild::m_pRegister, and RegisterSize.
Referenced by AddStringDaciuk().
CTrieRegister & CMorphAutomatBuilder::GetRegister | ( | const CTrieNodeBuild * | pNode | ) | [private] |
References CTrieNodeBuild::m_FirstChildNo, m_RegisterHash, CTrieNodeBuild::m_SecondChildNo, and MaxAlphabetSize.
Referenced by ReplaceOrRegister(), and UnregisterNode().
bool CMorphAutomatBuilder::CheckRegister | ( | ) | const [private] |
References CheckRegisterOrder(), CTrieNodeBuild::CheckRegisterRecursive(), CTrieNodeBuild::m_bRegistered, CTrieNodeBuild::m_pRegister, m_pRoot, m_RegisterHash, and MaxAlphabetSize.
Referenced by IsValid().
bool CMorphAutomatBuilder::IsValid | ( | ) | const [private] |
References CTrieNodeBuild::CheckIncomingRelationsCountRecursive(), CheckRegister(), CTrieNodeBuild::GetIncomingRelationsCountRecursive(), and m_pRoot.
void CMorphAutomatBuilder::InitTrie | ( | ) |
References ClearBuildNodes(), ClearRegister(), CreateNode(), and m_pRoot.
Referenced by CMorphDictBuilder::CreateAutomat().
bool CMorphAutomatBuilder::AddStringDaciuk | ( | const string & | WordForm | ) |
References AddSuffix(), CABCEncoder::CheckABCWithAnnotator(), CloneNode(), GetFirstConfluenceState(), CABCEncoder::m_Alphabet2Code, CABCEncoder::m_AnnotChar, CTrieNodeBuild::m_bRegistered, m_Prefix, CTrieNodeBuild::ModifyChild(), ReplaceOrRegister(), CTrieNodeBuild::SetFinal(), UnregisterNode(), and UpdateCommonPrefix().
void CMorphAutomatBuilder::ClearRegister | ( | ) |
References m_pRoot, m_RegisterHash, MaxAlphabetSize, RegisterSize, and CTrieNodeBuild::UnregisterRecursive().
Referenced by CMorphDictBuilder::CreateAutomat(), and InitTrie().
void CMorphAutomatBuilder::ConvertBuildRelationsToRelations | ( | ) |
References CMorphAutomat::Clear(), CMorphAutomRelation::GetChildNo(), CMorphAutomNode::GetChildrenStart(), CMorphAutomRelation::GetRelationalChar(), CMorphAutomNode::IsFinal(), CTrieNodeBuild::m_bFinal, CTrieNodeBuild::m_Children, CABCEncoder::m_Code2Alphabet, CTrieNodeBuild::m_NodeId, CMorphAutomat::m_NodesCount, CMorphAutomat::m_pNodes, CMorphAutomat::m_pRelations, m_pRoot, CMorphAutomat::m_RelationsCount, MaxAlphabetSize, CMorphAutomRelation::SetChildNo(), CMorphAutomNode::SetChildrenStart(), CMorphAutomNode::SetFinal(), CTrieNodeBuild::SetNodeIdNullRecursive(), and CMorphAutomRelation::SetRelationalChar().
Referenced by CMorphDictBuilder::CreateAutomat().
CTrieNodeBuild* CMorphAutomatBuilder::m_pRoot [private] |
Referenced by CheckRegister(), ClearRegister(), and GetRegister().
vector<CTrieNodeBuild*> CMorphAutomatBuilder::m_Prefix [private] |
Referenced by AddStringDaciuk(), GetFirstConfluenceState(), and UpdateCommonPrefix().
vector<CTrieNodeBuild*> CMorphAutomatBuilder::m_DeletedNodes [private] |
Referenced by ClearBuildNodes(), CreateNode(), and DeleteNode().