Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## edu.stanford.nlp.trees
Class TreeFunctions

    java.lang.Object
      edu.stanford.nlp.trees.TreeFunctions

    public class TreeFunctions

extends Object

This is a utility class which vends tree transformers to translate trees from one factory type to trees of another. For example, StringLabel trees need to be made into CategoryWordTag trees before they can be head-percolated. Enter LabeledTreeToCategoryWordTagTreeFunction.

Since:
  1.0
Author:
  Dan Klein

Constructor Summary
`TreeFunctions()`

Method Summary
`static Function<Tree,Tree>` | `getLabeledTreeToCategoryWordTagTreeFunction()` Return a Function that maps from StringLabel labeled trees to LabeledScoredTrees with a CategoryWordTag label.
`static Function<Tree,Tree>` | `getLabeledTreeToStringLabeledTreeFunction()` Return an Function that maps from Label-labeled trees (any implementing class) to LabeledScored trees with a StringLabel label.
`static void` | `main(String[] args)` This method just tests the functionality of the included transformers.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### TreeFunctions

    public TreeFunctions()

Method Detail

### getLabeledTreeToStringLabeledTreeFunction

    public static Function<Tree,Tree> getLabeledTreeToStringLabeledTreeFunction()

  Return an Function that maps from Label-labeled trees (any implementing class) to LabeledScored trees with a StringLabel label.

  Returns:
    The Function object

### getLabeledTreeToCategoryWordTagTreeFunction

    public static Function<Tree,Tree> getLabeledTreeToCategoryWordTagTreeFunction()

  Return a Function that maps from StringLabel labeled trees to LabeledScoredTrees with a CategoryWordTag label.

  Returns:
    The Function object

### main

    public static void main(String[] args)

  This method just tests the functionality of the included transformers.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Stanford NLP Group