public class Morpheme extends Object
Morpheme can
be altered without changing the underlying data (if any)
Thread Safety: Objects of this class are NOT thread safe and should not be accessed simultaneously by multiple threads.
CAUTION: Morphemes are implemented as lazy proxies onto a
Dictionary, and care should be taken not to access the same
Dictionary from multiple threads. Once any member of a
Morpheme has been read, its link to the Dictionary is broken
and this restriction is relaxed
| Constructor and Description |
|---|
Morpheme()
Creates a blank, modifiable
Morpheme that does not link
to any Dictionary |
Morpheme(Dictionary dictionary,
int partOfSpeechIndex)
Builds a lazy proxy onto a part-of-speech stored in a Dictionary
|
Morpheme(String partOfSpeech,
String conjugationalType,
String conjugationalForm,
String basicForm,
String[] readings,
String[] pronunciations,
String additionalInformation)
Creates a literal
Morpheme that does not link to any
Dictionary |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object object) |
String |
getAdditionalInformation()
Gets the additional information string
|
String |
getBasicForm()
Gets the unconjugated form of the morpheme
|
String |
getConjugationalForm()
Gets the conjugation form of the morpheme
|
String |
getConjugationalType()
Gets the conjugation type of the morpheme
|
String |
getPartOfSpeech()
Gets the part-of-speech in Chasen format
|
List<String> |
getPronunciations()
Gets the pronunciations of the morpheme
|
List<String> |
getReadings()
Gets the readings of the morpheme
|
void |
setAdditionalInformation(String additionalInformation)
Sets an arbitrary string of additional information
|
String |
toString() |
public Morpheme(Dictionary dictionary, int partOfSpeechIndex)
dictionary - The dicationary to proxy uponpartOfSpeechIndex - The index into the part-of-speech filepublic Morpheme(String partOfSpeech, String conjugationalType, String conjugationalForm, String basicForm, String[] readings, String[] pronunciations, String additionalInformation)
Morpheme that does not link to any
DictionarypartOfSpeech - The Chasen-format part-of-speechconjugationalType - The conjugational typeconjugationalForm - The conjugational formbasicForm - The unconjugated formreadings - The readingspronunciations - The pronunciationsadditionalInformation - Arbitrary additional informationpublic Morpheme()
Morpheme that does not link
to any Dictionarypublic String getConjugationalType()
public String getConjugationalForm()
public String getBasicForm()
public List<String> getReadings()
public List<String> getPronunciations()
public String getPartOfSpeech()
public String getAdditionalInformation()
public void setAdditionalInformation(String additionalInformation)
additionalInformation - The additional information to set