ddc
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
CGraphmatFile Class Reference

#include <GraphmatFile.h>

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

Public Member Functions

 CGraphmatFile ()
 
 ~CGraphmatFile ()
 
bool LoadDicts ()
 
bool LoadStringToGraphan (const string &szBuffer)
 
const string & GetLastError () const
 
void GetGraphematicalLine (char *line, size_t NumLine) const
 
void WriteGraphMat (const char *FName) const
 
- Public Member Functions inherited from CUnitHolder
const vector< CGraLine > & GetUnits () const
 
CGraLineGetUnit (size_t UnitNo)
 
const vector< char > & GetUnitBuf () const
 
const vector< BYTE > & GetInputBuffer () const
 
 CUnitHolder ()
 
void SetState (size_t LB, size_t HB, WORD state)
 
void SetDes (size_t x, Descriptors des)
 
bool HasDescr (size_t i, int descr) const
 
bool AreGrouped (size_t LB, size_t HB) const
 
bool HasGrouped (size_t LB, size_t HB) const
 
bool HasAbbreviation (size_t LB, size_t HB) const
 
size_t PassSpace (size_t i, size_t HB) const
 
size_t PPunctOrSoft (size_t i, size_t HB) const
 
size_t PPunct (size_t i, size_t HB) const
 
size_t BSpace (size_t i, size_t LB=0) const
 
size_t PSoft (size_t i, size_t HB) const
 
size_t BSoft (size_t i) const
 
bool IsHyphen (size_t x) const
 
bool is_latin_alpha (int ch) const
 
bool is_lowercase (int ch) const
 
bool is_uppercase (int ch) const
 
bool IsOneAlpha (size_t x) const
 
bool IsOneChar (size_t x, int i) const
 
bool IsOneULet (size_t x) const
 
bool FirstUpper (size_t x) const
 
bool IsBulletWord (size_t x) const
 
bool IsOneFullStop (size_t i) const
 
bool EmptyLineBeforeGraph (size_t i, size_t HB) const
 
bool IsQuestionOrExclamationMarks (size_t i) const
 
bool IsSentenceEndMark (size_t i) const
 
bool IsOneCloseQuotationMark (size_t i) const
 
bool IsOneOpenQuotationMark (size_t i) const
 
void FreeTable ()
 
void BuildUnitBufferUpper ()
 
void InitTokenBuffer ()
 
bool InitInputBuffer (const string &S)
 
void ClearInputBuffer ()
 
void AddUnit (const CGraLine &NewLine)
 
const char * GetUnitBufferStart () const
 
const char * GetUnitUpperBufferStart () const
 
const char * GetUppercaseToken (DWORD LineNo) const
 
string GetToken (DWORD LineNo) const
 
size_t GetTokensCount () const
 
DWORD GetTokenInputOffset (DWORD LineNo) const
 
BYTE GetTokenLength (DWORD LineNo) const
 
void DeleteDescr (size_t LineNo, Descriptors d)
 
void SetOborotNo (size_t LineNo, short OborotNo)
 
short GetOborotNo (size_t LineNo) const
 
void SetPageNumber (size_t LineNo, DWORD PageNumber)
 
DWORD GetPageNumber (size_t LineNo) const
 

Public Attributes

const CGraphanDictsm_pDicts
 
bool m_bConvertRussianJo2Je
 
size_t m_MinParOfs
 
size_t m_MaxParOfs
 
size_t m_TabSize
 
string m_GraOutputFile
 
bool m_bSentBreaker
 
bool m_bForceToRus
 
bool m_bEmptyLineIsSentenceDelim
 
bool m_bUseParagraphTagToDivide
 
bool m_bUseIndention
 
bool m_bFilterUnprintableSymbols
 
bool m_bRecognizeShortFIOs
 
size_t m_MaxSentenceLength
 
- Public Attributes inherited from CUnitHolder
MorphLanguageEnum m_Language
 

Private Member Functions

bool IsKey (size_t LB, size_t HB, size_t &GraLast) const
 
bool FindKeySequence (const char *title, size_t i, size_t HB, size_t &GraLast) const
 
bool DealBullet (size_t i, size_t HB)
 
bool DealAsteriskBullet (size_t LB, size_t HB)
 
int DealBulletsWithTwoBrackets (size_t StartPos, size_t EndPos)
 
bool DealEnglishStyleFIO (size_t StartPos, size_t EndPos)
 
bool DealAbbrev (size_t StartPos, size_t EndPos)
 
size_t FindOborotto (size_t i, size_t HB, short &OborotNo, vector< WORD > &OborortIds) const
 
void DealOborotto (size_t HB)
 
int DealReferences (size_t i, size_t HB)
 
void DealModifierKey (size_t LB, size_t HB)
 
void DealSimpleKey (size_t LB, size_t HB)
 
void DealKeySequence (size_t LB, size_t HB)
 
void DealGermanDividedCompounds (size_t LB, size_t HB)
 
void DealExtensionsAndLocalFileNames (size_t LB, size_t HB)
 
int HasIndention (size_t LB, size_t HB)
 
int CountEndL (size_t LB, size_t HB)
 
