Fuzzy Match
Hi,
Richard, there is any way to do fuzzy matched and return the full company name.
return the full company name and address
all most all row are same.
thanks and regard
Suleman shreef
Richard, there is any way to do fuzzy matched and return the full company name.
return the full company name and address
all most all row are same.
- Code: Select all
CompanyRecSet:= dataset([{'HPCC system','101 Sussex Street'},
{'HPCC','101 Sussex Street'},
{'AET','1900 West Loop South, Suite 920'},
{'AET UK LIMITED','1900 West Loop South, Suite 920'}],
{varstring ComapnyName,varstring Address});
CompanyRecSet;
thanks and regard
Suleman shreef
- suleman Shreef
- Posts: 21
- Joined: Wed Feb 27, 2019 9:15 am
Suleman,
Here are a couple of ways:
BTW, you will note that I changed your VARSTRINGs to STRINGs. In HPCC, STRING is the default string type. VARSTRING is only used for data coming in or going out that has/needs actual null terminators -- internally within HPCC there is no advantage to using VARSTRING over STRING.
HTH,
Richard
Here are a couple of ways:
- Code: Select all
IMPORT Std;
CompanyRecSet:= DATASET([{'HPCC system','101 Sussex Street'},
{'HPCC','101 Sussex Street'},
{'HPCC Systems Inc','101 Sussex Street'},
{'HPCsystems Limited','201 Sussex Street'},
{'AET','1900 West Loop South, Suite 920'},
{'AET UK LIMITED','1900 West Loop South, Suite 920'}],
{STRING CompanyName,STRING Address});
CompanyRecSet;
CompanyRecSet(Std.Str.StartsWith(CompanyName,'HPCC'));
CompanyRecSet(Std.Str.WildMatch(CompanyName,'*System*',TRUE));
BTW, you will note that I changed your VARSTRINGs to STRINGs. In HPCC, STRING is the default string type. VARSTRING is only used for data coming in or going out that has/needs actual null terminators -- internally within HPCC there is no advantage to using VARSTRING over STRING.
HTH,
Richard
- rtaylor
- Community Advisory Board Member
- Posts: 1619
- Joined: Wed Oct 26, 2011 7:40 pm
Richard, I have done using string build in function, but based on matched score like 80 matched need to select.
- suleman Shreef
- Posts: 21
- Joined: Wed Feb 27, 2019 9:15 am
You can also use the metaphone library support in the Standard Library to create "sounds like" fuzzy matching.
See http://cdn.hpccsystems.com/releases/CE- ... f#page=111
HTH,
Jim
See http://cdn.hpccsystems.com/releases/CE- ... f#page=111
HTH,
Jim
- JimD
- Posts: 160
- Joined: Wed May 18, 2011 1:35 pm
4 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest