<div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Hi, <br></div><div>I was going through the Xapian code base of different weighting schemes. In the lmweight code, I found out that we are returning non-negative numbers from get_maxpart, get_sumpart methods. Is this to avoid negative weight? Also in the Language Model with Jelinek Mercer Smoothing (LM-JM) implementation, I don't see any idf effect involved in that equation. The LM-JM equation looks something like this:</div><div><div style="font-family:arial,helvetica,sans-serif" class="gmail_default"> <b><span style="font-family:monospace,monospace">(LAMBDA)* MLE(t,d) + (1-LAMBDA) * MLE(t,c)</span></b> </div></div><div>However, if we bind it with idf, it will look like :</div><div>  <b><span style="font-family:monospace,monospace">1 + ((LAMBDA) /<b><span style="font-family:monospace,monospace"> (1-LAMBDA) </span></b>* (MLE(t,d) /<b><span style="font-family:monospace,monospace"> MLE(t,c)))</span></b> <br></span></b></div><div>which is widely used everywhere. I am planning to patch an improved representation of LM-JM with the idf effect shortly. Kindly let me know for any concerns.</div><div><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div style="background-image:none;margin:0cm 0cm 0pt;background-repeat:repeat"><span style="font-family:"Times New Roman",serif;font-size:12pt;letter-spacing:0.2px">Thanks and Regards,</span><br></div><div style="background-image:none;margin:0cm 0cm 0pt;background-repeat:repeat"><span style="font-size:12pt;font-family:"Times New Roman",serif">-Sourav</span></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>