@@ -0,0 +1,1371 @@
+import java.io.File;%0Aimport java.io.FileInputStream;%0Aimport java.io.IOException;%0Aimport java.io.InputStream;%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0Aimport com.google.gson.Gson;%0Aimport opennlp.tools.namefind.NameFinderME;%0Aimport opennlp.tools.namefind.TokenNameFinderModel;%0Aimport opennlp.tools.tokenize.SimpleTokenizer;%0Aimport opennlp.tools.tokenize.Tokenizer;%0Aimport opennlp.tools.tokenize.TokenizerME;%0Aimport opennlp.tools.tokenize.TokenizerModel;%0Aimport opennlp.tools.util.InvalidFormatException;%0Aimport opennlp.tools.util.Span;%0A%09%0Apublic String getPeople(String sentence) %7B%0A%09%09String outputJSON = %22%22;%0A%09%09TokenNameFinderModel model = null;%0A%09%09try %7B%0A%09%09%09model = new TokenNameFinderModel(%0A%09%09%09%09%09new File(%22en-ner-person.bin%22));%0A%09%09%7D catch (InvalidFormatException e) %7B%0A%09%09%09e.printStackTrace();%0A%09%09%7D catch (IOException e) %7B%0A%09%09%09e.printStackTrace();%0A%09%09%7D%0A%09%09NameFinderME finder = new NameFinderME(model);%0A%09%09Tokenizer tokenizer = SimpleTokenizer.INSTANCE;%0A%09%09String%5B%5D tokens = tokenizer.tokenize(sentence);%0A%09%09Span%5B%5D nameSpans = finder.find(tokens);%0A%09%09List%3CPersonName%3E people = new ArrayList%3CPersonName%3E();%0A%09%09String%5B%5D spanns = Span.spansToStrings(nameSpans, tokens);%0A%09%09for (int i = 0; i %3C spanns.length; i++) %7B%0A%09%09%09people.add(new PersonName(spanns%5Bi%5D));%0A%09%09%7D%0A %0A%09%09outputJSON = new Gson().toJson(people);%0A%09%09finder.clearAdaptiveData();%0A%09%09return %22%7B%5C%22names%5C%22:%22 + outputJSON + %22%7D%22;%0A%09%7D%0A

Create People.java