As described in <a href="http://terrier.org/docs/current/dfr_description.html">http://terrier.org/docs/current/dfr_description.html</a>, there are many DFR models, which models will to be implemented in Xapian. <div><br clear="all">
<div><i><br></i></div><div><i><br></i></div><i>Wenjin Wu</i><div><br></div><br>
<br><br><div class="gmail_quote">2011/3/28 Olly Betts <span dir="ltr"><<a href="mailto:olly@survex.com">olly@survex.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Mon, Mar 28, 2011 at 10:24:30AM +0800, wuwenjin wrote:<br>
> I have great interested in "Weight Schemes" project. and in the last few<br>
> days I have learnt some detail about DFR model family by reading some papers<br>
> and web page. I find that Terrier Project (<a href="http://terrier.org/" target="_blank">http://terrier.org/</a>) has<br>
> implement most of DFR scheme in Java language<br>
<br>
</div>Yes, Terrier implements a number of DfR schemes.<br>
<div class="im"><br>
> and briefly read related<br>
> source of Terrier's package( org.terrier.matching.models), I think "weight<br>
> scheme" can imitate that package, of course in C++.<br>
<br>
</div>Xapian's weighting schemes are structured in a particular way to allow<br>
for various optimisations. You need to subclass Xapian::Weight and<br>
implement various methods to implement them, so I would suggest just<br>
starting from the formulae - trying to directly translate Terrier's code<br>
to C++ will give you Java-esque C++ code which doesn't actually fit where<br>
you need it.<br>
<br>
You can see the Xapian::Weight API here:<br>
<br>
<a href="http://trac.xapian.org/browser/trunk/xapian-core/include/xapian/weight.h" target="_blank">http://trac.xapian.org/browser/trunk/xapian-core/include/xapian/weight.h</a><br>
<div class="im"><br>
> It will be better to<br>
> implement a generic DFR weighting model allowing any DFR to be generated<br>
> and evaluated. Since DFR is a framework or model family, which contains<br>
> many basic models and different normalizations.<br>
<br>
</div>An interesting idea.<br>
<br>
Although it's a family of weighting schemes, I suspect you'd find you<br>
ended up switching between different implementations for each DfR scheme<br>
internally, and that's better done by subclassing really.<br>
<br>
But probably worth thinking about further.<br>
<br>
Cheers,<br>
<font color="#888888"> Olly<br>
</font></blockquote></div><br></div>