public class Annotate extends Object
| Constructor and Description |
|---|
Annotate(Properties properties)
Constructor that takes into account lang options (en|es) loads the
corresponding parse model and decides whether to mark headWords or not.
|
| Modifier and Type | Method and Description |
|---|---|
void |
parseForTesting(File inputText) |
void |
parseToKAF(ixa.kaflib.KAFDocument kaf)
It takes a KAF document calls to getParse() and outputs the parse tree as
KAF constituents elements.
|
String |
parseToOneline(ixa.kaflib.KAFDocument kaf) |
void |
processTreebankWithHeadWords(File dir)
Takes a file containing Penn Treebank oneline annotation and annotates the
headwords, saving it to a file with the *.head extension.
|
public Annotate(Properties properties)
properties - the configuration propertiespublic void parseToKAF(ixa.kaflib.KAFDocument kaf)
throws IOException
kaf - document containing WF and Term elementsIOException - if io errorpublic String parseToOneline(ixa.kaflib.KAFDocument kaf) throws IOException
kaf - document containing WF and Term elementsIOException - if io errorpublic void parseForTesting(File inputText) throws IOException
IOExceptionpublic void processTreebankWithHeadWords(File dir) throws IOException
dir - the input file or directoryIOException - if io errorCopyright © 2017. All rights reserved.