davidlamprecht / linkedpaperswithcode

Code for generating Linked Papers with Code a high-quality RDF knowledge graph with metadata about the machine learning landscape.
https://linkedpaperswithcode.com
MIT License
2 stars 0 forks source link

how to fetch authors and affiliations #7

Open VladimirAlexiev opened 3 days ago

VladimirAlexiev commented 3 days ago
  1. The diagram is a bit misleading since it shows paper->dct:creator->soa:Author but this query returns nothing. It should use some different color (eg red) to show classes that are hosted externally:
    PREFIX soa: <https://semopenalex.org/ontology/>
    select * {?x a soa:Author}
  2. Authors are linked to SemOpenAlex, where there are 26.5 triples on average per author. Eg this federated query describes the first author:
    construct {?x ?p ?o} where {
    {select ?x {[] dct:creator ?x} limit 1}
    {service <https://semopenalex.org/sparql> {?x ?p ?o}}
    }
    Note: YasGUI doesn't have download format "Turtle" even for CONSTRUCT queries, that's why I show a table. As you see, there's a plethora of info. subject predicate object
    https://semopenalex.org/author/A5035759008 http://www.w3.org/1999/02/22-rdf-syntax-ns#type https://semopenalex.org/ontology/Author
    https://semopenalex.org/author/A5035759008 http://purl.org/dc/terms/created 2023-07-21
    https://semopenalex.org/author/A5035759008 http://purl.org/dc/terms/modified 2024-05-29
    https://semopenalex.org/author/A5035759008 https://semopenalex.org/ontology/citedByCount 2707
    https://semopenalex.org/author/A5035759008 https://semopenalex.org/ontology/worksCount 110
    https://semopenalex.org/author/A5035759008 https://semopenalex.org/ontology/countsByYear https://semopenalex.org/countsByYear/A5035759008Y2012
    https://semopenalex.org/author/A5035759008 https://semopenalex.org/ontology/countsByYear https://semopenalex.org/countsByYear/A5035759008Y2013
    https://semopenalex.org/author/A5035759008 https://semopenalex.org/ontology/countsByYear https://semopenalex.org/countsByYear/A5035759008Y2014
    https://semopenalex.org/author/A5035759008 https://semopenalex.org/ontology/countsByYear https://semopenalex.org/countsByYear/A5035759008Y2015
    https://semopenalex.org/author/A5035759008 https://semopenalex.org/ontology/countsByYear https://semopenalex.org/countsByYear/A5035759008Y2016
    https://semopenalex.org/author/A5035759008 https://semopenalex.org/ontology/countsByYear https://semopenalex.org/countsByYear/A5035759008Y2017
    https://semopenalex.org/author/A5035759008 https://semopenalex.org/ontology/countsByYear https://semopenalex.org/countsByYear/A5035759008Y2018
    https://semopenalex.org/author/A5035759008 https://semopenalex.org/ontology/countsByYear https://semopenalex.org/countsByYear/A5035759008Y2019
    https://semopenalex.org/author/A5035759008 https://semopenalex.org/ontology/countsByYear https://semopenalex.org/countsByYear/A5035759008Y2020
    https://semopenalex.org/author/A5035759008 https://semopenalex.org/ontology/countsByYear https://semopenalex.org/countsByYear/A5035759008Y2021
    https://semopenalex.org/author/A5035759008 https://semopenalex.org/ontology/countsByYear https://semopenalex.org/countsByYear/A5035759008Y2022
    https://semopenalex.org/author/A5035759008 https://semopenalex.org/ontology/countsByYear https://semopenalex.org/countsByYear/A5035759008Y2023
    https://semopenalex.org/author/A5035759008 https://semopenalex.org/ontology/countsByYear https://semopenalex.org/countsByYear/A5035759008Y2024
    https://semopenalex.org/author/A5035759008 http://purl.org/spar/bido/h-index 23
    https://semopenalex.org/author/A5035759008 http://xmlns.com/foaf/0.1/name David F. Fouhey
    https://semopenalex.org/author/A5035759008 https://semopenalex.org/ontology/2YrMeanCitedness 1.96875
    https://semopenalex.org/author/A5035759008 https://semopenalex.org/ontology/i10Index 36
    https://semopenalex.org/author/A5035759008 https://semopenalex.org/ontology/alternativeName David F. Fouhey
    https://semopenalex.org/author/A5035759008 https://semopenalex.org/ontology/alternativeName D. Fouhey
    https://semopenalex.org/author/A5035759008 https://semopenalex.org/ontology/alternativeName David Ford Fouhey
    https://semopenalex.org/author/A5035759008 https://semopenalex.org/ontology/alternativeName David Fouhey
    https://semopenalex.org/author/A5035759008 http://www.w3.org/ns/org#memberOf https://semopenalex.org/institution/I57206974
    https://semopenalex.org/author/A5035759008 http://www.w3.org/ns/org#memberOf https://semopenalex.org/institution/I27837315
    https://semopenalex.org/author/A5035759008 http://www.w3.org/ns/org#memberOf https://semopenalex.org/institution/I36672615
    https://semopenalex.org/author/A5035759008 https://dbpedia.org/ontology/orcidId https://orcid.org/0000-0001-5028-5161
  3. This fetches the data of the 3 orgs of this first author:
    construct {?org ?p ?o} where {
    {select ?x {[] dct:creator ?x} limit 1}
    {service <https://semopenalex.org/sparql> {
      ?x org:memberOf ?org.
      ?org ?p ?o
    }}
    }
    Again there's a plethora of info: subject predicate object
    https://semopenalex.org/institution/I57206974 http://www.w3.org/1999/02/22-rdf-syntax-ns#type https://semopenalex.org/ontology/Institution
    https://semopenalex.org/institution/I57206974 http://www.w3.org/2002/07/owl#sameAs https://makg.org/entity/57206974
    https://semopenalex.org/institution/I57206974 http://www.w3.org/2002/07/owl#sameAs https://www.wikidata.org/wiki/Q49210
    https://semopenalex.org/institution/I57206974 http://purl.org/dc/terms/created 2016-06-24
    https://semopenalex.org/institution/I57206974 http://purl.org/dc/terms/modified 2024-05-30
    https://semopenalex.org/institution/I57206974 http://www.w3.org/2000/01/rdf-schema#seeAlso https://en.wikipedia.org/wiki/New%20York%20University
    https://semopenalex.org/institution/I57206974 https://semopenalex.org/ontology/citedByCount 8616587
    https://semopenalex.org/institution/I57206974 https://semopenalex.org/ontology/worksCount 229236
    https://semopenalex.org/institution/I57206974 https://semopenalex.org/ontology/countsByYear https://semopenalex.org/countsByYear/I57206974Y2012
    https://semopenalex.org/institution/I57206974 https://semopenalex.org/ontology/countsByYear https://semopenalex.org/countsByYear/I57206974Y2013
    https://semopenalex.org/institution/I57206974 https://semopenalex.org/ontology/countsByYear https://semopenalex.org/countsByYear/I57206974Y2014
    https://semopenalex.org/institution/I57206974 https://semopenalex.org/ontology/countsByYear https://semopenalex.org/countsByYear/I57206974Y2015
    https://semopenalex.org/institution/I57206974 https://semopenalex.org/ontology/countsByYear https://semopenalex.org/countsByYear/I57206974Y2016
    https://semopenalex.org/institution/I57206974 https://semopenalex.org/ontology/countsByYear https://semopenalex.org/countsByYear/I57206974Y2017
    https://semopenalex.org/institution/I57206974 https://semopenalex.org/ontology/countsByYear https://semopenalex.org/countsByYear/I57206974Y2018
    https://semopenalex.org/institution/I57206974 https://semopenalex.org/ontology/countsByYear https://semopenalex.org/countsByYear/I57206974Y2019
    https://semopenalex.org/institution/I57206974 https://semopenalex.org/ontology/countsByYear https://semopenalex.org/countsByYear/I57206974Y2020
    https://semopenalex.org/institution/I57206974 https://semopenalex.org/ontology/countsByYear https://semopenalex.org/countsByYear/I57206974Y2021
    https://semopenalex.org/institution/I57206974 https://semopenalex.org/ontology/countsByYear https://semopenalex.org/countsByYear/I57206974Y2022
    https://semopenalex.org/institution/I57206974 https://semopenalex.org/ontology/countsByYear https://semopenalex.org/countsByYear/I57206974Y2023
    https://semopenalex.org/institution/I57206974 https://semopenalex.org/ontology/countsByYear https://semopenalex.org/countsByYear/I57206974Y2024
    https://semopenalex.org/institution/I57206974 https://semopenalex.org/ontology/magId 57206974
    https://semopenalex.org/institution/I57206974 https://dbpedia.org/property/countryCode US
    https://semopenalex.org/institution/I57206974 http://xmlns.com/foaf/0.1/name New York University
    https://semopenalex.org/institution/I57206974 https://semopenalex.org/ontology/ror https://ror.org/0190ak572
    https://semopenalex.org/institution/I57206974 https://dbpedia.org/ontology/alternativeName Universidad de Nueva York
    https://semopenalex.org/institution/I57206974 https://dbpedia.org/ontology/alternativeName Université de New York
    https://semopenalex.org/institution/I57206974 http://xmlns.com/foaf/0.1/depiction https://commons.wikimedia.org/w/index.php?title=Special:Redirect/file/Nyu%20short%20color.svg
    https://semopenalex.org/institution/I57206974 http://xmlns.com/foaf/0.1/homepage http://www.nyu.edu/
    https://semopenalex.org/institution/I57206974 https://dbpedia.org/ontology/location https://semopenalex.org/geo/I57206974
    https://semopenalex.org/institution/I57206974 https://dbpedia.org/property/acronym NYU
    https://semopenalex.org/institution/I57206974 https://semopenalex.org/ontology/grid grid.137628.9
    https://semopenalex.org/institution/I57206974 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/institution/I57206974 https://semopenalex.org/ontology/rorType education
    https://semopenalex.org/institution/I57206974 https://semopenalex.org/ontology/hasChildInstitution https://semopenalex.org/institution/I258800397
    https://semopenalex.org/institution/I57206974 https://semopenalex.org/ontology/hasChildInstitution https://semopenalex.org/institution/I120250893
    https://semopenalex.org/institution/I57206974 https://semopenalex.org/ontology/hasChildInstitution https://semopenalex.org/institution/I36672615
    https://semopenalex.org/institution/I57206974 https://semopenalex.org/ontology/hasChildInstitution https://semopenalex.org/institution/I2799442855
    https://semopenalex.org/institution/I57206974 https://semopenalex.org/ontology/hasChildInstitution https://semopenalex.org/institution/I4210123063
    https://semopenalex.org/institution/I57206974 https://semopenalex.org/ontology/hasChildInstitution https://semopenalex.org/institution/I4210165353
    https://semopenalex.org/institution/I57206974 https://semopenalex.org/ontology/hasAssociatedInstitution https://semopenalex.org/institution/I4210086933
    https://semopenalex.org/institution/I57206974 https://semopenalex.org/ontology/hasAssociatedInstitution https://semopenalex.org/institution/I2802707398
    https://semopenalex.org/institution/I57206974 https://semopenalex.org/ontology/hasAssociatedInstitution https://semopenalex.org/institution/I2800015068
    https://semopenalex.org/institution/I57206974 https://semopenalex.org/ontology/hasAssociatedInstitution https://semopenalex.org/institution/I4210108985
    https://semopenalex.org/institution/I57206974 https://semopenalex.org/ontology/hasAssociatedInstitution https://semopenalex.org/institution/I4210163050
    https://semopenalex.org/institution/I57206974 https://semopenalex.org/ontology/hasAssociatedInstitution https://semopenalex.org/institution/I4210160702
    https://semopenalex.org/institution/I57206974 https://semopenalex.org/ontology/hasAssociatedInstitution https://semopenalex.org/institution/I42102869
    https://semopenalex.org/institution/I27837315 http://www.w3.org/1999/02/22-rdf-syntax-ns#type https://semopenalex.org/ontology/Institution
    https://semopenalex.org/institution/I27837315 http://www.w3.org/2002/07/owl#sameAs https://makg.org/entity/27837315
    https://semopenalex.org/institution/I27837315 http://www.w3.org/2002/07/owl#sameAs https://www.wikidata.org/wiki/Q230492
    https://semopenalex.org/institution/I27837315 http://purl.org/dc/terms/created 2016-06-24
    https://semopenalex.org/institution/I27837315 http://purl.org/dc/terms/modified 2024-05-29
    https://semopenalex.org/institution/I27837315 http://www.w3.org/2000/01/rdf-schema#seeAlso https://en.wikipedia.org/wiki/University%20of%20Michigan
    https://semopenalex.org/institution/I27837315 https://semopenalex.org/ontology/citedByCount 17535410
    https://semopenalex.org/institution/I27837315 https://semopenalex.org/ontology/worksCount 885687
    https://semopenalex.org/institution/I27837315 https://semopenalex.org/ontology/countsByYear https://semopenalex.org/countsByYear/I27837315Y2012
    https://semopenalex.org/institution/I27837315 https://semopenalex.org/ontology/countsByYear https://semopenalex.org/countsByYear/I27837315Y2013
    https://semopenalex.org/institution/I27837315 https://semopenalex.org/ontology/countsByYear https://semopenalex.org/countsByYear/I27837315Y2014
    https://semopenalex.org/institution/I27837315 https://semopenalex.org/ontology/countsByYear https://semopenalex.org/countsByYear/I27837315Y2015
    https://semopenalex.org/institution/I27837315 https://semopenalex.org/ontology/countsByYear https://semopenalex.org/countsByYear/I27837315Y2016
    https://semopenalex.org/institution/I27837315 https://semopenalex.org/ontology/countsByYear https://semopenalex.org/countsByYear/I27837315Y2017
    https://semopenalex.org/institution/I27837315 https://semopenalex.org/ontology/countsByYear https://semopenalex.org/countsByYear/I27837315Y2018
    https://semopenalex.org/institution/I27837315 https://semopenalex.org/ontology/countsByYear https://semopenalex.org/countsByYear/I27837315Y2019
    https://semopenalex.org/institution/I27837315 https://semopenalex.org/ontology/countsByYear https://semopenalex.org/countsByYear/I27837315Y2020
    https://semopenalex.org/institution/I27837315 https://semopenalex.org/ontology/countsByYear https://semopenalex.org/countsByYear/I27837315Y2021
    https://semopenalex.org/institution/I27837315 https://semopenalex.org/ontology/countsByYear https://semopenalex.org/countsByYear/I27837315Y2022
    https://semopenalex.org/institution/I27837315 https://semopenalex.org/ontology/countsByYear https://semopenalex.org/countsByYear/I27837315Y2023
    https://semopenalex.org/institution/I27837315 https://semopenalex.org/ontology/countsByYear https://semopenalex.org/countsByYear/I27837315Y2024
    https://semopenalex.org/institution/I27837315 https://semopenalex.org/ontology/magId 27837315
    https://semopenalex.org/institution/I27837315 https://dbpedia.org/property/countryCode US
    https://semopenalex.org/institution/I27837315 http://xmlns.com/foaf/0.1/name University of Michigan–Ann Arbor
    https://semopenalex.org/institution/I27837315 https://semopenalex.org/ontology/ror https://ror.org/00jmfr291
    https://semopenalex.org/institution/I27837315 https://dbpedia.org/ontology/alternativeName University of Michigan
    https://semopenalex.org/institution/I27837315 https://dbpedia.org/ontology/alternativeName UMich
    https://semopenalex.org/institution/I27837315 https://dbpedia.org/ontology/alternativeName Université du Michigan
    https://semopenalex.org/institution/I27837315 http://xmlns.com/foaf/0.1/depiction https://commons.wikimedia.org/w/index.php?title=Special:Redirect/file/University%20of%20Michigan%20logo.svg
    https://semopenalex.org/institution/I27837315 http://xmlns.com/foaf/0.1/homepage https://www.umich.edu
    https://semopenalex.org/institution/I27837315 https://dbpedia.org/ontology/location https://semopenalex.org/geo/I27837315
    https://semopenalex.org/institution/I27837315 https://dbpedia.org/property/acronym UM
    https://semopenalex.org/institution/I27837315 https://semopenalex.org/ontology/grid grid.214458.e
    https://semopenalex.org/institution/I27837315 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/institution/I27837315 https://semopenalex.org/ontology/rorType education
    https://semopenalex.org/institution/I27837315 https://semopenalex.org/ontology/hasChildInstitution https://semopenalex.org/institution/I4210163254
    https://semopenalex.org/institution/I27837315 https://semopenalex.org/ontology/hasChildInstitution https://semopenalex.org/institution/I4210104572
    https://semopenalex.org/institution/I27837315 https://semopenalex.org/ontology/hasChildInstitution https://semopenalex.org/institution/I4210130704
    https://semopenalex.org/institution/I27837315 https://semopenalex.org/ontology/hasChildInstitution https://semopenalex.org/institution/I4210092198
    https://semopenalex.org/institution/I27837315 https://semopenalex.org/ontology/hasAssociatedInstitution https://semopenalex.org/institution/I2801799315
    https://semopenalex.org/institution/I27837315 https://semopenalex.org/ontology/hasAssociatedInstitution https://semopenalex.org/institution/I4210114445
    https://semopenalex.org/institution/I36672615 http://www.w3.org/1999/02/22-rdf-syntax-ns#type https://semopenalex.org/ontology/Institution
    https://semopenalex.org/institution/I36672615 http://www.w3.org/2002/07/owl#sameAs https://makg.org/entity/36672615
    https://semopenalex.org/institution/I36672615 http://www.w3.org/2002/07/owl#sameAs https://www.wikidata.org/wiki/Q946028
    https://semopenalex.org/institution/I36672615 http://purl.org/dc/terms/created 2016-06-24
    https://semopenalex.org/institution/I36672615 http://purl.org/dc/terms/modified 2024-05-30
    https://semopenalex.org/institution/I36672615 http://www.w3.org/2000/01/rdf-schema#seeAlso https://en.wikipedia.org/wiki/Courant%20Institute%20of%20Mathematical%20Sciences
    https://semopenalex.org/institution/I36672615 https://semopenalex.org/ontology/citedByCount 723289
    https://semopenalex.org/institution/I36672615 https://semopenalex.org/ontology/worksCount 14169
    https://semopenalex.org/institution/I36672615 https://semopenalex.org/ontology/countsByYear https://semopenalex.org/countsByYear/I36672615Y2012
    https://semopenalex.org/institution/I36672615 https://semopenalex.org/ontology/countsByYear https://semopenalex.org/countsByYear/I36672615Y2013
    https://semopenalex.org/institution/I36672615 https://semopenalex.org/ontology/countsByYear https://semopenalex.org/countsByYear/I36672615Y2014
    https://semopenalex.org/institution/I36672615 https://semopenalex.org/ontology/countsByYear https://semopenalex.org/countsByYear/I36672615Y2015
    https://semopenalex.org/institution/I36672615 https://semopenalex.org/ontology/countsByYear https://semopenalex.org/countsByYear/I36672615Y2016
    https://semopenalex.org/institution/I36672615 https://semopenalex.org/ontology/countsByYear https://semopenalex.org/countsByYear/I36672615Y2017
    https://semopenalex.org/institution/I36672615 https://semopenalex.org/ontology/countsByYear https://semopenalex.org/countsByYear/I36672615Y2018
    https://semopenalex.org/institution/I36672615 https://semopenalex.org/ontology/countsByYear https://semopenalex.org/countsByYear/I36672615Y2019
    https://semopenalex.org/institution/I36672615 https://semopenalex.org/ontology/countsByYear https://semopenalex.org/countsByYear/I36672615Y2020
    https://semopenalex.org/institution/I36672615 https://semopenalex.org/ontology/countsByYear https://semopenalex.org/countsByYear/I36672615Y2021
    https://semopenalex.org/institution/I36672615 https://semopenalex.org/ontology/countsByYear https://semopenalex.org/countsByYear/I36672615Y2022
    https://semopenalex.org/institution/I36672615 https://semopenalex.org/ontology/countsByYear https://semopenalex.org/countsByYear/I36672615Y2023
    https://semopenalex.org/institution/I36672615 https://semopenalex.org/ontology/countsByYear https://semopenalex.org/countsByYear/I36672615Y2024
    https://semopenalex.org/institution/I36672615 https://semopenalex.org/ontology/magId 36672615
    https://semopenalex.org/institution/I36672615 https://dbpedia.org/property/countryCode US
    https://semopenalex.org/institution/I36672615 http://xmlns.com/foaf/0.1/name Courant Institute of Mathematical Sciences
    https://semopenalex.org/institution/I36672615 https://semopenalex.org/ontology/ror https://ror.org/037tm7f56
    https://semopenalex.org/institution/I36672615 http://xmlns.com/foaf/0.1/depiction https://commons.wikimedia.org/w/index.php?title=Special:Redirect/file/WarrenWeaverHall.JPG
    https://semopenalex.org/institution/I36672615 http://xmlns.com/foaf/0.1/homepage http://www.cims.nyu.edu/
    https://semopenalex.org/institution/I36672615 https://dbpedia.org/ontology/location https://semopenalex.org/geo/I36672615
    https://semopenalex.org/institution/I36672615 https://dbpedia.org/property/acronym CIMS
    https://semopenalex.org/institution/I36672615 https://semopenalex.org/ontology/grid grid.482020.c
    https://semopenalex.org/institution/I36672615 https://semopenalex.org/ontology/imageThumbnail https://commons.wikimedia.org/w/index.php?title=Special:Redirect/file/WarrenWeaverHall.JPG&width=300
    https://semopenalex.org/institution/I36672615 https://semopenalex.org/ontology/rorType education
    https://semopenalex.org/institution/I36672615 https://semopenalex.org/ontology/hasParentInstitution https://semopenalex.org/institution/I57206974
VladimirAlexiev commented 3 days ago

LPWC and SemOpenAlex are both hosted in GraphDB, and the dumps are available. So if one loads both into the same GraphDB, one can use Internal Federation to query across the two repos much faster. (One could also load them to the same repo, but for data management purposes it's better to keep them separate).

davidlamprecht commented 4 hours ago

hi @VladimirAlexiev , We have already loaded SemOpenALex and LPWC into the same GraphDB in two different Repositories.