edu.stanford.nlp.classify
Class NBClassifier

java.lang.Object
  |
  +--edu.stanford.nlp.classify.NBClassifier
All Implemented Interfaces:
ClassifierB

public class NBClassifier
extends Object
implements ClassifierB

The classifier takes a set of (smoothed) probability vectors and a test vector, and classifies the test vector according to the probability vectors


Constructor Summary
NBClassifier(ProbabilitySet mytrain, FeatureSet mytest)
          Constructor: mytrain is the set of training vectors, mytest is a single Feature vector for testing.
 
Method Summary
 Classification classify(String filename)
          filename gives the name of the file where the results will be written.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NBClassifier

public NBClassifier(ProbabilitySet mytrain,
                    FeatureSet mytest)
Constructor: mytrain is the set of training vectors, mytest is a single Feature vector for testing.

Method Detail

classify

public Classification classify(String filename)
                        throws IOException
filename gives the name of the file where the results will be written.

Specified by:
classify in interface ClassifierB
IOException


Stanford NLP Group