Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes

CIndexSetForLoadingStage Class Reference

CIndexSetForLoadingStage is a part of DDC which is used only on the loading stage. More...

#include <IndexSetForLoadingStage.h>

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

List of all members.

Public Member Functions

Public Attributes

Protected Member Functions

Protected Attributes

Private Member Functions

Private Attributes


Detailed Description

CIndexSetForLoadingStage is a part of DDC which is used only on the loading stage.

CIndexSetForLoadingStage contains temporary file names and all load indices for one index set. While indexing three indices are used:


Constructor & Destructor Documentation

CIndexSetForLoadingStage::CIndexSetForLoadingStage (  ) 
CIndexSetForLoadingStage::~CIndexSetForLoadingStage (  ) 

References DeleteTempFiles().

Here is the call graph for this function:


Member Function Documentation

virtual string CIndexSetForLoadingStage::GetName (  )  const [private, pure virtual]
bool CIndexSetForLoadingStage::FindIndexItemInVector ( const char *  Item,
vector< CItemIndexForLoading >::iterator &  it,
vector< CItemIndexForLoading > &  V 
) [private]

find a string in vector "V", returning iterator "it", using m_LoadLess1

References LessIndexString1< IndexType >::are_equal(), and m_LoadLess1.

Referenced by FindIndexItem().

Here is the call graph for this function:

Here is the caller graph for this function:

bool CIndexSetForLoadingStage::FindIndexItem ( const char *  Item,
vector< CItemIndexForLoading >::iterator &  it 
) [private]

finds an item in the swap index set, if it is not found, finds the item in the file index set

References FindIndexItemInVector(), GetHashNo(), m_InputLoadIndexHash, and m_MemoryLoadIndexHash.

Referenced by IndexOneBigram(), and InsertToInputLoadIndex().

Here is the call graph for this function:

Here is the caller graph for this function:

bool CIndexSetForLoadingStage::AddToMemoryLoadIndexAndClear ( vector< CItemIndexForLoading > &  Body,
vector< CItemIndexForLoading > &  FileIndexSet 
) [private]

References GetName(), and m_LoadLess2.

Referenced by AddInputLoadIndexToMemoryLoadIndex().

Here is the call graph for this function:

Here is the caller graph for this function:

int CIndexSetForLoadingStage::GetHashNo ( const char *  Str  )  const [private]

Referenced by FindIndexItem(), and InsertToInputLoadIndex().

Here is the caller graph for this function:

size_t CIndexSetForLoadingStage::AddItemStrToBuffer ( const char *  Str,
size_t  StrLen 
) [protected]

add a string to m_StringBuffer

References GetName(), and m_StringBuffer.

Referenced by InsertToInputLoadIndex(), and CStringIndexSet::UnionIndexSet().

Here is the call graph for this function:

Here is the caller graph for this function:

bool CIndexSetForLoadingStage::IndexOneBigram ( const char *  Word1,
BYTE  Word1Len,
const char *  Word2,
BYTE  Word2Len,
const CTokenNo TokenOffset,
char  SecondWordAddress 
) [protected]

index one left bigrams

References BinaryWriteItem(), CriticalTokenLength, FindIndexItem(), CTempBigram::m_Distance, CTempBigram::m_LeftTokenId, CTempBigram::m_RightTokenCorpusAddress, CTempBigram::m_RightTokenId, and m_TempBigramsFile.

Referenced by InsertToInputLoadIndex(), and ProcessBigramBorder().

Here is the call graph for this function:

Here is the caller graph for this function:

bool CIndexSetForLoadingStage::CreateTempFiles ( string  Path  ) 

creates temporary files for indexing

References GetName(), m_bUseItemStorage, m_CurrOccurTempFileName, m_LeftContext, m_MainOccurTempFileName, m_TempBigramsFile, m_TempBigramsFileName, m_TempStorageFile, m_TempStorageFileName, MakeFName(), and UseBigrams().

Referenced by CConcIndexator::CreateMorphIndex().

Here is the call graph for this function:

Here is the caller graph for this function:

bool CIndexSetForLoadingStage::DeleteTempFiles (  ) 

deletes temporary files after indexing

References CloseTempBigramsFile(), m_bUseItemStorage, m_CurrOccurTempFileName, m_MainOccurTempFileName, m_MemoryLoadIndexHash, m_TempBigramsFileName, m_TempStorageFile, m_TempStorageFileName, and RemoveWithPrint().

