Semantic Publishing Challenge Queries

From BITPlan cr Wiki
Jump to navigation Jump to search

Semantic publishing Queries against wikidata

Q1.1

List the full names of all editors of the proceedings of workshop W

Input for this query is the volume number.

SELECT ?proceedings ?editor ?editorLabel ?affiliation ?affiliationLabel
WHERE{
  VALUES ?volume_number {"3262"}
  ?proceedings wdt:P31 wd:Q1143604;
               wdt:P179 wd:Q27230297;
               p:P179/pq:P478 ?volume_number;
               p:P98 [
                 ps:P98 ?editor;
                 pq:P1416 ?affiliation
               ].
  
  ?editor rdfs:label ?editorLabel. FILTER(lang(?editorLabel)="en")
  ?affiliation rdfs:label ?affiliationLabel. FILTER(lang(?affiliationLabel)="en")           
}

try it!

Q1.2

Count the number of papers in workshop W .

SELECT ?proceedings (COUNT(DISTINCT ?paper) as ?number_of_papers)
WHERE{
  VALUES ?volume_number {"3262"}
  ?proceedings wdt:P31 wd:Q1143604;
               wdt:P179 wd:Q27230297;
               p:P179/pq:P478 ?volume_number.
  
  ?paper wdt:P31 wd:Q13442814;
         wdt:P1433 ?proceedings.
}
GROUP BY ?proceedings

Q1.3

List the full names of all authors who have (co-)authored a paper in workshop W .

SELECT DISTINCT ?proceedings ?author ?authorLabel
WHERE{
  VALUES ?volume_number {"3262"}
  ?proceedings wdt:P31 wd:Q1143604;
               wdt:P179 wd:Q27230297;
               p:P179/pq:P478 ?volume_number.
  
  ?paper wdt:P31 wd:Q13442814;
         wdt:P1433 ?proceedings;
         wdt:P50|wdt:P2093 ?author.
  ?author rdfs:label ?authorLabel. FILTER(lang(?authorLabel)="en")
}


Q1.4

Compute the average length of a paper (in pages) in workshop W

SELECT DISTINCT ?proceedings (AVG(?number_of_pages) as ?avg_number_of_pages)
WHERE{
  VALUES ?volume_number {"3262"}
  ?proceedings wdt:P31 wd:Q1143604;
               wdt:P179 wd:Q27230297;
               p:P179/pq:P478 ?volume_number.
  
  ?paper wdt:P31 wd:Q13442814;
         wdt:P1433 ?proceedings;
         wdt:P1104 ?number_of_pages.
}
GROUP BY ?proceedings

Q1.5

(publication turnaround) Find out whether the proceedings of work- shop W were published on CEUR-WS.org before the workshop took place.

This query lists all proceedings that were published before the event took place.

SELECT DISTINCT ?proceedings ?pub_date ?event ?start_date
WHERE{
  ?proceedings wdt:P31 wd:Q1143604;
               wdt:P179 wd:Q27230297;
               p:P179/pq:P478 ?volume_number;
               wdt:P577 ?pub_date;
               wdt:P4745 ?event.
  ?event wdt:P580 ?start_date.
  FILTER(?pub_date < ?start_date)
}

Q1.6

(previous editions of a workshop) Identify all editions that the work- shop series titled T has published with CEUR-WS.org.

SELECT DISTINCT ?event ?ordinal ?proceedings ?volume_number
WHERE{
  VALUES ?series_title {"Wikidata Workshop"@en}
  VALUES ?series_type{ wd:Q47459256 wd:Q47258130 }
  ?series wdt:P31 ?series_type;
          wdt:P1476|rdfs:label ?series_title.
  ?event p:P179 [
            ps:P179 ?series;
            pq:P1545 ?ordinal
          ].

  ?proceedings wdt:P31 wd:Q1143604;
               wdt:P179 wd:Q27230297;
               p:P179/pq:P478 ?volume_number;
               wdt:P4745 ?event.
}


Q1.7

Identify the full names of those chairs of the workshop series titled T that have so far been a chair in every edition of the workshop published with CEUR-WS.org.

SELECT DISTINCT ?programm_commitee ?programm_commiteeLabel
WHERE{
  VALUES ?series_title {"Wikidata Workshop"@en}
  VALUES ?series_type{ wd:Q47459256 wd:Q47258130 }
  ?series wdt:P31 ?series_type;
          wdt:P1476|rdfs:label ?series_title.
  ?event p:P179 [
            ps:P179 ?series;
            pq:P1545 ?ordinal
          ];
         wdt:P5804 ?programm_commitee;
         ^wdt:P4745/wdt:P179 wd:Q27230297.
  {
    SELECT (COUNT(DISTINCT ?event) as ?number_of_events)
    WHERE{
      VALUES ?series_title {"Wikidata Workshop"@en}
      VALUES ?series_type{ wd:Q47459256 wd:Q47258130 }
      ?series wdt:P31 ?series_type;
          wdt:P1476|rdfs:label ?series_title.
      ?event p:P179 [
            ps:P179 ?series;
            pq:P1545 ?ordinal
          ];
           wdt:P5804 ?programm_commitee;
           ^wdt:P4745/wdt:P179 wd:Q27230297.
      }
    }

  ?programm_commitee rdfs:label ?programm_commiteeLabel. FILTER(lang(?programm_commiteeLabel)="en")
}GROUP BY ?programm_commitee ?number_of_events ?programm_commiteeLabel
HAVING (?number_of_events = COUNT(?programm_commitee))

