Package opennlp.tools.util.featuregen
Klasse BrownCluster
java.lang.Object
opennlp.tools.util.featuregen.BrownCluster
- Alle implementierten Schnittstellen:
SerializableArtifact
Class to load a Brown cluster document: 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.
-
Verschachtelte Klassen - Übersicht
Verschachtelte Klassen -
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungInstatiates aBrownCluster
and its related token to cluster map via anInputStream
. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungClass
<?> Retrieves the class which can serialize and recreate this artifact.lookupToken
(String string) Check if a token is in the Brown:paths, token map.void
serialize
(OutputStream out)
-
Konstruktordetails
-
BrownCluster
Instatiates aBrownCluster
and its related token to cluster map via anInputStream
.Note: Only tokens with frequency bigger than
5
will be added.- Parameter:
in
- A valid, openInputStream
to read from.- Löst aus:
IOException
- Thrown if errors occurred reading fromin
.
-
-
Methodendetails
-
lookupToken
Check if a token is in the Brown:paths, token map.- Parameter:
string
- the token to look-up- Gibt zurück:
- the brown class if such token is in the brown cluster map
-
serialize
- Löst aus:
IOException
-
getArtifactSerializerClass
Beschreibung aus Schnittstelle kopiert: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.- Angegeben von:
getArtifactSerializerClass
in SchnittstelleSerializableArtifact
- Gibt zurück:
- The corresponding
ArtifactSerializer
class.
-