edu.stanford.nlp.util
Class Counter
java.lang.Object
|
+--edu.stanford.nlp.util.Counter
- public class Counter
- extends Object
Counts occurrences of objects. In a floating point sort of a way.
Counter
public Counter()
total
public int total()
- Returns total count for all objects in Counter
hasSeen
public boolean hasSeen(Object o)
seenSet
public Set seenSet()
countOf
public double countOf(Object o)
setCount
public void setCount(Object o,
double d)
add
public void add(Object o)
- Add a count of 1.0 for object.
add
public void add(Object o,
double d)
addCounter
public void addCounter(Counter c)
toString
public String toString()
- Overrides:
toString
in class Object
Stanford NLP Group