PHP Classes

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

Recommend this page to a friend!
  Info   Documentation   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStar 36%Total: 215 All time: 8,321 This week: 49Up
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
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: 22 Up2 in United Kingdom Up
Innovation award
Innovation award
Nominee: 23x

Winner: 2x

Documentation

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 (4)  
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 (4)  /  src  
File Role Description
  Plain text file GenderLatin.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:215
This week:0
All time:8,321
This week:49Up
User Ratings User Comments (1)
 All time
Utility:56%StarStarStar
Consistency:43%StarStarStar
Documentation:43%StarStarStar
Examples:-
Tests:-
Videos:-
Overall:36%StarStar
Rank:4054