@RequestMapping(value="/removeall", method=RequestMethod.POST) @ResponseStatus(value = HttpStatus.OK) @ResponseBody public String removeall(@RequestParam(value="id") String idstring, HttpSession hs, Model model) throws Exception { SessionData sd = new SessionData(hs); TreeMap<String, TextAnnotation> tas = sd.tas; io.github.mayhewsw.Dictionary dict = sd.dict; TextAnnotation ta = tas.get(idstring); Boolean showdefs = sd.showdefs; View ner = ta.getView(ViewNames.NER_CONLL); //ner.removeAllConsituents(); for(Constituent c : ner.getConstituents()){ ner.removeConstituent(c); } String out = HtmlGenerator.getHTMLfromTA(ta, sd.dict, sd.showdefs, sd.showroman); return out; }
System.err.println("Should only be one constituent on this string..."); for(Constituent other : others){ ner.removeConstituent(other); others = new ArrayList<>(); ner.removeConstituent(other); add = true; rulecounts.get(surface).getSecond().incrementAndGet();
ner.removeConstituent(oldc); removed = true; } else if (a <= c && b == d) { ner.removeConstituent(oldc); removed = true;
ner.removeConstituent(oldc); removed = true; }else if(a <= c && b == d){ ner.removeConstituent(oldc); removed = true;
int origend = oldc.getEndSpan(); String origlabel = oldc.getLabel(); ner.removeConstituent(oldc);
int origend = oldc.getEndSpan(); String origlabel = oldc.getLabel(); ner.removeConstituent(oldc);
sentences.removeConstituent(first); sentences.removeConstituent(second); sentences.addConstituent(combinedSent);
sentences.removeConstituent(first); sentences.removeConstituent(second); sentences.addConstituent(combinedSent);