# A question related to the assignement autocomplete() last exercice

**URL:** <https://community.deeplearning.ai/t/a-question-related-to-the-assignement-autocomplete-last-exercice/792484>\
**Category:** NLP with Probabilistic Models\
**Tags:** week-module-3\
**Created:** [March 28, 2025, 11:25am UTC](https://community.deeplearning.ai/t/a-question-related-to-the-assignement-autocomplete-last-exercice/792484 "2025-03-28T11:25:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nizar2077](https://avatars.discourse-cdn.com/v4/letter/n/bbce88/32.png) [@Nizar2077](https://community.deeplearning.ai/u/Nizar2077)\
**Post date:** [March 28, 2025, 11:25am UTC](https://community.deeplearning.ai/t/a-question-related-to-the-assignement-autocomplete-last-exercice/792484/1 "2025-03-28T11:25:33Z")

</div>

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)]

---

<div class="post-metadata">

**Author:** ![Deepti\_Prasad](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/deepti_prasad/32/165831_2.png) [@Deepti\_Prasad](https://community.deeplearning.ai/u/Deepti_Prasad)\
**Post date:** [March 28, 2025, 6:03pm UTC](https://community.deeplearning.ai/t/a-question-related-to-the-assignement-autocomplete-last-exercice/792484/2 "2025-03-28T18:03:15Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Nizar2077](https://avatars.discourse-cdn.com/v4/letter/n/bbce88/32.png) [@Nizar2077](https://community.deeplearning.ai/u/Nizar2077)\
**Post date:** [March 28, 2025, 8:19pm UTC](https://community.deeplearning.ai/t/a-question-related-to-the-assignement-autocomplete-last-exercice/792484/3 "2025-03-28T20:19:20Z")

</div>

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
