Skip to content

Commit

Permalink
Agrego DeprecationWarning
Browse files Browse the repository at this point in the history
Es para un parametro de las sugerencias que ya no se usa mas
  • Loading branch information
meliascosta committed Jun 13, 2017
1 parent e655c6b commit 8ab3f5c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion textar/text_classifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,8 @@ def _make_text_vectors(self, examples):
return textvec

def get_similar(self, example, max_similars=3, similarity_cutoff=None,
term_diff_max_rank=10, filter_list=None):
term_diff_max_rank=10, filter_list=None,
term_diff_cutoff=None):
"""Devuelve textos similares al ejemplo dentro de los textos entrenados.
Nota:
Expand All @@ -185,6 +186,7 @@ def get_similar(self, example, max_similars=3, similarity_cutoff=None,
que se devuelven en best_words).
filter_list (list): Lista de ids de textos en la cual buscar textos
similares.
term_diff_cutoff (float): Deprecado. Se quitara en el futuro.
Returns:
tuple (list, list, list): (text_ids, sorted_dist, best_words)
Expand All @@ -197,6 +199,9 @@ def get_similar(self, example, max_similars=3, similarity_cutoff=None,
sugerencia.
"""

if term_diff_cutoff:
warnings.warn('Deprecado. Quedo sin uso. Se quitara en el futuro.',
DeprecationWarning)
if filter_list:
if max_similars > len(filter_list):
raise ValueError("No se pueden pedir mas sugerencias que la \
Expand Down

0 comments on commit 8ab3f5c

Please sign in to comment.