tmmt::SuffixArray Class Reference

#include <SuffixArray.h>

Collaboration diagram for tmmt::SuffixArray:

Collaboration graph
[legend]

List of all members.

Public Types

typedef unsigned int INDEX

Public Member Functions

 SuffixArray (std::string fileName)
 ~SuffixArray ()
void Sort (INDEX start, INDEX end)
int CompareIndex (INDEX a, INDEX b) const
int CompareWord (WORD_ID a, WORD_ID b) const
int Count (const std::vector< WORD > &phrase)
bool MinCount (const std::vector< WORD > &phrase, INDEX min)
bool Exists (const std::vector< WORD > &phrase)
int FindMatches (const std::vector< WORD > &phrase, INDEX &firstMatch, INDEX &lastMatch, INDEX search_start=0, INDEX search_end=-1)
int LimitedCount (const std::vector< WORD > &phrase, INDEX min, INDEX &firstMatch, INDEX &lastMatch, INDEX search_start=-1, INDEX search_end=0)
INDEX FindFirst (const std::vector< WORD > &phrase, INDEX &start, INDEX &end)
INDEX FindLast (const std::vector< WORD > &phrase, INDEX start, INDEX end, int direction)
int Match (const std::vector< WORD > &phrase, INDEX index)
void List (INDEX start, INDEX end)
INDEX GetPosition (INDEX index)
size_t GetSentence (INDEX position)
char GetWordInSentence (INDEX position)
char GetSentenceLength (size_t sentenceId)
INDEX GetSize ()
VocabularyGetVocabulary ()
const std::vector< std::vector
< WORD_ID > > & 
GetCorpus () const


Detailed Description

Definition at line 10 of file SuffixArray.h.


Member Typedef Documentation

typedef unsigned int tmmt::SuffixArray::INDEX

Definition at line 13 of file SuffixArray.h.


Constructor & Destructor Documentation

tmmt::SuffixArray::SuffixArray ( std::string  fileName  ) 

tmmt::SuffixArray::~SuffixArray (  ) 

Definition at line 106 of file SuffixArray.cpp.


Member Function Documentation

int tmmt::SuffixArray::CompareIndex ( INDEX  a,
INDEX  b 
) const

Definition at line 112 of file SuffixArray.cpp.

References CompareWord().

Referenced by Sort().

Here is the call graph for this function:

Here is the caller graph for this function:

int tmmt::SuffixArray::CompareWord ( WORD_ID  a,
WORD_ID  b 
) const [inline]

Definition at line 127 of file SuffixArray.cpp.

References tmmt::Vocabulary::GetWord().

Referenced by CompareIndex().

Here is the call graph for this function:

Here is the caller graph for this function:

int tmmt::SuffixArray::Count ( const std::vector< WORD > &  phrase  ) 

bool tmmt::SuffixArray::Exists ( const std::vector< WORD > &  phrase  ) 

INDEX tmmt::SuffixArray::FindFirst ( const std::vector< WORD > &  phrase,
INDEX start,
INDEX end 
)

INDEX tmmt::SuffixArray::FindLast ( const std::vector< WORD > &  phrase,
INDEX  start,
INDEX  end,
int  direction 
)

int tmmt::SuffixArray::FindMatches ( const std::vector< WORD > &  phrase,
INDEX firstMatch,
INDEX lastMatch,
INDEX  search_start = 0,
INDEX  search_end = -1 
)

const std::vector< std::vector< WORD_ID > >& tmmt::SuffixArray::GetCorpus (  )  const [inline]

Definition at line 63 of file SuffixArray.h.

INDEX tmmt::SuffixArray::GetPosition ( INDEX  index  )  [inline]

Definition at line 44 of file SuffixArray.h.

size_t tmmt::SuffixArray::GetSentence ( INDEX  position  )  [inline]

Definition at line 47 of file SuffixArray.h.

char tmmt::SuffixArray::GetSentenceLength ( size_t  sentenceId  )  [inline]

Definition at line 53 of file SuffixArray.h.

INDEX tmmt::SuffixArray::GetSize (  )  [inline]

Definition at line 56 of file SuffixArray.h.

Vocabulary& tmmt::SuffixArray::GetVocabulary (  )  [inline]

Definition at line 60 of file SuffixArray.h.

Referenced by tmmt::FuzzyMatchWrapper::GetVocabulary().

Here is the caller graph for this function:

char tmmt::SuffixArray::GetWordInSentence ( INDEX  position  )  [inline]

Definition at line 50 of file SuffixArray.h.

int tmmt::SuffixArray::LimitedCount ( const std::vector< WORD > &  phrase,
INDEX  min,
INDEX firstMatch,
INDEX lastMatch,
INDEX  search_start = -1,
INDEX  search_end = 0 
)

void tmmt::SuffixArray::List ( INDEX  start,
INDEX  end 
)

Definition at line 227 of file SuffixArray.cpp.

int tmmt::SuffixArray::Match ( const std::vector< WORD > &  phrase,
INDEX  index 
)

bool tmmt::SuffixArray::MinCount ( const std::vector< WORD > &  phrase,
INDEX  min 
)

void tmmt::SuffixArray::Sort ( INDEX  start,
INDEX  end 
)

Definition at line 76 of file SuffixArray.cpp.

References CompareIndex(), and k.

Here is the call graph for this function:


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

Generated on Thu Jul 6 00:34:47 2017 for Moses by  doxygen 1.5.9