int CountSpaces (size_t LB, size_t HB)
 
int DealFIO (size_t i, size_t HB)
 
int DealShortFIO (size_t i, size_t HB)
 
void DealNames (size_t LB, size_t HB)
 
bool DealSentBreaker ()
 
void InitNonContextDescriptors (CGraLine &L)
 
bool GraphmatMain ()
 
int InitContextDescriptors (size_t LB, size_t HB)
 
void MacSynHierarchy ()
 

Private Attributes

string m_LastError
 

Constructor & Destructor Documentation

◆ CGraphmatFile()

CGraphmatFile::CGraphmatFile ( )

◆ ~CGraphmatFile()

CGraphmatFile::~CGraphmatFile ( )

References CUnitHolder::FreeTable(), and m_pDicts.

Here is the call graph for this function:

Member Function Documentation

◆ IsKey()

bool CGraphmatFile::IsKey ( size_t  LB,
size_t  HB,
size_t &  GraLast 
) const
private

References FindKeySequence(), CUnitHolder::GetToken(), CUnitHolder::GetUnits(), CUnitHolder::IsOneAlpha(), CGraphanDicts::m_Keys, CUnitHolder::m_Language, m_pDicts, and ReverseChar().

Referenced by DealModifierKey(), and DealSimpleKey().

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

◆ FindKeySequence()

bool CGraphmatFile::FindKeySequence ( const char *  title,
size_t  i,
size_t  HB,
size_t &  GraLast 
) const
private

References CUnitHolder::BSoft(), CUnitHolder::GetTokenLength(), CUnitHolder::GetUnits(), CUnitHolder::HasDescr(), IsSuperEqualChar(), CUnitHolder::m_Language, OPun, and CUnitHolder::PSoft().

Referenced by IsKey().

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

◆ DealBullet()

bool CGraphmatFile::DealBullet ( size_t  i,
size_t  HB 
)
private

◆ DealAsteriskBullet()

bool CGraphmatFile::DealAsteriskBullet ( size_t  LB,
size_t  HB 
)
private

◆ DealBulletsWithTwoBrackets()

int CGraphmatFile::DealBulletsWithTwoBrackets ( size_t  StartPos,
size_t  EndPos 
)
private

◆ DealEnglishStyleFIO()

bool CGraphmatFile::DealEnglishStyleFIO ( size_t  StartPos,
size_t  EndPos 
)
private

◆ DealAbbrev()

bool CGraphmatFile::DealAbbrev ( size_t  StartPos,
size_t  EndPos 
)
private

References abbrev_lower_bound(), AbbrevIsEqualToString(), abUpperCase, CStrToCompare::CStrToCompare(), CStrToCompare::m_Str, CStrToCompare::m_StrLen, NumberPlace, OAbbr1, OAbbr2, ODigits, and stAbbreviation.

Referenced by InitContextDescriptors().

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

◆ FindOborotto()

size_t CGraphmatFile::FindOborotto ( size_t  i,
size_t  HB,
short &  OborotNo,
vector< WORD > &  OborortIds 
) const
private

References CUnitHolder::GetUnits(), CGraphanDicts::m_Oborottos, CGraphanDicts::m_OborottosFirstWordIndex, m_pDicts, CGraphemOborot::m_TokenIds, and CUnitHolder::PSoft().

Referenced by DealOborotto().

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

◆ DealOborotto()

void CGraphmatFile::DealOborotto ( size_t  HB)
private

◆ DealReferences()

int CGraphmatFile::DealReferences ( size_t  i,
size_t  HB 
)
private

References CUnitHolder::GetUnits(), CUnitHolder::GetUppercaseToken(), CUnitHolder::IsOneFullStop(), ORef1, ORef2, CUnitHolder::PassSpace(), CUnitHolder::SetDes(), CUnitHolder::SetState(), and stGrouped.

Referenced by InitContextDescriptors().

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

◆ DealModifierKey()

void CGraphmatFile::DealModifierKey ( size_t  LB,
size_t  HB 
)
private

References CUnitHolder::GetUnits(), CUnitHolder::HasDescr(), CUnitHolder::HasGrouped(), IsKey(), OHyp, OKey1, OKey2, CUnitHolder::SetDes(), CUnitHolder::SetState(), and stGrouped.

Referenced by InitContextDescriptors().

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

◆ DealSimpleKey()

void CGraphmatFile::DealSimpleKey ( size_t  LB,
size_t  HB 
)
private

References CUnitHolder::HasGrouped(), IsKey(), CUnitHolder::IsOneAlpha(), OKey1, OKey2, CUnitHolder::SetDes(), CUnitHolder::SetState(), and stGrouped.

Referenced by InitContextDescriptors().

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

◆ DealKeySequence()

void CGraphmatFile::DealKeySequence ( size_t  LB,
size_t  HB 
)
private

References CUnitHolder::BSoft(), CUnitHolder::DeleteDescr(), CUnitHolder::GetUnits(), CUnitHolder::HasDescr(), OKey1, OKey2, CUnitHolder::SetDes(), CUnitHolder::SetState(), and stGrouped.

Referenced by InitContextDescriptors().

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

