Created
April 17, 2018 13:17
-
-
Save Fhernd/880329898cae6fb90771e6d2170e7f3b to your computer and use it in GitHub Desktop.
Normalización de texto. Python.
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
import unicodedata | |
texto_1 = 'Ni\u00f1o' | |
texto_2 = 'Nin\u0303o' | |
print(texto_1 == texto_2) | |
texto_1 = unicodedata.normalize('NFC', texto_1) | |
texto_2 = unicodedata.normalize('NFC', texto_2) | |
print(texto_1 == texto_2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment