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

edu.stanford.nlp.ling.tokensregex.types.Expression 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.ling.tokensregex.types;

import edu.stanford.nlp.ling.tokensregex.Env;

/**
* This interface represents an expression that can be evaluated to obtain a value.
*
* @author Angel Chang
*/
public interface Expression {

  /**
   * Returns tags associated with this expression.
   *
   * @return Tags associated with this expression
   */
  Tags getTags();

  /**
   * Set the tags associated with this expression.
   *
   * @param tags Tags to associate with this expression
   */
  void setTags(Tags tags);

  /**
   * Returns a string indicating the type of this expression.
   *
   * @return type of this expressions
   */
  String getType();

  /**
   * Simplifies the expression using the specified environment.
   *
   * @param env Environment to simplify with respect to
   * @return Simplified expressions
   */
  Expression simplify(Env env);

  /**
   * Evaluates the expression using the specified environment and
   *   arguments.  Arguments are additional context not provided
   *   by the environment.
   *
   * @param env Environment
   * @param args Arguments
   * @return Evaluated value
   */
  Value evaluate(Env env, Object... args);

  /**
   * Returns whether the expression has already been evaluated to
   *   a Value
   *
   * @return true if the expression is already evaluated
   */
  boolean hasValue();

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy