PhraseHunter::MutableToken Class Reference

A Token whose OccurrenceMap can be modified. The main purpose of MutableToken is to be a base class for phrases, whose occurrence matrix needs to be modified as phrases are themselve not indexed. More...

#include <token.h>

Inherits PhraseHunter::Token.

Inherited by PhraseHunter::Phrase.

Inheritance diagram for PhraseHunter::MutableToken:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

unsigned int corpusFrequency () const
 Returns the number of documents a Token occurs in.
void removeDocument (DocID docID)
 Remove the document referred to by docID from the occurrence matrix.
void addOccurrence (DocID docID, IdxPos position)
 Add a position to the occurrence matrix of this Token.

Protected Member Functions

bool boolean_test () const
 MutableToken (const char *tokenstring)
 MutableToken (schma::UnicodePtr tokenstring)

Protected Attributes

unsigned int m_totalOccurrences

Detailed Description

A Token whose OccurrenceMap can be modified. The main purpose of MutableToken is to be a base class for phrases, whose occurrence matrix needs to be modified as phrases are themselve not indexed.

Definition at line 236 of file token.h.


Constructor & Destructor Documentation

PhraseHunter::MutableToken::MutableToken ( const char *  tokenstring  )  [inline, protected]

Definition at line 243 of file token.h.

PhraseHunter::MutableToken::MutableToken ( schma::UnicodePtr  tokenstring  )  [inline, protected]

Definition at line 245 of file token.h.


Member Function Documentation

bool PhraseHunter::MutableToken::boolean_test (  )  const [inline, protected]

Definition at line 240 of file token.h.

References m_totalOccurrences.

unsigned int PhraseHunter::MutableToken::corpusFrequency (  )  const [inline, virtual]

Returns the number of documents a Token occurs in.

Implements PhraseHunter::Token.

Definition at line 250 of file token.h.

References m_totalOccurrences.

void PhraseHunter::MutableToken::removeDocument ( DocID  docID  )  [inline]

Remove the document referred to by docID from the occurrence matrix.

Definition at line 115 of file token.cpp.

References PhraseHunter::Token::inDoc(), and PhraseHunter::Token::m_occurrences.

void PhraseHunter::MutableToken::addOccurrence ( DocID  docID,
IdxPos  position 
)

Add a position to the occurrence matrix of this Token.

Parameters:
docID The document ID referring to the document of the new occurrence.
position The byte offset, i.e. byte position, of the new occurrence.

Definition at line 122 of file token.cpp.

References PhraseHunter::Token::m_occurrences, and m_totalOccurrences.

Referenced by PhraseHunter::Phrase::getAdjacent().


Member Data Documentation

unsigned int PhraseHunter::MutableToken::m_totalOccurrences [protected]

Definition at line 239 of file token.h.

Referenced by addOccurrence(), boolean_test(), and corpusFrequency().


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