up
Class PreterminalRule

java.lang.Object
  extended by up.Rule
      extended by up.PreterminalRule

public class PreterminalRule
extends Rule

A preterminal rule. This is a rule of the form A → word.


Constructor Summary
PreterminalRule(int lhs, int rhs)
          Constructs a new preterminal rule.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Tests whether this rule is equal to the specified object.
 int getLHS()
          Returns the left-hand side of this rule.
 int getRHS()
          Returns the right-hand side of this rule.
 int hashCode()
          Returns the hash code of this rule.
 
Methods inherited from class up.Rule
getScore, setScore
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PreterminalRule

public PreterminalRule(int lhs,
                       int rhs)
Constructs a new preterminal rule.

Parameters:
lhs - the left-hand side (POS tag) of the new rule
rhs - the right-hand side (word token) of the new rule
Method Detail

getLHS

public int getLHS()
Returns the left-hand side of this rule.

Specified by:
getLHS in class Rule
Returns:
the left-hand side (POS tag) of this rule

getRHS

public int getRHS()
Returns the right-hand side of this rule.

Returns:
the right-hand side (word token) of this rule

equals

public boolean equals(java.lang.Object obj)
Tests whether this rule is equal to the specified object.

Overrides:
equals in class java.lang.Object
Parameters:
obj - the object to compare with
Returns:
true iff this rule is equal to the specified object

hashCode

public int hashCode()
Returns the hash code of this rule.

Overrides:
hashCode in class java.lang.Object
Returns:
the hash code of this rule