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

#835 in Development tools

Download history 29/week @ 2022-08-02 1/week @ 2022-08-09 2/week @ 2022-08-16 25/week @ 2022-08-23 1/week @ 2022-08-30 77/week @ 2022-09-06 2/week @ 2022-09-13 26/week @ 2022-09-20 1/week @ 2022-09-27 25/week @ 2022-10-04 2/week @ 2022-10-11 1/week @ 2022-10-25 51/week @ 2022-11-01 1/week @ 2022-11-08 7/week @ 2022-11-15

60 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

~4–12MB
~257K SLoC