sg.edu.nus.comp.nlp.ims.instance
Class CInstanceExtractor

java.lang.Object
  extended by sg.edu.nus.comp.nlp.ims.instance.CInstanceExtractor
All Implemented Interfaces:
IInstanceExtractor

public class CInstanceExtractor
extends java.lang.Object
implements IInstanceExtractor

a common instance extractor.

Author:
zhongzhi

Field Summary
protected  ICorpus m_Corpus
           
protected  IFeatureExtractor m_FeatureExtractor
           
protected  int m_InstanceSize
           
protected  int m_Iterator
           
protected  boolean m_Ready
           
 
Constructor Summary
CInstanceExtractor()
          default constructor
 
Method Summary
 boolean hasNext()
          check whether has more instance remain
 IInstance next()
          get the next instance
 boolean setCorpus(ICorpus p_Corpus)
          set corpus to be extracted
 boolean setFeatureExtractor(IFeatureExtractor p_FeatureExtactor)
          set featureExtractor to the InstanceExtractor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_Corpus

protected ICorpus m_Corpus

m_FeatureExtractor

protected IFeatureExtractor m_FeatureExtractor

m_Ready

protected boolean m_Ready

m_InstanceSize

protected int m_InstanceSize

m_Iterator

protected int m_Iterator
Constructor Detail

CInstanceExtractor

public CInstanceExtractor()
default constructor

Method Detail

next

public IInstance next()
Description copied from interface: IInstanceExtractor
get the next instance

Specified by:
next in interface IInstanceExtractor
Returns:
instance

hasNext

public boolean hasNext()
Description copied from interface: IInstanceExtractor
check whether has more instance remain

Specified by:
hasNext in interface IInstanceExtractor
Returns:
has or not

setCorpus

public boolean setCorpus(ICorpus p_Corpus)
Description copied from interface: IInstanceExtractor
set corpus to be extracted

Specified by:
setCorpus in interface IInstanceExtractor
Parameters:
p_Corpus - corpus to be extracted
Returns:
set success or not

setFeatureExtractor

public boolean setFeatureExtractor(IFeatureExtractor p_FeatureExtactor)
Description copied from interface: IInstanceExtractor
set featureExtractor to the InstanceExtractor

Specified by:
setFeatureExtractor in interface IInstanceExtractor
Parameters:
p_FeatureExtactor - feature extractor
Returns:
set success or not