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.

Field Summary
private  int docStopWordCount
           
private  int docWordCount
           
private  int maxNumberOfStopWords
           
private  int maxNumberOfWords
           
private  int minNumberOfStopWords
           
private  int minNumberOfWords
           
private  int numberOfDocs
           
private  int totalStopWords
           
private  int totalWords
           
 
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
 

Field Detail

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
Constructor Detail

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.
Method Detail

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.