Hi,
I am having some trouble figuring out where the stuck is for get_corrections function
So from the hints:
I check my word in vocab or not, if my word is in vocab, I suggest it. If not, if my word is in the intersection of edict_one and vocab, then I suggest that, if not this, if in edict_two and vocab, I suggest in this case.
I think I get this part right, then for the hint: if all three above are not helpful to my word, I can only have the word without anything suggested. or suggestion is just my word. this line of code should be the same as the first scenario where the word in vocab, we give suggestions to this word directly.
then after doing all this: and getting my suggestions dictionary ready, I use the functions that I have built at the very begging of this project: get_probs(get_count(suggestions)) to have my key: probs dictionary for the suggestions. then I pass this suggestion into Counter(suggestions_with probs) to make a counter object then I call .most(n) on it.
So far I think I am doing perfectly. then I got this error:
Can I get some help?
Much appreciated.