Reputation: 51
I am using MS LUIS to build a chat bot. When a filename comes in a question, it is detecting names,dates,numbers on the filename as real entities where they are not. The filenames are obviously coming inside quotes. Still LUIS is taking those as entities.
Is there a way to tell LUIS to stop identifying words inside quotes as entities. Any help will be greatly appreciated.
Upvotes: 0
Views: 55
Reputation: 7241
Unfortunately, LUIS binds all possible entities it can and they cannot be selectively removed--they can only be completely removed from the app.
However, you can handle this within your code a few different ways:
When the result comes back from LUIS, you could maybe selectively look at the entities. Pseudo-code might be something like
// If turnContext.activity.Text doesn't contain "", do something with entities
If you don't want LUIS to process filenames at all, you could also ignore them within your code. Code would be something like:
var recognizerResult = {};
if (!turnContext.activity.Text.contains("/"))
{
recognizerResult = await _services.LuisServices[LuisKey].RecognizeAsync(turnContext, cancellationToken);
}
Flip the toggle to the top-right from Entity View to Tokens View
Entity regex: ^(.*/)([^/]*)$
Before:
After (note: I only RegEx'd for "/" and not "\"):
Upvotes: 1