PHP Classes

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

Recommend this page to a friend!
     
  Info   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStar 56%Total: 430 All time: 6,320 This week: 455Up
Version License PHP version Categories
extract-name-email 1.2.23Free 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
Picture of Peter Kahl
  Performance   Level  
Name: Peter Kahl <contact>
Classes: 37 packages by
Country: United Kingdom
Age: ???
All time rank: 41521 in United Kingdom
Week rank: 20 Up2 in United Kingdom Up
Innovation award
Innovation award
Nominee: 23x

Winner: 2x

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 (6)  
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 (6)  /  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

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:430
This week:0
All time:6,320
This week:455Up
 User Ratings  
 
 All time
Utility:83%StarStarStarStarStar
Consistency:75%StarStarStarStar
Documentation:75%StarStarStarStar
Examples:-
Tests:-
Videos:-
Overall:56%StarStarStar
Rank:1770