
Research
PyPI Package Disguised as Instagram Growth Tool Harvests User Credentials
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
Supply Chain Security
Vulnerability
Quality
Maintenance
License
a frequency analysis of the terms in a text
it uses nlp-compromise for proper tokenization & normalization
t.ngram({min_count:1, max_size:5})
options.min_count = 1 // throws away seldom-repeated grams
options.max_size = 5 // maximum gram count. prevents the result from becoming gigantic
var nlp = require('nlp_compromise');
var nlpNgram = require('nlp-ngram');
nlp.plugin(nlpNgram);
var t = nlp.text('she said she swims');
t.ngram()
/*
[ [ { word: 'she', count: 2, size: 1 },
{ word: 'said', count: 1, size: 1 },
{ word: 'swims', count: 1, size: 1 } ],
[ { word: 'she said', count: 1, size: 2 },
{ word: 'said she', count: 1, size: 2 },
{ word: 'she swims', count: 1, size: 2 } ],
[ { word: 'she said she', count: 1, size: 3 },
{ word: 'said she swims', count: 1, size: 3 } ],
[ { word: 'she said she swims', count: 1, size: 4 } ] ]
*/
it also takes advantage of the proper tokenization & cleverness of nlp_compromise, ie "Tony Hawk" is one token, not two:
var t = nlp.text(`Tony Hawk played Tony Hawk's pro skater`);
t.ngram()
/*
[ [ { word: 'tony hawk', count: 2, size: 1 },
{ word: 'played', count: 1, size: 1 },
{ word: 'pro', count: 1, size: 1 },
{ word: 'skater', count: 1, size: 1 } ],
[ { word: 'tony hawk played', count: 1, size: 2 },
{ word: 'played tony hawk', count: 1, size: 2 },
{ word: 'tony hawk pro', count: 1, size: 2 },
{ word: 'pro skater', count: 1, size: 2 } ],
[ { word: 'tony hawk played tony hawk', count: 1, size: 3 },
{ word: 'played tony hawk pro', count: 1, size: 3 },
{ word: 'tony hawk pro skater', count: 1, size: 3 } ],
[ { word: 'tony hawk played tony hawk pro', count: 1, size: 4 },
{ word: 'played tony hawk pro skater', count: 1, size: 4 } ] ]
*/
var t = nlp.text(`Tony Hawk played Tony Hawk's pro skater`);
t.ngram({min_count:2})
// [ [ { word: 'tony hawk', count: 2, size: 1 } ], [], [], [] ]
FAQs
frequency-analysis of the terms in a text
The npm package nlp-ngram receives a total of 1 weekly downloads. As such, nlp-ngram popularity was classified as not popular.
We found that nlp-ngram 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
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
Product
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.
Security News
Research
Socket uncovered two npm packages that register hidden HTTP endpoints to delete all files on command.