首页 文章

给定一个单词列表,如何开发一种语法分组的算法方法?

提问于
浏览
1

我正在使用Google Places API,它们包含97个不同位置的list . 我想将位置列表减少到较少数量的位置,因为其中许多位置是可分组的 . 例如, atmbankfinancial ; templechurchmosquesynagogueworship ; schooluniversityeducation ; subway_stationtrain_stationtransit_stationgas_stationtransportation .

但是,也不应该过度概括;例如, pet_storecity_hallcourthouserestaurant 就像 buildings .

我尝试了很多方法来做到这一点 . 首先,我从多个词典中下载列表中97个单词的每个单词的同义词 . 然后,我发现两个单词之间的相似性基于它们共有的唯一同义词的几分之一(Jaccard相似性):

enter image description here

但在那之后,我如何将单词分组?使用传统的聚类方法(k-means,k-medoid,层次聚类和FCM),我没有得到任何好的聚类(我通过手动扫描结果确定了几个错误分类):

enter image description here

enter image description here

我甚至尝试过在Google新闻数据上训练的word2vec模型(其中每个单词都表示为300个特征的向量),我也没有得到基于此的良好集群:
enter image description here

2 回答

  • 1

    您可能正在寻找与向量空间维数减少相关的内容 . 在这些技术中,您需要一个文本语料库,它将位置用作文本中的单词 . 然后,维度减少将这些术语组合在一起 . 你可以在Latent Dirichlet Allocation和Latent语义索引上做一些阅读 . Jurafsky和Martin第16章的一个很好的参考是“Introduction to Information Retrieval " by Manning et al., chapter 18. Note that this book is from 2009, so a lot of advances are not captured. As you noted, there has been a lot of work such as word2vec. Another good reference is " Speech and Language Processing” .

  • 1

    您需要 much 更多数据 .

    没有附加数据的任何算法都不会将 ATMbankfinancial 相关联 . 因为这需要了解这些术语 .

    Jaccard的相似性无法获得这样的知识,它只能对单词起作用 . 然后“河岸”和“银行分行”非常相似 .

    所以不要指望算法会发生魔法 . 你需要神奇的数据......

相关问题