Class TopicIndexer
- java.lang.Object
-
- org.apache.uima.analysis_component.AnalysisComponent_ImplBase
-
- org.apache.uima.analysis_component.Annotator_ImplBase
-
- org.apache.uima.analysis_component.JCasAnnotator_ImplBase
-
- de.julielab.jcore.ae.topicindexing.TopicIndexer
-
- All Implemented Interfaces:
org.apache.uima.analysis_component.AnalysisComponent
public class TopicIndexer extends org.apache.uima.analysis_component.JCasAnnotator_ImplBase
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringPARAM_NUM_DISPLAYED_TOPIC_WORDSNumber of the top topic words that can be used e.g.static java.lang.StringPARAM_STORE_IN_MODEL_INDEXWhether or not to store the processed labels in the index of the model objectstatic java.lang.StringPARAM_TOPIC_MODEL_CONFIGXML configuration file for model training, labeling, and searchstatic java.lang.StringRESOURCE_KEY_MODEL_FILE_NAMESerialized file containing a de.julielab.topicmodeling.Model object that includes fields for name, version, ID map for Pubmed-IDs and Mallet-IDs, index, and the Mallet model object
-
Constructor Summary
Constructors Constructor Description TopicIndexer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcollectionProcessComplete()voidinitialize(org.apache.uima.UimaContext aContext)Loads model configuration and serialized model and checks whether to populate the model's indexvoidprocess(org.apache.uima.jcas.JCas aJCas)Infers labels and stores them in the CAS; if toModelIndex is set true, information is to stored into the model's index-
Methods inherited from class org.apache.uima.analysis_component.JCasAnnotator_ImplBase
getRequiredCasInterface, process
-
Methods inherited from class org.apache.uima.analysis_component.Annotator_ImplBase
getCasInstancesRequired, hasNext, next
-
-
-
-
Field Detail
-
PARAM_TOPIC_MODEL_CONFIG
public static final java.lang.String PARAM_TOPIC_MODEL_CONFIG
XML configuration file for model training, labeling, and search- See Also:
- Constant Field Values
-
RESOURCE_KEY_MODEL_FILE_NAME
public static final java.lang.String RESOURCE_KEY_MODEL_FILE_NAME
Serialized file containing a de.julielab.topicmodeling.Model object that includes fields for name, version, ID map for Pubmed-IDs and Mallet-IDs, index, and the Mallet model object- See Also:
- Constant Field Values
-
PARAM_NUM_DISPLAYED_TOPIC_WORDS
public static final java.lang.String PARAM_NUM_DISPLAYED_TOPIC_WORDS
Number of the top topic words that can be used e.g. for displaying as label for documents- See Also:
- Constant Field Values
-
PARAM_STORE_IN_MODEL_INDEX
public static final java.lang.String PARAM_STORE_IN_MODEL_INDEX
Whether or not to store the processed labels in the index of the model object- See Also:
- Constant Field Values
-
-
Method Detail
-
initialize
public void initialize(org.apache.uima.UimaContext aContext) throws org.apache.uima.resource.ResourceInitializationExceptionLoads model configuration and serialized model and checks whether to populate the model's index- Specified by:
initializein interfaceorg.apache.uima.analysis_component.AnalysisComponent- Overrides:
initializein classorg.apache.uima.analysis_component.AnalysisComponent_ImplBase- Throws:
org.apache.uima.resource.ResourceInitializationException
-
process
public void process(org.apache.uima.jcas.JCas aJCas) throws org.apache.uima.analysis_engine.AnalysisEngineProcessExceptionInfers labels and stores them in the CAS; if toModelIndex is set true, information is to stored into the model's index- Specified by:
processin classorg.apache.uima.analysis_component.JCasAnnotator_ImplBase- Throws:
org.apache.uima.analysis_engine.AnalysisEngineProcessException
-
collectionProcessComplete
public void collectionProcessComplete() throws org.apache.uima.analysis_engine.AnalysisEngineProcessException- Specified by:
collectionProcessCompletein interfaceorg.apache.uima.analysis_component.AnalysisComponent- Overrides:
collectionProcessCompletein classorg.apache.uima.analysis_component.AnalysisComponent_ImplBase- Throws:
org.apache.uima.analysis_engine.AnalysisEngineProcessException
-
-