What is Laplace Smoothing? What is Additive Smoothing? Why do we need smoothing in IDF?

Laplace smoothing addresses the issue encountered in NLP tasks, such as text classification with Naive Bayes, when certain words only occur in the test dataset and were not seen in training. It adds a small correction to the numerator and denominator of the posterior probability of a word belonging to each class to avoid the likelihood for a given class resulting in 0.