#include <token.h>
Inherits PhraseHunter::CorpusTokenBase.
Inheritance diagram for PhraseHunter::CorpusToken:


Public Member Functions | |
| bool | isEmpty () const |
| Returns true if this Token has no occurrences in the corpus. | |
Static Public Member Functions | |
| template<typename T> | |
| static TokenPtr | loadFromCorpus (T tokenstr, TokenID id, SQLitePP::SqliteDB &db) |
| Don't call this template function directly. Instead, use the non-template version below. | |
| template<typename T> | |
| static TokenPtr | loadFromCorpus (T tokenstr, TokenID id, SQLitePP::SqliteDB &db, const std::set< DocID > &docs) |
| Don't call this template function directly. Instead, use the non-template version below. | |
| static TokenPtr | loadFromToken (const TokenPtr &token, SQLitePP::SqliteDB &db) |
| Loads a CorpusToken. For initializing the OccurrenceMap of a LightCorpusToken. | |
| static TokenPtr | loadFromToken (const TokenPtr &token, SQLitePP::SqliteDB &db, const std::set< DocID > &docs) |
| Like above function, but ignoring all occurrences that are not in docs. | |
Private Member Functions | |
| void | insertPositions (SQLitePP::ResultIterator) |
| CorpusToken (const char *, TokenID, SQLitePP::SqliteDB &) | |
| CorpusToken (const char *, TokenID, SQLitePP::SqliteDB &, const std::set< DocID > &) | |
| CorpusToken (schma::UnicodePtr, TokenID, SQLitePP::SqliteDB &) | |
| CorpusToken (schma::UnicodePtr, TokenID, SQLitePP::SqliteDB &, const std::set< DocID > &) | |
| void | init (TokenID, SQLitePP::SqliteDB &) |
| void | init (TokenID, SQLitePP::SqliteDB &, const std::set< DocID > &) |
This is a non-phrasal Token. For reading only. A PhraseHunter::CorpusToken has an individual id, by which it can uniquely be identified and called from the database.
Definition at line 152 of file token.h.
| PhraseHunter::CorpusToken::CorpusToken | ( | const char * | , | |
| TokenID | , | |||
| SQLitePP::SqliteDB & | ||||
| ) | [private] |
| PhraseHunter::CorpusToken::CorpusToken | ( | const char * | , | |
| TokenID | , | |||
| SQLitePP::SqliteDB & | , | |||
| const std::set< DocID > & | ||||
| ) | [private] |
| PhraseHunter::CorpusToken::CorpusToken | ( | schma::UnicodePtr | , | |
| TokenID | , | |||
| SQLitePP::SqliteDB & | ||||
| ) | [private] |
| PhraseHunter::CorpusToken::CorpusToken | ( | schma::UnicodePtr | , | |
| TokenID | , | |||
| SQLitePP::SqliteDB & | , | |||
| const std::set< DocID > & | ||||
| ) | [private] |
| void PhraseHunter::CorpusToken::insertPositions | ( | SQLitePP::ResultIterator | ) | [private] |
Definition at line 43 of file token.cpp.
References SQLitePP::ResultIterator::get(), SQLitePP::ResultIterator::hasMoreRows(), PhraseHunter::CorpusTokenBase::m_corpusfreq, PhraseHunter::Token::m_occurrences, and SQLitePP::ResultIterator::next().
Referenced by init().
| void PhraseHunter::CorpusToken::init | ( | TokenID | , | |
| SQLitePP::SqliteDB & | ||||
| ) | [private] |
Definition at line 85 of file token.cpp.
References SQLitePP::SqliteDB::cachedStatement(), and insertPositions().
Referenced by CorpusToken().
| void PhraseHunter::CorpusToken::init | ( | TokenID | , | |
| SQLitePP::SqliteDB & | , | |||
| const std::set< DocID > & | ||||
| ) | [private] |
Definition at line 92 of file token.cpp.
References insertPositions(), and SQLitePP::SqliteDB::statement().
| static TokenPtr PhraseHunter::CorpusToken::loadFromCorpus | ( | T | tokenstr, | |
| TokenID | id, | |||
| SQLitePP::SqliteDB & | db | |||
| ) | [inline, static] |
Don't call this template function directly. Instead, use the non-template version below.
Definition at line 167 of file token.h.
References CorpusToken(), PhraseHunter::InvalidTokenID, and p_assert.
Referenced by PhraseHunter::StatisticsEngine::getCandidates(), and PhraseHunter::SearchEngine::searchToken().
| static TokenPtr PhraseHunter::CorpusToken::loadFromCorpus | ( | T | tokenstr, | |
| TokenID | id, | |||
| SQLitePP::SqliteDB & | db, | |||
| const std::set< DocID > & | docs | |||
| ) | [inline, static] |
Don't call this template function directly. Instead, use the non-template version below.
Definition at line 175 of file token.h.
References CorpusToken(), PhraseHunter::EmptyToken::instance(), PhraseHunter::InvalidTokenID, and p_assert.
| static TokenPtr PhraseHunter::CorpusToken::loadFromToken | ( | const TokenPtr & | token, | |
| SQLitePP::SqliteDB & | db | |||
| ) | [inline, static] |
Loads a CorpusToken. For initializing the OccurrenceMap of a LightCorpusToken.
| static TokenPtr PhraseHunter::CorpusToken::loadFromToken | ( | const TokenPtr & | token, | |
| SQLitePP::SqliteDB & | db, | |||
| const std::set< DocID > & | docs | |||
| ) | [inline, static] |
Like above function, but ignoring all occurrences that are not in docs.
| bool PhraseHunter::CorpusToken::isEmpty | ( | ) | const [inline, virtual] |
Returns true if this Token has no occurrences in the corpus.
Reimplemented from PhraseHunter::Token.
Definition at line 202 of file token.h.
References PhraseHunter::CorpusTokenBase::m_corpusfreq.
1.5.1