Class DictionaryEntryPersistor
- java.lang.Object
-
- opennlp.tools.dictionary.serializer.DictionaryEntryPersistor
-
public class DictionaryEntryPersistor extends java.lang.Object
This class is used by for reading and writing dictionaries of all kinds.
-
-
Constructor Summary
Constructors Constructor Description DictionaryEntryPersistor()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static boolean
create(java.io.InputStream in, EntryInserter inserter)
static void
serialize(java.io.OutputStream out, java.util.Iterator<Entry> entries)
Deprecated.static void
serialize(java.io.OutputStream out, java.util.Iterator<Entry> entries, boolean casesensitive)
Serializes the given entries to the givenOutputStream
.
-
-
-
Method Detail
-
create
public static boolean create(java.io.InputStream in, EntryInserter inserter) throws java.io.IOException
CreatesEntry
s from the givenInputStream
and forwards theseEntry
s to theEntryInserter
. After creation is finished the providedInputStream
is closed.- Parameters:
in
- stream to read entries frominserter
- inserter to forward entries to- Returns:
- isCaseSensitive attribute for Dictionary
- Throws:
java.io.IOException
InvalidFormatException
-
serialize
@Deprecated public static void serialize(java.io.OutputStream out, java.util.Iterator<Entry> entries) throws java.io.IOException
Deprecated.Serializes the given entries to the givenOutputStream
. After the serialization is finished the providedOutputStream
remains open.- Parameters:
out
- stream to serialize toentries
- entries to serialize- Throws:
java.io.IOException
- If an I/O error occurs
-
serialize
public static void serialize(java.io.OutputStream out, java.util.Iterator<Entry> entries, boolean casesensitive) throws java.io.IOException
Serializes the given entries to the givenOutputStream
. After the serialization is finished the providedOutputStream
remains open.- Parameters:
out
- stream to serialize toentries
- entries to serializecasesensitive
- indicates if the written dictionary should be case sensitive or case insensitive.- Throws:
java.io.IOException
- If an I/O error occurs
-
-