【发布时间】:2012-05-04 09:21:44
【问题描述】:
考虑到计算它们的计算开销,我只是想知道 n-gram (n>3) (及其出现频率)的用途是什么。是否有任何应用程序中二元组或三元组根本不够用?
如果是这样,n-gram 提取的最新技术是什么?有什么建议?我知道以下几点:
- A new method of n-gram statistics for large number of n and automatic extraction of words and phrases from large text data of Japanese
- Using suffix arrays to compute term frequency and document frequency for all substrings in a corpus
- Word association norms, mutual information, and lexicography
- Retrieving collocations from text: Xtract
【问题讨论】:
-
这可能没有达到 Legend 正在寻找的信息水平,但是来自 Pycon 2012 的这段视频很好地解释了在 python 中计算 n-gram 的基础知识(并使用它们来构建搜索引擎):pyvideo.org/video/715/building-a-python-based-search-engine。对于任何偶然发现这个问题的人。
-
计算 ngram 的“计算开销”可以忽略不计:您可以通过语料库一次性完成。即使存储高阶 ngram 也不是什么大问题。真正的代价是,对于较大的 n,您需要越来越大的语料库来克服稀疏问题。
-
@alexis:如果您能提供更多信息,那就太好了。具体来说,与稀疏问题有关的任何研究表明“计算 n-gram 的计算开销可以忽略不计”?谢谢。
-
@alexis:再次与您核对一下(关于我的评论)。谢谢。
-
@Legend,你看到下面我的回答了吗?
标签: nlp data-mining nltk n-gram