dcausse added a comment.
- `<http://www.wikidata.org/entity/>` prefix generally `wd` refers to the concept URI of the entity, this is generally how an entity (whether it's a property, item or lexeme) is identified, e.g. Q42 is identified as `wd:Q42` -> `<http://www.wikidata.org/entity/Q42>`, this is the form that is used to link items to statements and its other constituents (can be seen as a subject or an object) - `<http://www.wikidata.org/entity/statement/> prefix `s` in the dumps and Special:EntityData and `wds` in WDQS, these are used to identify a wikibase statement, e.g. wds:q42-D8404CDA-25E4-4334-AF13-A3290BCD9C0F <https://query.wikidata.org/#select%20%2a%20%7B%0A%20%20wds%3Aq42-D8404CDA-25E4-4334-AF13-A3290BCD9C0F%20%3Fp%20%3Fo%20.%0A%7D> is the identity of the date of birth statement for Q42 (can be seen as a subject or an object) - `<http://www.wikidata.org/prop/statement/>` prefix is what actually link the statement ID as defined above to its actual //simple value form//, so the actual date of birth of Q42 is stored in the triple wds:q42-D8404CDA-25E4-4334-AF13-A3290BCD9C0F ps:P569 ?dateOfBirth <https://query.wikidata.org/#select%20%2a%20%7B%20%20wds%3Aq42-D8404CDA-25E4-4334-AF13-A3290BCD9C0F%20ps%3AP569%20%3Fo%20.%20%7D> (can be seen only as a predicate) As you can see there are a lot of indirections to access the date of birth of item, this is where `/prop/direct/` (prefix `wdt`) becomes helpful, this link directly the entity (`wd:Q42`) to its //simple value form// using the predicate wdt:P569 <https://query.wikidata.org/#select%20%2a%20%7B%20%20wd%3AQ42%20wdt%3AP569%20%3Fo%20.%20%7D>. Of course there are some caveats and hidden details here (this would be too simple otherwise!), to be //promoted// as a //direct// statement it must be either the BestRank (only one) or the NormalRank if no BestRank are available (multiple are possible here), for instance the occupations of Q42 <https://query.wikidata.org/#select%20%2a%20%7B%20%20wd%3AQ42%20wdt%3AP106%20%3Fo%20.%20%7D>. For more details please see: https://www.mediawiki.org/wiki/Wikibase/Indexing/RDF_Dump_Format. I hope you won't have to dig too deeply into this structure but there as you noted some URIs might share the same beginning of the string, so identifying a entity ID simply doing `startswith("<http://www.wikidata.org/entity/")` might yield false positives. TASK DETAIL https://phabricator.wikimedia.org/T342111 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: AndrewTavis_WMDE, dcausse Cc: mpopov, JAllemandou, Lydia_Pintscher, dcausse, Gehel, dr0ptp4kt, AndrewTavis_WMDE, Aklapper, Manuel, Danny_Benjafield_WMDE, Astuthiodit_1, karapayneWMDE, Invadibot, maantietaja, ItamarWMDE, Akuckartz, Nandana, Lahi, Gq86, GoranSMilovanovic, QZanden, LawExplorer, _jensen, rosalieper, Scott_WUaS, Wikidata-bugs, aude, Mbch331
_______________________________________________ Wikidata-bugs mailing list -- [email protected] To unsubscribe send an email to [email protected]
