public class NGramCategorizer
extends java.lang.Object
Constructor and Description |
---|
NGramCategorizer() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
categorize(java.lang.String text)
Categorizes the text passed to it
|
java.lang.String |
categorize(java.lang.String text,
int limit)
Categorizes only a certain amount of characters in the text. recommended
when categorizing large texts in order to increase performance.
|
java.util.Map<java.lang.String,java.lang.Integer> |
getCategoryDistances(java.lang.String text)
Categorizes a text but returns a map containing all categories and their
distances to the text.
|
protected void |
init()
Clears the categories-collection and fills it with the FingerPrints given
in the configuration file.
|
protected void init()
public java.lang.String categorize(java.lang.String text)
text
- text to be categorizedpublic java.lang.String categorize(java.lang.String text, int limit)
text
- text to be analysedlimit
- number of characters to be analysedpublic java.util.Map<java.lang.String,java.lang.Integer> getCategoryDistances(java.lang.String text)
text
- text to be categorizedCopyright © 2001-2010 Jalios SA. All Rights Reserved.