How can I tokenize a string in a java class using the stanford parser?
I can only find examples of documentProcessor and PTBTokenizer taking text from an external file.
DocumentPreprocessor dp = new DocumentPreprocessor("hello.txt"); for (List sentence : dp) { System.out.println(sentence); }
Thanks.
source share