Analysis Engine: Concept - 11791-04/project-team04 GitHub Wiki
Public Interface: Required by JCasAnnotator_ImplBase
Method: initialize(UimaContext aContext) Throws: ResourceInitializationException
Called by UIMA at runtime to initiate the Concept Analysis Engine, defined by the conceptAEDescriptor.xml descriptor. This method simply instantiates a GoPubMedServiceProxy() reference to gain access to the Pub Med API.
Method: process(JCas jcas) Throws: AnalysisEngineProcessException
Receives a JCas object from the UIMA context and uses it to retrieve a Question containing a String with which to pass as the query parameter to a GoPubMedServiceProxy() method. Obtains a list of Finding objects which it then sorts by getScore() and for each Finding creates a ConceptSearchResult, parameterized by a Concept and a rank value to indicate our confidence in the relevance of each concept to the query. Adds the resulting ConceptSearchResult to the JCas to pass along to the CAS Consumer.