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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM