Git Product home page Git Product logo

rsearch-engine's Introduction

Okapi BM25 search

made-with-rust MIT license

Rust

A rust implementation of the BM25 search algorithm for document search, backed by an actix-web server.

BM25 is a bag-of-words retrieval function that ranks a set of documents based on the query terms appearing in each document, regardless of their proximity within the document - Wikipedia

okapi-bm25

Project set-up

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

Make sure you have rust installed. If not, check-out the official rust documentation.

Installing

A step by step series of examples that tell you how to get a development env running

  1. Clone the repo and cd into it.
$ git clone https://github.com/d1pankarmedhi/search_bm25.git
$ cd search_bm25
  1. Build the project to add the dependencies and build the project.
$ cargo build
  1. Run the project
$ cargo run
  1. The server should be running on localhost:8080. Make a POST request and check if there's any response using curl. If yes, then the project is set-up successfully.
$ curl -X POST http://localhost:8080/search?query=breadth
# Response
{
  "documents": [
    {
      "document": "Document 5: Breadth-First Search",
      "score": 6.627193106486171
    },
    {
      "document": "A* search is a popular heuristic search algorithm that combines elements of breadth-first search and best-first search. It uses a heuristic function to estimate the cost of reaching the goal from a particular node. A* search intelligently explores the most promising paths first, improving efficiency in finding optimal solutions.",
      "score": 3.558679160608629
    },
    {
      "document": "Breadth-first search (BFS) is another graph traversal algorithm that explores all the vertices of a graph level by level. It starts at a specific vertex and visits all its neighbors before moving to the next level of vertices. BFS is commonly used to find the shortest path between two vertices or to solve puzzles with minimum moves.",
      "score": 3.2969824201070472
    }
  ]
}

Built With

License

This project is licensed under the MIT License - see the LICENSE.md file for details

rsearch-engine's People

Contributors

d1pankarmedhi avatar

Stargazers

Clayton Kehoe avatar Arijeet Chatterjee avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.