PHP Classes

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    
Ratings Unique User Downloads Download Rankings
StarStar 36%Total: 213 All time: 8,319 This week: 110Up
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: 41721 in United Kingdom
Week rank: 91 Up3 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  
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:213
This week:0
All time:8,319
This week:110Up
User Ratings User Comments (1)
 All time
Utility:56%StarStarStar
Consistency:43%StarStarStar
Documentation:43%StarStarStar
Examples:-
Tests:-
Videos:-
Overall:36%StarStar
Rank:3961