> For the complete documentation index, see [llms.txt](https://docs.3dolphins.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.3dolphins.ai/5.1.x/api/bot-api/npl-api.md).

# NLP API

Natural language processing (NLP) APIs are used to analyze and classify text much more efficiently and accurately than even humans could.

### **Get Similarity Result by Sentence**

| Method     | POST                                                                                                                                                                                                                                                                               |
| ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Media Type | application/json                                                                                                                                                                                                                                                                   |
| URL        | http\://\[server]/dolphin/apiv1/graph/nlp/similarity                                                                                                                                                                                                                               |
| Header     | Authorization : Bearer \[generatedToken]                                                                                                                                                                                                                                           |
| Body       | <p>{<br>“lang”: “Indonesia”,<br>“sentence1”: “cara mendaftarkan akun”,<br>“sentence2”: “cara mendaftarkan account”,<br>“nouns1”: \[<br>   “akun”<br>],<br>“nouns2”: \[<br>   “account”<br>],<br>“verbs1”: \[<br>   “akun”<br>],<br>“primaryTerms”: \[<br>   “string”<br>]<br>}</p> |
| Status     | 200                                                                                                                                                                                                                                                                                |
| Response   | <p>{<br>   “status”: “success”,<br>   “data”: 0.13979776251968268,<br>   “hasMore”: false,<br>   “nextIndex”: 0,<br>   “prevIndex”: 0,<br>   “totalResults”: 0<br>}</p>                                                                                                            |

### **Get Noun Ambiguity Score**

| Method     | POST                                                                                                                                                                                                                                                                                   |
| ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Media Type | application/json                                                                                                                                                                                                                                                                       |
| URL        | http\://\[server]/dolphin/apiv1/graph/nlp/wordNeighborList                                                                                                                                                                                                                             |
| Header     | Authorization **:** Bearer \[generatedToken]                                                                                                                                                                                                                                           |
| Body       | <p>{<br>“lang”: “Indonesia”,<br>“sentence1”: “Dia datang kemari memberi tahu”,<br>“sentence2”: “”,<br>“nouns1”: \[<br>   “memberi tahu”<br>],<br>“nouns2”: \[<br>   “memberi informasi”<br>],<br>“verbs1”: \[<br>   “memberi”<br>],<br>“primaryTerms”: \[<br>   “string”<br>]<br>}</p> |
| Status     | 200                                                                                                                                                                                                                                                                                    |
| Response   | <p>{<br>   “status”: “success”,<br>   “data”: 0,<br>   “hasMore”: false,<br>   “nextIndex”: 0,<br>   “prevIndex”: 0,<br>   “totalResults”: 0<br>}</p>                                                                                                                                  |

### **Get Word Neighbor Result by Word**

| Method     | POST                                                                                                                                                                    |
| ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Media Type | application/json                                                                                                                                                        |
| URL        | http\://\[server]/dolphin/apiv1/graph/nlp/wordNeighbor                                                                                                                  |
| Header     | Authorization : Bearer \[generatedToken]                                                                                                                                |
| Body       | <p>{<br>“lang”: “Indonesia”,<br>“word1”: “adm”,<br>“word2s”: \[<br>  “admin”<br>]<br>}</p>                                                                              |
| Status     | 200                                                                                                                                                                     |
| Response   | <p>{<br>   “status”: “success”,<br>   “data”: 0.27198508381843567,<br>   “hasMore”: false,<br>   “nextIndex”: 0,<br>   “prevIndex”: 0,<br>   “totalResults”: 0<br>}</p> |

### **Get Word Neighbor List**

| Method     | POST                                                                                                                                                                                         |
| ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Media Type | application/json                                                                                                                                                                             |
| URL        | http\://\[server]/dolphin/apiv1/graph/nlp/wordNeighborList                                                                                                                                   |
| Header     | Authorization : Bearer \[generatedToken]                                                                                                                                                     |
| Body       | <p>{<br>   “lang”: “Indonesia”,<br>   “word1”: “atm terdekat”,<br>   “word2s”: \[<br>      “atm dekat sini”<br>]<br>}</p>                                                                    |
| Status     | 200                                                                                                                                                                                          |
| Response   | <p>{<br>“status”: “success”,<br>“data”: \[<br>   “sambungkan”,<br>   “customer”,<br>   “care”<br>],<br>“hasMore”: false,<br>“nextIndex”: 0,<br>“prevIndex”: 0,<br>“totalResults”: 0<br>}</p> |

### **Get Sensitive Words**

| Method     | POST                                                                                                                                                                                         |
| ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Media Type | application/json                                                                                                                                                                             |
| URL        | http\://\[server]/dolphin/apiv1/graph/nlp/word/sensitive                                                                                                                                     |
| Header     | Authorization : Bearer \[generatedToken]                                                                                                                                                     |
| Body       | <p>{<br>   “sentence”: “sambungkan ke cs”<br>}</p>                                                                                                                                           |
| Status     | 200                                                                                                                                                                                          |
| Response   | <p>{<br>“status”: “success”,<br>“data”: \[<br>   “sambungkan”,<br>   “customer”,<br>   “care”<br>],<br>“hasMore”: false,<br>“nextIndex”: 0,<br>“prevIndex”: 0,<br>“totalResults”: 0<br>}</p> |

### **Get Classification Active Module**

| Method     | GET                                                                                                                                                                                                                   |
| ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Media Type | application/json                                                                                                                                                                                                      |
| URL        | http\://\[server]/dolphin/apiv1/graph/nlp/classify/active                                                                                                                                                             |
| Header     | Authorization : Bearer \[generatedToken]                                                                                                                                                                              |
| Body       |                                                                                                                                                                                                                       |
| Status     | 200                                                                                                                                                                                                                   |
| Response   | <p>{<br>“status”: “success”,<br>“data”: \[<br>   “Gabriel – First Media”,<br>   “Error Message Code”,<br>   “Services”<br>],<br>“hasMore”: false,<br>“nextIndex”: 0,<br>“prevIndex”: 0,<br>“totalResults”: 0<br>}</p> |

### **Get classification value**

| Method     | POST                                                                                                                                                                                                                       |
| ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Media Type | application/json                                                                                                                                                                                                           |
| URL        | http\://\[server]/dolphin/apiv1/graph/nlp/classify/module                                                                                                                                                                  |
| Header     | Authorization : Bearer \[generatedToken]                                                                                                                                                                                   |
| Body       | <p>{<br>   “module”: “Services”,<br>   “message”: “Hallo”<br>}</p>                                                                                                                                                         |
| Status     | 200                                                                                                                                                                                                                        |
| Response   | <p>{<br>“status”: “success”,<br>“data”: {<br>   “module”: “Services”,<br>   “message”: “Hallo”,<br>   “category”: “default”<br>},<br>“hasMore”: false,<br>“nextIndex”: 0,<br>“prevIndex”: 0,<br>“totalResults”: 0<br>}</p> |

### **Get classification value**

| Method     | POST                                                                                                                                                                                                                                                                                                                        |
| ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Media Type | application/json                                                                                                                                                                                                                                                                                                            |
| URL        | http\://\[server]/dolphin/apiv1/graph/nlp/classify/enabled                                                                                                                                                                                                                                                                  |
| Header     | Authorization : Bearer \[generatedToken]                                                                                                                                                                                                                                                                                    |
| Body       | <p>{<br>   “message”: “Hallo”,<br>   “start”: 1,<br>   “count”: 10<br>}</p>                                                                                                                                                                                                                                                 |
| Status     | 200                                                                                                                                                                                                                                                                                                                         |
| Response   | <p>{<br>“status”: “success”,<br>“data”: {<br>   “message”: “Hallo”,<br>   “categories”: \[<br>     “default”,<br>     “default”<br>     ],<br>   “modules”: \[<br>     “Error Message Code”,<br>     “Services”<br>     ]<br>   },<br>“hasMore”: false,<br>“nextIndex”: 0,<br>“prevIndex”: 0,<br>“totalResults”: 0<br>}</p> |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.3dolphins.ai/5.1.x/api/bot-api/npl-api.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
