pycantonese.stop_words

pycantonese.stop_words(add=None, remove=None)[source]

Return Cantonese stop words.

New in version 2.2.0.

Parameters
additerable[str], optional

Stop words to add.

removeiterable[str], optional

Stop words to remove.

Returns
set[str]

Examples

>>> stop_words_1 = stop_words()
>>> len(stop_words_1)
104
>>> '香港' in stop_words_1
False
>>> stop_words_1  
{'一啲', '一定', '不如', '不過', ...}
>>>
>>> stop_words_2 = stop_words(add='香港')
>>> len(stop_words_2)
105
>>> '香港' in stop_words_2
True