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
2017-07-15 (3 months ago) RSS 2.0 feedNot yet rated by the usersTotal: 89 All time: 8,836 This week: 599Up
Version License PHP version Categories
gender-universal 1.0.1Custom (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: 32 packages by
Country: Hong Kong Hong Kong
Age: ???
All time rank: 6714 in Hong Kong Hong Kong
Week rank: 13 Up1 in Hong Kong Hong Kong Up
Innovation award
Innovation award
Nominee: 19x

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:89
This week:0
All time:8,836
This week:599Up