|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectSpellReader.Word
private final class SpellReader.Word
Keeps track of a single word, either an original or suggested word.
Field Summary | |
---|---|
int |
freq
|
float |
freqBoost
|
String |
metaphone
|
private TRStringDistance2 |
mphDist
|
SpellReader.Word |
orig
|
float |
score
|
String |
word
|
private TRStringDistance2 |
wordDist
|
Constructor Summary | |
---|---|
SpellReader.Word(SpellReader.Word inOrig,
String word,
int freq)
Constructor for suggested replacement words |
|
SpellReader.Word(String word)
Contructor for original words |
Method Summary | |
---|---|
private void |
align(PrintWriter w,
String s,
int width)
|
private float |
calcFreqBoost(int[] termFreqs,
int freq)
Calculate a boost factor based on the frequency of a term. |
void |
debug(PrintWriter w)
Dump debugging output about this word |
boolean |
equals(SpellReader.Word other)
|
int |
length()
|
int |
mphDist(String other)
|
String |
toString()
|
int |
wordDist(String other)
|
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public String word
public SpellReader.Word orig
public int freq
public String metaphone
private TRStringDistance2 wordDist
private TRStringDistance2 mphDist
public float score
public float freqBoost
Constructor Detail |
---|
public SpellReader.Word(String word) throws IOException
IOException
public SpellReader.Word(SpellReader.Word inOrig, String word, int freq) throws IOException
IOException
Method Detail |
---|
public int length()
public boolean equals(SpellReader.Word other)
public int wordDist(String other)
public int mphDist(String other)
public String toString()
toString
in class Object
public void debug(PrintWriter w)
private void align(PrintWriter w, String s, int width)
private float calcFreqBoost(int[] termFreqs, int freq)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |