Closed fernio closed 6 years ago
Try encoding the text using UTF-8
from pynlp import StanfordCoreNLP
with open("crashpynlp.txt", 'r') as file:
text = file.read().encode('utf-8')
nlp = StanfordCoreNLP(annotators="tokenize, ssplit, pos, lemma, ner")
doc = nlp(text)
That did the trick, thanks.
I'm trying to use pynlp to process a bunch of text files, but I'm having trouble with one of them crashpynlp.txt . Using the following script
I'm getting the following traceback