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
BosonNLP REST API 访问的封装
CommentsCluster
典型意见
ConvertedTime
时间转换结果
Dependency
依存文法
NamedEntity
命名实体
Tag
词性标注
TextCluster
文本聚类

Enums§

Error

Type Aliases§

Result