fasttext-js
Node.js interface for fastText
Setup
We can install fasttext-js
locally by running:
npm install --save fasttext-js
or
yarn add fasttext-js
Usage
; const dataPath = './inbound.txt';/* inbound.txt contentOpt in __label__NOpt out __label_YHello __label__N...*/const modelPath = './model.bin'; // Train supervised text classifiers ;
References
Train supervised text classifiers with txt file at dataPath
and store model to modelPath
.
// > Promise
Obtain the most likely label for an array of of sentences
with confidence rate using model at modelPath
.
// > Promise