edu.stanford.nlp.tagger.maxent
Class CountWrapper
java.lang.Object
edu.stanford.nlp.tagger.maxent.CountWrapper
public class CountWrapper
- extends Object
A simple data structure for some tag counts.
- Author:
- Kristina Toutanova
CountWrapper
public CountWrapper()
CountWrapper
public CountWrapper(String word,
int countPart,
int countThat,
int countIn,
int countRB)
incPart
public void incPart()
incPart
public void incPart(String wordPart)
incThat
public void incThat()
incIn
public void incIn(String wordPart)
incRB
public void incRB(String wordPart)
getCountPart
public int getCountPart()
getCountPart
public int getCountPart(String partWord)
getCountThat
public int getCountThat()
getCountIn
public int getCountIn()
getCountIn
public int getCountIn(String wordPart)
getCountRB
public int getCountRB()
getCountRB
public int getCountRB(String wordPart)
print
public void print()
getWord
public String getWord()
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
equals
public boolean equals(Object obj)
- Equality is tested only on the word, and not the various counts
that are maintained.
- Overrides:
equals
in class Object
- Parameters:
obj
- Item tested for equality
- Returns:
- Whether equal
save
public void save(OutDataStreamFile rf)
read
public void read(InDataStreamFile rf)
Stanford NLP Group