Count_n_grams test case failed

Hi,
I got one test case that failed for the count_n_grams function. I tried to debug but no luck. Can someone please help me with this?

Here is the output of the failed case:

Wrong output dictionary.
	 Expected: {('-1', '-1', '-1'): 4, ('-1', '-1', 'in'): 1, ('-1', 'in', 'sunset'): 1, ('in', 'sunset', 'sky'): 1, ('sunset', 'sky', 'is'): 1, ('sky', 'is', 'red'): 1, ('is', 'red', '-2'): 1, ('-1', '-1', 'i'): 1, ('-1', 'i', 'like'): 1, ('i', 'like', 'a'): 1, ('like', 'a', 'cat'): 2, ('a', 'cat', '-2'): 2, ('-1', '-1', 'this'): 1, ('-1', 'this', 'dog'): 1, ('this', 'dog', 'is'): 1, ('dog', 'is', 'like'): 1, ('is', 'like', 'a'): 1, ('-1', '-1', 'really'): 1, ('-1', 'really', 'really'): 1, ('really', 'really', 'long'): 1, ('really', 'long', 'sentence'): 1, ('long', 'sentence', '.'): 1, ('sentence', '.', 'it'): 1, ('.', 'it', 'is'): 1, ('it', 'is', 'very'): 1, ('is', 'very', 'long'): 1, ('very', 'long', 'indeed'): 1, ('long', 'indeed', ';'): 1, ('indeed', ';', 'so'): 1, (';', 'so', 'long'): 1, ('so', 'long', '...'): 1, ('long', '...', '-2'): 1} 
	Got: {('-1', '-1', '-1'): 4, ('-1', '-1', 'in'): 1, ('-1', 'in', 'sunset'): 1, ('in', 'sunset', 'sky'): 1, ('sunset', 'sky', 'is'): 1, ('sky', 'is', 'red'): 1, ('is', 'red', '-2'): 1, ('red', '-2'): 1, ('-1', '-1', 'i'): 1, ('-1', 'i', 'like'): 1, ('i', 'like', 'a'): 1, ('like', 'a', 'cat'): 2, ('a', 'cat', '-2'): 2, ('cat', '-2'): 2, ('-1', '-1', 'this'): 1, ('-1', 'this', 'dog'): 1, ('this', 'dog', 'is'): 1, ('dog', 'is', 'like'): 1, ('is', 'like', 'a'): 1, ('-1', '-1', 'really'): 1, ('-1', 'really', 'really'): 1, ('really', 'really', 'long'): 1, ('really', 'long', 'sentence'): 1, ('long', 'sentence', '.'): 1, ('sentence', '.', 'it'): 1, ('.', 'it', 'is'): 1, ('it', 'is', 'very'): 1, ('is', 'very', 'long'): 1, ('very', 'long', 'indeed'): 1, ('long', 'indeed', ';'): 1, ('indeed', ';', 'so'): 1, (';', 'so', 'long'): 1, ('so', 'long', '...'): 1, ('long', '...', '-2'): 1, ('...', '-2'): 1}.

Thanks,
Ashwanth.

Hey @ashwanth467,
It would be a little difficult for me to try to debug your code just from this output. Please DM your implementation for the same to me. For DM, click on my name and select “Message”.

Cheers,
Elemento