#algorithm #keyword

rake

Rust implementation of Rapid Automatic Keyword Extraction (RAKE) algorithm

13 releases

Uses new Rust 2024

0.3.6 Feb 20, 2025
0.3.4 Apr 7, 2024
0.3.3 Feb 24, 2021
0.3.2 Dec 25, 2020
0.1.1 Mar 17, 2018

#491 in Text processing

Download history 230/week @ 2024-12-09 49/week @ 2024-12-16 33/week @ 2024-12-23 64/week @ 2025-01-06 46/week @ 2025-01-13 108/week @ 2025-01-20 53/week @ 2025-01-27 87/week @ 2025-02-03 76/week @ 2025-02-10 181/week @ 2025-02-17 65/week @ 2025-02-24 74/week @ 2025-03-03 77/week @ 2025-03-10 24/week @ 2025-03-17 18/week @ 2025-03-24

200 downloads per month

MIT/Apache

13KB
211 lines

RAKE.rs

crates.io Documentation Crates.io Test

The library provides a multilingual implementation of Rapid Automatic Keyword Extraction (RAKE) algorithm for Rust.

How to Use

  • Append rake to dependencies of Cargo.toml:
rake = "0.3"
  • Import modules:
use rake::*;
  • Create a new instance of Rake struct:
let text = "a long text";
let sw = StopWords::from_file("path/to/stop_words_list.txt").unwrap();
let r = Rake::new(sw);
let keywords = r.run(text);
  • Iterate over keywords:
keywords.iter().for_each(
    |&KeywordScore {
        ref keyword,
        ref score,
    }| println!("{}: {}", keyword, score),
);

Dependencies

~2.4–4MB
~74K SLoC