T
Tim Mackey
hi,
when a user reaches a 404 page not found on my web site, i want to give them
one or more 'best guess' links to the page they are looking for (MS do this
on their site...). i have a list of all the available pages to compare the
requested url against.
i've hunted around on google and newsgroups like alt.comp.fuzzy, but i can't
find a nice .NET API that i can just call in my code to give me a closest
match. i would define closest match as the one with the smallest 'edit
distance' to the original, i.e. the one that requires the least amount of
insertions, deletions and edits to match it exactly. i can't see how a
regular expression could help (but i may of course be wrong) since i want to
be quite tolerant of variances in the strings.
if there isn't such an API, i would have the time to implement one, if
someone gave me a few pointers in the right direction. it would want to be
efficient also, because i can easily see an algorithm going into n cubed or
worse here.
thanks for reading this
tim
blog: http://tim.mackey.ie
67d0ebfec70e8db3
when a user reaches a 404 page not found on my web site, i want to give them
one or more 'best guess' links to the page they are looking for (MS do this
on their site...). i have a list of all the available pages to compare the
requested url against.
i've hunted around on google and newsgroups like alt.comp.fuzzy, but i can't
find a nice .NET API that i can just call in my code to give me a closest
match. i would define closest match as the one with the smallest 'edit
distance' to the original, i.e. the one that requires the least amount of
insertions, deletions and edits to match it exactly. i can't see how a
regular expression could help (but i may of course be wrong) since i want to
be quite tolerant of variances in the strings.
if there isn't such an API, i would have the time to implement one, if
someone gave me a few pointers in the right direction. it would want to be
efficient also, because i can easily see an algorithm going into n cubed or
worse here.
thanks for reading this
tim
blog: http://tim.mackey.ie
67d0ebfec70e8db3