Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gorse-io/gorse-rs
Rust SDK for gorse recommender system
https://github.com/gorse-io/gorse-rs
gorse recommender-system rust
Last synced: about 2 months ago
JSON representation
Rust SDK for gorse recommender system
- Host: GitHub
- URL: https://github.com/gorse-io/gorse-rs
- Owner: gorse-io
- License: apache-2.0
- Created: 2022-08-18T00:30:23.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-13T03:36:21.000Z (3 months ago)
- Last Synced: 2024-11-13T23:12:14.953Z (about 2 months ago)
- Topics: gorse, recommender-system, rust
- Language: Rust
- Homepage:
- Size: 28.3 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# gorse-rs
[![CI](https://github.com/gorse-io/gorse-rs/actions/workflows/ci.yml/badge.svg)](https://github.com/gorse-io/gorse-rs/actions/workflows/ci.yml)
[![Crates.io](https://img.shields.io/crates/v/gorse_rs)](https://crates.io/crates/gorse_rs/)Rust SDK for gorse recommender system
## Install
```toml
[dependencies]
gorse_rs = "0.4.1"
```## Usage
- Use async client:
```rust
use gorse_rs::{Feedback, Gorse};let client = Gorse::new("http://127.0.0.1:8087", "api_key");
let feedback = vec![
Feedback::new("star", "bob", "vuejs:vue", "2022-02-24"),
Feedback::new("star", "bob", "d3:d3", "2022-02-25"),
Feedback::new("star", "bob", "dogfalo:materialize", "2022-02-26"),
Feedback::new("star", "bob", "mozilla:pdf.js", "2022-02-27"),
Feedback::new("star", "bob", "moment:moment", "2022-02-28")
];
client.insert_feedback(&feedback).await;client.get_recommend("100").await;
```- Use blocking client:
```rust
use gorse_rs::Feedback;
use gorse_rs::blocking::Gorse;let client = Gorse::new("http://127.0.0.1:8087", "api_key");
let feedback = vec![
Feedback::new("star", "bob", "vuejs:vue", "2022-02-24"),
Feedback::new("star", "bob", "d3:d3", "2022-02-25"),
Feedback::new("star", "bob", "dogfalo:materialize", "2022-02-26"),
Feedback::new("star", "bob", "mozilla:pdf.js", "2022-02-27"),
Feedback::new("star", "bob", "moment:moment", "2022-02-28")
];
client.insert_feedback(&feedback);client.get_recommend("100");
```