Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am looking to define a true fuzzy search in scripting form so that it would find the most likely result from an input:
Input:
Blk
Black
Bk
White
Blu
B
Pk
Lookup Table:
Black
White
Blue
Pink
Orange
Result:
Input | Result |
---|---|
Blk | Black |
Black | Black |
Bk | Black |
White | White |
Blu | Blue |
B | Blue or Black |
Pk | Pink |
as can be seen, this example cannot use wildcards, but must use fuzzy logic. Under ideal circumstances, there would be a factor that would say how close the match was - I know this bit is asking a lot!
I have thousands of records that I wish to match in this way .........
Thanks in advance.
Just giving this thread a bump. I'm interested in this solution as well.
Hi
PFA of qvw application file that will help you.
Thanks
Vishal
Hello Rupe,
Try following below steps:
1) LOAD the below script.
2) Create a Straight table, with Color and Fuzzy as dimensions.
3) use below expression
=WildMatch(Color,mid(Fuzzy,1,1)&'*'& mid(Fuzzy,2,1)&'*' & mid(Fuzzy,3,1)&'*')
Script
Input:
LOAD * INLINE [
Fuzzy
Blk
Black
Bk
White
Blu
B
Pk
];
LookupTable:
LOAD * INLINE [
Color
Black
White
Blue
Pink
Orange
];
Please let me know if this was helpful or anything else is required.
Thanks,
angad
Sorry - have been away for a while. Yes a useful response but I specifically wanted to use fuzy logic as opposed to semi-fuzzy logic - if that makes sense .....