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
IOException
public void setDerivationTreeMaker(Function<E,Tree<Integer>> derivationTreeMaker)
public void convert(Iterator<E> inputCorpus) throws IOException
IOException
Copyright © 2017. All rights reserved.