Statistics of a given term. More...
#include <Word.h>
  
 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.  | |
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.
 1.6.1