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

@nlpjs/sentiment

Package Overview
Dependencies
Maintainers
1
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nlpjs/sentiment - npm Package Compare versions

Comparing version 4.1.4 to 4.3.0

10

package.json
{
"name": "@nlpjs/sentiment",
"version": "4.1.4",
"version": "4.3.0",
"description": "Sentiment Analysis",

@@ -28,7 +28,7 @@ "author": {

"dependencies": {
"@nlpjs/core": "^4.1.4",
"@nlpjs/language-min": "^4.1.2",
"@nlpjs/neural": "^4.1.4"
"@nlpjs/core": "^4.3.0",
"@nlpjs/language-min": "^4.3.0",
"@nlpjs/neural": "^4.3.0"
},
"gitHead": "99500ae2f3e16666fa5cc08a486664ef5267e810"
"gitHead": "68b063504d4cc94d11de373516114befc7c4e648"
}

@@ -0,0 +0,0 @@ /*

@@ -65,11 +65,22 @@ /*

prepare(locale, text, settings) {
const pipeline =
this.getPipeline(`${this.settings.tag}-prepare`) ||
this.getPipeline(`nlu-${locale || 'en'}-prepare`);
const input = {
text,
locale,
settings: settings || this.settings,
};
return this.runPipeline(input, pipeline);
const pipeline = this.getPipeline(`${this.settings.tag}-prepare`);
if (pipeline) {
const input = {
text,
locale,
settings: settings || this.settings,
};
return this.runPipeline(input, pipeline);
}
const stemmer =
this.container.get(`stemmer-${locale}`) ||
this.container.get(`stemmer-en`);
if (stemmer) {
return stemmer.tokenizeAndStem(text);
}
const normalized = text
.normalize('NFD')
.replace(/[\u0300-\u036f]/g, '')
.toLowerCase();
return normalized.split(/[\s,.!?;:([\]'"¡¿)/]+/).filter((x) => x);
}

@@ -76,0 +87,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