vn
Class Cyc.Match

java.lang.Object
  extended by vn.Cyc.Match
Enclosing class:
Cyc

private static class Cyc.Match
extends Object

This class represents a match between a VerbNet verb-frame pair and a Cyc rule. This match could either be a match specified by the manual mapping file ( <tuple> or <tuple-m> elements) or a match found by the automatic matching algorithm. Here is an example match from the manual mapping file:

 VerbNet Class: banish-10.2
    Member: extradite
    Frame: Basic Transitive
       Example: "The king banished the general."
       Syntax: %Agent V %Theme
       Semantics: cause(Agent, E) location(start(E), Theme, ?Source)
                  location(end(E), Theme, ?Destination)
 RULE #388
 [Def](verbSemTrans Extradite-TheWord 0 TransitiveNPFrame
          (and
             (isa :ACTION Extradition)
             (performedBy :ACTION :SUBJECT)
             (transferredObject :ACTION :OBJECT)))

See Also:
Cyc.loadManualFile(), Cyc.findCycMatches(String, String, String, int, String)

Field Summary
(package private)  String cycRuleNum
          The number of the Cyc rule involved in this match.
(package private)  String frame
          A string representation of the VerbNet frame involved in the verb-frame pair.
(package private)  boolean isCorrectMatch
          Whether or not a manual mapping match or an automatic match has a an equal match in the opposite group.
(package private)  boolean isManualClass
          Whether or not the VerbNet class for this match is covered in the manual mapping file.
(package private)  boolean maybe
          Whether or not this match object, if representing a manual mapping match, was listed as a maybe match (via the <tuple-m> element) inside the manual mapping file.
(package private)  String verb
          The verb of this match.
(package private)  String vnClass
          The VerbNet class to which the verb-frame pair in this match belongs.
 
Constructor Summary
Cyc.Match()
          Constructs a Cyc.Match object.
 
Method Summary
(package private)  boolean equals(Cyc.Match m)
          Returns whether or not two matches represent a match between the same verb-frame pair and Cyc rule.
 String toString()
          Returns a string representation of this Cyc.Match object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

verb

String verb
The verb of this match. This will be the same for the VerbNet verb-frame pair and the Cyc match because no Cyc.Match object is created without the naive constraint at least being applied to a possible match.

See Also:
Cyc.loadManualFile(), Cyc.findCycMatches(String, String, String, int, String)

vnClass

String vnClass
The VerbNet class to which the verb-frame pair in this match belongs.

See Also:
Cyc.loadManualFile(), Cyc.findCycMatches(String, String, String, int, String)

isManualClass

boolean isManualClass
Whether or not the VerbNet class for this match is covered in the manual mapping file.

See Also:
Cyc.loadManualFile(), Cyc.findCycMatches(String, String, String, int, String), Cyc.compareMatches()

cycRuleNum

String cycRuleNum
The number of the Cyc rule involved in this match. This is assigned by the Cyc.addRuleNumbersAndCompress() method and is assigned in the order that the rules are found in the file.

See Also:
Cyc.loadManualFile(), Cyc.findCycMatches(String, String, String, int, String)

frame

String frame
A string representation of the VerbNet frame involved in the verb-frame pair. This is a conglomeration of the frame ID and the frame description.

See Also:
Cyc.loadManualFile(), Cyc.findCycMatches(String, String, String, int, String)

isCorrectMatch

boolean isCorrectMatch
Whether or not a manual mapping match or an automatic match has a an equal match in the opposite group. When the automatic matching algorithm makes a match that was included in the manual mapping file, both the Cyc.Match object in the manual group (Cyc.MM) and the Cyc.Match object in the automatic group (Cyc.AM) have this instance variable set to true. Use solely by the Cyc.compareMatches() method when calculating the final results.

See Also:
Cyc.compareMatches()

maybe

boolean maybe
Whether or not this match object, if representing a manual mapping match, was listed as a maybe match (via the <tuple-m> element) inside the manual mapping file. This instance variable is unused for those matches found during the automatic matching algorithm.

See Also:
Cyc.loadManualFile(), toString()
Constructor Detail

Cyc.Match

Cyc.Match()
Constructs a Cyc.Match object.

See Also:
Cyc.loadManualFile(), Cyc.findCycMatches(String, String, String, int, String)
Method Detail

toString

public String toString()
Returns a string representation of this Cyc.Match object. All instance variables except isManualClass are included in the representation. If this method is being called it is being called on a match that is in Cyc.MM (a manual mapping class match). The maybe instance variable is only included if it is true and manifests itself as the string (maybe) appended to the normal representation.

Overrides:
toString in class Object
Returns:
the string representation of the match
See Also:
Cyc.compareMatches()

equals

boolean equals(Cyc.Match m)
Returns whether or not two matches represent a match between the same verb-frame pair and Cyc rule. In other words, if both matches have the same VerbNet class, verb, and VerbNet frame ID, they represent the same VerbNet verb-frame pair. If they both have the same Cyc rule number, they represent the same Cyc rule. The two are equal if they both represent the same verb-frame pair and the same Cyc rule.

Parameters:
m - the other Cyc.Match object to which this object should be compared
Returns:
whether or not this match is the same as the match given
See Also:
Cyc.compareMatches()