Skip to content

Commit

Permalink
0.2.7
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaime Sendra committed Sep 1, 2020
1 parent ab058ba commit 3c4d2db
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 18 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.2.6
0.2.7
2 changes: 1 addition & 1 deletion mlearner/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
# Dev branch marker is: 'X.Y.dev' or 'X.Y.devN' where N is an integer.
# 'X.Y.dev0' is the canonical version of 'X.Y.dev'
#
__version__ = '0.2.6'
__version__ = '0.2.7'


# On OSX, we can get a runtime error due to multiple OpenMP libraries loaded
Expand Down
17 changes: 1 addition & 16 deletions mlearner/nlp/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,22 +134,7 @@ def Function_clean(non_breaking_prefix_en):
text = " "
print(text)

def Function_clean(text):
"""
Función por defecto
"""
# text = BeautifulSoup(text, "lxml").get_text()
# Eliminamos la @ y su mención
text = re.sub(r"@[A-Za-z0-9]+", ' ', text)
# Eliminamos los links de las URLs
text = re.sub(r"https?://[A-Za-z0-9./]+", ' ', text)
# Nos quedamos solamente con los caracteres
text = re.sub(r"[^a-zA-Z.!?']", ' ', text)
return text

if self.function is None:
text = Function_clean(text)
else:
if self.function is not None:
text = self.function(text)

if non_breaking_prefix:
Expand Down

0 comments on commit 3c4d2db

Please sign in to comment.