abbrev.setDefinedHere(true); } else { abbrev.setTextReference(reference); abbrev.setDefinedHere(false);
@Override public void process(JCas jCas) throws AnalysisEngineProcessException { String txt = jCas.getDocumentText(); Collection<Acronym> all_predictions = model.predict(txt); Map<String, Acronym> final_predictions = model .acronymsArrayToMap(all_predictions); for (String k : final_predictions.keySet()) { Acronym acro = final_predictions.get(k); LOG.debug("Acronym: {} start:{}", acro._shortForm + " :: " + acro._longForm, acro._start); int occurence = acro._start; Abbreviation abrev = new Abbreviation(jCas, occurence, occurence + acro._shortForm.length()); abrev.setExpan(acro._longForm); abrev.setDefinedHere(true); abrev.addToIndexes(); } } }
abr.setDefinedHere(true); // TODO abr.setExpan(longF); abr.setTextReference(a);