private final class SpellReader.Word
extends Object
Modifier and Type | Field and Description |
---|---|
int |
freq |
float |
freqBoost |
String |
metaphone |
private TRStringDistance2 |
mphDist |
SpellReader.Word |
orig |
float |
score |
String |
word |
private TRStringDistance2 |
wordDist |
Constructor and Description |
---|
Word(SpellReader.Word inOrig,
String word,
int freq)
Constructor for suggested replacement words
|
Word(String word)
Contructor for original words
|
Modifier and Type | Method and Description |
---|---|
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) |
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
public Word(String word) throws IOException
IOException
public Word(SpellReader.Word inOrig, String word, int freq) throws IOException
IOException
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)