Workdocumentation 2023-12-23 TH

From BITPlan cr Wiki
Jump to navigation Jump to search

CEUR-WS Example

Relevant Entity Classes and their Relationships

Following strictly the 80% Pareto rule results in the class diagram below with the entity classes being proceedings, event, human_settlement (city), region, and country. The entity classes that are ignored because they are under represented are Scholar, scholarly article, Event Series and also the distinction into Workshops and Conferences. Note: For the classes human_settlement, region and sovereign_state several properties were excluded due to irrelevance for this context.

Edit diagram

Queries for EC Property usage

Proceedings

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX schema: <http://schema.org/>
SELECT ?p ?wd_prop ?label ?count_p ((100.0 * ?count_p / ?total) AS ?percent)
WHERE {
  {
   # Entity Selection Query
   SELECT DISTINCT ?p (COUNT(DISTINCT ?s) as ?count_p)
   WHERE {
     # Entity of Intrest: Q1143604 (proceedings)
     ?s wdt:P31/wdt:P279* wd:Q1143604.
	 # Context 
	 # part of the series CEUR-WS
	 ?s wdt:P179 wd:Q27230297.
     ?s ?p ?o.
   }
   GROUP BY ?p
  }
  OPTIONAL{
    ?wd_prop wikibase:directClaim ?p .
    ?wd_prop rdfs:label ?label .
    FILTER (LANG(?label) = "en") .
  } 
  FILTER(?p = rdfs:label || ?wd_prop || ?p = schema:description)
  BIND(MAX(?count_p) as ?total)
}
GROUP BY ?p ?wd_prop ?label ?count_p ?total
HAVING (?percent >= 80)
ORDER BY DESC(?count_p)

Event

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX schema: <http://schema.org/>
SELECT ?p ?wd_prop ?label ?count_p ((100.0 * ?count_p / ?total) AS ?percent)
WHERE {
  {
   # Entity Selection Query
   SELECT DISTINCT ?p (COUNT(DISTINCT ?s) as ?count_p)
   WHERE {
     # Entity of Intrest: Q1656682 (event)
     ?s wdt:P31/wdt:P279* wd:Q1656682.
	 # Context 
	 { 
	    # is proceedings from → part of the series CEUR-WS
	    ?s ^wdt:P4745/wdt:P179 wd:Q27230297.
     } UNION {
	    # ^presented in → published in → part of the series CEUR-WS
	    ?s ^wdt:P5072/wdt:P1433/wdt:P179 wd:Q27230297.
     }
     ?s ?p ?o.
   }
   GROUP BY ?p
  }
  OPTIONAL{
    ?wd_prop wikibase:directClaim ?p .
    ?wd_prop rdfs:label ?label .
    FILTER (LANG(?label) = "en") .
  } 
  FILTER(?p = rdfs:label || ?wd_prop || ?p = schema:description)
  BIND(MAX(?count_p) as ?total)
}
GROUP BY ?p ?wd_prop ?label ?count_p ?total
HAVING (?percent >= 80)
ORDER BY DESC(?count_p)

Scholar

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX schema: <http://schema.org/>
SELECT ?p ?wd_prop ?label ?count_p ((100.0 * ?count_p / ?total) AS ?percent)
WHERE {
  {
   # Entity Selection Query
   SELECT DISTINCT ?p (COUNT(DISTINCT ?s) as ?count_p)
   WHERE {
     # Entity of Intrest: Q5 (human)
     ?s wdt:P31/wdt:P279* wd:Q5.
	 # Context 
	 { 
	    # author of → published in → part of the series CEUR-WS
	    ?s ^wdt:P50/wdt:P1433/wdt:P179 wd:Q27230297.
     } UNION {
	    # editor of → part of the series CEUR-WS
	    ?s ^wdt:P98/wdt:P179 wd:Q27230297.
     }UNION {
	    # author of → published in → is in proceedings → part of the series CEUR-WS
	    ?s ^wdt:P98/wdt:P5072/^wdt:P4745/wdt:P179 wd:Q27230297.
     }
     ?s ?p ?o.
   }
   GROUP BY ?p
  }
  OPTIONAL{
    ?wd_prop wikibase:directClaim ?p .
    ?wd_prop rdfs:label ?label .
    FILTER (LANG(?label) = "en") .
  } 
  FILTER(?p = rdfs:label || ?wd_prop || ?p = schema:description)
  BIND(MAX(?count_p) as ?total)
}
GROUP BY ?p ?wd_prop ?label ?count_p ?total
HAVING (?percent > 80)
ORDER BY DESC(?count_p)

