Word Class Reference

Statistics of a given term. More...

#include <Word.h>

Inheritance diagram for Word:
Element

List of all members.

Public Member Functions

 Word (char *word, int wordNumber, int totalCount=0, int documentCount=0, FILE_POS_TYPE filePosition=0, float weight=0)
 Construct a Word using gathered data.
 Word (FileIO *file)
 Construct a Word from previously stored data.
void incrementTotalCount (void)
 Increment the count of the word in the corpus.
void incrementDocumentCount (void)
 Increment the count of the number of documents that contain the word.
int documentCount (void)
 Return the number of documents that contain the word.
int totalCount (void)
 Return the total number of appearances of the word in the corpus.
int length (void)
 Alias for documentCount().
void weight (float)
 Assign the term weight for the word.
float weight (void)
 Return the term weight for the word.
void purge (FileIO *file)
 Store the word in a file.
void salvage (FileIO *file)
 Retrieve the word from a file.
bool operator< (const Word &word) const
 Compare Word inequality according to their document count.
bool operator== (const Word &word) const
 Compare Word equality according to their document count.
void operator= (const Word &word)
 Assign one words statistics to another.

Friends

class ElementList< Word >
 ElementList need access to Words internals to renumber when ordered.

Detailed Description

Statistics of a given term.

This class is used to keep track of various statisitics (such as total count, number of documents appeared in) of a given term.

Author
lapark
Revision
1.7
Date
2009/10/08 06:41:31
Id
Word.h,v 1.7 2009/10/08 06:41:31 lapark Exp

The documentation for this class was generated from the following files:
 All Classes Functions Variables Friends

Generated on Tue Nov 10 14:12:19 2009 for textIR by  doxygen 1.6.1