Comparing version 2.0.7 to 2.0.8
@@ -270,3 +270,4 @@ export = Client; | ||
sentiment(params: { | ||
text: string | ||
text: string, | ||
target?: string | ||
}): Promise<{ | ||
@@ -273,0 +274,0 @@ status: number; |
@@ -284,5 +284,6 @@ const axios = require('axios') | ||
var text = params.text | ||
var target = params.target ?? null | ||
const payload = { | ||
'text': text | ||
'text': text, | ||
'target': target | ||
}; | ||
@@ -289,0 +290,0 @@ |
{ | ||
"name": "nlpcloud", | ||
"version": "2.0.7", | ||
"version": "2.0.8", | ||
"description": "NLP Cloud serves high performance pre-trained or custom models for NER, sentiment-analysis, classification, summarization, paraphrasing, text generation, image generation, code generation, question answering, automatic speech recognition, machine translation, language detection, semantic search, semantic similarity, tokenization, POS tagging, speech synthesis, embeddings, and dependency parsing. It is ready for production, served through a REST API.\n\nThis is the Node.js client for the NLP Cloud API.\n\nMore details here: https://nlpcloud.com\n\nDocumentation: https://docs.nlpcloud.com", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -305,3 +305,3 @@ # Node.js Client For NLP Cloud | ||
1. Your question | ||
1. A context that the model will use to try to answer your question | ||
1. (Optional) A context that the model will use to try to answer your question | ||
@@ -342,6 +342,9 @@ ```js | ||
Call the `sentiment()` method and pass the text you want to analyze the sentiment of: | ||
Call the `sentiment()` method and pass the following: | ||
1. The text you want to get the sentiment of | ||
1. (Optional) The target element that the sentiment should apply to | ||
```js | ||
client.sentiment({text:'<Your block of text>'}) | ||
client.sentiment({text:'<Your block of text>', target:'<Your target>'}) | ||
``` | ||
@@ -348,0 +351,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
35510
602
391