2 releases

0.4.1 Nov 24, 2022
0.4.0 Nov 20, 2022

#557 in Machine learning

Apache-2.0

20KB
356 lines

gorse-rs

CI Crates.io

Rust SDK for gorse recommender system

Install

[dependencies]
gorse_rs = "0.4.1"

Usage

  • Use async client:
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:
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");

Dependencies

~4–19MB
~223K SLoC