MycroftAI / adapt

Adapt Intent Parser
Apache License 2.0
712 stars 154 forks source link

Why is confidence only 0.375 for the regex example? #72

Closed remster85 closed 6 years ago

remster85 commented 6 years ago

Hi guys, I like the framework a lot and plan to use it and contribute to it. I was playing with the regex example. and executing the command, it returns a low confidence.

python regex.py "what's the weather like in tokyo"

    "intent_type": "WeatherIntent",
    "WeatherKeyword": "weather",
    "Location": "tokyo",
    "target": null,
    "confidence": 0.375
clusterfudge commented 6 years ago

Overall confidence is based on the amount of the utterance that is related to the matched intent. Entity matches from regular expressions are weighted lower than matches from vocabulary. You can see where this confidence rating is applied in EntityTagger.

In the above utterance, only "weather" and "tokyo" are used as part of the intent, and as such it has a low weight.

remster85 commented 6 years ago

thank you for the explanation!