Last active
December 23, 2015 21:39
-
-
Save soobrosa/6697624 to your computer and use it in GitHub Desktop.
homogenize text
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# input is unicode | |
import unicodedata | |
def homogenize (text): | |
text = unicodedata.normalize('NFKD', text).encode('ascii', 'ignore') | |
text = text.lower() | |
return text |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment