ssage

Crates.iossage
lib.rsssage
version0.1.0-alpha1
sourcesrc
created_at2022-09-17 00:45:47.437723
updated_at2022-09-17 00:45:47.437723
descriptionLibrary to extract important words from a sequence of messages or a full text
homepage
repositoryhttps://github.com/Emulator000/ssage
max_upload_size
id668010
size11,654
Dario (Emulator000)

documentation

README

Ssage


Extract important words from a sequence of messages or a full text and give it singular priority.

Sample of use

Supposing a sentence like "hi! this is just a sample message with distinct words." we could extract keywords and prioritize it.

use ssage::Ssage;

fn sample() {
    let mut ssage = Ssage::new(Default::default());

    let _ = ssage.feed("hi! this is just a sample message with distinct words.");
    ssage.prioritize_keyword("message");
    ssage.prioritize_keyword("just");
    ssage.prioritize_keyword("just");
    ssage.prioritize_keyword("message");
    ssage.prioritize_keyword("message");
    ssage.prioritize_keyword("just");
    ssage.prioritize_keyword("message");

    println!("Output: {}", ssage.feed("just a message"));
}

This should output message just since we prioritize more message than just and as the default configuration excluded words that are less than 4 characters.

Commit count: 1

cargo fmt