This project aims to implement various rank fusion algorithms in Rust and currently Reciprocal Ranking Fusion has been implemented. Rank fusion algorithms are commonly used in information retrieval systems to combine ranked lists generated by different search engines or ranking algorithms.
- Implemented the Reciprocal Ranking Fusion Algorithm, an unoptimised version for the same.
- Currently working on optimizing the
comb_sum
function using K-way merging to reduce its time complexity to O(nlogk).
I am making use of Rayon
crate to parallelise the operations as much as possible.
The project is structured as follows:
src/
: Contains the source code for the rank fusion algorithms.normalization/
: Contains implementations of normalization methods used in the fusion algorithms.data_struct.rs
: ContainsRun
andRuns
data structures along with some implementations which were required such ascreate_run_from_dict()
andfrom_list_of_hashmaps_to_runs()
etc.
examples/
: Contains example usage of the implemented algorithms.tests/
: Contains unit tests for ensuring the correctness of the implementations.
To use the rank fusion algorithms in your project, add the following to your Cargo.toml
: (tbf avoid using this for now, still in a very early stage. Check out ranx python library instead in case of python project.)
[dependencies]
rustified-rank-fusions = { git = "https://github.com/adismort14/rustified-rank-fusions" }
Then, import the desired fusion algorithms in your Rust code:
use rustified_rank_fusions::{rrf};
Contributions are welcome! If you find any bugs or have suggestions for improvements (oh, you will find many), please (don't) open an issue on the GitHub repository.
This project is licensed under the do whatever the duck you want with this.