public class SESentenceFeatureAnnotator
extends JCasAnnotator_ImplBase
Modifier and Type | Class and Description |
---|---|
private class |
SESentenceFeatureAnnotator.SideEffect |
Modifier and Type | Field and Description |
---|---|
private java.util.List |
metaKey |
private java.util.Map |
metaKeywords |
Constructor and Description |
---|
SESentenceFeatureAnnotator() |
Modifier and Type | Method and Description |
---|---|
private void |
annotatePSESentenceFeatures(JCas jcas)
Annotate PSESentenceFeature to be used to classify SE sentences based on
the previously trained model
|
private java.util.List |
getLocationFeaturesFromMetaKeywords(JCas jcas,
PSESentence ps)
Return the List of location features of meta keywords metaKeywords -
key:metakeyword, value:actual keyword
|
void |
initialize(UimaContext annotCtx) |
void |
process(JCas jcas) |
java.util.Map |
readMetaKeywordsFromFile(java.lang.String fileName,
java.util.List key)
Return LinkedHashMap (key:metakeyword, value:set of actual keywords
belonging to metakeyword) and assign key in the insertion order (cf)
LinkedHashMap.keySet() keeps the order)
input file format: metakeyword|keyword|keyword...
|
public void initialize(UimaContext annotCtx) throws ResourceInitializationException
ResourceInitializationException
public void process(JCas jcas) throws AnalysisEngineProcessException
AnalysisEngineProcessException
private void annotatePSESentenceFeatures(JCas jcas)
jcas
- private java.util.List getLocationFeaturesFromMetaKeywords(JCas jcas, PSESentence ps)
jcas
- ps
- PSESentencepublic java.util.Map readMetaKeywordsFromFile(java.lang.String fileName, java.util.List key) throws java.io.IOException
java.io.IOException