edu.stanford.nlp.parser.lexparser
Class Hook

java.lang.Object
  extended by edu.stanford.nlp.parser.lexparser.Hook
All Implemented Interfaces:
Scored

public class Hook
extends java.lang.Object

Class for parse table hooks. A "hook" is the parse item that Eisner and Satta introduced to reduce the complexity of lexicalized parsing to O(n^4).

Author:
Dan Klein

Field Summary
 Edge backEdge
           
 int end
           
 int head
           
 double iScore
           
 double oScore
           
 int start
           
 int state
           
 int subState
           
 int tag
           
 
Constructor Summary
Hook()
           
 
Method Summary
 boolean equals(java.lang.Object o)
          Hooks are equal if they have same state, substate, head, tag, start, and end.
 int hashCode()
           
 boolean isEdge()
           
 boolean isPostHook()
           
 boolean isPreHook()
           
 double score()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

subState

public int subState

start

public int start

end

public int end

state

public int state

head

public int head

tag

public int tag

backEdge

public Edge backEdge

iScore

public double iScore

oScore

public double oScore
Constructor Detail

Hook

public Hook()
Method Detail

isPreHook

public boolean isPreHook()

isPostHook

public boolean isPostHook()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Hooks are equal if they have same state, substate, head, tag, start, and end.

Overrides:
equals in class java.lang.Object

score

public double score()
Specified by:
score in interface Scored
Returns:
The score of this thing.

isEdge

public boolean isEdge()


Stanford NLP Group