|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsg.edu.nus.comp.nlp.ims.feature.CPOSFeatureExtractor
public class CPOSFeatureExtractor
POS feature extractor.
Field Summary | |
---|---|
protected static int |
g_PIDX
|
protected ICorpus |
m_Corpus
|
protected IFeature |
m_CurrentFeature
|
protected int |
m_Index
|
protected int |
m_IndexInSentence
|
protected int |
m_InstanceLength
|
protected int |
m_POSIndex
|
protected java.util.ArrayList<java.lang.Integer> |
m_POSs
|
protected ISentence |
m_Sentence
|
Constructor Summary | |
---|---|
CPOSFeatureExtractor()
constructor |
|
CPOSFeatureExtractor(java.util.ArrayList<java.lang.Integer> p_Indice)
constructor |
Method Summary | |
---|---|
protected java.lang.String |
formPOSName(int p_Index)
form POS feature name |
java.lang.String |
getCurrentInstanceID()
get the ID of current instance to be extracted |
protected IFeature |
getNext()
get the next feature of current instance |
protected java.lang.String |
getPOS(int p_Index)
get the part-of-speech of item p_Index + m_IndexInSentence |
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 |
protected boolean |
validIndex(int p_Index)
check the validity of index |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.ArrayList<java.lang.Integer> m_POSs
protected ICorpus m_Corpus
protected int m_Index
protected ISentence m_Sentence
protected int m_IndexInSentence
protected int m_InstanceLength
protected int m_POSIndex
protected IFeature m_CurrentFeature
protected static int g_PIDX
Constructor Detail |
---|
public CPOSFeatureExtractor(java.util.ArrayList<java.lang.Integer> p_Indice)
p_Indice
- pos tag interestedpublic CPOSFeatureExtractor()
Method Detail |
---|
public java.lang.String getCurrentInstanceID()
IFeatureExtractor
getCurrentInstanceID
in interface IFeatureExtractor
public boolean hasNext()
IFeatureExtractor
hasNext
in interface IFeatureExtractor
protected IFeature getNext()
protected java.lang.String getPOS(int p_Index)
p_Index
- index
protected boolean validIndex(int p_Index)
p_Index
- index
protected java.lang.String formPOSName(int p_Index)
p_Index
- index
public IFeature next()
IFeatureExtractor
next
in interface IFeatureExtractor
public boolean restart()
IFeatureExtractor
restart
in interface IFeatureExtractor
public boolean setCorpus(ICorpus p_Corpus)
IFeatureExtractor
setCorpus
in interface IFeatureExtractor
p_Corpus
- corpus to be extracted
public boolean setCurrentInstance(int p_Index)
IFeatureExtractor
setCurrentInstance
in interface IFeatureExtractor
p_Index
- instance index
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |