opennlp.tools.dictionary.serializer
Class DictionarySerializer
java.lang.Object
opennlp.tools.dictionary.serializer.DictionarySerializer
public class DictionarySerializer
- extends Object
This class is used by for reading and writing dictionaries of all kinds.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DictionarySerializer
public DictionarySerializer()
create
public static void create(InputStream in,
EntryInserter inserter)
throws IOException,
InvalidFormatException
- Creates
Entry
s form the given InputStream
and
forwards these Entry
s to the EntryInserter
.
After creation is finished the provided InputStream
is closed.
- Parameters:
in
- inserter
-
- Throws:
IOException
InvalidFormatException
serialize
public static void serialize(OutputStream out,
Iterator<Entry> entries)
throws IOException
- Serializes the given entries to the given
OutputStream
.
After the serialization is finished the provided
OutputStream
remains open.
- Parameters:
out
- entries
-
- Throws:
IOException
- If an I/O error occurs
Copyright © 2010. All Rights Reserved.