<br><br><div class="gmail_quote">On 11 October 2010 05:57, Michael Neale <span dir="ltr"><<a href="mailto:michael.neale@gmail.com">michael.neale@gmail.com</a>></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 "fixed" soundex - probably should try and find out who is using it to ensure there are no surprises. I can'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"><<a href="mailto:wolfgang.laun@gmail.com" target="_blank">wolfgang.laun@gmail.com</a>></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 <<a href="mailto:michael.neale@gmail.com" target="_blank">michael.neale@gmail.com</a>> wrote:<br>> I think you should clean room implement it (or reuse some old code of yours<br>
> if it is safe to do so). From what I have seen of the algorithm - it isn't<br>> huge - and it would make sense to have it re-implemented. As an alternative<br>> - consider taking a look at the MVEL soundex code and rewriting that - and<br>
> 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've also consulted a CPAN module, to learn what was intended by the<br>
MVEL implementation, but it's undecidable (possibly due to omissions or<br>bugs).<div><br><br>> I would say it is just slightly<br>> neglected - its not well known that it lives there. Using the MVEL one was<br>
> just opportunistic for drools. <br>
> I didn't know that it could return null, that is bad. I guess if it is null<br>> - 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 "" would be preferable.<div><br><br>> Also - AFAIK - soundex is only for english right?<br></div>Certainly.<div><br><br>> Is there an equivalent for other languages?<br></div>
Soundex is coarse even for English. I've found the atrocious example that<br>
the Soundex for "Britney Spears" is the same as for<br>"bewährten Superzicke" (~ "proven super-b*"). <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: "Kölner Phonetik". It might<br>make sense to provide this for an operator "soundex[de]". (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'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>> If so, perhaps having it in the drools codebase makes sense<br>> and opens the way for people to plug in their own soundex. <br>> On Mon, Oct 11, 2010 at 2:54 AM, Wolfgang Laun <<a href="mailto:wolfgang.laun@gmail.com" target="_blank">wolfgang.laun@gmail.com</a>><br>
> wrote:<br>>><br>>> The implementation of "soundslilke" is broken in more than one respect.<br>>> The conversion of a word to a Soundex string is provided by<br>>> org.mvel2.util.Soundex.<br>
>> (.) There are words where Soundex.soundex returns null, so that the<br>>> calling code, in Drools, crashes with a NPE.<br>>> (.) The algorithm implemented in Soundex is erroneous. I'm not sure which<br>
>> Soundex algorithm it is supposed to implement, but it just doesn't meet the<br>>> basic requirements.<br>>><br>>> I have implemented, correctly, the version for the National Archives and<br>
>> Records Administration (NARA) rule set for the official implementation of<br>>> Soundex used by the U.S. Government.<br>>><br>>> Do we wait for MVEL to correct this bug, or do we just replace it with a<br>
>> correct implementation?<br>>><br>>> Regards<br>>> 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>