Example usage for edu.stanford.nlp.trees TreeTransformer interface-usage

List of usage examples for edu.stanford.nlp.trees TreeTransformer interface-usage

Introduction

In this page you can find the example usage for edu.stanford.nlp.trees TreeTransformer interface-usage.

Usage

From source file CollapseUnaryTransformer.java

/**
 * This transformer collapses chains of unary nodes so that the top
 * node is the only node left.  The Sentiment model does not handle
 * unary nodes, so this simplifies them to make a binary tree consist
 * entirely of binary nodes and preterminals.  A new tree with new
 * nodes and labels is returned; the original tree is unchanged.