PhraseHunter::LightCorpusToken Class Reference

A corpus token that only carries corpus frequency information (opposed to CorpusToken). More...

#include <token.h>

Inherits PhraseHunter::CorpusTokenBase.

Inheritance diagram for PhraseHunter::LightCorpusToken:

Inheritance graph
[legend]
Collaboration diagram for PhraseHunter::LightCorpusToken:

Collaboration graph
[legend]
List of all members.

Public Member Functions

unsigned int documentFrequency () const
 Returns the number of documents a Token occurs in.

Static Public Member Functions

static TokenPtr search (const char *tokenstr, SQLitePP::SqliteDB &db)
 Search and initialize a LightCorpusToken. Special search function for LightCorpusToken if you don't want to use SearchEngine::searchToken() which always loads the whole OccurrenceMap.

Private Member Functions

 LightCorpusToken (const char *tokenstr, TokenID id, unsigned int freq, unsigned int docFreq)

Private Attributes

unsigned int m_documentFreq

Detailed Description

A corpus token that only carries corpus frequency information (opposed to CorpusToken).

Definition at line 208 of file token.h.


Constructor & Destructor Documentation

PhraseHunter::LightCorpusToken::LightCorpusToken ( const char *  tokenstr,
TokenID  id,
unsigned int  freq,
unsigned int  docFreq 
) [inline, private]

Definition at line 212 of file token.h.

References PhraseHunter::CorpusTokenBase::m_corpusfreq.

Referenced by search().


Member Function Documentation

TokenPtr PhraseHunter::LightCorpusToken::search ( const char *  tokenstr,
SQLitePP::SqliteDB db 
) [static]

Search and initialize a LightCorpusToken. Special search function for LightCorpusToken if you don't want to use SearchEngine::searchToken() which always loads the whole OccurrenceMap.

Definition at line 104 of file token.cpp.

References SQLitePP::SqliteDB::cachedStatement(), SQLitePP::ResultIterator::get(), SQLitePP::ResultIterator::hasMoreRows(), PhraseHunter::EmptyToken::instance(), and LightCorpusToken().

unsigned int PhraseHunter::LightCorpusToken::documentFrequency (  )  const [inline, virtual]

Returns the number of documents a Token occurs in.

Reimplemented from PhraseHunter::Token.

Definition at line 227 of file token.h.

References m_documentFreq.


Member Data Documentation

unsigned int PhraseHunter::LightCorpusToken::m_documentFreq [private]

Definition at line 211 of file token.h.

Referenced by documentFrequency().


The documentation for this class was generated from the following files:
Generated on Thu Dec 21 16:14:44 2006 for The Phrasehunter by  doxygen 1.5.1