https://github.com/ryanavella/summary-rs
Extract the sentences which best summarize a document.
https://github.com/ryanavella/summary-rs
rust summarization summarizer summary tf-idf
Last synced: 5 months ago
JSON representation
Extract the sentences which best summarize a document.
- Host: GitHub
- URL: https://github.com/ryanavella/summary-rs
- Owner: ryanavella
- License: apache-2.0
- Created: 2024-07-01T03:58:31.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-01T04:05:10.000Z (about 2 years ago)
- Last Synced: 2024-12-31T22:22:21.288Z (over 1 year ago)
- Topics: rust, summarization, summarizer, summary, tf-idf
- Language: Rust
- Homepage:
- Size: 18.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
# summary
Extract the sentences which best summarize a document.
[](https://github.com/ryanavella/summary-rs/blob/master/LICENSE-MIT) [](https://github.com/ryanavella/summary-rs/blob/master/LICENSE-APACHE) [](https://crates.io/crates/summary) [](https://docs.rs/summary)
## Example
```rust
let summarizer = Summarizer::new(Language::English);
let text = "See Spot. See Spot run. Run Spot, run!";
let n = 2.try_into().unwrap();
for sentence in summarizer.summarize_sentences(text, n) {
println!("{sentence}");
}
```