PHP Classes
elePHPant
Icontem

Gender Universal: Detect person gender name in multiple languages

Recommend this page to a friend!
  Info   View files Documentation   View files View files (4)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2018-03-20 (4 months ago) RSS 2.0 feedNot yet rated by the usersTotal: 105 All time: 8,939 This week: 405Up
Version License PHP version Categories
gender-universal 1.0.2Custom (specified...5Localization, PHP 5, Text processing, L..., A...
Description Author

This class can detect person gender name in multiple languages.

It takes the name of a person and an optional country identifier and detect the gender of the person.

This class uses other classes that are specialized in detecting the gender of people in certain limiyLatin, Cyrillic, Hanzi (Kanji).

  Performance   Level  
Name: Peter Kahl <contact>
Classes: 34 packages by
Country: United Kingdom United Kingdom
Age: ???
All time rank: 58130 in United Kingdom United Kingdom
Week rank: 12 Up1 in United Kingdom United Kingdom Up
Innovation award
Innovation award
Nominee: 20x

Winner: 1x

Details

Gender Universal

Detects gender from person's name, capable to analyse strings in these scripts: Latin, Cyrillic, Hanzi (Kanji).

Dependencies

Usage

use peterkahl\GenderUniversal\GenderUniversal;

$gendObj = new GenderUniversal;

#-------------------------------
# French (Latin) name
$gendObj->firstName = 'Gaétan';
$gendObj->lastName  = '';         # Surname is irrelevant (in this case)
$gendObj->country   = 'FR';       # Country code may be helpful

echo $gendObj->getGender(); # M

#-------------------------------
# Russian (Cyrillic) name
$gendObj->firstName = '????';
$gendObj->lastName  = '????????'; # Surname may be helpful
$gendObj->country   = '';

echo $gendObj->getGender(); # F

#-------------------------------
# Chinese (Hanzi) name
$gendObj->firstName = '??';      # Make sure this is only given name (not surname)
$gendObj->lastName  = '';         # Surname is irrelevant (in this case)
$gendObj->country   = '';         # Country code is irrelevant (in this case)

echo $gendObj->getGender(); # M

#-------------------------------
# Japanese (Kanji) name
$gendObj->firstName = '??';      # Make sure this is only given name (not surname)
$gendObj->lastName  = '';         # Surname is irrelevant (in this case)
$gendObj->country   = '';         # Country code is irrelevant (in this case)

echo $gendObj->getGender(); # M
  Files folder image Files  
File Role Description
Files folder imagesrc (1 file)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files  /  src  
File Role Description
  Plain text file GenderUniversal.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:105
This week:0
All time:8,939
This week:405Up