PHP Classes
elePHPant
Icontem

Extract Name from Email Address: Extract person name from e-mail address header

Recommend this page to a friend!
  Info   View files View files (6)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2017-05-10 (4 months ago) RSS 2.0 feedNot enough user ratingsTotal: 378 All time: 6,477 This week: 656Up
Version License PHP version Categories
extract-name-email 1.2.22Free To Use But R...5.0Email, PHP 5, Text processing
Description Author

This class can extract person name from e-mail address header.

It can parse given e-mail header line that should contain a person name and attempts to extract the person name from it.

The class uses certain heuristics to evaluate common ways people put their names in e-mail addresses to split the person names in its multiple parts.

A dictionary of common people names may be used to assure that the extracted names are part of the actual person name.

Innovation Award
PHP Programming Innovation award nominee
September 2012
Number 5
Some applications receive e-mail messages from users that do not specify their real name.

This class tries to guess the real name of a person that uses given e-mail address by parsing the address and splitting it in possible names that make part of the person real name.

Manuel Lemos
  Performance   Level  
Name: Peter Kahl <contact>
Classes: 32 packages by
Country: Hong Kong Hong Kong
Age: ???
All time rank: 6834 in Hong Kong Hong Kong
Week rank: 29 Up1 in Hong Kong Hong Kong Up
Innovation award
Innovation award
Nominee: 18x

Details
# Name From Email String
Extracts person's real name from an email (or any) string.

## Usage

```php
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.
  Files folder image Files  
File Role Description
Files folder imagesrc (3 files)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file README.md Doc. Readme
Accessible without login Plain text file LICENSE Doc. License

  Files folder image Files  /  src  
File Role Description
  Accessible without login Plain text file dictionary-names-extended.php Aux. Auxiliary script
  Accessible without login Plain text file dictionary-names.php Aux. Auxiliary script
  Plain text file nameFromString.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:378
This week:0
All time:6,477
This week:656Up