@Test public void emptyTest() { agdistis.process(null); agdistis.process(""); }
public String process(final String input) { List<Document> docs; try { docs = nif.parseNIF(input); } catch (Exception e) { return NifEverything.INPUT_NOT_PARSABLE; } List<Document> answerDocs = new ArrayList<>(); for (Document doc : docs) { Document answerDoc = new DocumentImpl(doc.getText()); List<Marking> resultMarkings = requestForStringAgdistis(createAgdistisString(doc)); nif.addAllMarkingsToDoc(answerDoc, resultMarkings); answerDocs.add(answerDoc); } return nif.writeNIF(answerDocs); }
AgdistisWrapper { public String process(final String input) { List<Document> docs; try { docs = nif.parseNIF(input); } catch (Exception e) { return NifEverything.INPUT_NOT_PARSABLE; } List<Document> answerDocs = new ArrayList<>(); for (Document doc : docs) { Document answerDoc = new DocumentImpl(doc.getText()); List<Marking> resultMarkings = requestForStringAgdistis(createAgdistisString(doc)); nif.addAllMarkingsToDoc(answerDoc, resultMarkings); answerDocs.add(answerDoc); } return nif.writeNIF(answerDocs); } }
AgdistisWrapper { public String process(final String input) { List<Document> docs; try { docs = nif.parseNIF(input); } catch (Exception e) { return NifEverything.INPUT_NOT_PARSABLE; } List<Document> answerDocs = new ArrayList<>(); for (Document doc : docs) { Document answerDoc = new DocumentImpl(doc.getText()); List<Marking> resultMarkings = requestForStringAgdistis(createAgdistisString(doc)); nif.addAllMarkingsToDoc(answerDoc, resultMarkings); answerDocs.add(answerDoc); } return nif.writeNIF(answerDocs); }  }
AgdistisWrapper { public String process(final String input) { List<Document> docs; try { docs = nif.parseNIF(input); } catch (Exception e) { return NifEverything.INPUT_NOT_PARSABLE; } List<Document> answerDocs = new ArrayList<>(); for (Document doc : docs) { Document answerDoc = new DocumentImpl(doc.getText()); List<Marking> resultMarkings = requestForStringAgdistis(createAgdistisString(doc)); nif.addAllMarkingsToDoc(answerDoc, resultMarkings); answerDocs.add(answerDoc); } return nif.writeNIF(answerDocs); }  @RequestMapping(method = RequestMethod.GET) String getAgdistis(); @RequestMapping(method = RequestMethod.POST) String postAgdistis(@RequestBody final String input); String process(final String input); List<Marking> requestForStringAgdistis(final String sentence); String createAgdistisString(final Document doc); }
AgdistisWrapper { public String process(final String input) { List<Document> docs; try { docs = nif.parseNIF(input); } catch (Exception e) { return NifEverything.INPUT_NOT_PARSABLE; } List<Document> answerDocs = new ArrayList<>(); for (Document doc : docs) { Document answerDoc = new DocumentImpl(doc.getText()); List<Marking> resultMarkings = requestForStringAgdistis(createAgdistisString(doc)); nif.addAllMarkingsToDoc(answerDoc, resultMarkings); answerDocs.add(answerDoc); } return nif.writeNIF(answerDocs); }  @RequestMapping(method = RequestMethod.GET) String getAgdistis(); @RequestMapping(method = RequestMethod.POST) String postAgdistis(@RequestBody final String input); String process(final String input); List<Marking> requestForStringAgdistis(final String sentence); String createAgdistisString(final Document doc);  }