A lightweight ForgeScript extension for the Node.js 'natural' library, providing natural language processing functions.
npm install github:weebforge/ForgeNLPnpm install github:weebforge/ForgeNLP#devHere is a small setup with an example code.
const{ ForgeNLP }=require("@weebforge/nlp");constclient=newForgeClient({extensions: [newForgeNLP({loadDefaults: true,classifiers: [{name: "sentiment",trainingData: [{label: "positive",text: "I love this!"},{label: "negative",text: "This sucks"}]}]})]});client.commands.addCommand({name: "classify",type: "messageCreate",code: `$classifyText[sentiment;$message]`});- Tokenization: Word, sentence, and custom tokenizers
- String Distance: Levenshtein, Jaro-Winkler, and more
- Word Management: Load and query word datasets
- Bayes Classifiers: Train and use text classifiers
- Distance Functions: Multiple string comparison algorithms
If you need any assistance, don't hesitate to reach out by opening a support form in the official BotForge Discord server! :D