nlp.js icon indicating copy to clipboard operation
nlp.js copied to clipboard

EntityText with especial character

Open ran-j opened this issue 4 years ago • 2 comments

I want to do math with user input like:

Q : "how much is 2+2" R: "the answer is 4"

so I created a entity:

manager.addNamedEntityText('plus', 'plus', ['pt'], ['+','plus']);

And It does not recognizer my entity "+"

image

Node : 10.x Node-nlp: 3.10.2 Windows 10

ran-j avatar Jan 14 '20 13:01 ran-j

@ran-j I imagine this character is being filtered during nlp steps. If you are using v3 you can try setting "+" inside utteranceDict as 'plus'. In this way, this character will be replaced before starting the nlp process.

ericzon avatar Feb 02 '20 13:02 ericzon

@ericzon Where would this be in v4?

Apollon77 avatar Aug 08 '22 20:08 Apollon77