小编Muh*_*oor的帖子

Python Counter() 函数用于统计文档中出现多次的单词

我正在开发一个 NLP(自然语言处理)项目,其中使用了集合库中的 Python Counter() 函数。我得到以下形式的结果:

\n\n

输出

\n\n
Counter({'due': 23, 'support': 20, 'ATM': 16, 'come': 12, 'case': 11, 'Sallu': 10, 'tough,': 9, 'team': 8, 'evident': , 'likely': 6, 'rupee': 4, 'depreciated': 2, 'senior': 1, 'neutral': 1, 'told': 1, 'tour\\n\\nRussia\xe2\x80\x99s': 1, 'Vladimir': 1, 'indeed,': 1, 'welcome,\xe2\x80\x9d': 1, 'player': 1, 'added': 1, 'Games,': 1, 'Russia': 1, 'arrest': 1, 'system.\\nBut': 1, 'rate': 1, 'Tuesday': 1, 'February,': 1, 'idea': 1, 'ban': 1, 'data': 1, 'consecutive': 1, 'interbank': 1, 'man,': 1, 'involved': 1, 'aggressive': …
Run Code Online (Sandbox Code Playgroud)

python nlp words python-3.x python-collections

3
推荐指数
1
解决办法
1万
查看次数

标签 统计

nlp ×1

python ×1

python-3.x ×1

python-collections ×1

words ×1