|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.stanford.nlp.trees.TreeFunctions
public class TreeFunctions
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.
Method Summary | |
---|---|
static Function<Tree,Tree> |
getLabeledToDescriptiveCoreLabelTreeFunction()
Returns a function which takes a tree with any label class where the labels might have an interesting description, such as a CategoryWordTag which goes "cat [T/W]", and returns a new tree with CoreLabels which contain the toString() of each of the input labels. |
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 |
Method Detail |
---|
public static Function<Tree,Tree> getLabeledTreeToStringLabeledTreeFunction()
public static Function<Tree,Tree> getLabeledTreeToCategoryWordTagTreeFunction()
public static Function<Tree,Tree> getLabeledToDescriptiveCoreLabelTreeFunction()
public static void main(String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |