sg.edu.nus.comp.nlp.ims.classifier
Class CPreLoadWekaEvaluator
java.lang.Object
sg.edu.nus.comp.nlp.ims.classifier.CWekaEvaluator
sg.edu.nus.comp.nlp.ims.classifier.CPreLoadWekaEvaluator
- All Implemented Interfaces:
- IEvaluator
public class CPreLoadWekaEvaluator
- extends CWekaEvaluator
Evaluator which pre-load some models.
- Author:
- zhongzhi
Method Summary |
protected void |
checkCapacity(java.lang.Integer p_Lexelt)
check the capacity |
protected weka.classifiers.Classifier |
getModel(java.lang.String p_LexeltID)
get weka model |
protected IStatistic |
getStatistic(java.lang.String p_LexeltID)
get statistic for lexelt |
protected void |
initial()
initial the evaluator |
void |
setOptions(java.lang.String[] p_Options)
set options |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
m_Capacity
protected int m_Capacity
m_Classifiers
protected weka.classifiers.Classifier[] m_Classifiers
m_Statistics
protected IStatistic[] m_Statistics
m_StaticOnes
protected java.util.HashSet<java.lang.String> m_StaticOnes
m_ReverseIndice
protected java.util.Hashtable<java.lang.String,java.lang.Integer> m_ReverseIndice
m_Loaded
protected java.util.ArrayList<java.lang.Integer> m_Loaded
CPreLoadWekaEvaluator
public CPreLoadWekaEvaluator()
checkCapacity
protected void checkCapacity(java.lang.Integer p_Lexelt)
- check the capacity
- Parameters:
p_Lexelt
- lexelt id
getModel
protected weka.classifiers.Classifier getModel(java.lang.String p_LexeltID)
throws java.io.IOException,
java.lang.ClassNotFoundException
- Description copied from class:
CWekaEvaluator
- get weka model
- Overrides:
getModel
in class CWekaEvaluator
- Parameters:
p_LexeltID
- lexelt id
- Returns:
- weka classifier
- Throws:
java.io.IOException
- io exception
java.lang.ClassNotFoundException
- class not found
getStatistic
protected IStatistic getStatistic(java.lang.String p_LexeltID)
- Description copied from class:
CWekaEvaluator
- get statistic for lexelt
- Overrides:
getStatistic
in class CWekaEvaluator
- Parameters:
p_LexeltID
- lexelt id
- Returns:
- statistic
setOptions
public void setOptions(java.lang.String[] p_Options)
- Description copied from interface:
IEvaluator
- set options
- Specified by:
setOptions
in interface IEvaluator
- Overrides:
setOptions
in class CWekaEvaluator
- Parameters:
p_Options
- options
initial
protected void initial()
throws java.io.IOException,
java.lang.ClassNotFoundException
- initial the evaluator
- Throws:
java.io.IOException
- exception while loading model or statistic
java.lang.ClassNotFoundException
- model cannot be converted to classifier