Skip to content

use declared prefixes in SPARQL construct results (or declare SOA prefixes in LPWC) #8

Closed
@VladimirAlexiev

Description

@VladimirAlexiev

Continuing #7, I tried this query at http://176.9.2.140:10216/sparql (will become https://linkedpaperswithcode.org/sparql shortly):

PREFIX dct: <http://purl.org/dc/terms/>
PREFIX org: <http://www.w3.org/ns/org#>
PREFIX soa: <https://semopenalex.org/ontology/>
PREFIX dct: <http://purl.org/dc/terms/>
construct {?org ?p ?o} where {
  {select ?x {[] dct:creator ?x} limit 1}
  {service <https://semopenalex.org/sparql> {
      ?x org:memberOf ?org.
      ?org ?p ?o
  }}
}

Unlike YasGUI that returns a table, this returns turtle, which is better:

@prefix schema: <https://schema.org/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix sp: <http://spinrdf.org/sp#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix org: <http://www.w3.org/ns/org#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .

<https://semopenalex.org/institution/I57206974> a <https://semopenalex.org/ontology/Institution>;
  owl:sameAs <https://makg.org/entity/57206974>, <https://www.wikidata.org/wiki/Q49210>;
  <http://purl.org/dc/terms/created> "2016-06-24"^^xsd:date;
  <http://purl.org/dc/terms/modified> "2024-05-30"^^xsd:date;
  rdfs:seeAlso <https://en.wikipedia.org/wiki/New%20York%20University>;
  <https://semopenalex.org/ontology/citedByCount> 8616587;
  <https://semopenalex.org/ontology/worksCount> 229236;
  <https://semopenalex.org/ontology/countsByYear> <https://semopenalex.org/countsByYear/I57206974Y2012>,
    <https://semopenalex.org/countsByYear/I57206974Y2013>, <https://semopenalex.org/countsByYear/I57206974Y2014>,
    <https://semopenalex.org/countsByYear/I57206974Y2015>, <https://semopenalex.org/countsByYear/I57206974Y2016>,
    <https://semopenalex.org/countsByYear/I57206974Y2017>, <https://semopenalex.org/countsByYear/I57206974Y2018>,
    <https://semopenalex.org/countsByYear/I57206974Y2019>, <https://semopenalex.org/countsByYear/I57206974Y2020>,
    <https://semopenalex.org/countsByYear/I57206974Y2021>, <https://semopenalex.org/countsByYear/I57206974Y2022>,
    <https://semopenalex.org/countsByYear/I57206974Y2023>, <https://semopenalex.org/countsByYear/I57206974Y2024>;
  <https://semopenalex.org/ontology/magId> 57206974;
  <https://dbpedia.org/property/countryCode> "US";
  foaf:name "New York University";
  <https://semopenalex.org/ontology/ror> "https://ror.org/0190ak572";
  <https://dbpedia.org/ontology/alternativeName> "Universidad de Nueva York", "Université de New York";
  foaf:depiction "https://commons.wikimedia.org/w/index.php?title=Special:Redirect/file/Nyu%20short%20color.svg";
  foaf:homepage "http://www.nyu.edu/";
  <https://dbpedia.org/ontology/location> <https://semopenalex.org/geo/I57206974>;
  <https://dbpedia.org/property/acronym> "NYU";
  <https://semopenalex.org/ontology/grid> "grid.137628.9";
  <https://semopenalex.org/ontology/imageThumbnail> "https://commons.wikimedia.org/w/index.php?title=Special:Redirect/file/Nyu%20short%20color.svg&width=300";
  <https://semopenalex.org/ontology/rorType> "education";
  <https://semopenalex.org/ontology/hasChildInstitution> <https://semopenalex.org/institution/I258800397>,
    <https://semopenalex.org/institution/I120250893>, <https://semopenalex.org/institution/I36672615>,
    <https://semopenalex.org/institution/I2799442855>, <https://semopenalex.org/institution/I4210123063>,
    <https://semopenalex.org/institution/I4210165353>;
  <https://semopenalex.org/ontology/hasAssociatedInstitution> <https://semopenalex.org/institution/I4210086933>,
    <https://semopenalex.org/institution/I2802707398>, <https://semopenalex.org/institution/I2800015068>,
    <https://semopenalex.org/institution/I4210108985>, <https://semopenalex.org/institution/I4210163050>,
    <https://semopenalex.org/institution/I4210160702>, <https://semopenalex.org/institution/I42102869> .

