#include <SuffixArray.h>
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 () |
Vocabulary & | GetVocabulary () |
const std::vector< std::vector < WORD_ID > > & | GetCorpus () const |
Definition at line 10 of file SuffixArray.h.
typedef unsigned int tmmt::SuffixArray::INDEX |
Definition at line 13 of file SuffixArray.h.
tmmt::SuffixArray::SuffixArray | ( | std::string | fileName | ) |
tmmt::SuffixArray::~SuffixArray | ( | ) |
Definition at line 106 of file SuffixArray.cpp.
Definition at line 112 of file SuffixArray.cpp.
References CompareWord().
Referenced by Sort().
Definition at line 127 of file SuffixArray.cpp.
References tmmt::Vocabulary::GetWord().
Referenced by CompareIndex().
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.
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().
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 | |||
) |
Definition at line 227 of file SuffixArray.cpp.
Definition at line 76 of file SuffixArray.cpp.
References CompareIndex(), and k.