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

java.lang.Object
  extended by sg.edu.nus.comp.nlp.ims.io.CModelWriter
All Implemented Interfaces:
IModelWriter

public class CModelWriter
extends java.lang.Object
implements IModelWriter

save model to hard disk.

Author:
zhongzhi

Field Summary
protected  java.lang.String m_ModelDir
           
protected  java.lang.String m_StatisticDir
           
 
Constructor Summary
CModelWriter()
          default constructor
CModelWriter(java.lang.String p_ModelDir)
          constructor with model directory
CModelWriter(java.lang.String p_ModelDir, java.lang.String p_StatisticDir)
          constructor with model directory and statistic directory
 
Method Summary
 void setOptions(java.lang.String[] p_Options)
          set options
 void write(java.lang.Object p_Model)
          write model
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_ModelDir

protected java.lang.String m_ModelDir

m_StatisticDir

protected java.lang.String m_StatisticDir
Constructor Detail

CModelWriter

public CModelWriter()
default constructor


CModelWriter

public CModelWriter(java.lang.String p_ModelDir)
constructor with model directory

Parameters:
p_ModelDir - model directory

CModelWriter

public CModelWriter(java.lang.String p_ModelDir,
                    java.lang.String p_StatisticDir)
constructor with model directory and statistic directory

Parameters:
p_ModelDir - model directory
p_StatisticDir - statistic directory
Method Detail

write

public void write(java.lang.Object p_Model)
           throws java.io.IOException
Description copied from interface: IModelWriter
write model

Specified by:
write in interface IModelWriter
Parameters:
p_Model - model
Throws:
java.io.IOException - exception while saving model

setOptions

public void setOptions(java.lang.String[] p_Options)
Description copied from interface: IModelWriter
set options

Specified by:
setOptions in interface IModelWriter
Parameters:
p_Options - options