yhat / python-naive-bayes

Naive Bayes in Python
MIT License
85 stars 43 forks source link

make python3 capable #1

Closed kylepjohnson closed 9 years ago

kylepjohnson commented 9 years ago

This change makes the script Python 2 and 3 compliant.

I ran 2to3, then adjusted the remove_punctuation() function to use a set() and join() instead of maketrans(). Surely this is latter change is not as efficient as maketrans(), but is arguably more readable.

I hope you find this useful and not a nuisance! If there are any adjustments you would like made, feel free to let me know and I can do so.