Wikidata:Property proposal/Shape Expression for class

From Wikidata
Jump to navigation Jump to search

Shape Expression for class[edit]

Originally proposed at Wikidata:Property proposal/Generic

   On hold
DescriptionShape Expression that members of a class should conform to
RepresentsShape Expressions (Q29377880)
Data type⧼datatypes-type-EntitySchema⧽ (not available yet)
Domainclass
Example 1human (Q5)E10
Example 2film festival (Q220505)E11
Example 3film festival edition (Q27787439)E12
Example 4natural number (Q21199)E13

Motivation[edit]

Property to link a class to the Shape Expression that members of it should conform to.

This will make it easier to query for Shape Expressions that exist, and quickly see what has been defined for a particular class. Jheald (talk) 16:56, 28 May 2019 (UTC)

Note: Implementation will require EntitySchema to be added to the set of data-types that can be values for Wikidata statements. There is a ticket for this on Phabricator, which Léa hopes should be resolved in the coming weeks.[1]. Jheald (talk) 07:54, 29 May 2019 (UTC)

Discussion[edit]

  • Proposed. Jheald (talk) 16:56, 28 May 2019 (UTC)
  •  Support - PKM (talk) 18:34, 28 May 2019 (UTC)
  •  SupportMisterSynergy (talk) 18:43, 28 May 2019 (UTC)
  •  Support Dhx1 (talk) 18:44, 28 May 2019 (UTC)
  •  Support Finn Årup Nielsen (fnielsen) (talk) 18:52, 28 May 2019 (UTC)
  •  Oppose This proposal needs to say much more about how it is supposed to work. Example 1 shows some of the problems. What does "member" mean here? Are only items that are an instance of (P31) to human (Q5) supposed to be covered, or are instances of subclasses (transistive-reflexive closure of subclass of (P279)) also covered? Then there are problems with the shape expression E11 as a shape for humans. The shape requires that the only instance of link for humans goes to human (Q5). The example shape needs to show at least some interesting conditions, such as requiring that children of humans are humans. Example 4 shows more problems. What items are covered here at all? Presumably natural numbers are not items at all, which means that they don't have any outgoing RDF triples. Even if they did, natural numbers should not be instances of instances of natural number. Peter F. Patel-Schneider (talk) 19:46, 28 May 2019 (UTC)
    • Comments:
      • Interestingness: "The example shape needs to show at least some interesting conditions, such as requiring that children of humans are humans" Yes absolutely, but note that ShEx are only a couple of hours old. I think we will gradually expand it these coming days.
      • Members: I do not think this proposal lays any interpretation on the membership and I suppose it would be up to the consensus (or ontology war) whether it should be transitive.
      • We have lots of natural numbers, e.g., 42 (Q812996) with outgoing triples. I should say they all should have a numeric value (P1181) which could be check with ShEx.
      • Natural number are not "instances of instances of natural number", they are instances of natural numbers.
      • A further remark: There are apparent a lack of possibility to keep track of which ShEx are created, e.g., at one point it looked like two ShEx was created for humans. I think a property to keep track of ShEx would benefit the ShEx, helping them to navigate the created schemas, i.e., if you are looking for the ShEx for human you can go to Q5 and follow the link to the ShEx page. — Finn Årup Nielsen (fnielsen) (talk) 20:03, 28 May 2019 (UTC)
    • The example is new, agreed, but that only makes the need for good examples higher. If there are no good examples of shapes to attach to classes then there is no reason to have this property. Peter F. Patel-Schneider (talk) 23:50, 28 May 2019 (UTC)
    • OK, there are "natural numbers" as items in Wikidata, but the shape says that these are instances of instances of natural number (Q21199), which is not correct. And, yes, there should be a check that their numeric value (P1181) is a natural number (if that is possible in ShEx). Peter F. Patel-Schneider (talk) 23:50, 28 May 2019 (UTC)
    • If the scope of a shape connected to a class is to be determined after the fact by the community then I'm completely opposed to this proposal. The scope needs to be nailed down explicitly before this property is allowed. Peter F. Patel-Schneider (talk) 23:50, 28 May 2019 (UTC)
      • Thanks for the note about "instance of instance of". This is actual not and "instance of instance of" and I think the way that people used this yesterday should be clarified. I would write the line "p:P31 @<instance-of-statement> ;" and similar the below line. In fact, I have changed the name now. I wonder if that clarify this issue? — Finn Årup Nielsen (fnielsen) (talk) 07:07, 29 May 2019 (UTC)
      • I think that there is a clash of philosophies here. Wikidata has been very much ontology-as-you-go with no overall coordination and no enforcing of consistency. We have had property suggestions which guide us to some form of consistency, that may also catch errors and vandalism. ShEx would be a next step. While one could imaging a ShEx-police appearing in Wikidata, that roams about enforcing the one and only scheme upon editors and items, I do not think that is what would be happening. I think that ShExs would be gradually built in an interplay with continuous development and refinement of Wikidata items. For instance, the E34 defines Danish nouns which a ShEx could say should always have a grammatical gender. It appears that proper nouns, plurale tantum and the word druk (L46327) form a problematic set where the grammatical gender might exist and can be set, or it might be unknown or have no value. To resolve this problem one should have an interplay between changes in the Wikidata items and the ShEx. Such problems could be discovered by other means, but I think ShEx would also be a help and steer us into a direction of consistency. — Finn Årup Nielsen (fnielsen) (talk) 09:38, 29 May 2019 (UTC)
  •  Support - NavinoEvans (talk) 09:28, 29 May 2019 (UTC)
  •  Support - Moebeus (talk) 11:20, 29 May 2019 (UTC)
  •  Oppose I'd rather make an item about a shape and link that. --- Jura 09:33, 30 May 2019 (UTC)
    • Which advantages do you see in such an approach, compared to this proposal? —MisterSynergy (talk) 09:35, 30 May 2019 (UTC)
    • One could describe the shapes in a structured way. Currently, we seem to be getting loads of # to do just that. Something we mostly avoided in any other part of Wikidata.--- Jura 09:38, 30 May 2019 (UTC)
      • @Jura1: As I understand it, the shapes themselves are meant to describe themselves in a structured, RDF-compliant, queryable way. Isn't that meant to be part of the point of them? Or perhaps that's SHACL (Q29377821) ?? Jheald (talk) 17:23, 30 May 2019 (UTC)
      • I'm still learning about the syntax .. maybe it's actually possible. Looking at it's current implementation at Wikidata, maybe we can't do it here, at least not with statements as we would usually do it. If we create a datatype for shapes, supposedly we could have several properties in addition to this one .. one could be "shape expression described in this item", "shape expression associated with list". --- Jura 07:02, 31 May 2019 (UTC)
        • @Jura1: Yes. I would hope we wouldn't need "shape expression described in this item", because I hope the shape expression (Exxx) would be its own item, and queryable in its own right. (That would depend on whether a ShEx has an RDF representation that could be included in WDQS -- that would certainly be the case for SHACL; I hope it's true for ShEx). But additional properties like "shape expression associated with list" I would certainly see as likely to be useful. I proposed "Shape Expression for class" first, as it seems likely to be the simplest and most common case, and worth a property in its own right. But there will be shape expressions for things identified other than as members of classes, and we will in turn want ways to point to them. Jheald (talk) 08:55, 31 May 2019 (UTC)
          • Two posters on Wikidata-l confirm that there is a standard RDF serialisation of ShEx [2]. So it should be straightforward to load this either into WDQS to describe a shape entity; or into an associated triplestore, that could service federated queries from WDQS. Jheald (talk) 16:46, 2 June 2019 (UTC)
          A phabricator ticket is open for this, phab:T225701 Jheald (talk) 09:59, 14 June 2019 (UTC)
        • Re "shape expression described in this item": Possibly, but I don't see a plan for that now and there might not be much added value in developing more GUI as it could already be done with Q-entities. --- Jura 10:21, 31 May 2019 (UTC)
  • Marking as on hold since the datatype is not available. This is not an assessment of the consensus for / against the proposal. − Pintoch (talk) 20:51, 23 July 2019 (UTC)
  •  Support --Tinker Bell 20:24, 1 November 2019 (UTC)
  •  Support Toni 001 (talk) 16:03, 11 November 2019 (UTC)

