StanfordPartOfSpeechTagger implements PartOfSpeechTagger { protected StanfordPartOfSpeechTagger(){ RedwoodConfiguration.empty().captureStderr().apply(); Properties props = new Properties(); props.put("annotators", "tokenize, ssplit, pos"); pipeline = new StanfordCoreNLP(props); RedwoodConfiguration.current().clear().apply(); } protected  StanfordPartOfSpeechTagger(); @Override String getName(); @Override String tag(String text); @Override List<String> tagTopK(String sentence); List<String> getTags(String text); @Override Tagging<String> getTagging(String text); static final StanfordPartOfSpeechTagger INSTANCE; }
@Test public void testStanfordPartOfSpeechTagger() { String s = StanfordPartOfSpeechTagger.INSTANCE.tag("The quick brown fox jumps over the lazy dog."); assertEquals("The/DT quick/JJ brown/JJ fox/NN jumps/VBZ over/IN the/DT lazy/JJ dog/NN ./.",s); }