PREFACE: If there is a tutorial that tells me how to do this please leave a link
Suppose I have a user query that I want to see if an animal in it. Is there a way to
- Construct a pattern that will tag the user’s input with the ~animals entity if an animal is found in the input
- If the user’s input contains an animal, and is tagged/marked with the “~animals” entity, how do I find the ~animals tag? (Where would I find this tag in the bot variables?)
- Tell me what words in the user input query were matched by the ~animals entity. For example, if the user said “I have a dog”, then “dog” would be the word matched by the ~animals entity. (Where in the variables tree would I find those words?)
- What BotBuilder node type would I use to contain the Javascript that analyzes the tags/marks applied to the user input so I can create a new string to be sent to my server that has just the tags/words I want to pass to it? Message, etc?
Robert, yes that can be done.
The syntax ~animals means a concept named animals. A bot developer can define their own concepts, but the system has a set of internal concepts and also some dynamically assigned ones. Part of the NL pipeline is to automatically mark/tag words with these concepts. Those marks are used by the FM engine in the intent and entity matching processes.
Now it just so happens that there is an internal concept called ~animals - not sure if you knew that or it was a lucky guess
To find a word that has been marked with a concept then you can use an entity node of type Custom, and in the regex field type the concept name. The subsequent entity value will be the (first available) word that was marked with that concept. If you just want to discover what the user said in the initial utterance then make it a hidden entity.
The internal concepts are not documented, but you can find out the marks applied to each word in an utterance through a cheat:
cheat conceptlist <utterance>
Hope that helps.
1 Like
Thanks Andy.
“Now it just so happens that there is an internal concept called ~animals - not sure if you knew that or it was a lucky guess ”
I’m a veteran ChatScript developer so I knew the ~animals entity existed. My current task is understanding where in BotBuilder they expose various ChatScript features, to the extent that they do.
“The internal concepts are not documented,”
Can I count on all of the “stock” ChatScript entities like ~animals being available to me via BotBuilder too?
What does FM mean?
I’m a veteran ChatScript developer
Yes, all the standard CS concepts are there. The only thing we don’t include is RAWDATA/WORLDDATA - but we have our own lists of names and geographical items.
- cheat conceptlist is basically :prepare
- cheat show facts for … is :facts
FM stands for Fundamental Meaning, just our term to indicate a deterministic NL approach that ChatScript provides us in contrast to the probabilistic scheme of Machine Learning (ML).
1 Like
probabilistic scheme of Machine Learning (ML)
Are you using the same technique Amazon uses for their Alexa NLU intent training? Yours seems more flexible so I’m curious as to if its the same or not.
I can’t comment on what techniques Amazon is using for their intent training.
1 Like