public class VocabularyClassifier extends Processor
Modifier and Type | Field and Description |
---|---|
boolean |
addAnnotationsOnKeywords
If true, add tag to all matching token
|
java.lang.String |
annotationName
The tag set by the classifier
|
boolean |
collapseToken
If true all identical tokens are collapsed
|
int[] |
excludedLanguages
Language for which the vocabulary classifier is deactivated (works only
if language=xx)
|
int |
extraAnnotationsMinTrustLevel
The minimum trust level to keep an extra annotations.
|
java.lang.String[] |
extraPrefixAnnotations
The optional list of prefix annotations to keep
|
int |
maxAnnotations
Max number of annotations per document
|
int |
maxKeywords
Max number of keywords to keep
|
int |
minKeywords
The minimum number of keywords per class
|
int |
minTrustLevel
Min trust level of categories to keep
|
java.lang.String |
resource
The processor resource
|
Constructor and Description |
---|
VocabularyClassifier(java.lang.String name,
java.lang.String resource,
java.lang.String fields)
Returns a new VocabularyClassifier processor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
finalize() |
int |
getNBToken()
Get the total number of tokens.
|
int |
getNBTokenInVocabulary()
Get the number of tokens present in the vocabulary.
|
double |
getScore(int classId)
Get current score for a given class id.
|
double |
getScore(java.lang.String className)
Get current score for a given class name.
|
void |
init(java.lang.String name,
java.lang.String[] fields)
Initialize the processor
|
protected void |
init(java.lang.String name,
java.lang.String resource,
java.lang.String annotationName,
java.lang.String[] fields,
boolean collapseToken,
boolean addAnnotationOnKeywords,
int maxAnnotations,
int minTrustLevel,
int minKeywords,
int maxKeywords,
java.lang.String[] extraPrefixAnnotations,
int extraAnnotationsMinTrustLevel,
int[] excludedLanguages)
Internals
|
checkResource, destroy, getName, init
public java.lang.String resource
public java.lang.String annotationName
public boolean collapseToken
public boolean addAnnotationsOnKeywords
public int maxAnnotations
public int minTrustLevel
public int maxKeywords
public int minKeywords
public java.lang.String[] extraPrefixAnnotations
public int extraAnnotationsMinTrustLevel
public int[] excludedLanguages
public VocabularyClassifier(java.lang.String name, java.lang.String resource, java.lang.String fields)
name
- the processor's name.resource
- the processor's corresponding resource.fields
- the fields on which this processor is active.public void init(java.lang.String name, java.lang.String[] fields)
public int getNBToken()
public int getNBTokenInVocabulary()
public double getScore(int classId)
classId
- The class identifier.public double getScore(java.lang.String className)
className
- The class name.protected void init(java.lang.String name, java.lang.String resource, java.lang.String annotationName, java.lang.String[] fields, boolean collapseToken, boolean addAnnotationOnKeywords, int maxAnnotations, int minTrustLevel, int minKeywords, int maxKeywords, java.lang.String[] extraPrefixAnnotations, int extraAnnotationsMinTrustLevel, int[] excludedLanguages)
protected void finalize()
finalize
in class java.lang.Object
Copyright © 2013 Dassault Systèmes, All Rights Reserved.