edu.stanford.nlp.trees
Class CollocationFinder

java.lang.Object
  extended by edu.stanford.nlp.trees.CollocationFinder

public class CollocationFinder
extends Object

Finds WordNet collocations in parse trees.

Author:
Chris Cox

Constructor Summary
CollocationFinder(Tree t, WordNetConnection w)
          Construct a new CollocationFinder over the Tree t.
CollocationFinder(Tree t, WordNetConnection w, HeadFinder hf)
          Construct a new CollocationFinder over the Tree t.
 
Method Summary
 Tree getMangledTree()
          Returns the "collocations included" parse tree.
 void PrintCollocationStrings(PrintWriter pw)
          Prints the collocations found in this Tree as strings.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CollocationFinder

public CollocationFinder(Tree t,
                         WordNetConnection w)
Construct a new CollocationFinder over the Tree t. The default HeadFinder is a CollinsHeadFinder.

Parameters:
t - parse tree
w - wordnet connection

CollocationFinder

public CollocationFinder(Tree t,
                         WordNetConnection w,
                         HeadFinder hf)
Construct a new CollocationFinder over the Tree t.

Parameters:
t - parse tree
w - w
hf - HeadFinder to use
Method Detail

getMangledTree

public Tree getMangledTree()
Returns the "collocations included" parse tree.

Returns:
the mangled tree which applies collocations found in this object.

PrintCollocationStrings

public void PrintCollocationStrings(PrintWriter pw)
Prints the collocations found in this Tree as strings. Each is followed by its boundary constituent indices in the original tree.
Example: throw_up (2,3)
came_up_with (7,9)



Stanford NLP Group