sg.edu.nus.comp.nlp.ims.io
Class CWekaSparseLexeltWriter

java.lang.Object
  extended by sg.edu.nus.comp.nlp.ims.io.CWekaLexeltWriter
      extended by sg.edu.nus.comp.nlp.ims.io.CWekaSparseLexeltWriter
All Implemented Interfaces:
ILexeltWriter

public class CWekaSparseLexeltWriter
extends CWekaLexeltWriter

convert instances in a lexelt to weka sparse instances format.

Author:
zhongzhi

Field Summary
 
Fields inherited from class sg.edu.nus.comp.nlp.ims.io.CWekaLexeltWriter
CommaPattern, QuotPattern
 
Constructor Summary
CWekaSparseLexeltWriter()
          default constructor
 
Method Summary
protected  java.lang.String getFeatureVector(IInstance p_Instance, IStatistic p_Stat)
          generate the feature vector for one instance
 java.lang.Object getInstances(ILexelt p_Lexelt)
          extract instances from p_iLexelt
 
Methods inherited from class sg.edu.nus.comp.nlp.ims.io.CWekaLexeltWriter
amendValue, getHeader, toString, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CWekaSparseLexeltWriter

public CWekaSparseLexeltWriter()
default constructor

Method Detail

getInstances

public java.lang.Object getInstances(ILexelt p_Lexelt)
                              throws java.lang.ClassNotFoundException
Description copied from interface: ILexeltWriter
extract instances from p_iLexelt

Specified by:
getInstances in interface ILexeltWriter
Overrides:
getInstances in class CWekaLexeltWriter
Parameters:
p_Lexelt - lexelt
Returns:
instances
Throws:
java.lang.ClassNotFoundException

getFeatureVector

protected java.lang.String getFeatureVector(IInstance p_Instance,
                                            IStatistic p_Stat)
Description copied from class: CWekaLexeltWriter
generate the feature vector for one instance

Overrides:
getFeatureVector in class CWekaLexeltWriter
Parameters:
p_Instance - instance
p_Stat - statistic of training instances
Returns:
feature vector