|
||||||||||
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.CGISLexeltWriter
public class CGISLexeltWriter
convert instances in a lexelt to maxent format.
Constructor Summary | |
---|---|
CGISLexeltWriter()
|
Method Summary | |
---|---|
java.lang.Object |
getInstances(ILexelt p_Lexelt)
extract instances from p_iLexelt |
protected int[][] |
loadStatistic(ILexelt p_iLexelt)
load the statistic of p_iLexelt for each feature type in statistic if feature is binary keep it else if feature is list and the number of values is less than 2 one new feature else set each value as a new feature |
protected java.util.HashSet<java.lang.Integer> |
processTags(IStatistic p_Stat,
java.util.ArrayList<java.lang.String> p_Tags)
change tags to integer (start from 1) |
protected java.lang.String |
toString(IInstance p_Instance,
IStatistic p_Stat,
int[][] p_Indice)
get the vector of one instance |
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 |
Constructor Detail |
---|
public CGISLexeltWriter()
Method Detail |
---|
public java.lang.Object getInstances(ILexelt p_Lexelt) throws java.lang.Exception
ILexeltWriter
getInstances
in interface ILexeltWriter
p_Lexelt
- lexelt
java.lang.Exception
- exception while converting p_Lexeltprotected int[][] loadStatistic(ILexelt p_iLexelt) throws java.lang.ClassNotFoundException
p_iLexelt
- lexelt
java.lang.ClassNotFoundException
protected java.lang.String toString(IInstance p_Instance, IStatistic p_Stat, int[][] p_Indice)
p_Instance
- input instancep_Stat
- statistic
protected java.util.HashSet<java.lang.Integer> processTags(IStatistic p_Stat, java.util.ArrayList<java.lang.String> p_Tags)
p_Stat
- statisticp_Tags
- real tags
public java.lang.String toString(ILexelt p_Lexelt) throws java.lang.Exception
ILexeltWriter
toString
in interface ILexeltWriter
p_Lexelt
- lexelt
java.lang.Exception
- exception while converting p_Lexeltpublic void write(java.lang.String p_Filename, ILexelt p_Lexelt) throws java.lang.Exception
ILexeltWriter
write
in interface ILexeltWriter
p_Filename
- file namep_Lexelt
- lexelt
java.lang.Exception
- exception while converting p_Lexelt
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |