public class TransformingTreebank extends Treebank
apply() or
iterator().
Important note: This class will only function properly if the TreeTransformer used is a function (which doesn't change its argument) rather than if it is a TreeMunger.
DEFAULT_TREE_FILE_SUFFIX| Constructor and Description |
|---|
TransformingTreebank()
Create a new TransformingTreebank.
|
TransformingTreebank(Treebank tb,
TreeTransformer transformer)
Create a new TransformingTreebank from a base Treebank that will
transform trees with the given TreeTransformer.
|
TransformingTreebank(TreeReaderFactory trf)
Create a new TransformingTreebank.
|
| Modifier and Type | Method and Description |
|---|---|
void |
apply(TreeVisitor tv)
Applies the TreeVisitor to to all trees in the Treebank.
|
void |
clear()
Empty a
Treebank. |
java.util.Iterator<Tree> |
iterator() |
void |
loadPath(java.io.File path,
java.io.FileFilter filt)
Load trees from given path specification.
|
static void |
main(java.lang.String[] args)
Loads treebank grammar from first argument and prints it.
|
decimate, encoding, loadPath, loadPath, loadPath, loadPath, loadPath, remove, size, textualSummary, textualSummary, toString, transform, treeReaderFactoryadd, addAll, contains, containsAll, isEmpty, removeAll, retainAll, toArray, toArrayclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic TransformingTreebank()
LabeledScoredTreeReaderFactory.
Compatibility note: Until Sep 2004, this used to create a Treebank
with a SimpleTreeReaderFactory, but this was changed as the old
default wasn't very useful, especially to naive users.public TransformingTreebank(TreeReaderFactory trf)
trf - the factory class to be called to create a new
TreeReaderpublic TransformingTreebank(Treebank tb, TreeTransformer transformer)
tb - The base Treebanktransformer - The TreeTransformer applied to each Tree.public void clear()
Treebank.public void loadPath(java.io.File path,
java.io.FileFilter filt)
public void apply(TreeVisitor tv)
public java.util.Iterator<Tree> iterator()
public static void main(java.lang.String[] args)
usage: java MemoryTreebank treebankFilesPathargs - array of command-line arguments