Extend list of known genders to parse from Wikidata
This commit is contained in:
parent
aa9f307c55
commit
8eb576f43d
|
@ -143,7 +143,7 @@ final class NodaWikidataFetcher {
|
|||
return '';
|
||||
}
|
||||
|
||||
$wikipedia_cont = MD_STD::runCurl($linkUrl);
|
||||
if (empty($wikipedia_cont = MD_STD::runCurl($linkUrl))) return '';
|
||||
|
||||
$doc = new DOMDocument();
|
||||
if (!($doc->loadHTML($wikipedia_cont))) {
|
||||
|
@ -575,11 +575,13 @@ final class NodaWikidataFetcher {
|
|||
$wikidata_gender_id = $data['claims']['P21']['0']['mainsnak']['datavalue']['value']['id'];
|
||||
|
||||
switch ($wikidata_gender_id) {
|
||||
case "Q6581097":
|
||||
case "Q6581097": // male
|
||||
case "Q44148": //male organism
|
||||
$wikidata_gender = "male";
|
||||
break;
|
||||
case "Q6581072":
|
||||
case "Q1052281":
|
||||
case "Q1052281": // transgender female
|
||||
case "Q43445": // female organism
|
||||
$wikidata_gender = "female";
|
||||
break;
|
||||
case "Q48270":
|
||||
|
|
Loading…
Reference in New Issue
Block a user