public class PhraseSet extends Object
AggregationRules to collect candidate
phrase for elision.| Constructor and Description |
|---|
PhraseSet(DiscourseFunction function,
NLGElement... phrases)
Construct a set of compatible phrases and their function
|
| Modifier and Type | Method and Description |
|---|---|
void |
addPhrase(NLGElement phrase)
Add a phrase
|
void |
addPhrases(Collection<NLGElement> phrases)
Add a collection of phrases.
|
void |
elideLeftmost()
Elide the leftmost consitutents in the phrase list, that is, all phrases
except the rightmost.
|
void |
elideRightmost()
Elide the rightmost constituents in the phrase list, that is, all phrases
except the first.
|
boolean |
formIdentical()
Check whether the phrases in this set are identical in form.
|
DiscourseFunction |
getFunction() |
boolean |
lemmaIdentical()
Check whether the phrases are lemma identical.
|
public PhraseSet(DiscourseFunction function, NLGElement... phrases)
function - their functionphrases - the list of constituent phrases for the function.public void addPhrase(NLGElement phrase)
phrase - the phrase to addpublic void addPhrases(Collection<NLGElement> phrases)
phrases - the phrases to addpublic DiscourseFunction getFunction()
public void elideRightmost()
public void elideLeftmost()
public boolean lemmaIdentical()
true in the following cases:
NLGElements and they
have the same lexical head, irrespective of inflectional variations.true if the pair is lemma identicalpublic boolean formIdentical()
p1 and p1.equals(p2).true if all phrases in the set are form-identicalCopyright © 2020. All Rights Reserved.