文本摘要:如何选择合适的 n-gram 大小

sel*_*sel 5 nlp information-retrieval summary data-mining text-mining

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

由于我对这个领域 (NLP) 很陌生,我想知道是否可以使用统计模型来自动选择合适的 Ngrams 大小(我的意思是 N-gram 的长度,一个单词的 unigram,两个字的二元组,或 3 个字的三元组)

例如,假设我有这篇想要总结的文本,作为总结,我将只保留 5 个最相关的 N-gram:

"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
Run Code Online (Sandbox Code Playgroud)

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

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

任何人都可以向我指出已经使用或解释过这种方法的研究论文、算法或课程吗?

先感谢您。

小智 0

  1. 我相信文档摘要是依赖于领域的。因此,如果您有域语料库,您可以使用 tf-idf 来了解您正在提取的 n-gram 的相关性。您可以对 n 元语法应用一些词形还原以获得更好的相关性分数。

  2. 还可以使用谷歌 N-gram http://www.ngrams.info/来计算相关性分数。