Class BrownCluster
java.lang.Object
opennlp.tools.util.featuregen.BrownCluster
- All Implemented Interfaces:
opennlp.tools.util.model.SerializableArtifact
Class to load a Brown cluster document in the format:
word\tword_class\tprob.
Originally available at: http://metaoptimize.com/projects/wordreprs/.
Further details can be found in the related research paper.
The file containing the clustering lexicon has to be passed as the
value of the dict attribute of each BrownCluster feature generator.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionInstatiates aBrownClusterand its related token to cluster map via anInputStream. -
Method Summary
Modifier and TypeMethodDescriptionClass<?> lookupToken(String string) Check if a token is in the Brown:paths, token map.voidserialize(OutputStream out)
-
Constructor Details
-
BrownCluster
Instatiates aBrownClusterand its related token to cluster map via anInputStream.- Parameters:
in- A valid, openInputStreamto read from.- Throws:
IOException- Thrown if errors occurred reading fromin.
-
-
Method Details
-
lookupToken
-
serialize
- Throws:
IOException
-
getArtifactSerializerClass
- Specified by:
getArtifactSerializerClassin interfaceopennlp.tools.util.model.SerializableArtifact
-