turicreate.text_analytics.stop_words

turicreate.text_analytics.stop_words(lang='en')

Get common words that are often removed during preprocessing of text data, i.e. “stop words”. Currently only English stop words are provided.

Parameters:
lang : str, optional

The desired language. Default: ‘en’ (English).

Returns:
out : set

A set of strings.

Examples

You may remove stop words from an SArray as follows:

>>> docs = turicreate.SArray([{'are': 1, 'you': 1, 'not': 1, 'entertained':1}])
>>> docs.dict_trim_by_keys(turicreate.text_analytics.stop_words(), True)
dtype: dict
Rows: 1
[{'entertained': 1}]