Ian Clarke <I.Clarke at dynamicblue.com> wrote:
> I have created a new package called Freenet.search which I have begun to
> populate with the classes required for a "fuzzy" searching mechanism
> which will allow "yahoo" or "altavista" style "x and y not z" style
> queries.
Well, wait a minute - did we actually come to any consensus on how search
was going to be carried out? There were a whole bunch of different ideas
floating around.
Also, it seems like it would be more straightforward to implement the fuzzy
operators using static class methods, something like:
public class Fuzzy {
public static float Or(float f1, float f2) {
return (f1 < f2 ? f2 : f1);
}
public static float Match(String s1, String s2) { ... }
}
thisKeyScore = Fuzzy.Or(Fuzzy.Match(thisKey,"cocoa"),
Fuzzy.Match(thisKey,"pops"));
theo
_______________________________________________
Freenet-dev mailing list
Freenet-dev at lists.sourceforge.net
http://lists.sourceforge.net/mailman/listinfo/freenet-dev