<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent changes to 2: Level2 scoring issues when bags of different sizes</title><link href="https://sourceforge.net/p/secondstring/bugs/2/" rel="alternate"/><link href="https://sourceforge.net/p/secondstring/bugs/2/feed.atom" rel="self"/><id>https://sourceforge.net/p/secondstring/bugs/2/</id><updated>2008-02-28T20:51:49Z</updated><subtitle>Recent changes to 2: Level2 scoring issues when bags of different sizes</subtitle><entry><title>Level2 scoring issues when bags of different sizes</title><link href="https://sourceforge.net/p/secondstring/bugs/2/" rel="alternate"/><published>2008-02-28T20:51:49Z</published><updated>2008-02-28T20:51:49Z</updated><author><name>Anonymous</name><uri>https://sourceforge.net/u/userid-None/</uri></author><id>https://sourceforge.net7936c32d9f0b7c96e7a001a18d2cd55b1a06f8bc</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I've encountered problems with Level2 not accurately scoring bags of different lengths. I'm including a patch which solved the problem for me.&lt;/p&gt;
&lt;p&gt;The problem presented itself when Level2.score(s, t) was called with size(s) &amp;lt; size(t). For example:&lt;/p&gt;
&lt;p&gt;s = {'Frances', 'Fyfe'}&lt;br /&gt;
t = {'Mary', 'Frances', 'Fyfe'}&lt;/p&gt;
&lt;p&gt;Level2.score(s,t) -&amp;gt; 1.0&lt;br /&gt;
level2.score(t,s) -&amp;gt; 0.83&lt;/p&gt;
&lt;p&gt;The problem is, I believe, that the algorithm always iterates over s. What should happen, in my opinion, is that the algorithm should iterate over the larger of the two sets.&lt;/p&gt;
&lt;p&gt;I'm including a patch which does just that. I hope this is helpful. &lt;/p&gt;&lt;/div&gt;</summary></entry></feed>