MycroftAI / skill-wiki

Query Wikipedia articles
https://mycroft.ai/skills
Apache License 2.0
18 stars 33 forks source link

Cannot use the word 'search' in other skills #41

Open stratus-ss opened 4 years ago

stratus-ss commented 4 years ago

It appears that because this skill is installed by default it blocks other skills from being able to use the word search.

For example, trying to write my own skill the phrase search confluence for chicken results in Mycroft activating the wiki skill. It responds with:

 >> Just a moment while I look up chicken
 >> The chicken is a type of domesticated fowl, a
    subspecies of the red junglefowl .

This to me would suggest that the wiki skill has too wide of a match with the word search. The same problem would manifest with the word check

I believe it is unreasonable to expect a user to black list default skills in order to use other skills. A default skill should not have a monopoly of generic terms like search. This leads to non-default skills having to use more awkward phrasing to be triggered. It also makes Mycroft seem "stupid" to the end user and it doesn't "understand"

This regex is too wide:

.*(wiki|for|about|wikipedia)

This needs to be more specific. Perhaps consider something like

(search | check) (wiki | wikipedia) for 
tell me about 
tell me something random

I see how this means that the regexes would match less but perhaps that is a good thing?

forslund commented 4 years ago

Perhaps the search should be removed from the Wikipedia.voc vocab file and added as a separate keyword. If this is used the regex won't need to be changed.

So the intent handler setup on L49 wouldn't catch this and it could be extended to something like

@intent_handler(IntentBuilder("").require("Wikipedia").
                    require("ArticleTitle").optionally("Search"))

which would make the match be more sane and require Wikipedia/wiki in combination with Search (or the wider tell me about X but that is not likely to occur in conjunction with search)

As a separate issue the "tell me about X" might be good for inclusion in the common query system.