edu.stanford.nlp.trees
Class QPTreeTransformer

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

public class QPTreeTransformer
extends java.lang.Object
implements TreeTransformer

Transforms an English structure parse tree in order to get the dependencies right: Adds an extra structure in QP phrases:
(QP (RB well) (IN over) (CD 9)) becomes
(QP (XS (RB well) (IN over)) (CD 9))
(QP (...) (CC ...) (...)) becomes
(QP (NP ...) (CC ...) (NP ...))

Author:
mcdm

Constructor Summary
QPTreeTransformer()
           
 
Method Summary
static void main(java.lang.String[] args)
           
static Tree QPtransform(Tree t)
          Transforms t if it contains one of the following QP structure: QP (RB IN CD|DT ...) well over, more than QP (JJR IN CD|DT ...) fewer than QP (IN JJS CD|DT ...) at least QP (...
 Tree transformTree(Tree t)
          Right now (Jan 2013) we only deal with the following QP structures: QP (RB IN CD|DT ...) well over, more than QP (JJR IN CD|DT ...) fewer than QP (IN JJS CD|DT ...) at least QP (...
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QPTreeTransformer

public QPTreeTransformer()
Method Detail

transformTree

public Tree transformTree(Tree t)
Right now (Jan 2013) we only deal with the following QP structures: QP (RB IN CD|DT ...) well over, more than QP (JJR IN CD|DT ...) fewer than QP (IN JJS CD|DT ...) at least QP (... CC ...) between 5 and 10

Specified by:
transformTree in interface TreeTransformer
Parameters:
t - tree to be transformed
Returns:
t with an extra layer if there was a QP structure matching the ones mentioned above

QPtransform

public static Tree QPtransform(Tree t)
Transforms t if it contains one of the following QP structure: QP (RB IN CD|DT ...) well over, more than QP (JJR IN CD|DT ...) fewer than QP (IN JJS CD|DT ...) at least QP (... CC ...) between 5 and 10

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

main

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


Stanford NLP Group