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 访问的封装- Comments
Cluster - 典型意见
- Converted
Time - 时间转换结果
- Dependency
- 依存文法
- Named
Entity - 命名实体
- Tag
- 词性标注
- Text
Cluster - 文本聚类