human settlement

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX schema: <http://schema.org/>
SELECT ?p ?wd_prop ?label ?count_p ((100.0 * ?count_p / ?total) AS ?percent)
WHERE {
  {
   # Entity Selection Query
   SELECT DISTINCT ?p (COUNT(DISTINCT ?s) as ?count_p)
   WHERE {
     # Entity of Intrest: Q486972 (human settlement)
     ?s wdt:P31/wdt:P279* wd:Q486972.
	 # Context 
	 { 
	    # ^location →is proceedings from → part of the series CEUR-WS
	    ?s ^wdt:P276/^wdt:P4745/wdt:P179 wd:Q27230297.
     } UNION {
	    # ^location → ^presented in → published in → part of the series CEUR-WS
	    ?s ^wdt:P276/^wdt:P5072/wdt:P1433/wdt:P179 wd:Q27230297.
     }
     ?s ?p ?o.
   }
   GROUP BY ?p
  }
  OPTIONAL{
    ?wd_prop wikibase:directClaim ?p .
    ?wd_prop rdfs:label ?label .
    FILTER (LANG(?label) = "en") .
  } 
  FILTER(?p = rdfs:label || ?wd_prop || ?p = schema:description)
  BIND(MAX(?count_p) as ?total)
}
GROUP BY ?p ?wd_prop ?label ?count_p ?total
HAVING (?percent >= 80)
ORDER BY DESC(?count_p)

souvereign state

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX schema: <http://schema.org/>
SELECT ?p ?wd_prop ?label ?count_p ((100.0 * ?count_p / ?total) AS ?percent)
WHERE {
  {
   # Entity Selection Query
   SELECT DISTINCT ?p (COUNT(DISTINCT ?s) as ?count_p)
   WHERE {
     # Entity of Intrest: Q3624078 (sovereign state)
     ?s wdt:P31/wdt:P279* wd:Q3624078.
	 # Context 
	 { 
	    # ^location →is proceedings from → part of the series CEUR-WS
	    ?s ^wdt:P17/^wdt:P4745/wdt:P179 wd:Q27230297.
     } UNION {
	    # ^location → ^presented in → published in → part of the series CEUR-WS
	    ?s ^wdt:P17/^wdt:P5072/wdt:P1433/wdt:P179 wd:Q27230297.
     }
     ?s ?p ?o.
   }
   GROUP BY ?p
  }
  OPTIONAL{
    ?wd_prop wikibase:directClaim ?p .
    ?wd_prop rdfs:label ?label .
    FILTER (LANG(?label) = "en") .
  } 
  FILTER(?p = rdfs:label || ?wd_prop || ?p = schema:description)
  BIND(MAX(?count_p) as ?total)
}
GROUP BY ?p ?wd_prop ?label ?count_p ?total
HAVING (?percent >= 80)
ORDER BY DESC(?count_p)

region

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX schema: <http://schema.org/>
SELECT ?p ?wd_prop ?label ?count_p ((100.0 * ?count_p / ?total) AS ?percent)
WHERE {
  {
   # Entity Selection Query
   SELECT DISTINCT ?p (COUNT(DISTINCT ?region) as ?count_p)
   WHERE {
     # Entity of Intrest: Q486972 (human settlement)
     ?s wdt:P31/wdt:P279* wd:Q486972.
	 # Context 
	 { 
	    # ^location →is proceedings from → part of the series CEUR-WS
	    ?s ^wdt:P276/^wdt:P4745/wdt:P179 wd:Q27230297.
     } UNION {
	    # ^location → ^presented in → published in → part of the series CEUR-WS
	    ?s ^wdt:P276/^wdt:P5072/wdt:P1433/wdt:P179 wd:Q27230297.
     }
	 # located in the administrative territorial entity
     ?s wdt:P131+ ?region.
	 ?region ?p ?o.
   }
   GROUP BY ?p
  }
  OPTIONAL{
    ?wd_prop wikibase:directClaim ?p .
    ?wd_prop rdfs:label ?label .
    FILTER (LANG(?label) = "en") .
  } 
  FILTER(?p = rdfs:label || ?wd_prop || ?p = schema:description)
  BIND(MAX(?count_p) as ?total)
}
GROUP BY ?p ?wd_prop ?label ?count_p ?total
HAVING (?percent >= 80)
ORDER BY DESC(?count_p)


Event Series

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX schema: <http://schema.org/>
SELECT ?p ?wd_prop ?label ?count_p ((100.0 * ?count_p / ?total) AS ?percent)
WHERE {
  {
   # Entity Selection Query
   SELECT DISTINCT ?p (COUNT(DISTINCT ?s) as ?count_p)
   WHERE {
     # Entity of Intrest: Q15900616 (event sequence )
     ?s wdt:P31/wdt:P279* wd:Q15900616.
	 # Context 
	 { 
	    # ^part of the series →is proceedings from → part of the series CEUR-WS
	    ?s ^wdt:P179/^wdt:P4745/wdt:P179 wd:Q27230297.
     } UNION {
	    # ^part of the series → ^presented in → published in → part of the series CEUR-WS
	    ?s ^wdt:P179/^wdt:P5072/wdt:P1433/wdt:P179 wd:Q27230297.
     }
	 # located in the administrative territorial entity
     ?s ?p ?o.
   }
   GROUP BY ?p
  }
  OPTIONAL{
    ?wd_prop wikibase:directClaim ?p .
    ?wd_prop rdfs:label ?label .
    FILTER (LANG(?label) = "en") .
  } 
  FILTER(?p = rdfs:label || ?wd_prop || ?p = schema:description)
  BIND(MAX(?count_p) as ?total)
}
GROUP BY ?p ?wd_prop ?label ?count_p ?total
HAVING (?percent >= 80)
ORDER BY DESC(?count_p)


Count Queries