MycroftAI / mycroft-core

Mycroft Core, the Mycroft Artificial Intelligence platform.
https://mycroft.ai
Apache License 2.0
6.51k stars 1.27k forks source link

Improve confidence calculation for Common Query #2986

Closed ken-mycroft closed 2 years ago

ken-mycroft commented 3 years ago

Description

The calc_confidence() routine is a bit dated. This adds some improvements which also cover some skill blemishes in common query skills.

How to test

There should be a difference in the response between "how tall is the eifel tower" and "what is the eifel tower", etc.

Contributor license agreement signed?

Yes

pep8speaks commented 3 years ago

Hello @ken-mycroft! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! :beers:

Comment last updated at 2021-09-06 06:39:50 UTC
devops-mycroft commented 3 years ago

Voight Kampff Integration Test Succeeded (Results)

forslund commented 3 years ago

This latest change the root issue I had with the code. I'm quite happy with it now :)

codecov-commenter commented 3 years ago

Codecov Report

Merging #2986 (d1e916c) into dev (13539d3) will increase coverage by 0.16%. The diff coverage is 93.47%.

:exclamation: Current head d1e916c differs from pull request most recent head 0a37e81. Consider uploading reports for the commit 0a37e81 to get more accurate results Impacted file tree graph

@@            Coverage Diff             @@
##              dev    #2986      +/-   ##
==========================================
+ Coverage   52.80%   52.97%   +0.16%     
==========================================
  Files         123      123              
  Lines       11104    11139      +35     
==========================================
+ Hits         5864     5901      +37     
+ Misses       5240     5238       -2     
Impacted Files Coverage Δ
mycroft/skills/common_query_skill.py 93.61% <93.47%> (+7.17%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 13539d3...0a37e81. Read the comment docs.