Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
581 views
in Technique[技术] by (71.8m points)

botframework - How to tell LUIS that "April" is a name and not a month

I have several patterns for finding information about people including things like:

What is {personName} phone number

and

Tell me about {personName} in {Department}

(Department being a custom entity)

However, no matter what kind of training I give it, including specific mentions of things like "April in Marketing", it always comes back with "April" being a datetimeV2 entity.

Is there a way I can force it to recognize that, within the name patterns, the string "April" is always a name, not "XXXX-04" datetimeV2 entity?

(We have no other people here with names the same as months, but I have to assume if we did, we'd need a workaround for those as well.)

question from:https://stackoverflow.com/questions/65909633/how-to-tell-luis-that-april-is-a-name-and-not-a-month

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

As a quick fix for now, Instead of a Simple Entity called personName in the Patterns, create a Pattern. Any entity (Go to Entities ? Create, will be one of the options), and put that entity whatever you call it (personNameAny) and put it in the pattern, and it will achieve the scenario you want where personNameAny acts as a placeholder for whatever text that happens after words like “what is” put in the utterance. This comes with drawbacks and isn’t the optimum solution but it can cover a lot of scenarios. https://docs.microsoft.com/en-us/azure/cognitive-services/luis/luis-how-to-add-entities


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...