Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nlpcloud

Package Overview
Dependencies
Maintainers
1
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nlpcloud - npm Package Compare versions

Comparing version 1.0.13 to 1.0.14

13

index.js

@@ -7,3 +7,3 @@ const axios = require('axios')

class Client {
constructor(model, token, gpu = false) {
constructor(model, token, gpu = false, lang = '') {
this.headers = {

@@ -14,5 +14,12 @@ 'Authorization': 'Token ' + token,

if (gpu) {
if (gpu && lang != '') {
this.rootURL = BASE_URL + '/' + API_VERSION + '/gpu/' + lang + '/' + model
}
else if (gpu && lang == '') {
this.rootURL = BASE_URL + '/' + API_VERSION + '/gpu/' + model
} else {
}
else if (!gpu && lang != '') {
this.rootURL = BASE_URL + '/' + API_VERSION + '/' + lang + '/' + model
}
else {
this.rootURL = BASE_URL + '/' + API_VERSION + '/' + model

@@ -19,0 +26,0 @@ }

{
"name": "nlpcloud",
"version": "1.0.13",
"version": "1.0.14",
"description": "NLP Cloud serves high performance pre-trained or custom models for NER, sentiment-analysis, classification, summarization, text generation, question answering, machine translation, language detection, tokenization, POS tagging, 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.io\n\nDocumentation: https://docs.nlpcloud.io",

@@ -5,0 +5,0 @@ "main": "index.js",

# Node.js Client For NLP Cloud
This is a Node.js client for the NLP Cloud API: https://docs.nlpcloud.io
This is the Node.js client for the [NLP Cloud](https://nlpcloud.io) API. See the [documentation](https://docs.nlpcloud.io) for more details.
NLP Cloud serves high performance pre-trained for NER, sentiment-analysis, classification, summarization, text generation, question answering, machine translation, language detection, tokenization, POS tagging, and dependency parsing. It is ready for production, served through a REST API.
NLP Cloud serves high performance pre-trained for NER, sentiment-analysis, classification, summarization, text generation, question answering, machine translation, language detection, tokenization, lemmatization, POS tagging, and dependency parsing. It is ready for production, served through a REST API.
Pre-trained models are the spaCy models and some transformers-based models from Hugging Face. You can also deploy your own transformers-based models, or spaCy models.
You can either use the NLP Cloud pre-trained models, fine-tune your own models, or deploy your own models.

@@ -92,3 +92,3 @@ If you face an issue, don't hesitate to raise it as a Github issue. Thanks!

The model can either be a pretrained model like `en_core_web_lg`, `bart-large-mnli`... but also one of your custom transformers-based models, or spaCy models, using `custom_model/<model id>` (e.g. `custom_model/2568`).
The model can either be a pretrained model like `en_core_web_lg`, `bart-large-mnli`... but also one of your custom models, using `custom_model/<model id>` (e.g. `custom_model/2568`).

@@ -103,3 +103,3 @@ Your token can be retrieved from your [NLP Cloud dashboard](https://nlpcloud.io/home/token).

If you want to use a GPU, pass `gpu = true`.
If you want to use a GPU, pass `true` as the 3rd argument.

@@ -109,5 +109,13 @@ ```js

const client = new NLPCloudClient("<model>", "<your token>", gpu = true)
const client = new NLPCloudClient('<model>', '<your token>', true)
```
If you want to use the multilingual add-on in order to process non-English texts, set `lang='<your language code>'` as the 4th argument. For example, if you want to process French text, you should set `lang='fr'` as the 4th argument.
```js
const NLPCloudClient = require('nlpcloud');
const client = new NLPCloudClient('<model>', '<your token>', false, '<your language code>')
```
### Entities Endpoint

@@ -114,0 +122,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc