Training computers to differentiate between people with the same name

All individuals are unique but millions of people share names. How to distinguish—or as it is technically known, disambiguate—people with common names and determine which John Smith or Maria Garcia or Wei Zhang or Omar Ali is a specific John Smith, Maria Garcia, Wei Zhang or Omar Ali—or even someone previously unidentified?