Package com.carrotsearch.lingo3g.api
Interface Lingo3GLabelDictionary
-
public interface Lingo3GLabelDictionaryCluster candidate label pruning (or boosting) dictionary.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description DoublegetLabelWeight(CharSequence label, MutableCharArray[] tokens, MutableCharArray[] stems, short[] flags)Returns the score of the label defined in the dictionary ornullif the dictionary does not contain the label.
-
-
-
Method Detail
-
getLabelWeight
Double getLabelWeight(CharSequence label, MutableCharArray[] tokens, MutableCharArray[] stems, short[] flags)
Returns the score of the label defined in the dictionary ornullif the dictionary does not contain the label.Score of 0 removes the cluster label from consideration. Score between 0-1 is penalizing, score of 1 is neutral and scores higher than 1 are boosting the label's importance with respect to other labels (making it more likely to become a cluster).
- Parameters:
label- Candidate label (preformatted as a string).tokens- An array of this label's tokens.stems- An array of this label's stems (normalized images of each token).flags- An array of bitfields for each token intokensandstems. This is a union of bitsets fromTokenTag,TokenTypeand possibly other internal bits.- Returns:
- The desired weight for the label or
null.
-
-