Referenced by CStringIndexSet::WriteToFile(), and ~CIndexSetForLoadingStage().

Here is the call graph for this function:

Here is the caller graph for this function:

size_t CIndexSetForLoadingStage::GetMemoryLoadIndexItemsCount (  )  const

gets the number of items in memory load index

References m_MemoryLoadIndexHash.

bool CIndexSetForLoadingStage::SaveMemoryLoadIndex (  ) 

saves memory index

References GetName(), m_CurrOccurTempFileName, m_MemoryLoadIndexHash, CExpc::m_strCause, and WriteLoadIndexToTempFileAndClear().

Referenced by CConcIndexator::CreateMorphIndex().

Here is the call graph for this function:

Here is the caller graph for this function:

bool CIndexSetForLoadingStage::AddInputLoadIndexToMemoryLoadIndex (  ) 

add the input load index to the memory load index and clear the input load index

References AddToMemoryLoadIndexAndClear(), GetName(), m_InputLoadIndexHash, and m_MemoryLoadIndexHash.

Referenced by CConcIndexator::CreateMorphIndex().

Here is the call graph for this function:

Here is the caller graph for this function:

void CIndexSetForLoadingStage::SortInputAndMemoryIndices (  ) 

sort the input and the memory load indices

References CItemIndexForLoading::GetOccurs(), m_InputLoadIndexHash, and m_MemoryLoadIndexHash.

Referenced by CConcIndexator::CreateMorphIndex().

Here is the call graph for this function:

Here is the caller graph for this function:

bool CIndexSetForLoadingStage::AddMemoryLoadIndexToMainLoadIndex (  ) 
void CIndexSetForLoadingStage::InsertToInputLoadIndex ( const char *  Str,
size_t  StrLen,
const vector< CTokenNo > &  occurrences 
)
void CIndexSetForLoadingStage::CloseTempBigramsFile (  ) 

closes all temporary bigrams file

References m_TempBigramsFile.

Referenced by DeleteTempFiles(), and CStringIndexSet::WriteToFile().

Here is the caller graph for this function:

bool CIndexSetForLoadingStage::UseBigrams (  )  const

true, if DDC should create bigrams for this index

References m_MaxBigramWindowSize.

Referenced by CreateTempFiles(), CStringIndexSet::DestroyIndexSet(), CQueryTokenNode::EvaluateWithoutHits(), CStringIndexSet::ReadFromTheDisk(), and CStringIndexSet::WriteToFile().

Here is the caller graph for this function:

void CIndexSetForLoadingStage::ProcessBigramBorder ( CTokenNo  occurrence  ) 

add "Wi <eos>" bigrams for end of sentence

References IndexOneBigram(), and m_LeftContext.

Here is the call graph for this function:


Member Data Documentation

a less operator for two buffer pointers

Referenced by AddMemoryLoadIndexToMainLoadIndex(), and AddToMemoryLoadIndexAndClear().

a less operator for a buffer pointer and a const char*

Referenced by FindIndexItemInVector().

a temporary file, where the memory index set is stored

Referenced by AddMemoryLoadIndexToMainLoadIndex(), CreateTempFiles(), DeleteTempFiles(), and SaveMemoryLoadIndex().

input memory index set (hashed by ASCII)

Referenced by AddInputLoadIndexToMemoryLoadIndex(), FindIndexItem(), InsertToInputLoadIndex(), and SortInputAndMemoryIndices().

a temporal file for left bigrams

Referenced by CIndexSetForLoadingStage(), CloseTempBigramsFile(), CreateTempFiles(), and IndexOneBigram().

deque<string> CIndexSetForLoadingStage::m_LeftContext [private]

a temporary file to write left bigrams

Referenced by CreateTempFiles(), DeleteTempFiles(), and CStringIndexSet::WriteToFile().

a temporary file, where the index storage is stored

Referenced by CStringIndexSet::ConvertTempStorageToPersistent(), CreateTempFiles(), and DeleteTempFiles().

m_MaxBigramWindowSize>0, then DDC creates bigrams for the index

Referenced by CIndexSetForLoadingStage(), InsertToInputLoadIndex(), CConcIndexator::LoadOptionsFromString(), and UseBigrams().

the break collection that bigrams could not trespass

Referenced by CIndexSetForLoadingStage(), and CConcIndexator::LoadOptionsFromString().


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