简体   繁体   中英

How to calculate similarity between full names?

I have 2 lists of items that should be matched based on full name only. For exact names, there should be no problem but what about if the full names contains missing or abbreviated parts like

  • "John Blair Smith" vs "John B. Smith" or
  • "John Blair Smith" vs "John B. Campbell Smith"

Which algorithm could be used to calculate a weighted similarity and then match these names from the different lists based on this similarity score?

Use one of String Distance Algorithms. There are many of them:

  • Hamming distance
  • Levenshtein Distance
  • Damerau-Levenshtein Distance
  • Optimal String Alignment
  • and many more..

Let inspire yourself in this article about Comparison of String Distance Algorithms .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM