gov.nist.nlpir.irf.de
Class TextStatistics
java.lang.Object
|
+--gov.nist.nlpir.irf.de.TextStatistics
- public class TextStatistics
- extends java.lang.Object
This class manages statistics about texts, like the number of words in
each text, the number of stopwords, etc.
- Version:
- $Revision: 1.1 $
- Author:
- This software was produced by NIST, an agency of the U.S. government,
and by statute is not subject to copyright in the United States.
Recipients of this software assume all responsibilities associated
with its operation, modification and maintenance.
Constructor Summary |
TextStatistics()
Creates an object with all statistics being 0, excepts maximums
that are positionned to Integer.MAX_VALUE so that their computing will be
easier. |
Method Summary |
void |
newDoc()
This function must be called when a document has been parsed so
that the statistics can be updated. |
void |
newStopWord()
This feature must be called when a new stopword is met in a
document. |
void |
newWord()
This feature must be called when a new word is met in a document. |
void |
present()
This function prints all the statistics about the texts, on an eight
lines display. |
Methods inherited from class java.lang.Object |
,
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
registerNatives,
toString,
wait,
wait,
wait |
totalWords
private int totalWords
totalStopWords
private int totalStopWords
numberOfDocs
private int numberOfDocs
maxNumberOfWords
private int maxNumberOfWords
minNumberOfWords
private int minNumberOfWords
maxNumberOfStopWords
private int maxNumberOfStopWords
minNumberOfStopWords
private int minNumberOfStopWords
docWordCount
private int docWordCount
docStopWordCount
private int docStopWordCount
TextStatistics
public TextStatistics()
- Creates an object with all statistics being 0, excepts maximums
that are positionned to Integer.MAX_VALUE so that their computing will be
easier.
newStopWord
public void newStopWord()
- This feature must be called when a new stopword is met in a
document.
newWord
public void newWord()
- This feature must be called when a new word is met in a document.
newDoc
public void newDoc()
- This function must be called when a document has been parsed so
that the statistics can be updated.
present
public void present()
- This function prints all the statistics about the texts, on an eight
lines display.