mit-nlp / MITIE

MITIE: library and tools for information extraction
2.92k stars 537 forks source link

Str support for python3 #66

Closed raphael0202 closed 8 years ago

raphael0202 commented 8 years ago

MITIE currently needs every str to be encoded in bytes in Python3. As I'm mainly using Python3, I've modified mitie.py to deal with unencoded strings (unicode in Python2 or str in python3), and to encode them before calling ctypes functions. I also returned str instead of bytes in Python3 for every function that was returning strings, as this is the default string type in Python3. Would you be interested in a pull request?

davisking commented 8 years ago

Sure, sounds like a good improvement :)

raphael0202 commented 8 years ago

I've submitted a pull request, the code should be fully python3 compatible :)