Skip to content

Add customization_weight parameter to recognize() for stt#309

Merged
ammardodin merged 3 commits intomasterfrom
mdk/307-add-customization-weight-to-stt
Nov 27, 2017
Merged

Add customization_weight parameter to recognize() for stt#309
ammardodin merged 3 commits intomasterfrom
mdk/307-add-customization-weight-to-stt

Conversation

@ammardodin
Copy link
Copy Markdown
Contributor

Fixes #306

@ammardodin ammardodin requested a review from mkistler November 25, 2017 18:38
@codecov-io
Copy link
Copy Markdown

codecov-io commented Nov 25, 2017

Codecov Report

Merging #309 into master will increase coverage by 0.02%.
The diff coverage is 50%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #309      +/-   ##
==========================================
+ Coverage   38.72%   38.75%   +0.02%     
==========================================
  Files          24       24              
  Lines        8292     8294       +2     
==========================================
+ Hits         3211     3214       +3     
+ Misses       5081     5080       -1
Impacted Files Coverage Δ
watson_developer_cloud/speech_to_text_v1.py 98.86% <50%> (-1.14%) ⬇️
watson_developer_cloud/watson_service.py 83.62% <0%> (+0.86%) ⬆️

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 7970a01...038b47c. Read the comment docs.

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Nov 25, 2017

CLA assistant check
All committers have signed the CLA.

if (params['customization_id'] is not None and
customization_weight is not None):
params['customization_weight'] = customization_weight

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can simply add

    'customization_weight': customization_weight,

into the params object above. The check for customization_weight is not None isn't needed because the service will strip it out, and the check for 'customization_id' shouldn't be needed because the service should simply ignore it when there is no customization_id.

Copy link
Copy Markdown
Contributor Author

@ammardodin ammardodin Nov 26, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, touche. I see you're removing None values in the base service. Nice !! 👍

Copy link
Copy Markdown

@mkistler mkistler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! 👍

@ammardodin ammardodin merged commit 242929b into master Nov 27, 2017
@ammardodin ammardodin deleted the mdk/307-add-customization-weight-to-stt branch November 27, 2017 00:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants