python-stop-words icon indicating copy to clipboard operation
python-stop-words copied to clipboard

Whats the difference between safe_get and get_stop ?

Open ejgutierrez74 opened this issue 5 years ago • 1 comments

get_stop_words and get_safe_words ?

stop_words = get_stop_words('english')

and

stop_words = safe_get_stop_words('en')

Thanks

ejgutierrez74 avatar Jul 18 '19 08:07 ejgutierrez74

if the language is not supported or does not exist, safe_get_stop_words will return an empty array.

stop_words = safe_get_stop_words('some_lang') print(stop_words) # []

but in get_stop_words will be the StopWordError exception

aqjw avatar Jan 02 '20 16:01 aqjw