| Recommend this page to a friend! | 
|  Download | 
| Info | Documentation |  Files |  Install with Composer |  Download | Reputation | Support forum | Blog | Links | 
| Ratings | Unique User Downloads | Download Rankings | ||||
| Not enough user ratings | Total: 171 | All time:  8,838 This week: 51  | ||||
| Version | License | PHP version | Categories | |||
| gender-universal 1.0.3 | Custom (specified... | 5 | Localization, PHP 5, Text processing, L..., A... | 
| Description | Author | |
| This class can detect person gender name in multiple languages. | 
Detects gender from person's name, capable to analyse strings in these scripts: Latin, Cyrillic, Hanzi (Kanji).
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 (4) | 
| File | Role | Description | ||
|---|---|---|---|---|
|  src (1 file) | ||||
|    composer.json | Data | Auxiliary data | ||
|    LICENSE | Lic. | License text | ||
|    README.md | Doc. | Documentation | ||
| 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 | 
| Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
| 100% | 
 | 
 | 
| Applications that use this package | 
 If you know an application of this package, send a message to the author to add a link here.
 If you know an application of this package, send a message to the author to add a link here.