Download .zip |
Info | Documentation | View files (4) | Download .zip | Reputation | Support forum | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2019-10-15 (18 hours ago) | Not yet rated by the users | Total: 124 | All time: 9,010 This week: 344 |
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 |
File | Role | Description | ||
---|---|---|---|---|
src (1 file) | ||||
composer.json | Data | Auxiliary data | ||
LICENSE | Lic. | License text | ||
README.md | Doc. | Documentation |
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.