#extract #algorithm #automatic #rapid #keyword #multilingual

rake

Rust implementation of Rapid Automatic Keyword Extraction (RAKE) algorithm

13 releases

new 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

#326 in Algorithms

Download history 22/week @ 2024-10-29 41/week @ 2024-11-05 10/week @ 2024-11-12 55/week @ 2024-11-19 98/week @ 2024-11-26 140/week @ 2024-12-03 149/week @ 2024-12-10 44/week @ 2024-12-17 30/week @ 2024-12-24 71/week @ 2025-01-07 47/week @ 2025-01-14 118/week @ 2025-01-21 43/week @ 2025-01-28 86/week @ 2025-02-04 88/week @ 2025-02-11

343 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.5–4MB
~74K SLoC