public class AdvPhraseSpec extends PhraseElement
This class defines a adverbial phrase. It is essentially
a wrapper around the PhraseElement class, with methods
for setting common constituents such as preModifier.
For example, the setAdverb method in this class sets
the head of the element to be the specified adverb
From an API perspective, this class is a simplified version of the AdvPhraseSpec
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: AdvPhraseSpec do not usually have (user-set) features
AdvPhraseSpec are produced by the createAdverbPhrase
method of a PhraseFactory
features| Constructor and Description |
|---|
AdvPhraseSpec(NLGFactory phraseFactory) |
| Modifier and Type | Method and Description |
|---|---|
NLGElement |
getAdverb() |
void |
setAdverb(Object adverb)
sets the adverb (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 AdvPhraseSpec(NLGFactory phraseFactory)
public void setAdverb(Object adverb)
public NLGElement getAdverb()
Copyright © 2020. All Rights Reserved.