|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.washington.cs.knowitall.rule.constraint.Constraint
edu.washington.cs.knowitall.rule.constraint.CaptureConstraint
edu.washington.cs.knowitall.rule.constraint.PartConstraint
public class PartConstraint
While not strictly a constraint because the condition is always true, this constraint captures the specified extraction part. Thus it is useful as an argument constraint.
| Field Summary |
|---|
| Fields inherited from class edu.washington.cs.knowitall.rule.constraint.Constraint |
|---|
part |
| Constructor Summary | |
|---|---|
PartConstraint(org.jdom.Element e)
|
|
PartConstraint(ExtractionPart part)
|
|
| Method Summary | |
|---|---|
protected Boolean |
check(TokenSequence extraction)
|
boolean |
equals(Object other)
Force subclasses to avoid pointer-based comparison. |
List<Constraint> |
generalize()
Creates a list of constraints with constraint size reduced by exactly one. |
int |
hashCode()
Force subclasses to avoid pointer-based comparison. |
int |
size()
The size of a constraint is the count of subconstraints. |
String |
toString()
Provides a base constraint representation. |
org.jdom.Element |
toXmlElement()
|
protected String |
value(TokenSequence extraction)
|
| Methods inherited from class edu.washington.cs.knowitall.rule.constraint.CaptureConstraint |
|---|
value |
| Methods inherited from class edu.washington.cs.knowitall.rule.constraint.Constraint |
|---|
check, create, create, create, fromXmlElement, getConstraintClass, simplify, subsumes, toString, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public PartConstraint(org.jdom.Element e)
public PartConstraint(ExtractionPart part)
| Method Detail |
|---|
public String toString()
Constraint
toString in class Constraintpublic boolean equals(Object other)
Constraint
equals in class Constraintpublic int hashCode()
Constraint
hashCode in class Constraintprotected Boolean check(TokenSequence extraction)
check in class Constraintprotected String value(TokenSequence extraction)
value in class CaptureConstraintpublic org.jdom.Element toXmlElement()
toXmlElement in class Constraintpublic List<Constraint> generalize()
Constraint
generalize in class Constraintpublic int size()
ConstraintTermConstraint
for example has a size equal to the number of restrictions it has.
size in class Constraint
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||