Security News
How Threat Actors are Abusing GitHub’s File Upload Feature to Host Malware
GitHub is susceptible to a CDN flaw that allows attackers to host malware on any public repository.
sentiment-alyze
Advanced tools
Readme
Node package for conducting textual analysis. The sentimentalyze method takes a string as its argument and returns a sentiment score calculated using AFINN-111. The termFrequency method also takes a string as its argument and returns an object with the count of words in that string. Filtering out English stop-words is optional.
Porter stemming algorithm reduces tokens to base, e.g. 'run', 'running', and 'runs' will all convert to 'run'.
Values of words in AFINN-111 range between -5 and +5.
##Installation: npm install --save sentiment-alyze
##Usage:
var sA = require('sentiment-alyze'),
string = 'This string is super awesome! I feel like running and shopping',
sentimentScore = sA.sentimentalyze(string),
termFrequency = sA.termFrequency(string),
termFrequencyNoStopWords = sA.termFrequency(string, {stopWords: 'no'}),
termFrequencyPorterized = sA.termFrequency(string, {stopWords: 'no', stem: 'yes'}),
phrases = [
'Virgina Woolf wrote To the Lighthouse',
'Virginia Woolf was an English author who lived in London.',
'Virginia Woolf lived in London. London was important to her. '],
tfIDF = sA.tfIDF(phrases);
console.log('sentiment score ', sentimentScore, 'term frequency, all words ', termFrequency, 'term frequency, no stop words ', termFrequencyNoStopWords, 'porterized ', termFrequencyPorterized);
console.log('term frequency-inverse document frequency ', tfIDF);
##Tests
npm test;
###Contributing
Fork, clone, lint, test, pull :-)
FAQs
Textual analysis tools for JavaScript.
The npm package sentiment-alyze receives a total of 2 weekly downloads. As such, sentiment-alyze popularity was classified as not popular.
We found that sentiment-alyze 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
GitHub is susceptible to a CDN flaw that allows attackers to host malware on any public repository.
Security News
At Node Congress, Socket CEO Feross Aboukhadijeh uncovers the darker aspects of open source, where applications that rely heavily on third-party dependencies can be exploited in supply chain attacks.
Research
Security News
The Socket Research team found this npm package includes code for collecting sensitive developer information, including your operating system username, Git username, and Git email.