edu.stanford.nlp.maxent.iis
Class ReadDataHPSG
java.lang.Object
|
+--edu.stanford.nlp.maxent.iis.ReadDataHPSG
- public class ReadDataHPSG
- extends Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ReadDataHPSG
public ReadDataHPSG()
ReadDataHPSG
public ReadDataHPSG(String wekaFileName)
throws Exception
ReadDataHPSG
public ReadDataHPSG(String wekaFileName,
ReadDataHPSG train)
throws Exception
setFeatures
public void setFeatures()
hasMoreData
public boolean hasMoreData()
advanceData
public void advanceData()
- read in the next data in currentData
getNextData
public DataDouble getNextData()
readData
public void readData(String s)
throws Exception
- reads one data instance - one line of the file
adds the instance to the features which are non-zero for it
also adds it to the list of instances for its class
Exception
numeric
public boolean numeric(int aNo)
nominal
public boolean nominal(int aNo)
ignore
public boolean ignore(String s)
getNumAttributes
public int getNumAttributes()
getNumValues
public int getNumValues(int aNo)
getFValue
public double getFValue(int aNo,
int exampleNo)
getClass
public int getClass(int exampleNo)
readAttribute
public void readAttribute(String s)
- Parse an attribute specification. The specification is of the form
\@attribute name real|nominal {val1,val2,..,valN}.
getYName
public String getYName(int yNo)
getAttributeName
public String getAttributeName(int aNo)
getAttrName
public String getAttrName(int aNo,
int val)
getData
public DataDouble getData(int index)
numSamples
public int numSamples()
save
public void save(String filename)
read
public void read(String filename)
Stanford NLP Group