diff --git a/pycorenlp/corenlp.py b/pycorenlp/corenlp.py index 6eb2175..b9d63bf 100644 --- a/pycorenlp/corenlp.py +++ b/pycorenlp/corenlp.py @@ -33,7 +33,10 @@ def annotate(self, text, properties=None): try: output = json.loads(output, encoding='utf-8', strict=True) except: - pass + try: + output = json.loads(output, strict=False) + except: + pass return output def tokensregex(self, text, pattern, filter):