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.


Field Summary
 Label label
           
 List pattern
           
 double score
           
 
Constructor Summary
SimpleRule(Label label, List pattern)
           
SimpleRule(Label label, List pattern, double score)
           
 
Method Summary
 boolean equals(Object o)
           
 Collection getFirstItems()
           
 int hashCode()
           
 Label label()
           
 Object pattern()
           
 double score()
          Return the score of this thing
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

label

public Label label

pattern

public List pattern

score

public double score
Constructor Detail

SimpleRule

public SimpleRule(Label label,
                  List pattern)

SimpleRule

public SimpleRule(Label label,
                  List pattern,
                  double score)
Method Detail

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