如何用python对英语单词进行分类?比如国家和政府:政权,政治,政治家,官员,democracy......besides,还有其他的话题:教育/家庭/经济/学科等等。
我想整理“经济学人”杂志的词汇,并根据频率和主题对这些进行分类。目前,我已经完成了单词的频率统计,下一步是如何用python自动对这些单词进行分类?
发布于 2020-04-14 09:41:40
发布于 2020-04-14 08:59:33
听起来挺难处理的。而且,这也不是一项简单的任务。如果我是你,我会考虑两种方法来做你要做的事。
- If you complete counting the words, then you should match those word to topic. There is no free lunch. Make own your rule for classifying category. e.g. Entertainment has many "TV" and "drama" so If some text has it, then we can guess it belongs to Entertainment.
- If you can't afford to make rules, let machine do it. But even in this case, you should label the article with your desired class(topics).
- Unsupervised pre-training(e.g. clustering) can also be used here. but at last, we need supervised data set with topics.
- You should decide taxonomy of topics.
欢迎来到ML世界。希望它能帮助我们找到正确的起点。
https://stackoverflow.com/questions/61203802
复制相似问题