25 releases

Uses old Rust 2015

0.10.3 Jan 6, 2021
0.10.2 Dec 31, 2019
0.10.1 Nov 22, 2018
0.9.0 Mar 23, 2018
0.2.4 Mar 17, 2016

#500 in Machine learning

Download history 12/week @ 2023-10-24 39/week @ 2023-10-31 2/week @ 2023-11-07 28/week @ 2023-11-14 26/week @ 2023-11-21 78/week @ 2023-11-28 1/week @ 2023-12-05 26/week @ 2023-12-12 6/week @ 2023-12-19 50/week @ 2023-12-26 27/week @ 2024-01-02 3/week @ 2024-01-09 2/week @ 2024-01-16 36/week @ 2024-01-23 101/week @ 2024-01-30 4/week @ 2024-02-06

145 downloads per month

MIT license

35KB
577 lines

bosonnlp-rs

Build Status Coverage Status Crates.io docs.rs

BosonNLP SDK for Rust

Installation

Add it to your Cargo.toml:

[dependencies]
bosonnlp = "0.10"

Add extern crate bosonnlp to your crate root and your're good to go!

Build

$ cargo build --release

Test

First you need to export a shell variable called BOSON_API_TOKEN and then run:

$ cargo test

License

This work is released under the MIT license. A copy of the license is provided in the LICENSE file.


lib.rs:

BosonNLP SDK for Rust

安装

Cargo.toml 增加如下内容:

[dependencies]
bosonnlp = "0.10"

使用教程

API Token 申请请访问 http://bosonnlp.com

extern crate bosonnlp;

use bosonnlp::BosonNLP;

fn main() {
    let nlp = BosonNLP::new(env!("BOSON_API_TOKEN"));
    let rs = nlp.sentiment(&["这家味道还不错"], "food").unwrap();
    assert_eq!(1, rs.len());
}

可以在 BosonNLP 文档网站 阅读详细的 BosonNLP REST API 文档。

Dependencies

~6–19MB
~284K SLoC