AD Research Wiki
  • Comments
  • Immutable Page
  • Menu
    • Navigation
    • RecentChanges
    • FindPage
    • Local Site Map
    • Help
    • HelpContents
    • HelpOnMoinWikiSyntax
    • Display
    • Attachments
    • Info
    • Raw Text
    • Print View
    • Edit
    • Load
    • Save
  • Login

FrontPage

Upload page content

You can upload content for the page named below. If you change the page name, you can also upload content for another page. If the page name is empty, we derive the page name from the file name.

File to load page content from
Page name
Comment

Revision 1 as of 2018-04-21 21:13:54
AD Research Wiki:
  • HowTos
  • WikidataCheatSheet

Wikidata: various explanations

Obtaining names for entities and predicates

The [[https://query.wikidata.org|Wikidata Query Service (WDQS)] has an automatic mechanism for obtaining the single best name for entity variables in the query. It does not work for predicate names, however. The mechanism is invoked by adding this line to the SPARQL query:

SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }

To obtain a single name of an entity "manually" (= without the mechanism above), one can add the following two lines to a query (Q90 is Paris). Note that without the language filter, one gets one name for each languages, for which a name has been specified for that entity in Wikidata (for popular entities, these are usually very many):

wd:Q90 rdfs:label ?label .
FILTER(LANG(?label) = "en") 

To obtain a single name for a predicate, one can write (TODO: the followins is not yet correct, currently working on this paragraph):

SELECT ?p (COUNT(?o) as ?count) WHERE {
  wd:Q90 ?p ?o .
}
GROUP BY ?p
ORDER BY DESC(?count)
LIMIT 100
  • MoinMoin Powered
  • Python Powered
  • GPL licensed
  • Valid HTML 4.01