Class 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.String PARAM_NUM_DISPLAYED_TOPIC_WORDS
      Number of the top topic words that can be used e.g.
      static java.lang.String PARAM_STORE_IN_MODEL_INDEX
      Whether or not to store the processed labels in the index of the model object
      static java.lang.String PARAM_TOPIC_MODEL_CONFIG
      XML configuration file for model training, labeling, and search
      static 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
    • Constructor Summary

      Constructors 
      Constructor Description
      TopicIndexer()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void collectionProcessComplete()  
      void initialize​(org.apache.uima.UimaContext aContext)
      Loads model configuration and serialized model and checks whether to populate the model's index
      void process​(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
      • Methods inherited from class org.apache.uima.analysis_component.AnalysisComponent_ImplBase

        batchProcessComplete, destroy, getContext, getResultSpecification, reconfigure, setResultSpecification
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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
    • Constructor Detail

      • TopicIndexer

        public TopicIndexer()
    • Method Detail

      • initialize

        public void initialize​(org.apache.uima.UimaContext aContext)
                        throws org.apache.uima.resource.ResourceInitializationException
        Loads model configuration and serialized model and checks whether to populate the model's index
        Specified by:
        initialize in interface org.apache.uima.analysis_component.AnalysisComponent
        Overrides:
        initialize in class org.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.AnalysisEngineProcessException
        Infers labels and stores them in the CAS; if toModelIndex is set true, information is to stored into the model's index
        Specified by:
        process in class org.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:
        collectionProcessComplete in interface org.apache.uima.analysis_component.AnalysisComponent
        Overrides:
        collectionProcessComplete in class org.apache.uima.analysis_component.AnalysisComponent_ImplBase
        Throws:
        org.apache.uima.analysis_engine.AnalysisEngineProcessException