◆ DealGermanDividedCompounds()

void CGraphmatFile::DealGermanDividedCompounds ( size_t  LB,
size_t  HB 
)
private

◆ DealExtensionsAndLocalFileNames()

void CGraphmatFile::DealExtensionsAndLocalFileNames ( size_t  LB,
size_t  HB 
)
private

◆ HasIndention()

int CGraphmatFile::HasIndention ( size_t  LB,
size_t  HB 
)
private

References CUnitHolder::HasDescr(), and OPar.

Referenced by DealFIO(), and DealShortFIO().

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

◆ CountEndL()

int CGraphmatFile::CountEndL ( size_t  LB,
size_t  HB 
)
private

References CUnitHolder::GetUnits().

Referenced by DealFIO(), and DealShortFIO().

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

◆ CountSpaces()

int CGraphmatFile::CountSpaces ( size_t  LB,
size_t  HB 
)
private

References CUnitHolder::GetUnits().

Referenced by DealFIO(), and DealShortFIO().

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

◆ DealFIO()

int CGraphmatFile::DealFIO ( size_t  i,
size_t  HB 
)
private

◆ DealShortFIO()

int CGraphmatFile::DealShortFIO ( size_t  i,
size_t  HB 
)
private

◆ DealNames()

void CGraphmatFile::DealNames ( size_t  LB,
size_t  HB 
)
private

References CUnitHolder::GetUnits(), CUnitHolder::HasDescr(), ONam, OSentEnd, OUpLw, and CUnitHolder::SetDes().

Referenced by InitContextDescriptors().

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

◆ DealSentBreaker()

bool CGraphmatFile::DealSentBreaker ( )
private

◆ InitNonContextDescriptors()

void CGraphmatFile::InitNonContextDescriptors ( CGraLine L)
private

◆ GraphmatMain()

bool CGraphmatFile::GraphmatMain ( )
private

◆ InitContextDescriptors()

int CGraphmatFile::InitContextDescriptors ( size_t  LB,
size_t  HB 
)
private

◆ MacSynHierarchy()

void CGraphmatFile::MacSynHierarchy ( )
private

References CUnitHolder::GetUnits(), InitDoc(), CUnitHolder::PSoft(), RecognizeCS(), and CUnitHolder::SetDes().

Referenced by GraphmatMain().

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

◆ LoadDicts()

bool CGraphmatFile::LoadDicts ( )

◆ LoadStringToGraphan()

bool CGraphmatFile::LoadStringToGraphan ( const string &  szBuffer)

References Format(), GraphmatMain(), CUnitHolder::InitInputBuffer(), m_GraOutputFile, m_LastError, and CExpc::m_strCause.

Referenced by CConcIndexator::LoadFileIntoGraphan(), and CConcIndexator::LoadXmlFile().

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

◆ GetLastError()

const string & CGraphmatFile::GetLastError ( ) const

References m_LastError.

Referenced by CConcIndexator::InitGraphan(), CConcIndexator::LoadFileIntoGraphan(), and CConcIndexator::LoadXmlFile().

Here is the caller graph for this function:

◆ GetGraphematicalLine()

void CGraphmatFile::GetGraphematicalLine ( char *  line,
size_t  NumLine 
) const

◆ WriteGraphMat()

void CGraphmatFile::WriteGraphMat ( const char *  FName) const

References CriticalGraphemLineLength, GetGraphematicalLine(), and CUnitHolder::GetUnits().

Referenced by GraphmatMain().

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

Member Data Documentation

◆ m_LastError

string CGraphmatFile::m_LastError
private

◆ m_pDicts

const CGraphanDicts* CGraphmatFile::m_pDicts

◆ m_bConvertRussianJo2Je

bool CGraphmatFile::m_bConvertRussianJo2Je

◆ m_MinParOfs

size_t CGraphmatFile::m_MinParOfs

Referenced by CGraphmatFile(), and DealIndention().

◆ m_MaxParOfs

size_t CGraphmatFile::m_MaxParOfs

Referenced by CGraphmatFile(), and DealIndention().

◆ m_TabSize

size_t CGraphmatFile::m_TabSize

◆ m_GraOutputFile

string CGraphmatFile::m_GraOutputFile

◆ m_bSentBreaker

bool CGraphmatFile::m_bSentBreaker

Referenced by CGraphmatFile(), and GraphmatMain().

◆ m_bForceToRus

bool CGraphmatFile::m_bForceToRus

◆ m_bEmptyLineIsSentenceDelim

bool CGraphmatFile::m_bEmptyLineIsSentenceDelim

◆ m_bUseParagraphTagToDivide

bool CGraphmatFile::m_bUseParagraphTagToDivide

◆ m_bUseIndention

bool CGraphmatFile::m_bUseIndention

◆ m_bFilterUnprintableSymbols

bool CGraphmatFile::m_bFilterUnprintableSymbols

◆ m_bRecognizeShortFIOs

bool CGraphmatFile::m_bRecognizeShortFIOs

◆ m_MaxSentenceLength

size_t CGraphmatFile::m_MaxSentenceLength

Referenced by CGraphmatFile(), and DealSentBreaker().


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