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

Modified Files:
      Tag: Feb2009
        pftijah.mx 
Log Message:
porting yesterdays changes to the LM retrieval model also to stable
(using CVS commands)



U pftijah.mx
Index: pftijah.mx
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/modules/pftijah/pftijah.mx,v
retrieving revision 1.197.2.9
retrieving revision 1.197.2.10
diff -u -d -r1.197.2.9 -r1.197.2.10
--- pftijah.mx  14 Mar 2009 07:37:32 -0000      1.197.2.9
+++ pftijah.mx  3 Apr 2009 08:14:19 -0000       1.197.2.10
@@ -2389,16 +2389,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