Crate bosonnlp

source ·
Expand description

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 文档。

Structs

BosonNLP REST API 访问的封装
典型意见
时间转换结果
依存文法
命名实体
词性标注
文本聚类

Enums

Type Definitions