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