User:YULdigitalpreservation/SoftwareKO

This page is dedicated to software organization by type/categoryEdit

Through working with the data relating to resources in the domain of computing I have observed multiple patterns for describing software types/categories.

I will describe each pattern. I will share relevant SPARQL queries and ShEx (Q29377880) schemas to illustrate options and trade-offs.

I hope to start a conversation among Wikidata editors to see if we can identify a preferred pattern.

Why categorize softwareEdit

  • AlternativeTo
  • Faceted search

GenreEdit

Please see this ShEx schema which expresses this pattern.

Here is a SPARQL query to identify items using genre:

The following query uses these:

  • Properties: instance of (P31)    , subclass of (P279)    , genre (P136)    
    1 SELECT ?item ?itemLabel ?genre ?genreLabel
    2 WHERE 
    3 {
    4   ?item wdt:P31/wdt:P279* wd:Q7397.
    5   ?item wdt:P136 ?genre.
    6   MINUS {?item wdt:P31/wdt:P279* wd:Q7889.}
    7   SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
    8 }
    

UseEdit

Here is a query that will return a table:

The following query uses these:

  • Properties: instance of (P31)    , subclass of (P279)    , use (P366)    
    1 SELECT DISTINCT ?item ?itemLabel ?use ?useLabel 
    2 WHERE 
    3 {
    4   ?item wdt:P31/wdt:P279* wd:Q7397.
    5   ?item wdt:P366 ?use.
    6   MINUS {?item wdt:P31/wdt:P279* wd:Q7889.}
    7   SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
    8 }
    

This query will allow us to see the different values that are combined with "use" for software:

The following query uses these:

  • Properties: instance of (P31)    , subclass of (P279)    , use (P366)    
     1 SELECT DISTINCT  ?use ?useLabel (COUNT (?item) as ?count)
     2 WHERE 
     3 {
     4   ?item wdt:P31/wdt:P279* wd:Q7397.
     5   ?item wdt:P366 ?use.
     6   MINUS {?item wdt:P31/wdt:P279* wd:Q7889.}
     7   SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
     8 }
     9 
    10 GROUP BY ?use ?useLabel
    11 ORDER BY DESC (?count)
    

P31 type of softwareEdit

First we need to collect the types of software from Wikidata:

The following query uses these:

  • Properties: instance of (P31)    
    1 SELECT ?item ?itemLabel 
    2 WHERE 
    3 {
    4   ?item wdt:P31 wd:Q28530532.
    5   SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
    6 }
    

Then we can combine that with software that is said to be an instance of any of those types:

The following query uses these:

  • Properties: instance of (P31)    , subclass of (P279)    
    1 SELECT ?software ?softwareLabel ?item ?itemLabel 
    2 WHERE 
    3 {
    4   ?item wdt:P31 wd:Q28530532.
    5   ?software wdt:P31/wdt:P279* ?item.
    6   SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
    7 }
    

In Jan 2019 more than 110,000 software items match this pattern.

Subclass of a software titleEdit

The following query uses these:

  • Properties: subclass of (P279)    , instance of (P31)    
    1 SELECT ?item ?itemLabel ?software ?softwareLabel
    2 WHERE 
    3 {
    4   ?item wdt:P279 ?software.
    5   ?software wdt:P31/wdt:P279* wd:Q7397.
    6   SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
    7 }
    

Software part of a seriesEdit

The following query uses these:

Software part of a series (video games removed)Edit

The following query uses these:

  • Properties: instance of (P31)    , subclass of (P279)    , part of the series (P179)    
    1 SELECT ?software ?softwareLabel ?series ?seriesLabel
    2 WHERE 
    3 {
    4    ?software wdt:P31/wdt:P279* wd:Q7397.
    5   ?software wdt:P179 ?series.
    6   MINUS {?software wdt:P31/wdt:P279* wd:Q7889.}
    7   SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
    8 }
    

Software edition of software titleEdit

The following query uses these:

Subclass of softwareEdit

P279Edit

There are currently 1500 subclasses of software.

P31 one of those subclasses

The following query uses these:

2835 using this pattern in early Jan 2019

ShEx schemaEdit

Please consult this github repo to see this schema expressed in ShEx (Q29377880). This diagram was created using the RDFShape tool.

 
A diagram to show a visual representation of this schema