Re: Letor: returning MSet after re-ranking
Ayush Tomar <[email protected]>
| Newsgroups | gmane.comp.search.xapian.devel |
|---|---|
| Message-ID | <CAPx_PWmK5W2NPuopnupJPmtqawMtWBhTr88R41f8JghbZau3GQ@mail.gmail.com> |
> > Would a method which swapped two elements of an MSet provide what you > need? That would provide a more generic way to adjust the ranking of > an MSet which for example could be used to implement a diversification > feature or something like SQL "GROUP BY". > In addition to a method which swapped two elements of an MSet, what is a required is a method that could update the weights of all MSetItem in an MSet with the ones returned by letor. A method void MSetIterator::set_weight(double letor_wt) could do that. Once the weights have been updated, I could use void MSet::exchange(MSetIterator &, MSetIterator &b) to write a sorting method as part of any letor class to sort the MSet elements by weights, or maybe as MSet::sort() method which performs this sorting directly, whichever way it presents a broader use-case to users. What do you think? Regards, Ayush