edu.stanford.nlp.trees
Class TreeFunctions

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

public class TreeFunctions
extends java.lang.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

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(java.lang.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
 

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(java.lang.String[] args)
This method just tests the functionality of the included transformers.



Stanford NLP Group