Package opennlp.tools.util.featuregen
Class WordClusterDictionary
- java.lang.Object
-
- opennlp.tools.util.featuregen.WordClusterDictionary
-
- All Implemented Interfaces:
SerializableArtifact
public class WordClusterDictionary extends Object implements SerializableArtifact
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classWordClusterDictionary.WordClusterDictionarySerializer
-
Constructor Summary
Constructors Constructor Description WordClusterDictionary(InputStream in)Read word2vec and clark clustering style lexicons.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Class<?>getArtifactSerializerClass()Retrieves the class which can serialize and recreate this artifact.StringlookupToken(String string)voidserialize(OutputStream out)
-
-
-
Constructor Detail
-
WordClusterDictionary
public WordClusterDictionary(InputStream in) throws IOException
Read word2vec and clark clustering style lexicons.- Parameters:
in- theInputStreamto read from.- Throws:
IOException- Thrown if IO errors occurred during read.
-
-
Method Detail
-
serialize
public void serialize(OutputStream out) throws IOException
- Throws:
IOException
-
getArtifactSerializerClass
public Class<?> getArtifactSerializerClass()
Description copied from interface:SerializableArtifactRetrieves the class which can serialize and recreate this artifact.Note: The serializer class must have a
public zero argument constructoror an exception is thrown during model serialization/loading.- Specified by:
getArtifactSerializerClassin interfaceSerializableArtifact- Returns:
- The corresponding
ArtifactSerializerclass.
-
-