edu.stanford.nlp.parser.lexparser
Class BinaryRule

java.lang.Object
  extended by edu.stanford.nlp.parser.lexparser.Rule
      extended by edu.stanford.nlp.parser.lexparser.BinaryRule
All Implemented Interfaces:
Serializable, Comparable

public class BinaryRule
extends Rule
implements Serializable, Comparable

Binary rules (ints for parent, left and right children)

Author:
Dan Klein
See Also:
Serialized Form

Field Summary
 int leftChild
           
 int rightChild
           
 
Fields inherited from class edu.stanford.nlp.parser.lexparser.Rule
parent, score
 
Constructor Summary
BinaryRule()
           
BinaryRule(int parent, int leftChild, int rightChild, double score)
           
BinaryRule(String s, Numberer n)
          Creates a BinaryRule from String s, assuming it was created using toString().
 
Method Summary
 int compareTo(Object o)
           
 boolean equals(Object o)
           
 int hashCode()
           
 String toString()
           
 
Methods inherited from class edu.stanford.nlp.parser.lexparser.Rule
isUnary, score, scoreComparator
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

leftChild

public int leftChild

rightChild

public int rightChild
Constructor Detail

BinaryRule

public BinaryRule()

BinaryRule

public BinaryRule(String s,
                  Numberer n)
Creates a BinaryRule from String s, assuming it was created using toString().

Parameters:
s -

BinaryRule

public BinaryRule(int parent,
                  int leftChild,
                  int rightChild,
                  double score)
Method Detail

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

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

toString

public String toString()
Overrides:
toString in class Object

compareTo

public int compareTo(Object o)
Specified by:
compareTo in interface Comparable


Stanford NLP Group