public abstract class PhraseChecker extends Object
| Constructor and Description |
|---|
PhraseChecker() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
allActive(NLGElement... sentences)
Check whether all sentences are active
|
static boolean |
allPassive(NLGElement... sentences)
Check whether all sentences are passive
|
static boolean |
expletiveSubjects(NLGElement... sentences)
Check whether these sentences have expletive subjects (there, it etc)
|
static boolean |
haveSameVoice(NLGElement... sentences)
Check that the sentences supplied are either all active or all passive.
|
static List<PhraseSet> |
leftPeriphery(NLGElement... sentences)
Collect a list of pairs of constituents with the same syntactic function
from the left periphery of two sentences.
|
static boolean |
nonePassive(NLGElement... sentences)
Check that no element of a give array of sentences is passive.
|
static List<PhraseSet> |
rightPeriphery(NLGElement... sentences)
Collect a list of pairs of constituents with the same syntactic function
from the right periphery of two sentences.
|
static boolean |
sameFrontMods(NLGElement... sentences)
Check that the sentences supplied have identical front modifiers
|
static boolean |
samePostMods(NLGElement... sentences)
Check that some phrases have the same postmodifiers
|
static boolean |
sameSentences(NLGElement... sentences)
Check that the sentences supplied are identical
|
static boolean |
sameSubjects(NLGElement... sentences)
Check that the sentences supplied have identical subjects
|
static boolean |
sameSurfaceSubjects(NLGElement... sentences)
Check whether the sentences have the same surface subjects, that
is, they are either all active and have the same subjects, or all passive
and have the same passive raising subjects.
|
static boolean |
sameVP(NLGElement... sentences)
Check that the sentences supplied have identical verb phrases
|
static boolean |
sameVPArgs(NLGElement... sentences)
Check that the sentences supplied have the same complements at VP level.
|
static boolean |
sameVPHead(NLGElement... sentences)
Check that a list of sentences have the same verb
|
static boolean |
sameVPModifiers(NLGElement... sentences)
check that the phrases supplied are sentences and have the same VP
premodifiers and postmodifiers
|
public static boolean sameSentences(NLGElement... sentences)
sentences - the sentencestrue if for every pair of sentences s1
and s2, s1.equals(s2).public static boolean expletiveSubjects(NLGElement... sentences)
sentences - the sentencestrue if all the sentences have expletive subjectspublic static boolean sameFrontMods(NLGElement... sentences)
sentences - the sentencestrue if for every pair of sentences s1
and s2,
s1.getFrontModifiers().equals(s2.getFrontModifiers())
.public static boolean samePostMods(NLGElement... sentences)
sentences - the phrasespublic static boolean sameSubjects(NLGElement... sentences)
sentences - the sentencestrue if for every pair of sentences s1
and s2
s1.getSubjects().equals(s2.getSubjects()).public static boolean allPassive(NLGElement... sentences)
sentences - the sentencestrue if for every sentence s,
s.isPassive() == true.public static boolean allActive(NLGElement... sentences)
sentences - the sentencestrue if for every sentence s,
s.isPassive() == false.public static boolean sameSurfaceSubjects(NLGElement... sentences)
sentences - the sentencestrue if the sentences have the same surface subjectspublic static boolean sameVPHead(NLGElement... sentences)
sentences - the sentencestrue if for every pair of sentences s1
and s2
s1.getVerbPhrase().getHead().equals(s2.getVerbPhrase().getHead())public static boolean haveSameVoice(NLGElement... sentences)
sentences - the sentencestrue if the sentences have the same voicepublic static boolean sameVP(NLGElement... sentences)
sentences - the sentencestrue if for every pair of sentences s1
and s2,
s1.getVerbPhrase().equals(s2.getVerbPhrase()).public static boolean sameVPArgs(NLGElement... sentences)
sentences - the sentencestrue if for every pair of sentences s1
and s2, their VPs have the same pre- and
post-modifiers and complements.public static boolean sameVPModifiers(NLGElement... sentences)
sentences - the sentencestrue if all pairs of sentences have VPs with the
same pre and postmodifierspublic static List<PhraseSet> leftPeriphery(NLGElement... sentences)
sentences - the list of sentencespublic static List<PhraseSet> rightPeriphery(NLGElement... sentences)
sentences - the list of sentencespublic static boolean nonePassive(NLGElement... sentences)
sentences - the sentencestrue if none of the sentences is passiveCopyright © 2020. All Rights Reserved.