|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectopennlp.tools.doccat.DocumentCategorizerME
public class DocumentCategorizerME
Maxent implementation of DocumentCategorizer.
| Constructor Summary | |
|---|---|
DocumentCategorizerME(DoccatModel model)
Initializes the current instance with a doccat model. |
|
DocumentCategorizerME(DoccatModel model,
FeatureGenerator... featureGenerators)
Initializes a the current instance with a doccat model and custom feature generation. |
|
DocumentCategorizerME(opennlp.model.MaxentModel model)
Deprecated. Use DocumentCategorizerME(DoccatModel) instead. |
|
DocumentCategorizerME(opennlp.model.MaxentModel model,
FeatureGenerator... featureGenerators)
Deprecated. Use DocumentCategorizerME(DoccatModel, FeatureGenerator...) instead. |
|
| Method Summary | |
|---|---|
double[] |
categorize(String documentText)
Categorizes the given text. |
double[] |
categorize(String[] text)
Categorizes the given text. |
String |
getAllResults(double[] results)
|
String |
getBestCategory(double[] outcome)
|
String |
getCategory(int index)
|
int |
getIndex(String category)
|
int |
getNumberOfCategories()
|
static opennlp.model.AbstractModel |
train(DocumentCategorizerEventStream eventStream)
Deprecated. |
static DoccatModel |
train(String languageCode,
ObjectStream<DocumentSample> samples)
Trains a doccat model with default feature generation. |
static DoccatModel |
train(String languageCode,
ObjectStream<DocumentSample> samples,
int cutoff,
int iterations)
Trains a doccat model with default feature generation. |
static DoccatModel |
train(String languageCode,
ObjectStream<DocumentSample> samples,
int cutoff,
int iterations,
FeatureGenerator... featureGenerators)
Trains a document categorizer model with custom feature generation. |
static DoccatModel |
train(String languageCode,
ObjectStream<DocumentSample> samples,
TrainingParameters mlParams,
FeatureGenerator... featureGenerators)
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DocumentCategorizerME(DoccatModel model,
FeatureGenerator... featureGenerators)
model - featureGenerators - public DocumentCategorizerME(DoccatModel model)
model - @Deprecated public DocumentCategorizerME(opennlp.model.MaxentModel model)
DocumentCategorizerME(DoccatModel) instead.
MaxentModel.
model -
@Deprecated
public DocumentCategorizerME(opennlp.model.MaxentModel model,
FeatureGenerator... featureGenerators)
DocumentCategorizerME(DoccatModel, FeatureGenerator...) instead.
MaxentModel
and FeatureGenerators.
model - featureGenerators - | Method Detail |
|---|
public double[] categorize(String[] text)
categorize in interface DocumentCategorizertext - public double[] categorize(String documentText)
categorize in interface DocumentCategorizerpublic String getBestCategory(double[] outcome)
getBestCategory in interface DocumentCategorizerpublic int getIndex(String category)
getIndex in interface DocumentCategorizerpublic String getCategory(int index)
getCategory in interface DocumentCategorizerpublic int getNumberOfCategories()
getNumberOfCategories in interface DocumentCategorizerpublic String getAllResults(double[] results)
getAllResults in interface DocumentCategorizer
@Deprecated
public static opennlp.model.AbstractModel train(DocumentCategorizerEventStream eventStream)
throws IOException
DocumentCategorizerME.
eventStream -
IOException
public static DoccatModel train(String languageCode,
ObjectStream<DocumentSample> samples,
TrainingParameters mlParams,
FeatureGenerator... featureGenerators)
throws IOException
IOException
public static DoccatModel train(String languageCode,
ObjectStream<DocumentSample> samples,
int cutoff,
int iterations,
FeatureGenerator... featureGenerators)
throws IOException
languageCode - samples - cutoff - iterations - featureGenerators -
IOException
public static DoccatModel train(String languageCode,
ObjectStream<DocumentSample> samples,
int cutoff,
int iterations)
throws IOException
languageCode - samples -
IOException
ObjectStreamException
public static DoccatModel train(String languageCode,
ObjectStream<DocumentSample> samples)
throws IOException
languageCode - samples -
IOException
ObjectStreamException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||