edu.stanford.nlp.lexgram
Class SimpleRule
java.lang.Object
|
+--edu.stanford.nlp.lexgram.SimpleRule
- All Implemented Interfaces:
- Rule, Scored
- public final class SimpleRule
- extends Object
- implements Rule, Scored
SimpleRule: Class for representing a generic rewrite rule.
label
public Label label
pattern
public List pattern
score
public double score
SimpleRule
public SimpleRule(Label label,
List pattern)
SimpleRule
public SimpleRule(Label label,
List pattern,
double score)
score
public double score()
- Description copied from interface:
Scored
- Return the score of this thing
- Specified by:
score
in interface Rule
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
equals
public boolean equals(Object o)
- Overrides:
equals
in class Object
label
public Label label()
- Specified by:
label
in interface Rule
pattern
public Object pattern()
- Specified by:
pattern
in interface Rule
getFirstItems
public Collection getFirstItems()
- Specified by:
getFirstItems
in interface Rule
toString
public String toString()
- Overrides:
toString
in class Object
Stanford NLP Group