diff --git a/VERSION b/VERSION index a53741c..967b33f 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.2.6 \ No newline at end of file +0.2.7 \ No newline at end of file diff --git a/mlearner/__init__.py b/mlearner/__init__.py index e17516a..57b783f 100644 --- a/mlearner/__init__.py +++ b/mlearner/__init__.py @@ -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 diff --git a/mlearner/nlp/utils.py b/mlearner/nlp/utils.py index 8582728..2de2b7f 100644 --- a/mlearner/nlp/utils.py +++ b/mlearner/nlp/utils.py @@ -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: