You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the max_stopword_similarity value passed to extract_terms method is too low, e. g. .10, no terms might be found at all. This results in the following error being raised in term_extractor.py line 124.
raise ValueError(
ValueError: Expected 2D array, got 1D array instead:
array=[].
Reshape your data either using array.reshape(-1, 1) if your data has a single feature or array.reshape(1, -1) if it contains a single sample.
Suggestion:
Check if top_spans actually contains any term candidate by wrapping lines 124-132 in an if condition:
**if len(top_spans) > 0:**
if collapse_similarity is True:
top_spans = self._collapse_similarity(top_spans)
for i, span in enumerate(top_spans):
span._.span_id = i
top_spans = sorted(top_spans, key=lambda span: span._.span_id)
if return_as_table is True:
top_spans = self._return_as_table(top_spans)
return top_spans
Does this make sense to you?
The text was updated successfully, but these errors were encountered:
When the max_stopword_similarity value passed to extract_terms method is too low, e. g. .10, no terms might be found at all. This results in the following error being raised in term_extractor.py line 124.
Suggestion:
Check if top_spans actually contains any term candidate by wrapping lines 124-132 in an if condition:
Does this make sense to you?
The text was updated successfully, but these errors were encountered: