All Downloads are FREE. Search and download functionalities are using the official Maven repository.

edu.stanford.nlp.parser.shiftreduce.Transition Maven / Gradle / Ivy

Go to download

Stanford Parser processes raw text in English, Chinese, German, Arabic, and French, and extracts constituency parse trees.

There is a newer version: 3.9.2
Show newest version
package edu.stanford.nlp.parser.shiftreduce;

import java.io.Serializable;
import java.util.List;

import edu.stanford.nlp.parser.common.ParserConstraint;

/**
 * An interface which defines a transition type in the shift-reduce
 * parser.  Expected transition types are shift, unary, binary,
 * finalize, and idle.  
 * 
* There is also a compound unary transition for combining multiple * unary transitions into one, which lets us prevent the parser from * creating arbitrary unary transition sequences. */ public interface Transition extends Serializable { /** * Whether or not it is legal to apply this transition to this state. */ public boolean isLegal(State state, List constraints); /** * Applies this transition to get a new state. */ public State apply(State state); /** * Applies this transition to get a new state. */ public State apply(State state, double scoreDelta); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy