edu.stanford.nlp.trees
Class CoordinationTransformer

java.lang.Object
  extended by edu.stanford.nlp.trees.CoordinationTransformer
All Implemented Interfaces:
TreeTransformer

public class CoordinationTransformer
extends java.lang.Object
implements TreeTransformer

Coordination transformer transforms a PennTreebank tree containing a coordination in a flat structure in order to get the dependencies right.

Author:
Marie-Catherine de Marneffe

Constructor Summary
CoordinationTransformer()
           
 
Method Summary
static Tree CCtransform(Tree t)
          Transforms t if it contains a coordination in a flat structure
static void main(java.lang.String[] args)
           
 Tree transformTree(Tree t)
          Transforms t if it contains a coordination in a flat structure (CCtransform) and transforms UCP (UCPtransform).
static Tree UCPtransform(Tree t)
          Transforms t if it contains an UCP, it will change the UCP tag into the phrasal tag of the first word of the UCP (UCP (JJ electronic) (, ,) (NN computer) (CC and) (NN building)) will become (ADJP (JJ electronic) (, ,) (NN computer) (CC and) (NN building))
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CoordinationTransformer

public CoordinationTransformer()
Method Detail

transformTree

public Tree transformTree(Tree t)
Transforms t if it contains a coordination in a flat structure (CCtransform) and transforms UCP (UCPtransform).

Specified by:
transformTree in interface TreeTransformer
Parameters:
t - a tree to be transformed
Returns:
t transformed

UCPtransform

public static Tree UCPtransform(Tree t)
Transforms t if it contains an UCP, it will change the UCP tag into the phrasal tag of the first word of the UCP (UCP (JJ electronic) (, ,) (NN computer) (CC and) (NN building)) will become (ADJP (JJ electronic) (, ,) (NN computer) (CC and) (NN building))

Parameters:
t - a tree to be transformed
Returns:
t transformed

CCtransform

public static Tree CCtransform(Tree t)
Transforms t if it contains a coordination in a flat structure

Parameters:
t - a tree to be transformed
Returns:
t transformed (give t not null, return will not be null)

main

public static void main(java.lang.String[] args)


Stanford NLP Group