public class OccurrenceCounter extends Object
Modifier and Type | Field and Description |
---|---|
Hashtable<String,Double> |
counts |
int |
totalTokens |
int |
uniqueTokens |
Constructor and Description |
---|
OccurrenceCounter() |
Modifier and Type | Method and Description |
---|---|
void |
addToken(String s) |
void |
addToken(String s,
double d) |
double |
getCount(String s) |
CharacteristicWords |
getMostFrequentTokens(int numOfTokensToReturn) |
String[] |
getTokens() |
Iterator<String> |
getTokensIterator() |
String |
toString() |
public void addToken(String s)
public void addToken(String s, double d)
public double getCount(String s)
public String[] getTokens()
public CharacteristicWords getMostFrequentTokens(int numOfTokensToReturn)
Copyright © 2017. All rights reserved.