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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NBClassifier
public NBClassifier(ProbabilitySet mytrain,
FeatureSet mytest)
- Constructor: mytrain is the set of training vectors, mytest is
a single Feature vector for testing.
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