[KinoSearch] Subclassable Highlighter

Father Chrysostomos sprout at cpan.org
Thu Jan 31 14:37:21 PST 2008


On Jan 30, 2008, at 1:54 PM, I wrote:

> This patch makes the changes to Highlighter.pm’s public interface,  
> and modifies the test accordingly. It does not yet use HighlightSpan  
> and HeatMap

This patch makes it use those two. I saw in another message that you  
wanted the Scorer to provide the HighlightSpans. I’m not sure exactly  
how you want to accomplish that, but this is a start. It uses the  
Query for now, but at least it eliminates _starts_and_ends and  
_calc_best_location from Highlighter.pm.

I did run into a problem with multiple HighlightSpans with the same  
start offset. It makes the ( 1 / ( 1 + log($diff) ) ) formula in  
HeatMap.pm blow up (log 0). So I’ve added code that eliminates  
duplicates, adding the weights together. I’m not sure if this is how  
it should be done.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: ks-highlight-again.diff
Type: application/octet-stream
Size: 16647 bytes
Desc: not available
Url : http://rectangular.com/pipermail/kinosearch/attachments/20080131/720011b8/attachment-0002.obj 
-------------- next part --------------



-------------- next part --------------
_______________________________________________
KinoSearch mailing list
KinoSearch at rectangular.com
http://www.rectangular.com/mailman/listinfo/kinosearch


More information about the kinosearch mailing list