Modifier and Type | Field and Description |
---|---|
static Word |
UNKNOWN
The Word representing the unknown word.
|
Constructor and Description |
---|
Word(java.lang.String spelling,
Pronunciation[] pronunciations,
boolean isFiller)
Creates a Word
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Word other) |
boolean |
equals(java.lang.Object obj) |
Pronunciation |
getMostLikelyPronunciation()
Get the highest probability pronunciation for a word
|
Pronunciation[] |
getPronunciations()
Retrieves the pronunciations of this word
|
java.lang.String |
getSpelling()
Returns the spelling of the word.
|
int |
hashCode() |
boolean |
isFiller()
Determines if this is a filler word
|
boolean |
isSentenceEndWord()
Returns true if this word is an end of sentence word
|
boolean |
isSentenceStartWord()
Returns true if this word is a start of sentence word
|
java.lang.String |
toString()
Returns a string representation of this word, which is the spelling
|
public static final Word UNKNOWN
public Word(java.lang.String spelling, Pronunciation[] pronunciations, boolean isFiller)
spelling
- the spelling of this wordpronunciations
- the pronunciations of this wordisFiller
- true if the word is a filler wordpublic java.lang.String getSpelling()
public boolean isFiller()
true
if this word is a filler word, otherwise it
returns false
public boolean isSentenceEndWord()
public boolean isSentenceStartWord()
public Pronunciation[] getPronunciations()
public Pronunciation getMostLikelyPronunciation()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object