uk.ac.shef.dcs.oak.jate.util.counter
Class WordCounter

java.lang.Object
  extended by uk.ac.shef.dcs.oak.jate.util.counter.WordCounter

public class WordCounter
extends java.lang.Object

Count number of words in corpus/document/text.


Constructor Summary
WordCounter()
           
 
Method Summary
 int countWords(CorpusImpl c)
          Count number of words in a corpus, delimited by a space character
 int countWords(Document d)
          Count number of words in a document, delimited by a space character
static void main(java.lang.String[] args)
          Main testing method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WordCounter

public WordCounter()
Method Detail

countWords

public int countWords(CorpusImpl c)
Count number of words in a corpus, delimited by a space character

Parameters:
c -
Returns:

countWords

public int countWords(Document d)
Count number of words in a document, delimited by a space character

Parameters:
d -
Returns:

main

public static void main(java.lang.String[] args)
Main testing method.

Parameters:
args - args[0] is the path to directory containing files