# NLP

## GET /memori/v2/WordVector/{strSessionID}/{word}

> Looks up the vector definition for a word.

````json
{"openapi":"3.0.1","info":{"title":"Memori Web API V2","version":"v2"},"paths":{"/memori/v2/WordVector/{strSessionID}/{word}":{"get":{"tags":["NLP"],"summary":"Looks up the vector definition for a word.","operationId":"NLP-GetWordVector","parameters":[{"name":"strSessionID","in":"path","description":"The session ID","required":true,"schema":{"type":"string"}},{"name":"word","in":"path","description":"Word to be looked up","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WordVectorResponse"}}}}}}}},"components":{"schemas":{"WordVectorResponse":{"type":"object","properties":{"vector":{"type":"array","items":{"type":"number","format":"float"},"description":"Word vector.","nullable":true},"requestID":{"type":"integer","description":"Progressive number of the request (since the Server started).\r\nUse this number, together with the RequestDateTime property,\r\nto report an anomalous response.","format":"int64"},"requestDateTime":{"type":"string","description":"Timestamp of the request.\r\nUse this timestamp, together with the RequestID property,\r\nto report an anomalous response.","format":"date-time"},"resultCode":{"type":"integer","description":"Result code. A code of ```0``` means no errors.\r\nWhen the request fails, its value is equivalent to the HTTP\r\nstatus code.","format":"int32"},"resultMessage":{"type":"string","description":"Result message. A message of ```Ok``` means no errors.","nullable":true}},"additionalProperties":false,"description":"Response of a Get Word Vector request."}}}}
````

## GET /memori/v2/SimilarWords/{strSessionID}/{word}

> Searches for the 10 words most semantically similar words to the> \
> specified word.

````json
{"openapi":"3.0.1","info":{"title":"Memori Web API V2","version":"v2"},"paths":{"/memori/v2/SimilarWords/{strSessionID}/{word}":{"get":{"tags":["NLP"],"summary":"Searches for the 10 words most semantically similar words to the\r\nspecified word.","operationId":"NLP-GetSimilarWords","parameters":[{"name":"strSessionID","in":"path","description":"The session ID","required":true,"schema":{"type":"string"}},{"name":"word","in":"path","description":"Word to be searcher for","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetSimilarWordsResponse"}}}}}}}},"components":{"schemas":{"GetSimilarWordsResponse":{"type":"object","properties":{"similarWords":{"type":"array","items":{"type":"string"},"description":"List of similar words.","nullable":true},"requestID":{"type":"integer","description":"Progressive number of the request (since the Server started).\r\nUse this number, together with the RequestDateTime property,\r\nto report an anomalous response.","format":"int64"},"requestDateTime":{"type":"string","description":"Timestamp of the request.\r\nUse this timestamp, together with the RequestID property,\r\nto report an anomalous response.","format":"date-time"},"resultCode":{"type":"integer","description":"Result code. A code of ```0``` means no errors.\r\nWhen the request fails, its value is equivalent to the HTTP\r\nstatus code.","format":"int32"},"resultMessage":{"type":"string","description":"Result message. A message of ```Ok``` means no errors.","nullable":true}},"additionalProperties":false,"description":"Response of a Get Similar Words request."}}}}
````

## POST /memori/v2/GuessLanguage/{strSessionID}

> Tries to guess the language of a sentence by analyzing keyword> \
> occurrences.

