public class CorpusConverter<E> extends Object implements Consumer<E>
The convert(java.util.Iterator) method will then traverse the
iterator and write the converted outputs to the writer.
Alternatively, you can use the CorpusConverter as a Consumer in the
context of internal iteration.
| Constructor and Description |
|---|
CorpusConverter(AbstractCorpusWriter cw,
Map<String,Function<E,? extends Object>> conv) |
| Modifier and Type | Method and Description |
|---|---|
void |
accept(E element) |
void |
addConsumer(Consumer<E> consumer) |
void |
addTransformation(Function<E,E> transformation) |
void |
convert(Iterator<E> inputCorpus) |
void |
setDerivationTreeMaker(Function<E,Tree<Integer>> derivationTreeMaker) |
public CorpusConverter(AbstractCorpusWriter cw, Map<String,Function<E,? extends Object>> conv) throws IOException
IOExceptionpublic void setDerivationTreeMaker(Function<E,Tree<Integer>> derivationTreeMaker)
public void convert(Iterator<E> inputCorpus) throws IOException
IOExceptionCopyright © 2017. All rights reserved.