Difference between revisions of "Q3.7"

From BITPlan cr Wiki
Jump to navigation Jump to search
(Created page with "=Query= {{Query |id=7 |title=Full series of workshops |description=Identify the full series of workshop W regardless of whether individual editions published with CEUR-WS.org...")
 
 
Line 3: Line 3:
 
{{Query
 
{{Query
 
|id=7
 
|id=7
 +
|name=FullSeriesOfWorkhops
 
|title=Full series of workshops
 
|title=Full series of workshops
 
|description=Identify the full series of workshop W regardless of whether individual editions published with CEUR-WS.org.
 
|description=Identify the full series of workshop W regardless of whether individual editions published with CEUR-WS.org.
 +
|sparql=PREFIX target: <http://www.wikidata.org/entity/Q116982161>
 +
 +
# title: List of event and proceedings for a specific event series
 +
SELECT DISTINCT
 +
  (SAMPLE(?years) AS ?year)
 +
  (SAMPLE(?ordinal) AS ?ordinal)
 +
  (SAMPLE(?short_names) AS ?short_name)
 +
  ?event ?eventLabel (CONCAT("/event/", SUBSTR(STR(?event), 32)) AS ?eventUrl)
 +
  ?proceedings ?proceedingsLabel (CONCAT("/venue/", SUBSTR(STR(?proceedings), 32)) AS ?proceedingsUrl)
 +
WHERE {
 +
  {
 +
    ?event wdt:P179 {{!}} wdt:P31 target: .
 +
    ?event rdfs:label ?eventLabel.
 +
    FILTER(LANG(?eventLabel)="en")
 +
    OPTIONAL {
 +
      ?event wdt:P585 {{!}} wdt:P580 ?datetime .
 +
      BIND(YEAR(?datetime) AS ?years)
 +
    }
 +
    OPTIONAL {
 +
      ?event wdt:P1813 ?short_names
 +
    }
 +
    OPTIONAL {
 +
      ?proceedings wdt:P4745 ?event
 +
    }
 +
    OPTIONAL{
 +
      ?event p:P179/pq:P1545 ?ordinal
 +
    }
 +
  }
 +
  UNION
 +
  {
 +
    # proceedings even if the event is not there!!!
 +
    ?proceedings ( wdt:P179 / wdt:P4745 ) target: .
 +
    ?proceedings rdfs:label ?proceedingsLabel.
 +
    FILTER(LANG(?proceedingsLabel)="en")
 +
    OPTIONAL {
 +
      ?proceedings wdt:P577 ?datetime .
 +
      BIND(YEAR(?datetime) AS ?years)   
 +
    }
 +
  }
 +
  }
 +
GROUP BY ?event ?year ?eventLabel ?proceedings ?proceedingsLabel
 +
ORDER BY DESC(?year)
 +
|scholia=event-series_events.sparql
 +
|relevance=1
 +
|comment=Scholia Example [https://scholia.toolforge.org/event-series/Q116982161 Text2KG]
 
|task=Task3
 
|task=Task3
 
|storemode=property
 
|storemode=property
 
}}
 
}}
 
=Freitext=
 
=Freitext=

Latest revision as of 06:55, 22 March 2023

Query

Query
edit
id  7
name  FullSeriesOfWorkhops
title  Full series of workshops
description  Identify the full series of workshop W regardless of whether individual editions published with CEUR-WS.org.
sparql  
PREFIX target: <http://www.wikidata.org/entity/Q116982161>

# title: List of event and proceedings for a specific event series
SELECT DISTINCT 
  (SAMPLE(?years) AS ?year)
  (SAMPLE(?ordinal) AS ?ordinal)
  (SAMPLE(?short_names) AS ?short_name)
  ?event ?eventLabel (CONCAT("/event/", SUBSTR(STR(?event), 32)) AS ?eventUrl)
  ?proceedings ?proceedingsLabel (CONCAT("/venue/", SUBSTR(STR(?proceedings), 32)) AS ?proceedingsUrl)
WHERE {
  {
    ?event wdt:P179 | wdt:P31 target: .
    ?event rdfs:label ?eventLabel.
    FILTER(LANG(?eventLabel)="en")
    OPTIONAL {
      ?event wdt:P585 | wdt:P580 ?datetime .
      BIND(YEAR(?datetime) AS ?years)
    }
    OPTIONAL {
      ?event wdt:P1813 ?short_names
    }
    OPTIONAL {
      ?proceedings wdt:P4745 ?event
    }
    OPTIONAL{
      ?event p:P179/pq:P1545 ?ordinal
    }
  }
  UNION
  {
    # proceedings even if the event is not there!!!
    ?proceedings ( wdt:P179 / wdt:P4745 ) target: .
    ?proceedings rdfs:label ?proceedingsLabel.
    FILTER(LANG(?proceedingsLabel)="en")
    OPTIONAL {
      ?proceedings wdt:P577 ?datetime .
      BIND(YEAR(?datetime) AS ?years)    
    }
  }
  }
GROUP BY ?event ?year ?eventLabel ?proceedings ?proceedingsLabel
ORDER BY DESC(?year)
tryiturl  →
wdqsurl  →
scholia  event-series_events.sparql→event-series_events.sparql
relevance  1
comment  Scholia Example Text2KG
task  Task3→Task3

Freitext