<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent changes to bugs</title><link href="https://sourceforge.net/p/secondstring/bugs/" rel="alternate"/><link href="https://sourceforge.net/p/secondstring/bugs/feed.atom" rel="self"/><id>https://sourceforge.net/p/secondstring/bugs/</id><updated>2015-12-09T12:33:16.483000Z</updated><subtitle>Recent changes to bugs</subtitle><entry><title>#5 Jaro returns score 0.0 for resembling strings</title><link href="https://sourceforge.net/p/secondstring/bugs/5/?limit=25#7032" rel="alternate"/><published>2015-12-09T12:33:16.483000Z</published><updated>2015-12-09T12:33:16.483000Z</updated><author><name>Alexis Monroy</name><uri>https://sourceforge.net/u/alexisml/</uri></author><id>https://sourceforge.netba06e8ba9f271ffc77e94a83aa5333c4754a69eb</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;This is caused by a glitch in the source code of Jaro class. At function commonChars, the line:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;for (int j=Math.max(0,i-halflen); !foundIt &amp;amp;&amp;amp; j&amp;lt;Math.min(i+halflen,t.length()); j++) {
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;...is wrong. It should be:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;for (int j=Math.max(0,i-halflen); !foundIt &amp;amp;&amp;amp; j&amp;lt;Math.min(i+halflen**+1**,t.length()); j++) {
&lt;/pre&gt;&lt;/div&gt;

&lt;/div&gt;</summary></entry><entry><title>library not thread safe</title><link href="https://sourceforge.net/p/secondstring/bugs/6/" rel="alternate"/><published>2010-05-11T13:24:46Z</published><updated>2010-05-11T13:24:46Z</updated><author><name>Anonymous</name><uri>https://sourceforge.net/u/userid-None/</uri></author><id>https://sourceforge.net5bff289f623d6105d4bde071df620e44016c790f</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;SimpleTokenizer has a static DEFAULT_TOKENIZER used by many methods in their constructors. However, SimpleTokenizer has a Map which is not thread safe. We have had infinite loops in the core java treemap get when used in a multi-threaded web environment. It would also seem incorrect to share a tokenizer between all methods.&lt;/p&gt;
&lt;p&gt;One solution is to change the matching methods constructors to use a new SimpleTokenizer each.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Jaro returns score 0.0 for resembling strings</title><link href="https://sourceforge.net/p/secondstring/bugs/5/" rel="alternate"/><published>2010-02-05T12:29:43Z</published><updated>2010-02-05T12:29:43Z</updated><author><name>Anonymous</name><uri>https://sourceforge.net/u/userid-None/</uri></author><id>https://sourceforge.net022ddd17d81d2e6ef3962abd6d7bb894be9bdcd4</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;When I give jaro the strings 'ihdienstdatuni' and 'indienstdatum' the returned score = 0.0, although there are only 3 differences.&lt;br /&gt;
When I append a space after 'indienstdatum' and leave the other string the same, the resulting score is 0.74. When I append a space to both strings, the score goes up to 0.78.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Jaccard.score() returns NaN if both strings empty</title><link href="https://sourceforge.net/p/secondstring/bugs/4/" rel="alternate"/><published>2009-04-08T01:35:20Z</published><updated>2009-04-08T01:35:20Z</updated><author><name>Anonymous</name><uri>https://sourceforge.net/u/userid-None/</uri></author><id>https://sourceforge.net421b6533439b4d41b37e6f8a98209fe22692f921</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Jaccard.score(s1, s2) returns NaN if both strings have zero tokens.  this happens when both strings are empty, or the tokenizer doesn't find any tokens (NGram tokenizer with minNGramSize &amp;gt; size of the string)&lt;/p&gt;
&lt;p&gt;It should *probably* return 0.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Probable typo in compute method in com/wcohen/ss/AffineGap.j</title><link href="https://sourceforge.net/p/secondstring/bugs/3/" rel="alternate"/><published>2008-04-09T13:35:09Z</published><updated>2008-04-09T13:35:09Z</updated><author><name>Anonymous</name><uri>https://sourceforge.net/u/userid-None/</uri></author><id>https://sourceforge.netf71745f1e89e318ba79ad6c7924fb54b326ed62d</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Line 66 of AffineGap has a '=' where it should probably be a '-'.&lt;/p&gt;
&lt;p&gt;The line in question is:&lt;br /&gt;
it.get(i=1,j-1) + matchScore&lt;/p&gt;
&lt;p&gt;and i is one of the parameters to the method containing that line.&lt;/p&gt;&lt;/div&gt;</summary></entry><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><entry><title>Jaro metric uses halflength of the longer string</title><link href="https://sourceforge.net/p/secondstring/bugs/1/" rel="alternate"/><published>2004-04-14T08:29:34Z</published><updated>2004-04-14T08:29:34Z</updated><author><name>David Necas</name><uri>https://sourceforge.net/u/yeti-dn/</uri></author><id>https://sourceforge.netc6a148d53632f60ec235f2010c107218f3f5610f</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Here's a patch:&lt;/p&gt;
&lt;p&gt;--- Jaro.java.orig      2004-04-14 10:21:34.000000000 +0200&lt;br /&gt;
+++ Jaro.java   2004-04-14 10:21:26.000000000 +0200&lt;br /&gt;
@@ -51,7 +51,7 @@&lt;/p&gt;
&lt;p&gt;private int halfLengthOfShorter(String&lt;br /&gt;
str1,String str2)&lt;br /&gt;
{&lt;br /&gt;
-               return (str1.length() &amp;gt; str2.length())&lt;br /&gt;
? str1.length()/2 + 1 : str2.length()/2 + 1;&lt;br /&gt;
+               return (str1.length() &amp;lt; str2.length())&lt;br /&gt;
? str1.length()/2 + 1 : str2.length()/2 + 1;&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;private String commonChars(String s,String&lt;br /&gt;
t,int halflen) &lt;/p&gt;&lt;/div&gt;</summary></entry></feed>