com.thesis.backend.classifiers
Class MaxEnt_Classifier

java.lang.Object
  extended by com.thesis.backend.classifiers.MaxEnt_Classifier

public class MaxEnt_Classifier
extends java.lang.Object

Document classifier , currently set to maximum entropy (MaxEnt)


Constructor Summary
MaxEnt_Classifier(java.lang.String path)
          Load model from path
 
Method Summary
 cc.mallet.classify.Classifier getClassifier()
           
 cc.mallet.types.InstanceList putThroughPipes(java.lang.String dataFileName)
          Create, setup and run through MALLET pipes This is were features are specified
 java.lang.String runMaxEnt(cc.mallet.types.Instance instance)
          Run Classifier on instance and return predicted label
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MaxEnt_Classifier

public MaxEnt_Classifier(java.lang.String path)
                  throws java.io.FileNotFoundException,
                         java.io.IOException,
                         java.lang.ClassNotFoundException
Load model from path

Parameters:
path -
Throws:
java.io.FileNotFoundException
java.io.IOException
java.lang.ClassNotFoundException
Method Detail

putThroughPipes

public cc.mallet.types.InstanceList putThroughPipes(java.lang.String dataFileName)
                                             throws java.io.UnsupportedEncodingException,
                                                    java.io.FileNotFoundException
Create, setup and run through MALLET pipes This is were features are specified

Parameters:
dataFileName -
Returns:
iData
Throws:
java.io.UnsupportedEncodingException
java.io.FileNotFoundException

runMaxEnt

public java.lang.String runMaxEnt(cc.mallet.types.Instance instance)
Run Classifier on instance and return predicted label

Parameters:
instance -
Returns:
predicted label

getClassifier

public cc.mallet.classify.Classifier getClassifier()