@Test @SuppressWarnings("rawtypes") public void testProcess() throws ResourceInitializationException, IOException, InvalidXMLException { XMLInputSource likelihoodXML = null; ResourceSpecifier likelihoodSpec = null; AnalysisEngine likelihoodAnnotator = AnalysisEngineFactory.createEngine(DESCRIPTOR); JCas aJCas = null; try { aJCas = likelihoodAnnotator.newJCas(); } catch (ResourceInitializationException e) { LOGGER.error("testProcess()", e); } initCas(aJCas); try { likelihoodAnnotator.process(aJCas); } catch (Exception e) { LOGGER.error("testProcess()", e); } JFSIndexRepository indexes = aJCas.getJFSIndexRepository(); Iterator likelihoodIter = indexes.getAnnotationIndex( LikelihoodIndicator.type).iterator(); ArrayList<String> prediction = getPredictedIndicators(likelihoodIter); String predictedIndicators = prediction.get(0); String predictedCategories = prediction.get(1); LOGGER.debug("testProcess() - Predicted Indicators: " + predictedIndicators); LOGGER.debug("testProcess() - Wanted Indicators: " + TEST_INDICATORS); assertEquals(TEST_INDICATORS, predictedIndicators); LOGGER.debug("testProcess() - Predicted Categories: " + predictedCategories); LOGGER.debug("testProcess() - Wanted Indicators: " + TEST_CATEGORIES); assertEquals(TEST_CATEGORIES, predictedCategories); }
@Override public void process(JCas aJCas) throws AnalysisEngineProcessException { detectLikelihood(aJCas); }
LikelihoodDetectionAnnotator extends JCasAnnotator_ImplBase { @Override public void process(JCas aJCas) throws AnalysisEngineProcessException { detectLikelihood(aJCas); } }
LikelihoodDetectionAnnotator extends JCasAnnotator_ImplBase { @Override public void process(JCas aJCas) throws AnalysisEngineProcessException { detectLikelihood(aJCas); }  }
LikelihoodDetectionAnnotator extends JCasAnnotator_ImplBase { @Override public void process(JCas aJCas) throws AnalysisEngineProcessException { detectLikelihood(aJCas); }  @Override void initialize(UimaContext aContext); @Override void process(JCas aJCas); }
LikelihoodDetectionAnnotator extends JCasAnnotator_ImplBase { @Override public void process(JCas aJCas) throws AnalysisEngineProcessException { detectLikelihood(aJCas); }  @Override void initialize(UimaContext aContext); @Override void process(JCas aJCas); static final String PARAM_LIKELIHOOD_DICT_PATH; }