nlp - 文本摘要: how to choose the right n-gram size

标签 nlp data-mining information-retrieval text-mining summary

我正在总结文本,使用 nltk 库我能够提取二元组、一元组和三元组并按频率对它们进行排序

由于我对这个领域(NLP)非常陌生,我想知道是否可以使用一种统计模型来自动选择 Ngram 的正确大小(我所说的大小是指 N-gram 的长度)单词一元组、两个单词二元组或 3 个单词三元组)

例如,假设我想要总结这段文本,作为总结,我将只保留 5 个最相关的 N 元语法:

"A more principled way to estimate sentence importance is using random walks 
and eigenvector centrality. LexRank[5] is an algorithm essentially identical 
to TextRank, and both use this approach for document summarization. The two 
methods were developed by different groups at the same time, and LexRank 
simply focused on summarization, but could just as easily be used for
keyphrase extraction or any other NLP ranking task." wikipedia

然后作为输出,我想要“随机游走”、“texRank”、“lexRanks”、“文档摘要”、“关键短语提取”、“NLP 排名任务”

换句话说,我的问题是:如何推断一元语法比二元语法或三元语法更相关? (仅使用频率作为 N-gram 相关性的度量不会给我想要的结果)

任何人都可以给我指出一篇研究论文、算法或已经使用或解释过这种方法的类(class)

提前谢谢您。

最佳答案

考虑到您有一个语料库,您可以尝试使用主题建模技术(例如 Biterm )来帮助您推断与给定主题最相关的术语,因为您的术语也可能是 n 元语法。这将是一个概率近似,因为正如您所提到的,简单地计算频率并不能产生好的结果。

当然,这种方法考虑了词形还原和停用词删除。

关于nlp - 文本摘要: how to choose the right n-gram size,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28072231/

相关文章:

regex - 如何在R中条件下的字符串后添加 "."

algorithm - 网络爬虫 : Assigning a score to a URL (using its words composing it) given statistics of words previously crawled

algorithm - 查找属于特定集合的子集的集合

lucene - 语言语料库搜索引擎

java - 如何使用 illinois-edison 序列化/反序列化

python - 拉丁语到英语字母散列

machine-learning - 调整 Apache Spark MLlib 算法

machine-learning - 机器学习中如何处理具有其他属性的时间序列数据?

java - 信息检索系统的数据结构/算法

NLP:定性 "positive"vs "negative"句子