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

edu.stanford.nlp.fsm.DFSATransition Maven / Gradle / Ivy

Go to download

Stanford CoreNLP provides a set of natural language analysis tools which can take raw English language text input and give the base forms of words, their parts of speech, whether they are names of companies, people, etc., normalize dates, times, and numeric quantities, mark up the structure of sentences in terms of phrases and word dependencies, and indicate which noun phrases refer to the same entities. It provides the foundational building blocks for higher level text understanding applications.

There is a newer version: 4.5.7
Show newest version
package edu.stanford.nlp.fsm;

import edu.stanford.nlp.util.Scored;

/**
 * DFSATransition represents a transition in a weighted finite state
 * transducer.  For now, just null out fields that may not apply.
 * This should really be FSATransition as there's nothing
 * deterministic-specific.  If FSA is ever made, this should be
 * abstracted.  The ID is a descriptor, not a unique ID.
 *
 * @author Dan Klein
 * @version 12/14/00
 */
public final class DFSATransition implements Scored {

  private Object transitionID;
  private DFSAState source;
  protected DFSAState target; // used directly in DFSAMinimizer (only)
  private double score;
  private T input;
  private Object output;

  public DFSATransition(Object transitionID, DFSAState source, DFSAState target, T input, Object output, double score) {
    this.transitionID = transitionID;
    this.source = source;
    this.target = target;
    this.input = input;
    this.output = output;
    this.score = score;
  }

  public DFSAState getSource() {
    return source;
  }

  public DFSAState source() {
    return source;
  }

  public DFSAState getTarget() {
    return target;
  }

  public DFSAState target() {
    return target;
  }

  public Object getID() {
    return transitionID;
  }

  public double score() {
    return score;
  }

  public T getInput() {
    return input;
  }

  public T input() {
    return input;
  }

  public Object getOutput() {
    return output;
  }

  public Object output() {
    return output;
  }

  @Override
  public String toString() {
    return "[" + transitionID + "]" + source + " -" + input + ":" + output + "-> " + target;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy