Research
Recent Trends in Malicious Packages Targeting Discord
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
sentiment-zh_cn
Advanced tools
Readme
本项目为sentiment项目的中文fork,基于本地化的AFINN-111词库对中文文本进行情感分析。
sentiment-zh_cn在build/目录下提供一份编译AFINN词库的工具和用于保护助语素的源文件。
npm install sentiment-zh_cn
var sentiment = require('sentiment-zh_cn');
var r1 = sentiment('网络不是法外之地。党政机关微信工作群是展示、交流、沟通、讨论工作的平台,属于“公共场所”,党员领导干部是公众人物,一言一行都代表着党和政府的形象。在微信群转发淫秽图片,既破坏了网络环境,危害他人身心健康,又违反了工作纪律、生活纪律,损害了党和政府形象,造成不良影响,必然要受到党纪处理。随即,当地纪委也迅速介入了调查。');
console.dir(r1);
运行结果为:
{ score: -6,
comparative: -0.08955223880597014,
tokens:
[ '网络',
'不是',
'法',
'外', ……],
words: [ '迅速', '影响', '损害', '违反', '健康', '危害', '破坏' ],
positive: [ '迅速', '健康' ],
negative: [ '影响', '损害', '违反', '危害', '破坏' ] }
在参数列表里增加一个包含自定义词汇评分的字典即可。
var sentiment = require('sentiment-zh_cn');
var r2 = sentiment('他妈的你不想活了?', {'妈的': -10});
console.dir(r2);
{ score: -10,
comparative: -2,
tokens: [ '他', '妈的', '你', '不想', '活' ],
words: [ '妈的' ],
positive: [],
negative: [ '妈的' ] }
FAQs
基于本地化的AFINN的中文nodejs情感分析库
We found that sentiment-zh_cn 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
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
Security News
Socket CEO Feross Aboukhadijeh joins a16z partners to discuss how modern, sophisticated supply chain attacks require AI-driven defenses and explore the challenges and solutions in leveraging AI for threat detection early in the development life cycle.
Security News
NIST's new AI Risk Management Framework aims to enhance the security and reliability of generative AI systems and address the unique challenges of malicious AI exploits.