vocab/lang-code/
or locale/lang-code/
directories of a Skill. They can have one or more lines to list synonyms or terms that have the same meaning in the context of this Skill. Mycroft will match any of these keywords with the Intent.Potato.voc
. Within this file we might include:potato
potatoes
spud
Potato
keyword.regex/lang-code/
or locale/lang-code/
directories of a Skill. They can have one or more lines to provide different ways that an entity may be referenced. Mycroft will execute these lines in the order they appear and return the first result as an entity to the Intent Handler.type.rx
file to extract the type of potato we are interested in. Within this file we might include:.*
matches zero, one or more of any single character. (?P<Type>.*)
is known as a Named Capturing Group. The variable name is defined between the , and what is captured is defined after this name. In this case we use .*
to capture anything.Tell me about sweet potatoes
Do you like deep fried potato
How do I make mashed potato
Type
be:
1. sweet
2. deep fried
3. mashed
Type
will be available to use in your Skill's Intent Handler on the message
object. We can access this using:Potato.voc
Type.rx
.voc
files:Like.voc
- containing a single line "like"You.voc
- containing a single line "you"I.voc
- containing a single line "I".voc
or .rx
files.Potato
and Like
keywords are required. It must be present for the intent to match.Type
entity is optional. A stronger match will be made if this is found, but it is not required.You
or I
keywords.Do you like potato? Do you like fried potato? Will I like mashed potato? Do you think I would like potato?
How do I make mashed potato?
Like
keyword is not found.Is it like a potato?
You
nor I
keyword is found..voc
files. Similarly, definite articles like the word "the" are removed in the normalization process, so avoid using them in your .voc
or .rx
files as well.skill-dir/locale/en-us/somefile.dialog
. So make sure that your .voc
files and .dialog
files inside a language subfolder.