Update of /cvsroot/monetdb/pathfinder/modules/pftijah
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv15499

Modified Files:
        pftijah.mx 
Log Message:
changed behavior of LM model. it works now as in the old tijah version,
returning only elements that match *all* query terms.



U pftijah.mx
Index: pftijah.mx
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/modules/pftijah/pftijah.mx,v
retrieving revision 1.219
retrieving revision 1.220
diff -u -d -r1.219 -r1.220
--- pftijah.mx  25 Mar 2009 16:07:46 -0000      1.219
+++ pftijah.mx  2 Apr 2009 15:25:43 -0000       1.220
@@ -2431,16 +2431,21 @@
        # score elements by this term
         var e_tScores := _score_LM($t, c_tCnt, cSize, e_tCnt, e_size);
         e_tCnt := nil;
+        e_tScores := 
e_tScores.kunion(left.kdiff(e_tScores).project(dbl(0))).sort();
         
        # aggregate term scores
-        eScores := eScores.union_mul(e_tScores);
+        eScores := e_tScores.left_mul(eScores);
        e_tScores := nil;
     }
     eScores.access(BAT_READ);
     
     var res;
-    res := eScores;
-    
+    if (returnall) {
+        res := eScores;
+    } else {
+        var unchanged := eScores.uselect(dbl(0));
+        res := eScores.kdiff(unchanged);
+    }
     t_total :+= time();
     if (timing) printf("# LM timing: total: %d\n", t_total);
     return res;


------------------------------------------------------------------------------
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins

Reply via email to