使用re创建停用词列表

问题描述 投票:-1回答:1

我想创建自己的禁用词列表。为了解决大小写问题,我想在列表中加入re:

new_stopwords = ['food','eat','drink','order','time',r'[?M?m?c?C\S]','service'] 

r'[?M?m?c?C\S]'意在找到麦当劳的所有变种。但它似乎没有用

python regex customization stop-words
1个回答
© www.soinside.com 2019 - 2024. All rights reserved.