Commits

Hiroyoshi Komatsu committed 022660f Merge

Merged in rangius/corenlp-python (pull request #6)

Compatibility with pexpect-u

  • Participants
  • Parent commits 895cf22, 4a1bb18

Comments (0)

Files changed (1)

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 #"):