sg.edu.nus.comp.nlp.ims.feature
Interface IFeatureExtractor

All Known Implementing Classes:
CAllWordsFeatureExtractorCombination, CCollocationExtractor, CFeatureExtractorCombination, CPOSFeatureExtractor, CSurroundingWordExtractor

public interface IFeatureExtractor

feature extractor interface. extract features from corpus.

Author:
zhongzhi

Method Summary
 java.lang.String getCurrentInstanceID()
          get the ID of current instance to be extracted
 boolean hasNext()
          whether has at least one more feature
 IFeature next()
          get the next feature
 boolean restart()
          restart the iterator
 boolean setCorpus(ICorpus p_Corpus)
          set corpus to be extracted
 boolean setCurrentInstance(int p_Index)
          set the index of instance which to be extracted from corpus
 

Method Detail

setCurrentInstance

boolean setCurrentInstance(int p_Index)
set the index of instance which to be extracted from corpus

Parameters:
p_Index - instance index
Returns:
set success or not

getCurrentInstanceID

java.lang.String getCurrentInstanceID()
get the ID of current instance to be extracted

Returns:
instance id

setCorpus

boolean setCorpus(ICorpus p_Corpus)
set corpus to be extracted

Parameters:
p_Corpus - corpus to be extracted
Returns:
set success or not

restart

boolean restart()
restart the iterator

Returns:
success or not

hasNext

boolean hasNext()
whether has at least one more feature

Returns:
has or not

next

IFeature next()
get the next feature

Returns:
feature