PHP Classes
elePHPant
Icontem

PHP Detect Gender Latin: Detect a person gender from the name in Latin text

Recommend this page to a friend!
  Info   View files Documentation   View files View files (4)   DownloadInstall with Composer Download .zip   Reputation   Support forum (3)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2019-10-11 (5 hours ago) RSS 2.0 feedNot enough user ratingsTotal: 188 All time: 8,345 This week: 330Up
Version License PHP version Categories
gender-latin 1.0.3Custom (specified...5PHP 5, Text processing, Artificial in...
Description Author

This class can detect a person gender from the name in Latin text.

It takes a given name of a person that uses Latin characters and attempts to detect the gender of the person by evaluating the characters that the the name uses.

The class already knows the gender of a person that uses certain well known names but may guess the gender of the person that uses other names.

Innovation Award
PHP Programming Innovation award nominee
June 2017
Number 10
Many sites require that users inform their gender when they register. However, the gender of a person can be deducted from his name.

This class can detect the gender of a person with a name that uses Latin characters.

This way, it is possible to automatically set the gender field after the user enters his name, thus saving the user from being bothered to explicitly set the gender form field.

Manuel Lemos
  Performance   Level  
Name: Peter Kahl <contact>
Classes: 37 packages by
Country: United Kingdom United Kingdom
Innovation award
Innovation award
Nominee: 23x

Winner: 2x

 

Details

Gender Latin

Detects gender from person's name in Latin script.

Dependency

Required dependency is PHP extension Gender.

Usage

use peterkahl\GenderLatin\GenderLatin;

$latGen = new GenderLatin;
$latGen->firstName = 'Gaétan';
$latGen->lastName  = '';
$latGen->country   = 'FR';

echo $latGen->getGender(); # M

Acknowledgement

This library contains code authored by Pete Warden.

  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 GenderLatin.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:188
This week:0
All time:8,345
This week:330Up
User Comments (1)