Wikibase/Wikibase.cloud/FAQ

Configuration

edit

How do I map entities from my Wikibase to Wikidata entities?

edit
  1. As an instance manager, go to your Dashboard.
  2. Click the ⚙️ icon next to your instance.
  3. Go to the Features tab.
  4. Use the mapping tables there to map entities in your Wikibase to entities on Wikidata.

How can I make external identifiers clickable?

edit

First, set up a formatter URL property

  1. Create a property of data type String that will serve as your formatter URL property.
     
  2. Map this property to the Wikidata property P1630.
     

Then, set up an external identifier property for a specific source

  1. Create a property of data type External Identifier that you will use to generate URLs to an external web resource.
  2. To this property, add a statement with the formatter URL property you just created. The value must contain a template for the URL: write $1 where the external identifier is supposed to go.
     

Finally, use the external identifier in a statement

  1. Use the external identifier property you just created in a statement for a Wikibase entity.
  2. The value of the statement will replace $1 in the template to generate a clickable URL pointing to the external resource.
     

How do I change the order of statements on an entity page?

edit

By default, sites that use structured data from Wikibase display those statements in the order in which they were added: the first statement added to the entity appears at the top, and the last statement added appears at the bottom.

On Wikibase Cloud instances, the only way to change the default order of properties is to edit the Wikibase-SortedProperties page. This action is only available to Administrators.

Data modeling

edit

How can I create Lexemes?

edit

First, make sure that Lexemes are enabled on your instance

  1. As an instance manager, go to your Dashboard.
  2. Click the ⚙️ icon next to your instance.
  3. Go to the Features tab.
  4. Make sure that Lexemes are enabled in the Lexeme section.

Create a language code property

  1. Create a property of data type External Identifier for specifying language codes.
  2. Map this property to the Wikidata property P218.

Then, create language items

  1. Create an item for a language (for example, English).
  2. Add a statement to it using the language code property you created earlier. Specify a language code as its value (for example, en).
  3. Add any additional languages you need in a similar way.

Also, create a lexical category

Create any item for the concept describing a lexical category, for example, noun.

Finally, create a Lexeme

  1. Click New Lexeme in the side bar.
  2. When you fill out the form, the languages you created should be available in the Lexeme's language dropdown.
  3. You can specify any relevant item from your Wikibase as lexical category.
     

Tools

edit

How can I add examples to the Query Service interface?

edit

Edit the Project:SPARQL/examples page on your instance by adding your own example.

Let the template of the page source below guide you.

== Example category ==
=== Example name ===
<sparql tryit="1">
SELECT (COUNT(DISTINCT ?item) AS ?count)
WHERE {
  ?item ?predicate ?object .
  FILTER REGEX(STR(?item), "^.*/entity/Q[0-9]+$")
}

</sparql>

This example will show up in Query Service examples like this: