public class BayesCategorizerBuilder extends CategorizerBuilder
Modifier | Constructor and Description |
---|---|
protected |
BayesCategorizerBuilder() |
|
BayesCategorizerBuilder(MOTPipeInterface pipe)
Deprecated.
|
|
BayesCategorizerBuilder(MOTPipeInterface pipe,
java.lang.String[] matchedAnnotations,
java.lang.String[] skippedAnnotations)
Initialize a new bulder
|
Modifier and Type | Method and Description |
---|---|
void |
addClass(java.lang.String className,
int classId)
Add a new class
|
boolean |
compile(java.lang.String dirName)
Compile the resource
|
boolean |
compile(java.lang.String dirName,
int maxCategoryPresence)
Compile the resource
|
boolean |
compile(java.lang.String dirName,
int maxCategoryPresence,
int maxVocabularySize)
Compile the resource
|
boolean |
compile(java.lang.String dirName,
int maxCategoryPresence,
int maxVocabularySize,
double minFrequencyInClass)
Compile the resource
|
protected void |
finalize() |
void |
newDocument(int did,
int classId)
Must be call before processing a document
|
newDocument
endDocument, feed, feedWithBytes, setPipe
public BayesCategorizerBuilder(MOTPipeInterface pipe, java.lang.String[] matchedAnnotations, java.lang.String[] skippedAnnotations)
pipe
- The pipe to usematchedAnnotations
- The list of annotations to use to extract keywordsskippedAnnotations
- The list of annotations to skip, to avoid keywords extraction@Deprecated public BayesCategorizerBuilder(MOTPipeInterface pipe)
protected BayesCategorizerBuilder()
public void addClass(java.lang.String className, int classId)
className
- The class nameclassId
- The class identifierpublic void newDocument(int did, int classId)
newDocument
in class CategorizerBuilder
did
- The associated document idclassId
- The associated class idpublic boolean compile(java.lang.String dirName, int maxCategoryPresence, int maxVocabularySize, double minFrequencyInClass)
compile
in class CategorizerBuilder
dirName
- The destination directorymaxCategoryPresence
- The maximum presence of a category (in percent)maxVocabularySize
- The maximum number of keywords in the resourceminFrequencyInClass
- The minimum frequency a keyword must have to be usedpublic boolean compile(java.lang.String dirName, int maxCategoryPresence, int maxVocabularySize)
compile
in class CategorizerBuilder
dirName
- The destination directorymaxCategoryPresence
- The maximum presence of a category (in percent)maxVocabularySize
- The maximum number of keywords in the resourcepublic boolean compile(java.lang.String dirName, int maxCategoryPresence)
compile
in class CategorizerBuilder
dirName
- The destination directorymaxCategoryPresence
- The maximum presence of a category (in percent)public boolean compile(java.lang.String dirName)
compile
in class CategorizerBuilder
dirName
- The destination directoryprotected void finalize()
finalize
in class java.lang.Object
Copyright © 2013 Dassault Systèmes, All Rights Reserved.