Skip to content

TypeError: not a constructor #3

@CietstHydroxide

Description

@CietstHydroxide

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions