pike.git / src / modules / _WhiteFish / whitefish.c

version» Context lines:

pike.git/src/modules/_WhiteFish/whitefish.c:1:   #include <math.h>      #include "global.h"   #include "stralloc.h"   #include "global.h" - RCSID("$Id: whitefish.c,v 1.28 2001/05/31 00:33:44 js Exp $"); + RCSID("$Id: whitefish.c,v 1.29 2001/05/31 17:15:26 norlin Exp $");   #include "pike_macros.h"   #include "interpret.h"   #include "program.h"   #include "program_id.h"   #include "object.h"   #include "operators.h"   #include "array.h"   #include "module_support.h"      #include "config.h"
pike.git/src/modules/_WhiteFish/whitefish.c:406:    double proximity_coefficients[8];    double field_coefficients[66];    int numblobs, i;    Blob **blobs;       struct svalue *cb;    struct object *res;    struct array *_words, *_field;       /* 1: Get all arguments. */ -  get_all_args( "do_query_merge", args, "%a%a%*", +  get_all_args( "do_query_phrase", args, "%a%a%*",    &_words, &_field, &cb);       if( _field->size != 66 )    Pike_error("Illegal size of field_coefficients array (expected 66)\n" );       numblobs = _words->size;    if( !numblobs )    {    struct object *o = wf_resultset_new( );    pop_n_elems( args );
pike.git/src/modules/_WhiteFish/whitefish.c:435:       for( i = 0; i<66; i++ )    field_coefficients[i] = (double)_field->item[i].u.integer;       res = low_do_query_phrase(blobs,numblobs, field_coefficients );    pop_n_elems( args );    push_object( res );   }      static void f_do_query_and( INT32 args ) - /*! @decl ResultSet do_query_merge( array(int) words, @ + /*! @decl ResultSet do_query_and( array(int) words, @    *! array(int) field_coefficients, @    *! array(int) proximity_coefficients, @    *! function(int:string) blobfeeder)    *! @[words]    *!    *! Arrays of word ids. Note that the order is significant    *! for the ranking.    *!    *! @[field_coefficients]    *!
pike.git/src/modules/_WhiteFish/whitefish.c:584:    double proximity_coefficients[8];    double field_coefficients[66];    int numblobs, i, cutoff;    Blob **blobs;       struct svalue *cb;    struct object *res;    struct array *_words, *_field, *_prox;       /* 1: Get all arguments. */ -  get_all_args( "do_query_merge", args, "%a%a%a%d%*", +  get_all_args( "do_query_or", args, "%a%a%a%d%*",    &_words, &_field, &_prox, &cutoff, &cb);       if( _field->size != 66 )    Pike_error("Illegal size of field_coefficients array (expected 66)\n" );    if( _prox->size != 8 )    Pike_error("Illegal size of proximity_coefficients array (expected 8)\n" );       numblobs = _words->size;    if( !numblobs )    {