````json
{"openapi":"3.0.1","info":{"title":"Memori Web API V2","version":"v2"},"paths":{"/memori/v2/GuessLanguage/{strSessionID}":{"post":{"tags":["NLP"],"summary":"Tries to guess the language of a sentence by analyzing keyword\r\noccurrences.","operationId":"NLP-GuessLanguage","parameters":[{"name":"strSessionID","in":"path","description":"The session ID","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The sentence to analyze","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SentenceSpecs"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GuessLanguageResponse"}}}}}}}},"components":{"schemas":{"SentenceSpecs":{"type":"object","properties":{"text":{"type":"string","description":"Text of the sentence.\r\nRequired.","nullable":true}},"additionalProperties":false,"description":"Specifications for requests requiring a sentence."},"GuessLanguageResponse":{"type":"object","properties":{"languageGuesses":{"type":"object","additionalProperties":{"type":"number","format":"float","nullable":true},"description":"List of languages and their scores.","nullable":true},"requestID":{"type":"integer","description":"Progressive number of the request (since the Server started).\r\nUse this number, together with the RequestDateTime property,\r\nto report an anomalous response.","format":"int64"},"requestDateTime":{"type":"string","description":"Timestamp of the request.\r\nUse this timestamp, together with the RequestID property,\r\nto report an anomalous response.","format":"date-time"},"resultCode":{"type":"integer","description":"Result code. A code of ```0``` means no errors.\r\nWhen the request fails, its value is equivalent to the HTTP\r\nstatus code.","format":"int32"},"resultMessage":{"type":"string","description":"Result message. A message of ```Ok``` means no errors.","nullable":true}},"additionalProperties":false,"description":"Response of a Guess Language request."}}}}
````

## POST /memori/v2/ComputeSimilarity/{strSessionID}

> Computes the similarity between a reference and a comparison sentences.

````json
{"openapi":"3.0.1","info":{"title":"Memori Web API V2","version":"v2"},"paths":{"/memori/v2/ComputeSimilarity/{strSessionID}":{"post":{"tags":["NLP"],"summary":"Computes the similarity between a reference and a comparison sentences.","operationId":"NLP-ComputeSentencesSimilarity","parameters":[{"name":"strSessionID","in":"path","description":"The session ID","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The sentences to analyze","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TwoSentencesSpecs"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComputeSentencesSimilarityResponse"}}}}}}}},"components":{"schemas":{"TwoSentencesSpecs":{"type":"object","properties":{"referenceText":{"type":"string","description":"Text of the reference sentence.\r\nRequired.","nullable":true},"referenceTextType":{"type":"string","description":"Type of reference text, i.e. question or answer. Required. <br> Only types supported are:<ul> <li><code>QUESTION</code></li> <li><code>ANSWER</code></li> </ul>","nullable":true},"comparisonText":{"type":"string","description":"Text of the comparison sentence.\r\nRequired.","nullable":true},"comparisonTextType":{"type":"string","description":"Type of comparison text, i.e. question or answer. Required. <br> Only types supported are:<ul> <li><code>QUESTION</code></li> <li><code>ANSWER</code></li> </ul>","nullable":true}},"additionalProperties":false,"description":"Specifications for requests requiring a two sentences."},"ComputeSentencesSimilarityResponse":{"type":"object","properties":{"similarity":{"type":"number","description":"Similarity index, between 0.0 (totally different) and 1.0 (identical).","format":"float"},"similarityLevel":{"type":"string","description":"Similarity level, i.e. none, low, medium or high. <br> Currently supported similarity levels are:<ul> <li><code>NONE</code></li> <li><code>LOW</code></li> <li><code>MEDIUM</code></li> <li><code>HIGH</code></li> </ul>","nullable":true},"requestID":{"type":"integer","description":"Progressive number of the request (since the Server started).\r\nUse this number, together with the RequestDateTime property,\r\nto report an anomalous response.","format":"int64"},"requestDateTime":{"type":"string","description":"Timestamp of the request.\r\nUse this timestamp, together with the RequestID property,\r\nto report an anomalous response.","format":"date-time"},"resultCode":{"type":"integer","description":"Result code. A code of ```0``` means no errors.\r\nWhen the request fails, its value is equivalent to the HTTP\r\nstatus code.","format":"int32"},"resultMessage":{"type":"string","description":"Result message. A message of ```Ok``` means no errors.","nullable":true}},"additionalProperties":false,"description":"Response of a Compute Sentences Similarity request."}}}}
````

## POST /memori/v2/CheckWords/{strSessionID}

> Checks the words of a sentence for their definition in the word> \
> vector dictionary.

````json
{"openapi":"3.0.1","info":{"title":"Memori Web API V2","version":"v2"},"paths":{"/memori/v2/CheckWords/{strSessionID}":{"post":{"tags":["NLP"],"summary":"Checks the words of a sentence for their definition in the word\r\nvector dictionary.","operationId":"NLP-CheckUndefinedWords","parameters":[{"name":"strSessionID","in":"path","description":"The session ID","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The sentence to analyze","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SentenceSpecs"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckUndefinedWordsResponse"}}}}}}}},"components":{"schemas":{"SentenceSpecs":{"type":"object","properties":{"text":{"type":"string","description":"Text of the sentence.\r\nRequired.","nullable":true}},"additionalProperties":false,"description":"Specifications for requests requiring a sentence."},"CheckUndefinedWordsResponse":{"type":"object","properties":{"undefinedWords":{"type":"array","items":{"type":"string"},"description":"List of words missing from the word vector dictionary.","nullable":true},"requestID":{"type":"integer","description":"Progressive number of the request (since the Server started).\r\nUse this number, together with the RequestDateTime property,\r\nto report an anomalous response.","format":"int64"},"requestDateTime":{"type":"string","description":"Timestamp of the request.\r\nUse this timestamp, together with the RequestID property,\r\nto report an anomalous response.","format":"date-time"},"resultCode":{"type":"integer","description":"Result code. A code of ```0``` means no errors.\r\nWhen the request fails, its value is equivalent to the HTTP\r\nstatus code.","format":"int32"},"resultMessage":{"type":"string","description":"Result message. A message of ```Ok``` means no errors.","nullable":true}},"additionalProperties":false,"description":"Response of a Check Undefined Words request."}}}}
````

## Checks a sentence for NSFW content.

> This API requires a Giver session.

````json
{"openapi":"3.0.1","info":{"title":"Memori Web API V2","version":"v2"},"paths":{"/memori/v2/CheckNSFW/{strSessionID}":{"post":{"tags":["NLP"],"summary":"Checks a sentence for NSFW content.","description":"This API requires a Giver session.","operationId":"NLP-CheckNSFW","parameters":[{"name":"strSessionID","in":"path","description":"The session ID","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The sentence to analyze","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SentenceSpecs"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckNSFWResponse"}}}}}}}},"components":{"schemas":{"SentenceSpecs":{"type":"object","properties":{"text":{"type":"string","description":"Text of the sentence.\r\nRequired.","nullable":true}},"additionalProperties":false,"description":"Specifications for requests requiring a sentence."},"CheckNSFWResponse":{"type":"object","properties":{"nsfw":{"type":"boolean","description":"True if the checked content is considered NSFW."},"requestID":{"type":"integer","description":"Progressive number of the request (since the Server started).\r\nUse this number, together with the RequestDateTime property,\r\nto report an anomalous response.","format":"int64"},"requestDateTime":{"type":"string","description":"Timestamp of the request.\r\nUse this timestamp, together with the RequestID property,\r\nto report an anomalous response.","format":"date-time"},"resultCode":{"type":"integer","description":"Result code. A code of ```0``` means no errors.\r\nWhen the request fails, its value is equivalent to the HTTP\r\nstatus code.","format":"int32"},"resultMessage":{"type":"string","description":"Result message. A message of ```Ok``` means no errors.","nullable":true}},"additionalProperties":false,"description":"Response of a Check NSFW request."}}}}
````


---

# 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://docs.aisuru.com/api/engine/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.
