Re: Weighting Schemes: Implementing Piv+ Normalization

James Aylett <[email protected]>
Newsgroups gmane.comp.search.xapian.devel
Message-ID <[email protected]>
On Wed, Jul 27, 2016 at 11:38:58PM +0530, Vivek Pal wrote:

> But I'm running into some issues with Piv+ normalization. In the Piv+
> formula  , there are two parameters (s and delta) that control the weight
> assigned. I think the way I'm serialising and unserialising these
> parameters has some issues which is causing a few errors,
> http://pastebin.com/yCyuvF1X.  Any suggestion is appreciated!

Two of those are compile errors, suggesting you aren't pulling in the
right header file (it's in common/serialise-double.h I believe).

This one:

----------------------------------------------------------------------
weight/tfidfweight.cc: In member function 'virtual
Xapian::TfIdfWeight* Xapian::TfIdfWeight::unserialise(const string&)
const':

weight/tfidfweight.cc:87:37: error: conversion from 'const char' to
non-scalar type 'const string {aka const
std::__cxx11::basic_string<char>}' requested

     const string normals = (*(ptr)++);
                                     ^
----------------------------------------------------------------------

I can't tell for sure without seeing the diff. You may mean just
`ptr++`? But it could be something else, depending on what you're
trying to do.

> Also, I was wondering if we want to have pivoted normalization weighting as
> a separate weighting scheme in Xapian as it will make a way to add support
> of different variations of pivoted normalization in the future?

This is more of a question for Olly, who I believe should be back on
reliable internet later this week.

J

-- 
  James Aylett, occasional trouble-maker
  xapian.org
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.