Andra Waagmeester Andrawaag (talk) 19:33, 30 January 2018 (UTC) YULdigitalpreservation (talk) 13:32, 6 February 2018 (UTC) Daniel Mietchen (talk) 01:52, 7 February 2018 (UTC) Finn Årup Nielsen (fnielsen) (talk) 13:55, 13 February 2018 (UTC) Lucas Werkmeister (talk) 12:34, 14 February 2018 (UTC) John Samuel 20:31, 26 February 2018 (UTC) Dhx1 (talk) 02:39, 8 March 2018 (UTC) Jneubert (talk) 13:35, 19 June 2018 (UTC) Malore (talk) 15:59, 24 August 2018 (UTC) Vladimir Alexiev (talk) 06:33, 10 September 2018 (UTC) Jose Emilio Labra Gayo (talk) 19:34, 21 November 2018 (UTC) Spinster 💬 08:45, 18 December 2018 (UTC) Egon Willighagen (talk) 07:43, 5 March 2019 (UTC) EricP (talk) 10:44, 14 March 2019 (UTC) Tombakerii (talk) 15:03, 17 May 2019 (UTC) Maxlath (talk) 13:26, 19 May 2019 (UTC) Jumtist (talk) 13:29, 19 May 2019 (UTC) SilentSpike (talk) 13:48, 19 May 2019 (UTC) MisterSynergy (talk) 19:17, 19 May 2019 (UTC) Harmonia Amanda (talk) 06:32, 20 May 2019 (UTC) Salgo60 (talk) 09:07, 20 May 2019 (UTC) Ivanhercaz (Talk) 15:38, 20 May 2019 (UTC) Andrew Su (talk) 15:50, 20 May 2019 (UTC) Mlemusrojas (talk) 16:50, 21 May 2019 (UTC) Dani Fernandez 14:11, 23 May 2019 (UTC) PKM (talk) 02:43, 29 May 2019 (UTC) Sannita - not just another it.wiki sysop 09:47, 2 June 2019 (UTC) Infomuse (talk) 22:37, 3 June 2019 (UTC) Buccalon (talk) 17:42, 18 June 2019 (UTC) author  TomT0m / talk page 11:52, 30 June 2019 (UTC) Ecritures (talk) 20:08, 15 July 2019 (UTC) Fuzheado (talk) 17:03, 10 July 2019 (UTC) Iovka Boneva (Iovka) Csisc (talk) 20:43, 24 August 2019 (UTC) Fuzheado (talk) 18:01, 23 October 2019 (UTC) Ash Crow (talk) Pdehaye (talk) 22:13, 27 October 2019 (UTC) Tinker Bell 20:18, 1 November 2019 (UTC) So9q (talk) 06:26, 13 November 2019 (UTC) ElanHR (talk) 21:29, 14 November 2019 (UTC) Arybolab (talk) Blue Rasberry (talk) 14:21, 24 November 2019 (UTC) Susanna Ånäs (Susannaanas) (talk) BlaueBlüte (talk) 22:20, 8 December 2019 (UTC) Arcadialib (talk) 21:37, 19 February 2020 (UTC) Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits TiagoLubiana (talk) 18:31, 23 March 2020 (UTC) VIGNERON (talk) Iwan.Aucamp (talk) 11:39, 5 May 2020 (UTC) —M@sssly 15:52, 30 April 2020 (UTC) Moebeus Moebeus (talk) 11:41, 27 May 2020 (UTC) CamelCaseNick (talk) 17:13, 28 May 2020 (UTC) Jvcavv (talk) 21:38, 23 September 2020 (UTC) Bodhisattwa (talk) 15:23, 6 November 2020 (UTC) DeniseSl (talk) 09:49, 11 November 2020 (UTC) VisbyStar (talk) 21:11, 23 March 2021 (UTC) Pictogram voting comment.svg Notified participants of WikiProject Schemas

  •  Support. Currently, we have around 160 entity schemas and it's difficult to have any information about the existing schemas, especially to avoid create new schemas for already existing ones. I have also created this Phabricator ticket: phab:T243891 for this purpose. Is it possible to bring back this discussion from the current state of 'On Hold'? John Samuel (talk) 11:30, 6 February 2020 (UTC)
  •  Support I am also in favour of opening the discussion. We have some interesting schemas already on Wikidata, but it really hard to identify that already exist. I am currently just extracting all from 1..n, where I increase n once and while. Having a property would help here. --Andrawaag (talk) 15:22, 6 February 2020 (UTC)
  •  Support --Sannita - not just another it.wiki sysop 21:25, 6 February 2020 (UTC)
  •  Support. --Csisc (talk) 23:30, 6 February 2020 (UTC)
  •  Support for re-opening the discusssion, we have had some more experience by now Pdehaye (talk) 22:23, 9 February 2020 (UTC)
  •  Support I agree that there needs to be more documentation but Wikidata now has a class for shape expressions so we need to start linking them to items somewhere. This proposal seems like the natural place to start despite the confusion and conflicts to address. Blue Rasberry (talk) 16:29, 12 April 2020 (UTC)
  •  Support to move beyond on hold. @Pintoch: What do you think? TiagoLubiana (talk) 19:22, 9 May 2020 (UTC)
  •  Support @Pintoch: --SCIdude (talk) 16:20, 3 November 2020 (UTC)
  •  Support of being able to add EntitySchemas to items.  Oppose to RDF in E-space. I think Juras arguments are valid. This is really a question about how to best model this. We already have a lot of Q-items that describe different structural pieces necessary to construct this wonderful knowledge graph. I see no good reason to use RDF structure in the E-space when we can do it today in Q-space. My impression is that everything that involves WMDE and the team takes a long time to get done, so we might as well follow Juras suggestion and keep RDF in the Q-space and model each E-item there. This offloads the WMDE team which seems to have enough tasks already in their backlog. This is in line with KISS (Q131560) also.--So9q (talk) 11:57, 2 February 2021 (UTC)
  •  Support Liridon (talk) 19:01, 9 February 2021 (UTC)