private void addHeuristicPredicateView(TextAnnotation ta) throws Exception { View view = new View(heuristicPredicateView, "", ta, 1.0); List<Constituent> predicates = heuristic.getPredicates(ta); for (Constituent c : predicates) view.addConstituent(c); ta.addView(heuristicPredicateView, view); } }
/** * remove overlapping entities, put them in a View and add them to ta * @param ta * @param neConstituents */ private static void processEntities(TextAnnotation ta, List<Constituent> neConstituents, String viewName ) { neConstituents = removeOverlappingEntities( neConstituents ); View nerView = new View( viewName, NAME, ta, 1.0 ); for ( Constituent c : neConstituents ) nerView.addConstituent( c ); ta.addView( viewName, nerView ); }
View ner = new View(ViewNames.NER_CONLL, "DocumentController",ta,1.0); ta.addView(ViewNames.NER_CONLL, ner);
View ner = new View(ViewNames.NER_CONLL, "", ta, 1.0); ta.addView(ViewNames.NER_CONLL, ner);
View ner = new View(ViewNames.NER_CONLL, "SentenceController",ta,1.0); ta.addView(ViewNames.NER_CONLL, ner);
ner = ta.getView(ViewNames.NER_CONLL); }else{ ner = new View(ViewNames.NER_CONLL, "Ltf2TextAnnotation",ta,1.0); ta.addView(ViewNames.NER_CONLL, ner);
ner = ta.getView(ViewNames.NER_ONTONOTES); }else{ ner = new View(ViewNames.NER_CONLL, "Ltf2TextAnnotation",ta,1.0); ta.addView(ViewNames.NER_CONLL, ner);
@Override protected void addView(TextAnnotation ta) throws AnnotatorException { assert ta.hasView(ViewNames.SENTENCE): "Sentences view didn't find . . . "; List<Constituent> sentences = ta.getView(ViewNames.SENTENCE).getConstituents(); View vu = new View(viewName, "ClausIEAnnotator", ta, 1.0); assert sentences.size() == ta.getNumberOfSentences(); for(Constituent sent : sentences) { String[] clausieResults = ClausieSplitter.split(sent.getSurfaceForm()); Constituent sentenceCons = new Constituent("sent-" + sent.getSentenceId(), viewName, ta, sent.getStartSpan(), sent.getEndSpan()); int propId = 0; for(String clausieSent : clausieResults) { sentenceCons.addAttribute("clauseIe:" + propId, clausieSent); propId++; } vu.addConstituent(sentenceCons); } ta.addView(viewName, vu); } }
View postView = new View(getPostViewName(), NAME, ta, 1.0);
newVu = new TreeView(vu.viewName, vu.viewGenerator, newTA, vu.score); } else { newVu = new View(vu.viewName, vu.viewGenerator, newTA, vu.score);
View postView = new View(getPostViewName(), NAME, ta, 1.0);
newVu = new TreeView(vu.viewName, vu.viewGenerator, newTA, vu.score); } else { newVu = new View(vu.viewName, vu.viewGenerator, newTA, vu.score);
newVu = new TreeView(vu.viewName, vu.viewGenerator, newTA, vu.score); } else { newVu = new View(vu.viewName, vu.viewGenerator, newTA, vu.score);
newVu = new TreeView(vu.viewName, vu.viewGenerator, newTA, vu.score); } else { newVu = new View(vu.viewName, vu.viewGenerator, newTA, vu.score);