Commits

Riccardo Angius committed 4a1bb18

Additional check for compatibility with pexpect-u

  • Participants
  • Parent commits 78dae46

Comments (0)

Files changed (1)

File corenlp/corenlp.py

     """
     results = {"sentences": []}
     state = STATE_START
-    for line in unidecode(text.decode('utf-8')).split("\n"):
+
+    if type(text) == str:
+        text = text.decode('utf-8')
+
+    for line in unidecode(text).split("\n"):
         line = line.strip()
 
         if line.startswith("Sentence #"):