public class AdjPhraseSpec extends PhraseElement
This class defines a adjective phrase. It is essentially
a wrapper around the PhraseElement class, with methods
for setting common constituents such as preModifier.
For example, the setAdjective method in this class sets
the head of the element to be the specified adjective
From an API perspective, this class is a simplified version of the AdjPhraseSpec
class in simplenlg V3. It provides an alternative way for creating syntactic
structures, compared to directly manipulating a V4 PhraseElement.
Methods are provided for setting and getting the following constituents:
NOTE: AdjPhraseSpec do not usually have (user-set) features
AdjPhraseSpec are produced by the createAdjectivePhrase
method of a PhraseFactory
features| Constructor and Description |
|---|
AdjPhraseSpec(NLGFactory phraseFactory) |
| Modifier and Type | Method and Description |
|---|---|
NLGElement |
getAdjective() |
void |
setAdjective(Object adjective)
sets the adjective (head) of the phrase
|
addComplement, addComplement, addFrontModifier, addFrontModifier, addModifier, addPostModifier, addPostModifier, addPreModifier, addPreModifier, clearComplements, getChildren, getFrontModifiers, getHead, getPostModifiers, getPreModifiers, printTree, setComplement, setComplement, setDeterminer, setFrontModifier, setFrontModifier, setHead, setPostModifier, setPostModifier, setPreModifier, setPreModifierclearAllFeatures, 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, setTense, toStringpublic AdjPhraseSpec(NLGFactory phraseFactory)
public void setAdjective(Object adjective)
public NLGElement getAdjective()
Copyright © 2020. All Rights Reserved.