OKapi BM25 算法介绍

From wikipedia.org英文版,我主要将其改变成中文。


  BM25(Best Match25)是在信息检索系统中根据提出的query对document进行评分的算法。It is based on the probabilistic retrieval framework developed in the 1970s and 1980s by Stephen E. RobertsonKaren Spärck Jones, and others.BM25算法首先由OKapi系统实现,所以又称为OKapi BM25。

  

      BM25属于bag-of-words模型,bag-of-words模型只考虑document中词频,不考虑句子结构或者语法关系之类,把document当做装words的袋子,具体袋子里面可以是杂乱无章的。It is not a single function, but actually a whole family of scoring functions, with slightly different components and parameters. One of the most prominent instantiations of the function is as follows.

  对于一个query Q, 包括关键字 q_1, ..., q_n, 一个文档的BM25得分:

\text{score}(D,Q) = \sum_{i=1}^{n} \text{IDF}(q_i) \cdot \frac{f(q_i, D) \cdot (k_1 + 1)}{f(q_i, D) + k_1 \cdot (1 - b + b \cdot \frac{|D|}{\text{avgdl}})},
其中IDF是上篇文章《 TD-IDF》中的IDF,f是《 TD-IDF》中的TF,|D|是文档D的长度,avgdl是语料库全部文档的平均长度。k 1和b是参数。 usually chosen, in absence of an advanced optimization, as  k_1 \in [1.2,2.0]  and  b = 0.75

转载于:https://www.cnblogs.com/jilichuan/archive/2012/08/22/2650721.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值