Example usage for edu.stanford.nlp.trees Tree isPrePreTerminal

List of usage examples for edu.stanford.nlp.trees Tree isPrePreTerminal

Introduction

In this page you can find the example usage for edu.stanford.nlp.trees Tree isPrePreTerminal.

Prototype

public boolean isPrePreTerminal() 

Source Link

Document

Return whether all the children of this node are preterminals or not.

Usage

From source file:tml.utils.StanfordUtils.java

License:Apache License

public static String getPennTagMinimalPhrase(Tree t) {
    if (t.isLeaf())
        return "LEAF";

    if (t.isPrePreTerminal())
        return t.value();

    return getPennTagMinimalPhrase(t.children()[0]);
}