<https://semopenalex.org/institution/I27837315> a <https://semopenalex.org/ontology/Institution>;
  owl:sameAs <https://makg.org/entity/27837315>, <https://www.wikidata.org/wiki/Q230492>;
  <http://purl.org/dc/terms/created> "2016-06-24"^^xsd:date;
  <http://purl.org/dc/terms/modified> "2024-05-29"^^xsd:date;
  rdfs:seeAlso <https://en.wikipedia.org/wiki/University%20of%20Michigan>;
  <https://semopenalex.org/ontology/citedByCount> 17535410;
  <https://semopenalex.org/ontology/worksCount> 885687;
  <https://semopenalex.org/ontology/countsByYear> <https://semopenalex.org/countsByYear/I27837315Y2012>,
    <https://semopenalex.org/countsByYear/I27837315Y2013>, <https://semopenalex.org/countsByYear/I27837315Y2014>,
    <https://semopenalex.org/countsByYear/I27837315Y2015>, <https://semopenalex.org/countsByYear/I27837315Y2016>,
    <https://semopenalex.org/countsByYear/I27837315Y2017>, <https://semopenalex.org/countsByYear/I27837315Y2018>,
    <https://semopenalex.org/countsByYear/I27837315Y2019>, <https://semopenalex.org/countsByYear/I27837315Y2020>,
    <https://semopenalex.org/countsByYear/I27837315Y2021>, <https://semopenalex.org/countsByYear/I27837315Y2022>,
    <https://semopenalex.org/countsByYear/I27837315Y2023>, <https://semopenalex.org/countsByYear/I27837315Y2024>;
  <https://semopenalex.org/ontology/magId> 27837315;
  <https://dbpedia.org/property/countryCode> "US";
  foaf:name "University of Michigan–Ann Arbor";
  <https://semopenalex.org/ontology/ror> "https://ror.org/00jmfr291";
  <https://dbpedia.org/ontology/alternativeName> "University of Michigan", "UMich",
    "Université du Michigan";
  foaf:depiction "https://commons.wikimedia.org/w/index.php?title=Special:Redirect/file/University%20of%20Michigan%20logo.svg";
  foaf:homepage "https://www.umich.edu";
  <https://dbpedia.org/ontology/location> <https://semopenalex.org/geo/I27837315>;
  <https://dbpedia.org/property/acronym> "UM";
  <https://semopenalex.org/ontology/grid> "grid.214458.e";
  <https://semopenalex.org/ontology/imageThumbnail> "https://commons.wikimedia.org/w/index.php?title=Special:Redirect/file/University%20of%20Michigan%20logo.svg&width=300";
  <https://semopenalex.org/ontology/rorType> "education";
  <https://semopenalex.org/ontology/hasChildInstitution> <https://semopenalex.org/institution/I4210163254>,
    <https://semopenalex.org/institution/I4210104572>, <https://semopenalex.org/institution/I4210130704>,
    <https://semopenalex.org/institution/I4210092198>;
  <https://semopenalex.org/ontology/hasAssociatedInstitution> <https://semopenalex.org/institution/I2801799315>,
    <https://semopenalex.org/institution/I4210114445> .

<https://semopenalex.org/institution/I36672615> a <https://semopenalex.org/ontology/Institution>;
  owl:sameAs <https://makg.org/entity/36672615>, <https://www.wikidata.org/wiki/Q946028>;
  <http://purl.org/dc/terms/created> "2016-06-24"^^xsd:date;
  <http://purl.org/dc/terms/modified> "2024-05-30"^^xsd:date;
  rdfs:seeAlso <https://en.wikipedia.org/wiki/Courant%20Institute%20of%20Mathematical%20Sciences>;
  <https://semopenalex.org/ontology/citedByCount> 723289;
  <https://semopenalex.org/ontology/worksCount> 14169;
  <https://semopenalex.org/ontology/countsByYear> <https://semopenalex.org/countsByYear/I36672615Y2012>,
    <https://semopenalex.org/countsByYear/I36672615Y2013>, <https://semopenalex.org/countsByYear/I36672615Y2014>,
    <https://semopenalex.org/countsByYear/I36672615Y2015>, <https://semopenalex.org/countsByYear/I36672615Y2016>,
    <https://semopenalex.org/countsByYear/I36672615Y2017>, <https://semopenalex.org/countsByYear/I36672615Y2018>,
    <https://semopenalex.org/countsByYear/I36672615Y2019>, <https://semopenalex.org/countsByYear/I36672615Y2020>,
    <https://semopenalex.org/countsByYear/I36672615Y2021>, <https://semopenalex.org/countsByYear/I36672615Y2022>,
    <https://semopenalex.org/countsByYear/I36672615Y2023>, <https://semopenalex.org/countsByYear/I36672615Y2024>;
  <https://semopenalex.org/ontology/magId> 36672615;
  <https://dbpedia.org/property/countryCode> "US";
  foaf:name "Courant Institute of Mathematical Sciences";
  <https://semopenalex.org/ontology/ror> "https://ror.org/037tm7f56";
  foaf:depiction "https://commons.wikimedia.org/w/index.php?title=Special:Redirect/file/WarrenWeaverHall.JPG";
  foaf:homepage "http://www.cims.nyu.edu/";
  <https://dbpedia.org/ontology/location> <https://semopenalex.org/geo/I36672615>;
  <https://dbpedia.org/property/acronym> "CIMS";
  <https://semopenalex.org/ontology/grid> "grid.482020.c";
  <https://semopenalex.org/ontology/imageThumbnail> "https://commons.wikimedia.org/w/index.php?title=Special:Redirect/file/WarrenWeaverHall.JPG&width=300";
  <https://semopenalex.org/ontology/rorType> "education";
  <https://semopenalex.org/ontology/hasParentInstitution> <https://semopenalex.org/institution/I57206974> .

However, it doesn't use prefixed declared in the query.
I suspect it only uses namespaces existing in the LPWC repo.
If that is the case, then please define all SOA prefixes in the LPWC repo.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions