edu.washington.cs.knowitall.rule.constraint
Class PatternConstraint
java.lang.Object
edu.washington.cs.knowitall.rule.constraint.Constraint
edu.washington.cs.knowitall.rule.constraint.CaptureConstraint
edu.washington.cs.knowitall.rule.constraint.AbstractPatternConstraint
edu.washington.cs.knowitall.rule.constraint.PatternConstraint
- Direct Known Subclasses:
- SequenceConstraint
public class PatternConstraint
- extends AbstractPatternConstraint
Constrains based on the supplied token-based pattern.
- Author:
- schmmd
| Fields inherited from class edu.washington.cs.knowitall.rule.constraint.Constraint |
part |
|
Method Summary |
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 |
size()
The size of a constraint is the count of subconstraints. |
org.jdom.Element |
toXmlElement()
|
| Methods inherited from class edu.washington.cs.knowitall.rule.constraint.Constraint |
check, create, create, create, fromXmlElement, getConstraintClass, hashCode, simplify, subsumes, toString, toString, toString |
PatternConstraint
public PatternConstraint(org.jdom.Element e)
PatternConstraint
protected PatternConstraint(org.jdom.Element e,
ExtractionPart part)
PatternConstraint
public PatternConstraint(ExtractionPart part,
String pattern)
equals
public boolean equals(Object other)
- Description copied from class:
Constraint
- Force subclasses to avoid pointer-based comparison.
- Overrides:
equals in class AbstractPatternConstraint
toXmlElement
public org.jdom.Element toXmlElement()
- Overrides:
toXmlElement in class Constraint
generalize
public List<Constraint> generalize()
- Description copied from class:
Constraint
- Creates a list of constraints with constraint size reduced by exactly
one.
- Specified by:
generalize in class Constraint
- Returns:
size
public int size()
- Description copied from class:
Constraint
- The size of a constraint is the count of subconstraints. Most
constraints will have a size of one. However
TermConstraint
for example has a size equal to the number of restrictions it has.
- Specified by:
size in class Constraint
- Returns:
Copyright © 2011 University of Washington CSE. All Rights Reserved.