The code (cmd.js):
const NLP = require('@hiyurigi/nlp')("TextCorrection") //line 8
const v = new NLP(textList)
const corrected = v.TextCorrection({Needle: input, Threshold: 0.4, NgramsLength: 1, KeyRange: 2, ThresholdOperator: '<='})
Error:
TypeError: v is not a constructor
at init (.\node_modules\@hiyurigi\nlp\src\Handler.js:13:9)
at Object.runCommand (.\cmd.js:8:45)
at processTicksAndRejections (node:internal/process/task_queues:94:5)
The code (cmd.js):
const NLP = require('@hiyurigi/nlp')("TextCorrection") //line 8const v = new NLP(textList)const corrected = v.TextCorrection({Needle: input, Threshold: 0.4, NgramsLength: 1, KeyRange: 2, ThresholdOperator: '<='})Error:
TypeError: v is not a constructorat init (.\node_modules\@hiyurigi\nlp\src\Handler.js:13:9)at Object.runCommand (.\cmd.js:8:45)at processTicksAndRejections (node:internal/process/task_queues:94:5)