Class DictionaryEntryPersistor
- java.lang.Object
-
- opennlp.tools.dictionary.serializer.DictionaryEntryPersistor
-
public class DictionaryEntryPersistor extends 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(InputStream in, EntryInserter inserter)
static void
serialize(OutputStream out, Iterator<Entry> entries)
Deprecated.static void
serialize(OutputStream out, Iterator<Entry> entries, boolean casesensitive)
Serializes the given entries to the givenOutputStream
.
-
-
-
Method Detail
-
create
public static boolean create(InputStream in, EntryInserter inserter) throws 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:
IOException
InvalidFormatException
-
serialize
@Deprecated public static void serialize(OutputStream out, Iterator<Entry> entries) throws 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:
IOException
- If an I/O error occurs
-
serialize
public static void serialize(OutputStream out, Iterator<Entry> entries, boolean casesensitive) throws 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:
IOException
- If an I/O error occurs
-
-