Q1.8

Identify all CEUR-WS.org proceedings volumes in which workshops of conference C in year Y were published.

SELECT DISTINCT *
WHERE{
  VALUES ?conference_title {"ESWC 2022"@en}
  ?proceedings wdt:P31 wd:Q1143604;
               wdt:P179 wd:Q27230297;
               p:P179/pq:P478 ?volume_number;
               wdt:P577 ?pub_date;
               wdt:P4745 ?workshop.
  ?workshop wdt:P11633 ?conference.  # colocated with
  ?conference wdt:P1476|rdfs:label ?conference_title.
  
 FILTER(YEAR(?pub_date)= "2022"^^xsd:integer)
}

Q1.9

Identify those papers of workshop W that were (co-)authored by at least one chair of the workshop.

SELECT DISTINCT ?proceedings ?paper ?paperLabel ?event ?eventLabel ?author ?authorLabel
WHERE{
  #VALUES ?volume_number {"3262"}
  ?proceedings wdt:P31 wd:Q1143604;
               wdt:P179 wd:Q27230297;
               p:P179/pq:P478 ?volume_number;
               wdt:P4745 ?event.
  
  ?paper wdt:P31 wd:Q13442814;
         wdt:P1433 ?proceedings;
         wdt:P50|wdt:P2093 ?author.
  ?event wdt:P5804 ?author.
  
  
  ?author rdfs:label ?authorLabel. FILTER(lang(?authorLabel)="en")
  ?paper rdfs:label ?paperLabel. FILTER(lang(?paperLabel)="en")
  ?event rdfs:label ?eventLabel. FILTER(lang(?eventLabel)="en")
}

Q1.10

List the full names of all authors of invited papers in workshop W


invited papers are currently not covered by wikidata

Q1.11

Determine the number of editions that the workshop series titled T has had, regardless of whether published with CEUR-WS.org.

SELECT DISTINCT ?series ?seriesLabel (Count(DISTINCT ?event2)as ?number_of_events)
WHERE{
  ?proceedings wdt:P31 wd:Q1143604;
               wdt:P179 wd:Q27230297;
               p:P179/pq:P478 ?volume_number;
               wdt:P4745 ?event.
  ?event wdt:P179 ?series.
  ?event2 wdt:P179 ?series.
  ?series rdfs:label ?seriesLabel. FILTER(lang(?seriesLabel)="en")
}
GROUP BY ?series ?seriesLabel


Q1.12

(change of workshop title) Determine the title (without year) that workshop W had in its first edition.


SELECT DISTINCT ?event ?eventLabel
WHERE{
  VALUES ?event_title {"The Third Wikidata Workshop"@en}
  ?proceedings wdt:P31 wd:Q1143604;
               wdt:P179 wd:Q27230297;
               p:P179/pq:P478 ?volume_number;
               wdt:P4745 ?e.
  ?e wdt:P179 ?series;
         wdt:P1476|rdfs:label ?event_title.
  ?event p:P179 [
                  ps:P179 ?series;
                  pq:P1545 ?ordinal
  ].
  ?event rdfs:label ?eventLabel. FILTER(lang(?eventLabel)="en")
}
ORDER BY ?ordinal
LIMIT 1


Q1.13

(workshops that have died) Of the workshops of conference C in year Y , identify those that did not publish with CEUR-WS.org in the following year (and that therefore probably no longer took place).



Q1.14

(papers of a workshop published jointly with others) Identify the papers of the workshop titled T (which was published in a joint volume V with other workshops).


SELECT DISTINCT ?paper ?paperLabel ?proceedings
WHERE{
  VALUES ?event_title {"1st International Workshop on Knowledge Graph Generation From Text"@en}
  ?proceedings wdt:P31 wd:Q1143604;
               wdt:P179 wd:Q27230297;
               p:P179/pq:P478 ?volume_number;
               wdt:P4745 ?event.
  ?event wdt:P1476|rdfs:label ?event_title.
  ?paper wdt:P1433 ?proceedings;  # published in
         wdt:P5072 ?event. # presented in
  
  ?paper rdfs:label ?paperLabel. FILTER(lang(?paperLabel)="en")
}

Q1.15

(editors of one workshop published jointly with others) List the full names of all editors of the proceedings of the workshop titled T (which was published in a joint volume V with other workshops).

SELECT DISTINCT ?proceedings ?event ?editor ?editorLabel
WHERE{
  VALUES ?event_title {"1st International Workshop on Knowledge Graph Generation From Text"@en}
  ?proceedings wdt:P31 wd:Q1143604;
               wdt:P179 wd:Q27230297;
               p:P179/pq:P478 ?volume_number;
               p:P4745 [
                            ps:P4745 ?event;
                            pq:P98 ?editor
               ].
  ?event wdt:P1476|rdfs:label ?event_title.
  
  ?editor rdfs:label ?editorLabel. FILTER(lang(?editorLabel)="en")
}