I came across this the other day: en.wikipedia.org/wiki/Levenshtein_distance

while not directly related - it is in the general area of what we are trying for here - which is to deal with input has come from a human who made small typos (the above could help if you have a modest size dictionary you can score against for best match - obviously small as it is probably quadratic time to find a match).

On Sat, Oct 16, 2010 at 5:07 AM, Wolfgang Laun <wolfgang.laun@gmail.com> wrote:
What you describe isn't an issue of providing a built-in operator that maps both
operands according to "any kind of processing" before doing == or !=.

Nevertheless, if anyone thinks that DoubleMetaphone is worth doing, it
could be added to the framework class I've outlined in my original mail.

-W

On 15 October 2010 18:11, jschmied <nabble@juergenschmied.de> wrote:
>
> Hi!
>
> I would put the creation of the key into a getter of my dataobject like:
>
> class MyObject {
>
> public String getMatchingKey() {
>  return doubleMetahone(myValue);
> }
> }
>
> then insert this object into the working memory. You can write then your
> rules like:
>
> $a : MyObject ()
> $b: MyObject(MatchingKey == $a.MatchingKey)
>
> Drools calls the getMatchingKey only once and caches the result!
>
> You can hide any kind of processing in a getter. As example I've done many
> Date/Time processing like this.
>
> juergen
>
>
>
>
>
> --
> View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/soundslike-report-on-phonetic-matching-tp1707485p1709303.html
> Sent from the Drools - Dev mailing list archive at Nabble.com.
> _______________________________________________
> rules-dev mailing list
> rules-dev@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-dev
>

_______________________________________________
rules-dev mailing list
rules-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev



--
Michael D Neale
home: www.michaelneale.net
blog: michaelneale.blogspot.com