Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Predict user intents with cool machine learning tool, Facebook FastText.
Usage
const { Router } = require('prg-chatbot');
const keyworder = require('keyworder');
const path = require('path');
keyworder.setResolver({
model: path.join(process.cwd(), 'models', 'model.bin')
});
const app = new Router();
app.use(keyworder('hello'), (req, res, postBack, next) => {
res.text('Hello too!');
});
function
Create resolver middleware for PrgChatbot
Promise.<{tag:string, score:number}>
Resolve single text
Object
function
Create resolver middleware for PrgChatbot
Kind: global function
Param | Type | Description |
---|---|---|
tag | string | tag for matching |
[threshold] | number | override success threshold |
[namespace] | string | resolver namespace |
Example
const keyworder = require('keyworder');
router.use(keyworder('hello-intent'), (req, res) => {
res.text('Welcome too!');
});
Kind: global function
Param | Type | Description |
---|---|---|
configuration | Configuration | the resolver configuration |
[namespace] | string | set resolver for diferent namespace |
Example
const keyworder = require('keyworder');
const path = require('path');
keyworder.setResolver({
model: path.join(__dirname, 'model.bin')
});
Promise.<{tag:string, score:number}>
Resolve single text
Kind: global function
Param | Type | Description |
---|---|---|
text | string | query text |
[threshold] | number | override the threshold |
[namespace] | string | use other than default resolver |
Object
Kind: global typedef
Properties
Name | Type | Description |
---|---|---|
model | string | path to trained fast text model |
threshold | number | prediction threshold (0.95 recommended) |
cacheSize | number | keep this amount of results cached |
filter | function | text preprocessor |
logger | function | resolver logger function |
FAQs
Intent recognition for prg-chatbot
The npm package keyworder receives a total of 0 weekly downloads. As such, keyworder popularity was classified as not popular.
We found that keyworder 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
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.