# nlp自然语言

路由列表

| 名称              | 路由                  |
| --------------- | ------------------- |
| 词法分析接口          | lexer               |
| 依存句法分析接口        | depparser           |
| 词向量表示接口         | word\_emb\_vec      |
| DNN语言模型接口       | dnnlm\_cn           |
| 词义相似度接口         | word\_emb\_sim      |
| 短文本相似度接口        | simnet              |
| 评论观点抽取接口        | comment\_tag        |
| 情感倾向分析接口        | sentiment\_classify |
| 文章标签接口          | keyword             |
| 文章分类接口          | topic               |
| 文本纠错接口          | ecnet               |
| 新闻摘要接口          | news\_summary       |
| 对话情绪识别接口        | emotion             |
| 分词接口(旧版)        | wordseg             |
| 词性标注接口(旧版)      | wordpos             |
| 中文词向量表示接口(旧版)   | wordembedding       |
| 中文DNN语言模型接口(旧版) | dnnlm\_cn           |
| 短文本相似度接口(旧版)    | simnet              |
| 评论观点抽取接口（旧版）    | comment\_tag        |

## 调用方式

> 下文中$ai变量均为百度ai实例 获得方法请[查看](/ai/baidu.md)

```
//参数

$params = [
    'test' => 'some text need to anylises'
];

// 词法分析的路由lexer
$res = $ai->nlp()->send('lexer',$params);

// 依存句法分析的路由depparser
$res = $ai->nlp()->send('depparser',$params);


//处理返回结果
if($res->success()){
    var_dump($res->toArray());
}
```

```
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doc.crisen.org/ai/baidu/nlp.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
