|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectvn.Matcher
public class Matcher
This class contains all the match constraints materalized into code.
All methods besides those for the null constraint and the naive constraint
accept a VerbNet syntax string and a Cyc verbSemTrans
rule as their
arugments. These methods don't need to know what the verb is
because it is assumed when they are called, the naive constraint
has already been applied, and the VerbNet syntax and Cyc rule arguments are for
the same verb. The naive constraint will always be applied first.
If the naive constraint for a VN syntax-Cyc rule pair fails (i.e.
the syntax was for verb 'jump' and Cyc rule was for verb 'jest')
then there is no match and no further constrains are applied.
Each method returns a boolean value. If a constraint method returns
false
, that method has determined that the VerbNet syntax and the
Cyc rule are incompatible and there is no match. However, if a constraint method
returns true
, it is not saying that there exists a good match,
but rather that there is no reason to discard the match as far as it
is concerned. There could exist other constraint methods that
find cause to discard it.
The word match means that a congruence was found between a
VerbNet verb-frame pair and a Cyc rule. The defend-85
VerbNet class has 4 members and 4 frames (as of VN Version 2.1). Therefore,
there are 16 verb-frame pairs for this class. Each verb-frame pair has the
possibility of matching with one or more Cyc verbSemTrans
rules.
Each Cyc rule is basically a syntactic frame for a single verb. A
possible match is any such (verb-frame pair, Cyc rule) combination.
The constraints applied by VxC (as specified by -A operator) determine if
there exists an actual match.
The methods bad_DBPBimpliesCause(String, String, String)
and
bad_agentImpliesDBPB(String, String)
are only included in this Javadoc
for historical and informational purposes. They represent constraints that
had poor performance on the VerbNet-Cyc mapping. They are not available
for use when executing the VxC application (i.e. they are not invoked
when the -Aa option is provided).
Finally, usually the implementation of these methods can be understood
by examining the syntax of the VerbNet syntax statement and the
tokens that are generally used in Cyc rules. Use the key option (-k)
to learn more about VerbNet syntax:
java vn.Inspector -kAlso, one can get a good feel for VerbNet syntax by just looking at lots of examples. If you download the original Inspector (instead of trying to use VxC as a VerbNet viewer) you can quickly pull all the VerbNet syntax strings:
java vn.Inspector xml/ -VxyzYou can use VxC as a VerbNet viewer, you just have to still specify all the mandatory operators (-C, -M and -F).
Cyc.findCycMatches(String, String, String, int, String)
Constructor Summary | |
---|---|
private |
Matcher()
This constructor is private because the class is not intended to ever be instantiated. |
Method Summary | |
---|---|
(package private) static boolean |
adjective(String vnSyntax,
String cycRule)
Signals to discard a possible match if the adjectives in both the VerbNet syntax and the Cyc rule do not correspond. |
(package private) static boolean |
bad_agentImpliesDBPB(String vnSyntax,
String cycRule)
Signals to discard a possible match if the VerbNet syntax specifies 'Agent' as the noun phrase that immediately precedes the verb and the Cyc rule does not have the predicates 'doneBy' or 'performedBy' for the subject of the verb. |
(package private) static boolean |
bad_DBPBimpliesCause(String vnSyntax,
String vnSem,
String cycRule)
Signals to discard a possible match if the Cyc rule specifies the predicates 'doneBy' or 'performedBy' for the subject and VerbNet does not have 'cause(Agent' appearing somewhere in the semantics for the verb-frame pair. |
(package private) static boolean |
cycPreposition(String vnSyntax,
String cycRule)
Signals to discard a possible match if the prepositions in both the VerbNet syntax and the Cyc rule do not correspond. |
(package private) static boolean |
DBPBimpliesAgent(String vnSyntax,
String cycRule)
Signals to discard a possible match if the Cyc rule specifies the predicates 'doneBy' or 'performedBy' for the subject and VerbNet does not have 'Agent' for the noun phrase immediately preceding the Verb. |
private static void |
eprint(String s)
Used as shorthand for System.err.print . |
private static void |
eprintln(String s)
Used as shorthand for System.err.println . |
(package private) static boolean |
fromLocationImpliesSource(String vnSyntax,
String cycRule)
Signals to discard a possible match if the Cyc rule specifies the predicate 'fromLocation' for the direct object and VerbNet does not have 'Source' for the noun phrase immediately following the Verb. |
(package private) static boolean |
infinitiveGerund(String vnSyntax,
String cycRule)
Signals to discard a possible match if the infinitive or gerund nature in both the VerbNet syntax and the Cyc rule do not correspond. |
(package private) static boolean |
middleVoiceNoAgent(String vnSyntax,
String cycRule)
Signals to discard a possible match if the Cyc rule is of type MiddleVoiceFrame and VerbNet specifies 'Agent' for the noun
phrase immediately preceding the verb. |
(package private) static boolean |
naive(String vnVerb,
String cycVerb)
Signals to discard a possible match between a VN frame's syntax and a Cyc rule if the verbs (lemmas) are unequal. |
(package private) static boolean |
nullMatch()
Always returns false . |
(package private) static boolean |
transitivity(String vnSyntax,
String cycRule)
Signals to discard a possible match if the transitivity in both the VerbNet syntax and the Cyc rule do not correspond. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
private Matcher()
Method Detail |
---|
private static void eprintln(String s)
System.err.println
.
s
- the string to printPrintStream.println(String)
private static void eprint(String s)
System.err.print
.
s
- the string to printPrintStream.print(String)
static boolean nullMatch()
false
. It discards every possible match. This method is for
debugging purposes only, but can still be invoked on the
command-line. Its constraint symbol is 0
(zero).
Using this constraint (-A0 on command-line), one should expect to find the following
results produced (assuming there are X total manual mapping matches
and Y naive matches discarded by the manual mapping process):
false
Cyc.findCycMatches(String, String, String, int, String)
static boolean naive(String vnVerb, String cycVerb)
n
.
This is a special constraint because it must always
be applied before the other constraints (besides the null constraint). It makes no sense
to compare the syntax for the verb 'jump' in a verb-frame pair
and a Cyc rule for the verb 'jest'. Using this constraint alone
can also be used for debugging purposes.
Using this constraint (-An on command-line), one should expect to find the following
results produced (assuming there are X total manual mapping matches
and Y naive matches discarded by the manual mapping process):
vnVerb
- the verb from the verb-frame paircycVerb
- the verb from the Cyc rule
true
if the lemma for the verb-frame pair matches the
lemma in the Cyc rule, false
otherwiseCyc.findCycMatches(String, String, String, int, String)
static boolean cycPreposition(String vnSyntax, String cycRule)
p
. If the Cyc rule requires a
specific preposition but the VerbNet frame syntax either does not
specify a verb at all after the verb, or it does specify one or more
prepositions but the prepositions that follow the verb do not include the preposition
in the Cyc rule, then the possible match is invalid. If the Cyc rule
does not require a preposition then true
is returned.
vnSyntax
- the syntax from the verb-frame pair for this possible matchcycRule
- the Cyc rule for this possible match
false
if this possible match does not meet the constraint,
true
if it does meet the constraint or the constraint does not apply to the
given possible matchCyc.findCycMatches(String, String, String, int, String)
,
Cyc.cycHasPreposition(String)
,
Cyc.cycExtractPreposition(String)
,
PrepositionManager.prepInClass(String, String)
static boolean transitivity(String vnSyntax, String cycRule)
t
. One of the
arguments for the verbSemTrans
predicate is a frame type
which describes the transitivity. In the VerbNet syntax, if
there is a % sign following the verb (i.e. a noun phrase) then the frame is assumed to
be transitive.
vnSyntax
- the syntax from the verb-frame pair for this possible matchcycRule
- the Cyc rule for this possible match
false
if this possible match does not meet the constraint,
true
if it does meet the constraint or the constraint does not apply to the
given possible matchCyc.findCycMatches(String, String, String, int, String)
,
Cyc.cycExtractTrans(String)
static boolean infinitiveGerund(String vnSyntax, String cycRule)
i
. This constraint
only operates on cases where either the VerbNet syntax or the Cyc rule
involves an infinitive or gerund (i.e. "He continued painting").
If neither involves an infinitive or gerund, then true
is returned. If one of them involves an infinitive, then the other must as
well. If one of them involves a gerund, then the other must as well.
vnSyntax
- the syntax from the verb-frame pair for this possible matchcycRule
- the Cyc rule for this possible match
false
if this possible match does not meet the constraint,
true
if it does meet the constraint or the constraint does not apply to the
given possible matchCyc.findCycMatches(String, String, String, int, String)
static boolean adjective(String vnSyntax, String cycRule)
j
. The VerbNet syntax and the Cyc rule have to either both
involve an adjective construction or both not involve an adjective construction.
vnSyntax
- the syntax from the verb-frame pair for this possible matchcycRule
- the Cyc rule for this possible match
false
if this possible match does not meet the constraint,
true
if it does meet the constraint or the constraint does not apply to the
given possible matchCyc.findCycMatches(String, String, String, int, String)
static boolean fromLocationImpliesSource(String vnSyntax, String cycRule)
f
.
vnSyntax
- the syntax from the verb-frame pair for this possible matchcycRule
- the Cyc rule for this possible match
false
if this possible match does not meet the constraint,
true
if it does meet the constraint or the constraint does not apply to the
given possible matchCyc.findCycMatches(String, String, String, int, String)
static boolean DBPBimpliesAgent(String vnSyntax, String cycRule)
d
.
vnSyntax
- the syntax from the verb-frame pair for this possible matchcycRule
- the Cyc rule for this possible match
false
if this possible match does not meet the constraint,
true
if it does meet the constraint or the constraint does not apply to the
given possible matchCyc.findCycMatches(String, String, String, int, String)
static boolean middleVoiceNoAgent(String vnSyntax, String cycRule)
MiddleVoiceFrame
and VerbNet specifies 'Agent' for the noun
phrase immediately preceding the verb. With middle voice, there
should not be an 'Agent' as the subject of the verb, only 'Theme', 'Experiencer', etc.
Its constraint symbol is m
.
vnSyntax
- the syntax from the verb-frame pair for this possible matchcycRule
- the Cyc rule for this possible match
false
if this possible match does not meet the constraint,
true
if it does meet the constraint or the constraint does not apply to the
given possible matchCyc.findCycMatches(String, String, String, int, String)
static boolean bad_DBPBimpliesCause(String vnSyntax, String vnSem, String cycRule)
c
. NOTE: Although this method is made visible in
the Javadoc documentation - it is NOT activated. Its constraint symbol
is not valid and it is not included when -Aa is provided. It produced less than
desirable results when applied to the possible matches.
vnSyntax
- the syntax from the verb-frame pair for this possible matchvnSem
- the semantics from the verb-frame pair for this possible match in one continuous string.cycRule
- the Cyc rule for this possible match
false
if this possible match does not meet the constraint,
true
if it does meet the constraint or the constraint does not apply to the
given possible matchCyc.findCycMatches(String, String, String, int, String)
static boolean bad_agentImpliesDBPB(String vnSyntax, String cycRule)
e
. NOTE: Although this method is made visible in
the Javadoc documentation - it is NOT activated. Its constraint symbol
is not valid and it is not included when -Aa is provided. It produced less than
desirable results when applied to the possible matches.
vnSyntax
- the syntax from the verb-frame pair for this possible matchcycRule
- the Cyc rule for this possible match
false
if this possible match does not meet the constraint,
true
if it does meet the constraint or the constraint does not apply to the
given possible matchCyc.findCycMatches(String, String, String, int, String)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |