|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsg.edu.nus.comp.nlp.ims.io.CWekaLexeltWriter
public class CWekaLexeltWriter
convert instances in a lexelt to weka sparse instances format.
Field Summary | |
---|---|
protected static java.util.regex.Pattern |
CommaPattern
|
protected static java.util.regex.Pattern |
QuotPattern
|
Constructor Summary | |
---|---|
CWekaLexeltWriter()
default constructor |
Method Summary | |
---|---|
protected java.lang.String |
amendValue(java.lang.String p_Value)
amend feature value |
protected java.lang.String |
getFeatureVector(IInstance p_Instance,
IStatistic p_Stat)
generate the feature vector for one instance |
protected java.lang.String |
getHeader(ILexelt p_Lexelt)
generate the head part of arff file |
java.lang.Object |
getInstances(ILexelt p_Lexelt)
extract instances from p_iLexelt |
java.lang.String |
toString(ILexelt p_Lexelt)
write lexelt to a string |
void |
write(java.lang.String p_FileName,
ILexelt p_Lexelt)
write information of p_iLexelt to p_FileName in some format |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static java.util.regex.Pattern QuotPattern
protected static java.util.regex.Pattern CommaPattern
Constructor Detail |
---|
public CWekaLexeltWriter()
Method Detail |
---|
public void write(java.lang.String p_FileName, ILexelt p_Lexelt) throws java.io.IOException, java.lang.ClassNotFoundException
ILexeltWriter
write
in interface ILexeltWriter
p_FileName
- file namep_Lexelt
- lexelt
java.io.IOException
java.lang.ClassNotFoundException
public java.lang.String toString(ILexelt p_Lexelt) throws java.lang.ClassNotFoundException
ILexeltWriter
toString
in interface ILexeltWriter
p_Lexelt
- lexelt
java.lang.ClassNotFoundException
public java.lang.Object getInstances(ILexelt p_Lexelt) throws java.lang.ClassNotFoundException
ILexeltWriter
getInstances
in interface ILexeltWriter
p_Lexelt
- lexelt
java.lang.ClassNotFoundException
protected java.lang.String getHeader(ILexelt p_Lexelt) throws java.lang.ClassNotFoundException
p_Lexelt
- lexelt
java.lang.ClassNotFoundException
protected java.lang.String getFeatureVector(IInstance p_Instance, IStatistic p_Stat)
p_Instance
- instancep_Stat
- statistic of training instances
protected java.lang.String amendValue(java.lang.String p_Value)
p_Value
- feature value
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |