Closed stas4000 closed 6 years ago
This project is prepared mainly for importing. There is inference script, but mostly for testing purposes. Make own project, place nmt-chatbot inside it, and import (like in README). Then print output - you'll see all responses and index of best scored response.
Currently there's no way to filter all links out. You will have to modify scoring code.
Thanks for your response, I already modified the inference.py script so that now I'm getting one response with the highest score that is not a link.
hello, i would like to know how did you remove link outputs. thanks.
Best way to remove llinks is to filter them out from a training dataset, otherwise all answers might be a links for a question, so no answer at all.
Hi Frameworkapi,
Daniel is correct the best way is indeed to remove all links from dataset, but if you already trained your model and you'd like to filter the links there is a way using regex.
I am attaching my customized inference.py file. It's filtering all links and outputs a single answer with the highest score. Just look below line 307
For clarification I filtered the answers with this regex: "https?://(?:[-\w.]|(?:%[\da-fA-F]{2}))+"
Hi, Couldn't find anywhere in issues a question of this kind nor a clear instruction in README. So my question is how do I setup my trained bot to give me a single answer selected by the maximum score.
Also, I would love to know if there is a setting that filters links (I mean always returns a response without a website link)
Thanks in advance.