public class InflectedWordElement extends NLGElement
This class defines the NLGElement that is used to represent an
word that requires inflection by the morphology. It has convenience methods
for retrieving the base form of the word (for example, kiss,
eat) and for setting and retrieving the base word. The base word is
a WordElement constructed by the lexicon.
features| Constructor and Description |
|---|
InflectedWordElement(String word,
LexicalCategory category)
Constructs a new inflected word using the giving word as the base form.
|
InflectedWordElement(WordElement word)
Constructs a new inflected word from a WordElement
|
| Modifier and Type | Method and Description |
|---|---|
String |
getBaseForm()
Retrieves the base form for this element.
|
WordElement |
getBaseWord()
Retrieves the base word for this element.
|
List<NLGElement> |
getChildren()
This method returns null as the inflected word has no child components.
|
String |
printTree(String indent) |
void |
setBaseWord(WordElement word)
Sets the base word for this element.
|
String |
toString() |
clearAllFeatures, equals, equals, getAllFeatureNames, getAllFeatures, getCategory, getFactory, getFeature, getFeatureAsBoolean, getFeatureAsDouble, getFeatureAsElement, getFeatureAsElementList, getFeatureAsFloat, getFeatureAsInteger, getFeatureAsList, getFeatureAsLong, getFeatureAsString, getFeatureAsStringList, getParent, getRealisation, getTense, hasFeature, isA, isNegated, isPlural, removeFeature, setCategory, setFactory, setFeature, setFeature, setFeature, setFeature, setFeature, setFeature, setNegated, setParent, setPlural, setRealisation, setTensepublic InflectedWordElement(String word, LexicalCategory category)
word - the base form for this inflected word.category - the lexical category for the word.public InflectedWordElement(WordElement word)
word - underlying wordelementpublic List<NLGElement> getChildren()
getChildren in class NLGElementList of NLGElements representing the
children of this element.public String toString()
toString in class NLGElementpublic String printTree(String indent)
printTree in class NLGElementpublic String getBaseForm()
String forming the base form of the element.public void setBaseWord(WordElement word)
word - the WordElement representing the base word as
read from the lexicon.public WordElement getBaseWord()
WordElement representing the base word as read
from the lexicon.Copyright © 2020. All Rights Reserved.