Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
dracula-sentiment
Advanced tools
A deep sentiment analyser for Node.js which uses character embeddings.
A quick way to get "good enough" sentiment analysis into your applications, this package uses character and word-level embeddings and LSTM networks to decide if a given text is either "positive" or "negative".
npm install dracula-sentiment --save
var dracula = require('dracula-sentiment');
var text = "xoxo cant wait";
// Output a 'positive', 'negative', or 'neutral' label
console.log(text, dracula.analyze(text));
// To output a [negative, neutral, positive] float array
console.log(text, dracula.score(text));
For best performance and accuracy, remove any non-ascii characters by converting them to their closest equivalents via unidecode
or something similar, and feed it sentence-sized chunks of text.
npm test
Tests aren't very extensive at present.
If you encounter any sentences where the classification is obviously wrong, open an issue and we'll work out a way to extend Dracula's training data so that it doesn't happen. Contributions to clean up the code and improve its style and performance are certainly welcome!
FAQs
A deep sentiment analyser for Node.js which uses character embeddings.
The npm package dracula-sentiment receives a total of 1 weekly downloads. As such, dracula-sentiment popularity was classified as not popular.
We found that dracula-sentiment demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.