peterkahl/name-from-email-string

Extracts person's real name from (email) string.

v0.5.1 2018-03-22 17:52 UTC

README

Extracts person's real name from an email (or any) string.

Usage

use peterkahl\nameFromString\nameFromString;

$email = 'johnbutterworth@genius.whatever';

echo nameFromString::getName($email); # John Butterworth

Dictionary

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.