Skip to content

Instantly share code, notes, and snippets.

@Fhernd
Created April 17, 2018 13:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Fhernd/880329898cae6fb90771e6d2170e7f3b to your computer and use it in GitHub Desktop.
Save Fhernd/880329898cae6fb90771e6d2170e7f3b to your computer and use it in GitHub Desktop.
Normalización de texto. Python.
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