A question related to the assignement autocomplete() last exercice

Hi everyone i hope you are doing well, i have a question on why i get “have” twice in the suggestions (all the tests are passed successfully),i don’t understand the logic behind it please give me some insights:
The previous words are [‘i’, ‘am’, ‘to’], the suggestions are:
[(‘be’, 0.027665685098338604),
(‘have’, 0.00013487086115044844),
(‘have’, 0.00013490725126475548),
(‘i’, 6.746272684341901e-05)]
and the same with “you” here:
[(‘you’, 0.023426812585499317),
(‘you’, 0.003559435862995299),
(‘you’, 0.00013491635186184566),
(‘i’, 6.746272684341901e-05)]

hi @Nizar2077

you haven’t mentioned the exercise name in particular to the assignment you got this output, but if I have to understand if you compare the previous word, the probabilistic metric is probably based on the corpus having either sentences

“I have” or I am going to have"

same goes for you

you can be

“you have to”

“you have had”

“you are going to have”

a word can repeat Multiple times in a corpus but its probability related to its previous word can have different corpus or sentences.

1 Like

it’s exercice 11 of the final assignement of week 3 related to N-grads autocomplete,i don’t understand why the same word is mentioned more than once ,srry but i didn’t understand can you explain to me why in details please? and thank you for the help