Statistics of a given document. More...
#include <Document.h>
Public Member Functions | |
| Document (char *name, int number) | |
| Initialise class with document name and id.  | |
| Document (FileIO *file) | |
| Initialise class from file.  | |
| void | totalTerms (int terms) | 
| Assign the total number of words in the document.  | |
| void | uniqueTerms (int terms) | 
| Assign the total number of unique words in the document.  | |
| int | totalTerms (void) | 
| Return the total number of words in the document.  | |
| int | uniqueTerms (void) | 
| Return the total number of unique words in the document.  | |
| int | length (void) | 
| Return the total number of unique words in the document.  | |
| float | norm (void) | 
| For cosine normalisation, set to 1 if not changed.  | |
| void | norm (float value) | 
| Assign the document norm length.  | |
| int | number (void) | 
| Return the document id.  | |
| void | assignPosition (FILE_POS_TYPE position) | 
| Assign the file position (if indexed by document).  | |
| FILE_POS_TYPE | filePosition (void) | 
| Return the file position (if indexed by document).  | |
| char * | name (void) | 
| Return the document name.  | |
| void | purge (FileIO *file) | 
| Save the document stats to the given file.  | |
| void | salvage (FileIO *file) | 
| Load the document stats from the given file.  | |
Statistics of a given document.
This class is used to keep track of various statisitics (such as total term count, number of unique terms) of a given document.
 1.6.1