Wikidata:Property proposal/kinship equivalent

From Wikidata
Jump to navigation Jump to search

kinship equivalent in SPARQL at Wikidata[edit]

Originally proposed at Wikidata:Property proposal/Person

Descriptionpart of a SPARQL query that lists this type of ?relative of a ?person
Data typeString
Domainitems for kinship
Allowed valuesSPARQL without SELECT * {}, wdt:P31 wd:Q5, but always including ?person and ?relative. Relationship properties: P22, P25, P40, P26, P3373 (add more if needed, not P1038).
Example
  • father (Q7565)?person wdt:P22 ?relative
  • uncle (Q76557)?person (wdt:P22 | wdt:P25 ) ?parent . { ?parent wdt:P3373 ?relative } UNION { ?parent wdt:P26 / wdt:P3373 ?relative } . ?relative wdt:P21 wd:Q6581097
Formatter URLhttps://query.wikidata.org/#SELECT%20%3Fperson%20%3FpersonLabel%20%3Frelative%20%3FrelativeLabel%0A%7B%20%0A%20%20$1.%0A%20%20%3Fperson%20wdt%3AP31%20wd%3AQ5%20.%20%3Frelative%20wdt%3AP31%20wd%3AQ5%20.%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22%5BAUTO_LANGUAGE%5D%2Cen%22.%20%7D%0A%7D%0ALIMIT%2010
Motivation

Following the question by User:Marsupium at Wikidata:Project_chat#How_to_tell_a_machine_what_an_uncle_.28Q76557.29_is.3F
--- Jura 11:34, 12 September 2017 (UTC)[reply]

User:Paweł Ziemian User:Jura1 (is this project family relationships?) User:Infovarius User:Melderick User:Bvatant

Notified participants of WikiProject Parenthood
--- Jura 11:51, 12 September 2017 (UTC)[reply]

Discussion
  •  Comment maybe the uncle sample should have two queries instead of one.
    --- Jura 11:51, 12 September 2017 (UTC)[reply]
  •  Support Seems needed. Don't exactly understand the mechanics, but believe @Jura1: got it right :-).
Just a note: DNB's AGRELON abstracts over gender in its hierarchy of family relations. So they got "uncle or aunt" and "nephew or niece" but not the gender-specific forms. The benefit is non-redundancy and more possibilities for definition of inverses. --Vladimir Alexiev (talk) 17:17, 2 October 2017 (UTC)[reply]

@Jura1, 2 ديفيد عادل وهبة خليل, Vladimir Alexiev: ✓ Done Now kinship equivalent in SPARQL at Wikidata (P4316). Lymantria (talk) 05:46, 10 October 2017 (UTC)[reply]