string_grouper
string_grouper copied to clipboard
how to handle 'ValueError: empty vocabulary; perhaps the documents only contain stop words' in group_similar_strings
currently I am having to use a try/except clause when using group_similar_strings in case all of the strings only contain stopwords. Is it possible to handle this case differently, e.g. just return all strings ungrouped? or perhaps just a more descriptive error so that I can except and handle OnlyStopwordsError or similar instead of any ValueError. great package, many thanks.
That makes sense, @gw00207 and is a simple enough addition to make. Can you create a pull request for this?
please see https://github.com/Bergvca/string_grouper/pull/67