Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

example not fully working #86

Closed
j2l opened this issue Oct 12, 2018 · 2 comments
Closed

example not fully working #86

j2l opened this issue Oct 12, 2018 · 2 comments

Comments

@j2l
Copy link
Contributor

j2l commented Oct 12, 2018

Describe the bug
I can run the example and model.nlp is created, but there's no classification, nor answer:
image
No error is thrown.

To Reproduce
win 10, node.js 8.9.3, npm 5.5.1
npm i node-nlp
await is not working, changed to use .then() (see screenshot)

Expected behavior
same result as example in readme.

@jesus-seijas-sp
Copy link
Contributor

Hello!
Here you have an example of code with async/await:
https://gist.github.com/jesus-seijas-sp/498082e6c00021d526378754134e43c5

And here with promises:
https://gist.github.com/jesus-seijas-sp/573b0a1a59cd8520e756ddabc25d1d56

The problem in your code is that the then() part with the manager.process should be a function.

Also you have a folder with 3 examples: a console bot, a microsoft bot framework bot, and a benchmark using 3 different corpus:
https://github.com/axa-group/nlp.js/tree/master/examples

@j2l
Copy link
Contributor Author

j2l commented Oct 13, 2018

Wow!
Thank you for this reply. You nailed the problem perfectly.
All the examples you provided here are working.
I'll learn more :)

Thank you also for replying on Friday night.
Have a great week-end.

@j2l j2l closed this as completed Oct 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants