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

rake

Rust implementation of Rapid Automatic Keyword Extraction (RAKE) algorithm

12 releases

0.3.4 Apr 7, 2024
0.3.3 Feb 24, 2021
0.3.2 Dec 25, 2020
0.3.0 May 10, 2020
0.1.1 Mar 17, 2018

#300 in Algorithms

Download history 79/week @ 2024-07-04 36/week @ 2024-07-11 23/week @ 2024-07-18 54/week @ 2024-07-25 39/week @ 2024-08-01 37/week @ 2024-08-08 20/week @ 2024-08-15 25/week @ 2024-08-22 42/week @ 2024-08-29 22/week @ 2024-09-05 9/week @ 2024-09-12 47/week @ 2024-09-19 88/week @ 2024-09-26 82/week @ 2024-10-03 24/week @ 2024-10-10 22/week @ 2024-10-17

230 downloads per month

MIT/Apache

12KB
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