| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jalios.jcms.search.NGramCategorizer
public class NGramCategorizer
TextCategorizer is able to categorize texts by computing the similarity of the FingerPrint of a text with a collection of the FingerPrints of the categories.
| Constructor Summary | |
|---|---|
| NGramCategorizer() | |
| Method Summary | |
|---|---|
|  String | categorize(String text)Categorizes the text passed to it | 
|  String | categorize(String text,
           int limit)Categorizes only a certain amount of characters in the text. | 
|  Map<String,Integer> | getCategoryDistances(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. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public NGramCategorizer()
| Method Detail | 
|---|
protected void init()
public String categorize(String text)
text - text to be categorized
public String categorize(String text,
                         int limit)
text - text to be analysedlimit - number of characters to be analysed
public Map<String,Integer> getCategoryDistances(String text)
text - text to be categorized
| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||