We have an intent which catches a person's name and email. Below is how our training data looks. The problem is with utterances which contain just name and email, without additional phrases around. As we are using it in SMS conversation, I guess that it could be quite often the case.
For example if user types in "Mark Randel gone@hotmail.com", we will get name: Mark
and email: Randelgone@hotmail.com
I noticed that if we enter an exact phrase as it is in one of the utterances in training phrases, we will get the right result, but obviously, we can not add all possible combinations here.
Would it be expected that recognition will improve if we add additional 20-30 training phrases with various just name and email combinations? This would be kind of strange, because, what is the point of system entities in that case?
Has anyone had a similar issue?
In Dialogflow ES, default @sys.email entity allows empty string for extracting email. I think this cause the problem.
You use regexp entities with email regex, so that you might be able to extract only valid email string.
In my environment, I created regex custom entity for extracting email.
regex : [\w-\.]+@([\w-]+\.)+[\w-]{2,4}
input : Mark Randel gone@hotmail.com
output :
parameters | value |
---|---|
person | {'name': 'Mark Randel'} |
regex-email | gone@hotmail.com |