python - 构建标签云的巧妙方法? - Python

标签 python django indexing keyword data-mining

我已经构建了一个内容聚合器,并想添加一个代表当前趋势的标签云。

不幸的是,这非常复杂,因为我必须寻找代表每篇文章上下文的关键字

例如Iwastheamazingnice等词strong> 与上下文无关。


帮助将不胜感激! :)

最佳答案

使用NLTK ,特别是它的停用词语料库:

Besides regular content words, there is another class of words called stop words that perform important grammatical functions, but are unlikely to be interesting by themselves. These include prepositions, complementizers, and determiners. NLTK comes bundled with the Stopwords corpus, a list of 2400 stop words across 11 different languages (including English).

关于python - 构建标签云的巧妙方法? - Python,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2485800/

相关文章:

python - 如何在Uvicorn Web服务器上运行Django?

python - 如何为这个 Django 自定义标签编写测试用例

python - 我应该为 Flask、uWSGI 和 nginx 提供单独的容器吗?

python - 是否有一个命令,以便当某事比答案少 3 或多 3 时它会做某事?

python - 您可以列出 S3 存储桶中的所有文件夹吗?

sql - 让 SQL 使用正确的索引

python - Pandas:使用 set_index() 将列设置为索引会创建一个子索引。为什么会发生这种情况以及如何消除它?

python - 从背景窗口获取像素颜色

python - 嵌套序列化程序显示反向时出现问题

php explode - 需要第二个元素