Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def limpiatextoo(texto):
- texto = texto.lower()
- texto = re.sub(r"\n", "", texto)
- texto = re.sub(r"[-()]", "", texto)
- texto = re.sub(r"\.", " .", texto)
- texto = re.sub(r"\!", " !", texto)
- texto = re.sub(r"\?", " ?", texto)
- texto = re.sub(r"\,", " ,", texto)
- texto = re.sub(r"i'm", "i am", texto)
- texto = re.sub(r"he's", "he is", texto)
- texto = re.sub(r"she's", "she is", texto)
- texto = re.sub(r"it's", "it is", texto)
- texto = re.sub(r"that's", "that is", texto)
- texto = re.sub(r"what's", "that is", texto)
- texto = re.sub(r"\'ll", " will", texto)
- texto = re.sub(r"\'re", " are", texto)
- texto = re.sub(r"won't", "will not", texto)
- texto = re.sub(r"can't", "cannot", texto)
- texto = re.sub(r"n't", " not", texto)
- texto = re.sub(r"n'", "ng", texto)
- texto = re.sub(r"ohh", "oh", texto)
- return texto
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement