org.apache.uima.lucas
Class ProspectiveSearchAE

java.lang.Object
  extended by org.apache.uima.analysis_component.AnalysisComponent_ImplBase
      extended by org.apache.uima.analysis_component.Annotator_ImplBase
          extended by org.apache.uima.analysis_component.CasAnnotator_ImplBase
              extended by org.apache.uima.lucas.LuceneDocumentAE
                  extended by org.apache.uima.lucas.ProspectiveSearchAE
All Implemented Interfaces:
org.apache.uima.analysis_component.AnalysisComponent

public class ProspectiveSearchAE
extends LuceneDocumentAE

The ProspectiveSearchAE monitors if one of the defined search queries occurs in the processed document, for each matching search query a FS is inserted into the CAS.

Optionally the matched text can be marked by a set of annotations, the most common use case for this is search term highlighting.

The defined search queries are provided by a user implemented SearchQueryProvider, which could for example retrieve the search queries from a database or a web service.

The implementation first indexes the document and then searches all defined queries against this one document index, for indexing the Lucene MemoryIndex is used. Notes about the runtime performance can be found in the javadoc of the MemoryIndex class.

See Also:
SearchQueryProvider, SearchQuery, MemoryIndex

Field Summary
 
Fields inherited from class org.apache.uima.lucas.LuceneDocumentAE
annotationTokenStreamBuilder, fieldBuilder, fieldDescriptions, filterBuilder, PARAM_MAPPINGFILE, tokenizer
 
Constructor Summary
ProspectiveSearchAE()
           
 
Method Summary
 void initialize(org.apache.uima.UimaContext aContext)
          initializes the analyzer
 void process(org.apache.uima.cas.CAS aCAS)
           
 void typeSystemInit(org.apache.uima.cas.TypeSystem aTypeSystem)
           
 
Methods inherited from class org.apache.uima.lucas.LuceneDocumentAE
createDocument, preloadResources
 
Methods inherited from class org.apache.uima.analysis_component.CasAnnotator_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, collectionProcessComplete, destroy, getContext, getResultSpecification, reconfigure, setResultSpecification
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProspectiveSearchAE

public ProspectiveSearchAE()
Method Detail

initialize

public void initialize(org.apache.uima.UimaContext aContext)
                throws org.apache.uima.resource.ResourceInitializationException
Description copied from class: LuceneDocumentAE
initializes the analyzer

Specified by:
initialize in interface org.apache.uima.analysis_component.AnalysisComponent
Overrides:
initialize in class LuceneDocumentAE
Throws:
org.apache.uima.resource.ResourceInitializationException

typeSystemInit

public void typeSystemInit(org.apache.uima.cas.TypeSystem aTypeSystem)
                    throws org.apache.uima.analysis_engine.AnalysisEngineProcessException
Overrides:
typeSystemInit in class org.apache.uima.analysis_component.CasAnnotator_ImplBase
Throws:
org.apache.uima.analysis_engine.AnalysisEngineProcessException

process

public void process(org.apache.uima.cas.CAS aCAS)
             throws org.apache.uima.analysis_engine.AnalysisEngineProcessException
Specified by:
process in class org.apache.uima.analysis_component.CasAnnotator_ImplBase
Throws:
org.apache.uima.analysis_engine.AnalysisEngineProcessException


Copyright © 2006-2011 The Apache Software Foundation. All Rights Reserved.