net.sf.textkit4j.classify.ngram
Class NgramClassifier

java.lang.Object
  extended by 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


Field Summary
protected  NGramFactory ngramFactory
           
protected  java.util.Map<java.lang.String,NGrams> trainingNgrams
           
 
Constructor Summary
NgramClassifier()
           
 
Method Summary
 java.util.Collection<Classification> classify(java.lang.String text)
           
 NGramFactory getNgramFactory()
           
 java.util.Map<java.lang.String,NGrams> getTrainingData()
           
 void setNgramFactory(NGramFactory ngramFactory)
           
 void setNGramFactory(NGramFactory factory)
           
 void setTrainingData(java.util.Map<java.lang.String,NGrams> map)
           
abstract  void trainToClassifyAs(java.lang.String language, java.lang.String text)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

trainingNgrams

protected java.util.Map<java.lang.String,NGrams> trainingNgrams

ngramFactory

protected NGramFactory ngramFactory
Constructor Detail

NgramClassifier

public NgramClassifier()
Method Detail

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.