public class BinaryTransition extends Object implements Transition
Modifier and Type | Class and Description |
---|---|
static class |
BinaryTransition.Side |
Modifier and Type | Field and Description |
---|---|
String |
label |
BinaryTransition.Side |
side
Which side the head is on
|
Constructor and Description |
---|
BinaryTransition(String label,
BinaryTransition.Side side) |
Modifier and Type | Method and Description |
---|---|
State |
apply(State state)
Add a binary node to the existing node on top of the stack
|
State |
apply(State state,
double scoreDelta)
Add a binary node to the existing node on top of the stack
|
boolean |
equals(Object o) |
int |
hashCode() |
boolean |
isBinarized() |
boolean |
isLegal(State state,
List<ParserConstraint> constraints)
Legal as long as there are at least two items on the state's stack.
|
String |
toString() |
public final String label
public final BinaryTransition.Side side
public BinaryTransition(String label, BinaryTransition.Side side)
public boolean isLegal(State state, List<ParserConstraint> constraints)
isLegal
in interface Transition
public boolean isBinarized()
public State apply(State state)
apply
in interface Transition
public State apply(State state, double scoreDelta)
apply
in interface Transition