Extracts person's real name from (email) string.
Extracts person's real name from an email (or any) string.
use peterkahl\nameFromString\nameFromString; $email = 'email@example.com'; echo nameFromString::getName($email); # John Butterworth
This class depends on a dictionary of names.
While it is good to have large dictionary of all possible strings (names), having the dictionary too large may cause erroneous results. Remember, you can never expect a precise result from this class; in most cases, the results are quite precise.
For your convenience, extended version of the dictionary is provided. You may, also, create your own dictionary, especially if the one provided doesn't contain the names that are common in your geographical area.