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

edu.stanford.nlp.trees.TreeTransformer 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.trees;

/**
 * This is a simple interface for a function that alters a
 * local Tree.
 *
 * @author Christopher Manning.
 */
public interface TreeTransformer {

  /**
   * Does whatever one needs to do to a particular tree.
   * This routine is passed a whole Tree, and could itself
   * work recursively, but the canonical usage is to invoke this method
   * via the Tree.transform() method, which will apply the
   * transformer in a bottom-up manner to each local Tree,
   * and hence the implementation of TreeTransformer should
   * merely examine and change a local (one-level) Tree.
   *
   * @param t  A tree.  Classes implementing this interface can assume
   *           that the tree passed in is not null.
   * @return the transformed Tree
   */
  public Tree transformTree(Tree t); 

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy