Skip to content

elliotekj/bm25

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BM25: Ranking Algorithm for Search

Hex.pm Version HexDocs Hex.pm License

BM25 is an algorithm used to rank documents based on their relevance to a given search query. It calculates a score for each document based on a given search query, indicating how relevant each document is to that query. The higher the BM25 score, the more relevant the document is considered.

Installation

The package can be installed by adding bm25 to your list of dependencies in mix.exs:

def deps do
  [
    {:bm25, "~> 1.0"}
  ]
end
iex> documents = [
iex>   "BM25 is a ranking function",
iex>   "used by search engines",
iex>   "to rank matching documents"
iex> ]
iex> query = ["ranking", "search", "function"]
iex> BM25.bm25(documents, query)
[1.8455076734299591, 1.0126973514850315, 0.0]

License

BM25 is released under the Apache License 2.0.

About

This package was written by Elliot Jackson.

About

BM25 is a ranking algorithm for search

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages