
Security News
Open Source Maintainers Feeling the Weight of the EU’s Cyber Resilience Act
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.
sentiment-parser
Advanced tools
The sentiment-parser package is used to easily parse sentiments from sentences, using a simple one-liner.
The sentiment-parser package is used to easily parse sentiments from sentences, using a simple one-liner.
The package currently uses both an offline package and the IBM Watson API to gather the results. It will also try to guess a best answer, based on the two differing results.
You will need to secure credentials from IBM. To do that:
const { Parser } = require('sentiment-parser');
const parser = new Parser();
parser.setCredentials({
nlAnalyzer: {
username: '{your-api-username}',
password: '{your-api-password}',
},
toneAnalyzer: {
username: '{your-api-username}',
password: '{your-api-password}',
}
});
parser.parseSentiment(userInput).then(response => {
// response.score is a value between -1 to 1
// response.label is "negative" or "positive"
}
parser.parseEmotion(`I hate this`).then(parsedTone => {
// parsedTone.watsonTone.strongestTone contains the strongest tone
// parsedTone.watsoneTone.allTones contains an array of all the recognized tones
// Each tone has a tone_id, tone_name and a score (from 0 to 1)
}
FAQs
The sentiment-parser package is used to easily parse sentiments from sentences, using a simple one-liner.
The npm package sentiment-parser receives a total of 1 weekly downloads. As such, sentiment-parser popularity was classified as not popular.
We found that sentiment-parser 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.
Security News
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.
Security News
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.