List of usage examples for edu.stanford.nlp.ling TaggedWordFactory TaggedWordFactory
public TaggedWordFactory(char divider)
TaggedWordFactory
. From source file:org.ets.research.nlp.stanford_thrift.general.CoreNLPThriftUtil.java
License:Open Source License
public static List<TaggedWord> getListOfTaggedWordsFromTaggedSentence(String taggedSentence, String divider) { String[] taggedTokens = taggedSentence.split(" "); TaggedWordFactory tf = new TaggedWordFactory(divider.charAt(0)); List<TaggedWord> taggedWordList = new ArrayList<TaggedWord>(); for (String taggedToken : taggedTokens) { taggedWordList.add((TaggedWord) tf.newLabelFromString(taggedToken)); }/*from w ww . ja va2s. c o m*/ return taggedWordList; }