net.sf.textkit4j.classify.ngram
Class NgramClassifier
java.lang.Object
net.sf.textkit4j.classify.ngram.NgramClassifier
- All Implemented Interfaces:
- Classifier
- Direct Known Subclasses:
- CharacterBigramClassifier, WordBigramClassifier
public abstract class NgramClassifier
- extends java.lang.Object
- implements Classifier
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
trainingNgrams
protected java.util.Map<java.lang.String,NGrams> trainingNgrams
ngramFactory
protected NGramFactory ngramFactory
NgramClassifier
public NgramClassifier()
trainToClassifyAs
public abstract void trainToClassifyAs(java.lang.String language,
java.lang.String text)
- Specified by:
trainToClassifyAs
in interface Classifier
classify
public java.util.Collection<Classification> classify(java.lang.String text)
- Specified by:
classify
in interface Classifier
getTrainingData
public java.util.Map<java.lang.String,NGrams> getTrainingData()
setTrainingData
public void setTrainingData(java.util.Map<java.lang.String,NGrams> map)
getNgramFactory
public NGramFactory getNgramFactory()
setNgramFactory
public void setNgramFactory(NGramFactory ngramFactory)
setNGramFactory
public void setNGramFactory(NGramFactory factory)
Copyright © 2009 All Eight, LLC. All Rights Reserved.