edu.stanford.nlp.ie.pcfg
Class LookupRule

java.lang.Object
  |
  +--edu.stanford.nlp.ie.pcfg.LookupRule

public class LookupRule
extends Object

To be used when mapping rules to XRules (XRules = rules + probabilites). The LookupRule contains an entire rule except for its probability. Thus when used as a key in a HashMap it allows users to lookup a rule without knowing the rule's probability. NOTE: This class isn't really necessary. The preferred way to store a XRule in a HashMap is to make a copy of the rule, set the copy's probability to 1, and use the copy's toString as a key.


Field Summary
 XRule rule
           
 
Constructor Summary
LookupRule(XRule rule)
           
 
Method Summary
 boolean equals(Object o)
           
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

rule

public XRule rule
Constructor Detail

LookupRule

public LookupRule(XRule rule)
Method Detail

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Stanford NLP Group