#algorithm #keyword #rake

rake

Rust implementation of Rapid Automatic Keyword Extraction (RAKE) algorithm

11 releases

0.3.3 Feb 24, 2021
0.3.2 Dec 25, 2020
0.3.0 May 10, 2020
0.2.0 Jan 6, 2020
0.1.1 Mar 17, 2018

#702 in Text processing

Download history 6/week @ 2022-12-02 20/week @ 2022-12-09 4/week @ 2022-12-16 6/week @ 2022-12-23 2/week @ 2022-12-30 3/week @ 2023-01-06 4/week @ 2023-01-13 23/week @ 2023-01-20 13/week @ 2023-01-27 62/week @ 2023-02-03 30/week @ 2023-02-10 57/week @ 2023-02-17 4/week @ 2023-02-24 7/week @ 2023-03-03 9/week @ 2023-03-10 154/week @ 2023-03-17

176 downloads per month

MIT/Apache

12KB
212 lines

RAKE.rs

crates.io Documentation Build Status Crates.io

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

~1.7–2.6MB
~68K SLoC