Document doc = new DefaultDocument();
{
doc.putAttribute("text", "I eat sushi with chopsticks.");
}
StanfordPosAnnotator ann = new StanfordPosAnnotator();
{
ann.setProperty("target", "text");
}
ann.annotate(doc); // do annotation
for (Keyword kwd : doc.getKeywords()) {
System.err.println(kwd);
}