我在pandas中有一个列,如下所示
0 ['business', 'ceremony', 'festival', 'group']
1 ['mountain', 'outdoors', 'travel', 'tree', 'forest']
2 ['people', 'city', 'politics', 'architecture']
3 ['people', 'politics', 'protest', 'travel']
4 ['automobile', 'business', 'police', 'transporation']
我想找到相似的单词并减少几个单词来表示列 即减少相似的单词并使用最常用的单词。
输入:
[automobile, business, police, transportation, vehicle]
输出:
[Vehicle, business, police]
提前致谢