Crates.io | ssage |
lib.rs | ssage |
version | 0.1.0-alpha1 |
source | src |
created_at | 2022-09-17 00:45:47.437723 |
updated_at | 2022-09-17 00:45:47.437723 |
description | Library to extract important words from a sequence of messages or a full text |
homepage | |
repository | https://github.com/Emulator000/ssage |
max_upload_size | |
id | 668010 |
size | 11,654 |
Extract important words from a sequence of messages or a full text and give it singular priority.
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.