UNQ_C10 GRADED FUNCTION: get_corrections Wrong output values

In the Exercise 10: UNQ_C10 GRADED FUNCTION: get_corrections
I got:

Test your function

w1_unittest.test_get_corrections(get_corrections, probs, vocab)
Wrong output values.

Any help?

Thanks.

Lev.

Hey @LevValenzuela,
Have you set allow_switches = True while using the edit_one_letter and edit_two_letter functions? It hasn’t been mentioned explicitly, but since nothing has been mentioned, it implies that we are supposed to use the default values which is True in both the cases.

If it doesn’t help you, then please DM me your implementation for the get_corrections function, so that I can try to find to find out the exact issue.

Cheers,
Elemento

1 Like

Thank you, @Elemento, thats the solution.

I use ‘verbose’ instead of allow_switches = True. I believe always was true, since verbose = True from the call of the function get_corrections():

# Test your implementation - feel free to try other words in my word
*my_word = ‘dys’ *
tmp_corrections = get_corrections(my_word, probs, vocab, 2, verbose=True) # keep verbose=True

Cheers,
Lev

Hey @LevValenzuela,
I am a little unsure how verbose and allow_switches are related, but as long your issue is resolved, I am glad :nerd_face:

Cheers,
Elemento

Hi, @Elemento,

There are not related at all. I supossed “verbose” was the second parameter of the edit functons, instead of allow_switches = True. My bad.

Thank you for your help.

Lev.