
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.
fasttext-native
Advanced tools
fastText native bindings for ⬡.js
Forked from pragonauts's fast-text
There is a simple class for executing prediction models:
const path = require('path')
const { Classifier } = require('fasttext-native')
const model = path.resolve(__dirname, './classification.bin')
const classifier = new Classifier(model)
classifier.predict('how it works', 1, (err, res) => {
if (err) {
console.error(err)
} else if (res.length > 0) {
const tag = res[0].label // __label__someTag
const score = res[0].valuel // 1.3455345
} else {
console.log('No matches')
}
})
There is a simple class for searching nearest neighbours:
const path = require('path')
const { Query } = require('fasttext-native')
const model = path.resolve(__dirname, './skipgram.bin')
const query = new Query(model)
query.nn('word', 10, (err, res) => {
if (err) {
console.error(err)
} else if (res.length > 0) {
const tag = res[0].label // letter
const score = res[0].valuel // 0.99992
} else {
console.log('No matches')
}
})
FAQs
fastText bindings for Node.js
The npm package fasttext-native receives a total of 0 weekly downloads. As such, fasttext-native popularity was classified as not popular.
We found that fasttext-native 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.