Failed testcases for w3_unittest.test_calculate_perplexity(calculate_perplexity)

Why do I have 2 failed testcases for the calculate_perplexity function ?

Wrong perplexity value.
	 Expected: 6.137396479150367 
	Got: 2.943288481048362.
Wrong perplexity value.
	 Expected: 5.0931554910158665 
	Got: 2.5947982560418383.
 2  Tests passed
 2  Tests failed

(Code snippet removed)

Dear @user342 ,

Instead of len(unique…), try to use vocabulary size and smoothing constant as it is mentioned in the description.

I hope it helps.

All the best.