winkjs / wink-eng-lite-web-model

English lite language model for Web Browsers
MIT License
11 stars 8 forks source link

Error calling learnCustomEntities() #1

Closed kiwikoda closed 3 years ago

kiwikoda commented 3 years ago

I'm receiving the following error when calling learnCustomEntities() as per the sample code in the documentation.

wink-nlp.js:1452 Uncaught SyntaxError: Unexpected token , in JSON at position 3
    at JSON.parse (<anonymous>)
    at Object.importJSON (VM1233 wink-nlp.js:1452)
    at compiler (VM1233 wink-nlp.js:1496)
    at Object.learnCustomEntities (VM1233 wink-nlp.js:1767)

Here is a codepen: https://codepen.io/pilotbean/pen/vYXNGLX

sanjayaksaxena commented 3 years ago

@kiwikoda thanks for highlighting the issue. It is a bug in the wink-eng-lite-web-model and not in the wink-nlp. Transferring the issue to wink-eng-lite-web-model.

sanjayaksaxena commented 3 years ago

@kiwikoda we have fixed the issue:

image

Thanks once again for your contribution.

kiwikoda commented 3 years ago

Brilliant! Thanks, @sanjayaksaxena.