
Research
/Security News
Popular Tinycolor npm Package Compromised in Supply Chain Attack Affecting 40+ Packages
Malicious update to @ctrl/tinycolor on npm is part of a supply-chain attack hitting 40+ packages across maintainers
languagemodel
Advanced tools
A natural language model and cross-language model, for natural language understanding and generation
"A statistical language model assigns a probability to a sequence of m words P(w_1,\ldots,w_m) by means of a probability distribution." (Wikipedia)
This module provides a unigram-based cross-lingual language model, inspired by: Leuski Anton, Traum David. A Statistical Approach for Text Processing in Virtual Humans tech. rep.University of Southern California, Institute for Creative Technologies 2008.
A CrossLanguageModel can be used as a multi-class classifier/ranker, but, it also takes into account the structure of the output classes.
npm install languagemodel
var CrossLanguageModel = require('languagemodel').CrossLanguageModel;
var model = new CrossLanguageModel({
smoothingFactor : 0.9
});
model.trainBatch([
{input: {i:1, want:1, aa:1}, output: {a:1}},
{input: {i:1, want:1, bb:1}, output: {b:1}},
{input: {i:1, want:1, cc:1}, output: {c:1}},
]);
console.dir(model.similarities({i:1, want:1, aa:1, and:1, bb:1}));
==>
[ { output: { a: 1 }, similarity: -0.29506393100486217 },
{ output: { b: 1 }, similarity: -0.29506393100486217 },
{ output: { c: 1 }, similarity: -0.6413224201123425 } ]
FAQs
A natural language model and cross-language model, for natural language understanding and generation
We found that languagemodel 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
Malicious update to @ctrl/tinycolor on npm is part of a supply-chain attack hitting 40+ packages across maintainers
Security News
pnpm's new minimumReleaseAge setting delays package updates to prevent supply chain attacks, with other tools like Taze and NCU following suit.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.