Matchcode Optimization:N-Gram: Difference between revisions
Jump to navigation
Jump to search
Created page with "{{MatchcodeOptimizationNav |AlgorithmsCollapse= }} ==N-Gram== ===Specifics=== *https://en.wikipedia.org/wiki/N-gram ===Summary=== Counts the number of common contiguous sub-..." |
No edit summary |
||
Line 5: | Line 5: | ||
==N-Gram== | ==N-Gram== | ||
===Specifics=== | ===Specifics=== | ||
*https://en.wikipedia.org/wiki/N-gram | :*https://en.wikipedia.org/wiki/N-gram | ||
===Summary=== | ===Summary=== | ||
Counts the number of common contiguous sub-strings (grams) between the two strings. | :Counts the number of common contiguous sub-strings (grams) between the two strings. | ||
===Returns=== | ===Returns=== | ||
Percentage of similarity | :Percentage of similarity | ||
MatchingGrams/(LongestLength – (NGRAMS - 1)) | :MatchingGrams/(LongestLength – (NGRAMS - 1)) | ||
NGRAM is defined as the length of common strings this algorithm looks for. Matchup default I NGRAM = 2. For “ABCD” vs “GABCE”, Matching NGRAMS would be “AB” and “BC”. | :NGRAM is defined as the length of common strings this algorithm looks for. Matchup default I NGRAM = 2. For “ABCD” vs “GABCE”, Matching NGRAMS would be “AB” and “BC”. | ||
MatchingGrams is the count of the number of matching grams. | :MatchingGrams is the count of the number of matching grams. | ||
LongestLength is the longer string length of the two strings being compared. | :LongestLength is the longer string length of the two strings being compared. | ||
===Example Matchcode Component=== | ===Example Matchcode Component=== | ||
Line 28: | Line 28: | ||
|AdditionalRows= | |AdditionalRows= | ||
{{EDTRow|White|Johnson|Jhnsn|Unique}} | {{EDTRow|White|Johnson|Jhnsn|Unique}} | ||
{{EDTRow| | {{EDTRow|Green|Neumon|Pneumon|Match Found}} | ||
{{EDTRow| | {{EDTRow|White|Beaumarchais|Bumarchay|Unique}} | ||
{{EDTRow|Green|Apco Oil Lube 170|Apco Oil Lube 342|Match Found}} | {{EDTRow|Green|Apco Oil Lube 170|Apco Oil Lube 342|Match Found}} | ||
}} | }} | ||
Line 42: | Line 42: | ||
===Recommended Usage=== | ===Recommended Usage=== | ||
Hybrid deduper, where a single incoming record can quickly be evaluated independently against each record in an existing large master database. | :Hybrid deduper, where a single incoming record can quickly be evaluated independently against each record in an existing large master database. | ||
Batch processes where NGRAM is set on a single non-first matchcode component. | :Batch processes where NGRAM is set on a single non-first matchcode component. | ||
Databases created with abbreviations or similar word substitutions. | :Databases created with abbreviations or similar word substitutions. | ||
Multi word field data where a trailing word does not appear in every record in the expected group or data contains acceptable variations of one of the keywords. | :Multi word field data where a trailing word does not appear in every record in the expected group or data contains acceptable variations of one of the keywords. | ||
===Not Recommended For=== | ===Not Recommended For=== | ||
Databases where the number of errors with relation to the string length result is a small number of common substrings. | :Databases where the number of errors with relation to the string length result is a small number of common substrings. | ||
===Do Not Use With=== | ===Do Not Use With=== | ||
UTF-8 data. This algorithm was ported to MatchUp with the assumption that a character equals one byte, and therefore results may not be accurate if the data contains multi-byte characters. | :UTF-8 data. This algorithm was ported to MatchUp with the assumption that a character equals one byte, and therefore results may not be accurate if the data contains multi-byte characters. | ||
[[Category:MatchUp Hub]] | [[Category:MatchUp Hub]] | ||
[[Category:Matchcode Optimization]] | [[Category:Matchcode Optimization]] |
Latest revision as of 14:27, 27 September 2018
N-Gram
Specifics
Summary
- Counts the number of common contiguous sub-strings (grams) between the two strings.
Returns
- Percentage of similarity
- MatchingGrams/(LongestLength – (NGRAMS - 1))
- NGRAM is defined as the length of common strings this algorithm looks for. Matchup default I NGRAM = 2. For “ABCD” vs “GABCE”, Matching NGRAMS would be “AB” and “BC”.
- MatchingGrams is the count of the number of matching grams.
- LongestLength is the longer string length of the two strings being compared.
Example Matchcode Component
Example Data
STRING1 STRING2 RESULT Johnson Jhnsn Unique Neumon Pneumon Match Found Beaumarchais Bumarchay Unique Apco Oil Lube 170 Apco Oil Lube 342 Match Found
Performance | |||||
---|---|---|---|---|---|
Slower | Faster | ||||
Matches | |||||
More Matches | Greater Accuracy |
Recommended Usage
- Hybrid deduper, where a single incoming record can quickly be evaluated independently against each record in an existing large master database.
- Batch processes where NGRAM is set on a single non-first matchcode component.
- Databases created with abbreviations or similar word substitutions.
- Multi word field data where a trailing word does not appear in every record in the expected group or data contains acceptable variations of one of the keywords.
Not Recommended For
- Databases where the number of errors with relation to the string length result is a small number of common substrings.
Do Not Use With
- UTF-8 data. This algorithm was ported to MatchUp with the assumption that a character equals one byte, and therefore results may not be accurate if the data contains multi-byte characters.