gov.nist.nlpir.irf.de
Class HtmlAddrCount

java.lang.Object
  |
  +--gov.nist.nlpir.irf.de.HtmlAddrCount

public class HtmlAddrCount
extends java.lang.Object

Internal word counter for DeHtml.

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.
See Also:
DeHtml

Field Summary
(package private)  int paragraphCount
          Number of the current paragraph, starting at 1.
(package private)  int wordCount
          Number of the current word in the current paragraph, starting at 0 but usually newWord() is called before the word number is used, so that the actual start can be considered 1.
 
Constructor Summary
HtmlAddrCount()
          Initializes counters with new HtmlAddrCount Object.
 
Method Summary
 int getParagraphCount()
          Returns the number of the current paragraph
 int getWordCount()
          Returns the number of the current word within the current paragraph
 void newTag(java.lang.String sgmltag)
          Increments paragraph counter and reset word counter if paragraph tag is supplied.
 void newWord()
          Increments word counter.
 void present()
          Writes the current word and paragraph counters' values to standard out
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

wordCount

int wordCount
Number of the current word in the current paragraph, starting at 0 but usually newWord() is called before the word number is used, so that the actual start can be considered 1.

paragraphCount

int paragraphCount
Number of the current paragraph, starting at 1.
Constructor Detail

HtmlAddrCount

public HtmlAddrCount()
Initializes counters with new HtmlAddrCount Object.
Method Detail

newTag

public final void newTag(java.lang.String sgmltag)
Increments paragraph counter and reset word counter if paragraph tag is supplied.
Parameters:
sgmltag - a sgml tag.

newWord

public final void newWord()
Increments word counter.

getWordCount

public final int getWordCount()
Returns the number of the current word within the current paragraph
Returns:
the number of the current word within the current paragraph

getParagraphCount

public final int getParagraphCount()
Returns the number of the current paragraph
Returns:
the number of the current paragraph

present

public void present()
Writes the current word and paragraph counters' values to standard out