<br><br><div class="gmail_quote">On 11 October 2010 05:57, Michael Neale <span dir="ltr">&lt;<a href="mailto:michael.neale@gmail.com">michael.neale@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
great - I guess if it shifts away from &quot;fixed&quot; soundex - probably should try and find out who is using it to ensure there are no surprises. I can&#39;t imagine it is widely used. <br></blockquote><div><br>Neither do I - you should have seen some complaints, then.<br>
-W<br><br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br><div class="gmail_quote"><div><div></div><div class="h5">
On Mon, Oct 11, 2010 at 2:43 PM, Wolfgang Laun <span dir="ltr">&lt;<a href="mailto:wolfgang.laun@gmail.com" target="_blank">wolfgang.laun@gmail.com</a>&gt;</span> wrote:<br></div></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div></div><div class="h5">
<div><span></span><span></span><a></a>On 10 October 2010 23:41, Michael Neale &lt;<a href="mailto:michael.neale@gmail.com" target="_blank">michael.neale@gmail.com</a>&gt; wrote:<br>&gt; I think you should clean room implement it (or reuse some old code of yours<br>


&gt; if it is safe to do so). From what I have seen of the algorithm - it isn&#39;t<br>&gt; huge - and it would make sense to have it re-implemented. As an alternative<br>&gt; - consider taking a look at the MVEL soundex code and rewriting that - and<br>


&gt; we will see if we can make it upstream.<br><br></div>I just re-implemented this according to the algorithm I found in<br> <a href="http://en.wikipedia.org/wiki/Soundex" target="_blank">http://en.wikipedia.org/wiki/Soundex</a><br>

I&#39;ve also consulted a CPAN module, to learn what was intended by the<br>
MVEL implementation, but it&#39;s undecidable (possibly due to omissions or<br>bugs).<div><br><br>&gt; I would say it is just slightly<br>&gt; neglected  - its not well known that it lives there. Using the MVEL one was<br>

&gt; just opportunistic for drools. <br>
&gt; I didn&#39;t know that it could return null, that is bad. I guess if it is null<br>&gt; - that would mean that you just do a literal case insensitive compare?<br><br></div>A correct implementation never returns null. An empty word might, but for<br>


our purpose &quot;&quot; would be preferable.<div><br><br>&gt; Also - AFAIK - soundex is only for english right?<br></div>Certainly.<div><br><br>&gt; Is there an equivalent for other languages?<br></div>
Soundex is coarse even for English. I&#39;ve found the atrocious example that<br>
the Soundex for &quot;Britney Spears&quot; is the same as for<br>&quot;bewährten Superzicke&quot; (~ &quot;proven super-b*&quot;).  <a href="http://en.wikipedia.org/wiki/New_York_State_Identification_and_Intelligence_System" title="New York State Identification and Intelligence System" target="_blank">NYSIIS</a> is supposed<br>


to be better.<br><br>For German, there is an equivalent: &quot;Kölner Phonetik&quot;. It might<br>make sense to provide this for an operator &quot;soundex[de]&quot;. (All of<br>/M[ae][iy]e?r/ sound alike in German, and all exist as proper names.)<br>


<br>I have also found one link to an implementation adapted for French. <br><br>Soundex is aimed at the pronunciation of proper names. There might be some<br>leeway for that even in a language like Hungarian, which is pronounced exactly<br>


as written.<br><br>I think Drools should drop the MVEL version and go for a flexible approach,<br>possibly even <a href="http://s.th" target="_blank">s.th</a>. better than Soundex/NARA for English. I&#39;ll research this<br>

some more, and report back before I commit anything ;-)<br><font color="#888888">
<br>-W</font><div><div></div><div><br><br><br>&gt; If so, perhaps having it in the drools codebase makes sense<br>&gt; and opens the way for people to plug in their own soundex. <br>&gt; On Mon, Oct 11, 2010 at 2:54 AM, Wolfgang Laun &lt;<a href="mailto:wolfgang.laun@gmail.com" target="_blank">wolfgang.laun@gmail.com</a>&gt;<br>


&gt; wrote:<br>&gt;&gt;<br>&gt;&gt; The implementation of &quot;soundslilke&quot; is broken in more than one respect.<br>&gt;&gt; The conversion of a word to a Soundex string is provided by<br>&gt;&gt; org.mvel2.util.Soundex.<br>


&gt;&gt; (.) There are words where Soundex.soundex returns null, so that the<br>&gt;&gt; calling code, in Drools, crashes with a NPE.<br>&gt;&gt; (.) The algorithm implemented in Soundex is erroneous. I&#39;m not sure which<br>


&gt;&gt; Soundex algorithm it is supposed to implement, but it just doesn&#39;t meet the<br>&gt;&gt; basic requirements.<br>&gt;&gt;<br>&gt;&gt; I have implemented, correctly, the version for the National Archives and<br>


&gt;&gt; Records Administration (NARA) rule set for the official implementation of<br>&gt;&gt; Soundex used by the U.S. Government.<br>&gt;&gt;<br>&gt;&gt; Do we wait for MVEL to correct this bug, or do we just replace it with a<br>


&gt;&gt; correct implementation?<br>&gt;&gt;<br>&gt;&gt; Regards<br>&gt;&gt; Wolfgang<br><br>
</div></div><br></div></div><div class="im">_______________________________________________<br>
rules-dev mailing list<br>
<a href="mailto:rules-dev@lists.jboss.org" target="_blank">rules-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-dev</a><br>
<br></div></blockquote></div><div><div></div><div class="h5"><br><br clear="all"><br>-- <br>Michael D Neale<br>home: <a href="http://www.michaelneale.net" target="_blank">www.michaelneale.net</a><br>blog: <a href="http://michaelneale.blogspot.com" target="_blank">michaelneale.blogspot.com</a><br>


</div></div><br>_______________________________________________<br>
rules-dev mailing list<br>
<a href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-dev</a><br>
<br></blockquote></div><br>