Multivariate Bernoulli Naive Bayes

How has sir added 2 in denominator in formula.
I didn’t understand.plz help!!

While applying Laplace smoothing for calculating conditional probability we add K to the denominator, here generally K = No. of unique entries in dictionary/ vocab size. But here we have made bernoulli’s model, that means for every word correspondingly we have either 0 or 1 no matter how many times it occurs in the sample. And that’s the reason, in bernoulli’s model we add 2 to the denominator.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.