April 2019
Beginner to intermediate
386 pages
11h 20m
English
The necessary steps include the following:
import java.util.Arrays;import java.util.List;import edu.stanford.nlp.parser.lexparser.LexicalizedParser;import edu.stanford.nlp.trees.Tree;import edu.stanford.nlp.trees.TreePrint;
LexicalizedParser lexicalizedParser = LexicalizedParser.loadModel("englishPCFG.ser.gz");List<String> wordList = Arrays.asList("The", "old man", "sat", "down", "beside", "the", "tree", ".");
Tree tree = lexicalizedParser.parseStrings(wordList);tree.pennPrint();
Read now
Unlock full access