org.allenai.nlpstack.parse.poly.polyparser
Returns an iterator that iterates over all of the words (as strings) that exist in the argument parses, in order.
Returns an iterator that iterates over all of the words (as strings) that exist in the argument parses, in order.
Note that if a particular word appears multiple times in the parses, it will also appear an equivalent number of times in the returned iterator.
the parses we want to extract words from
an iterator over all words that appear in the argument parses (in order)
Creates an Iterator over PolytreeParse objects from a CoNLL-X format file, which is a tab- separated format with one line per sentence word, and 10 fields per line, like this:
Creates an Iterator over PolytreeParse objects from a CoNLL-X format file, which is a tab- separated format with one line per sentence word, and 10 fields per line, like this:
1 The _ DET DT _ 2 DET _ _ 2 cat _ NOUN NN _ 3 NSUBJ _ _ 3 sat _ VERB VBD _ 0 ROOT _ _ 4 by _ PREP IN _ 3 PREP _ _ 5 me _ NOUN PRN _ 4 POBJ _ _ 6 . _ PUNC . _ 3 . _ _
The ten fields are (sentence position, word, lemma, coarse POS tag, fine POS tag, IGNORED, breadcrumb position, arc label, IGNORED, IGNORED). If a field is not specified, then a single underscore is inserted.
Different parse trees within the same file are separated by a single blank line.
the CoNLL-X file containing the dependency parses
if true, then use the (fine) POS tags contained in the file (otherwise, use an automatic tagger)
an Iterator over dependency parses contained in the argument file
Iterates over parses and writes each parse to the specified file (in Conll-X format).
Iterates over parses and writes each parse to the specified file (in Conll-X format).
where to direct the parses
the parse objects to iterate over