Wikidata:Wikisource/How to help

Wikidata:Wikisource
Where to find Wikisource sitelinks on a Wikidata item page
How to add Wikisource sitelinks to Wikidata
screenshot of sitelinks highlighted on the English Wikisource page for Homer
screenshot highlighting link to Wikidata item on Wikisource

There are a lot of things you can do to help with integrating Wikisource and Wikidata.

Add sitelinks edit

This can be achieved by adding links for Wikisource pages that correspond to a particular item on Wikidata. For example, Wikidata has one item for Homer, the Ancient Greek epic poet. The Homer item page then links out to the all the Wikisource pages in different languages on Homer (it also links out the Wikipedia and Wikiquote pages on Homer).

Sitelinks can be added in more than 200 languages but you can only add a sitelink for a language if a page for that language version of Wikisource already exists.

When adding a Wikisource sitelink for an item, you will need to input both the language of the Wikisource page and the title of the page as it appears on Wikisource. Wikimedia sitelinks are added to an item page after the Statements section; for Wikisource, add sitelinks under the header "Wikisource pages linked to this item."

Once added to a Wikidata item, sitelinks will appear on the corresponding Wikisource page in the left sidebar menu under "Languages." A link to the Wikidata item will also appear in the left sidebar menu under "Tools."

Authors edit

Because there is a one-to-one relationship between a Wikipedia article about an author and a Wikisource page about the same author, often items will already exist for authors on Wikidata. In these cases, sitelinks for Wikisource page can be easily added to the author items on Wikidata.

Note: sometimes author pages on different Wikisource sites may be found in the main namespace; however, even in such wikis (like German Wikisource) the author pages still follow the same rules. Examples:

Wikidata item: Homer (Q6691)
Wikisource page to add as sitelink: http://en.wikisource.org/wiki/Author:Homer
Wikisource site to add to "Language Code" column: enwikisource
Page title to add to "Linked page" column: Author:Homer

Wikidata item: Homer (Q6691)
Wikisource page to add as sitelink: http://pt.wikisource.org/wiki/Autor:Homero
Wikisource site to add to "Language Code" column: ptwikisource
Page title to add to "Linked page" column: Autor:Homero

You can only add a sitelink for a Wikisource page to one item only on Wikidata. You will see an error message when attempting to add a new sitelink if that link has already been added to another item page. Wikidata also does not support anchors (links to a specific section of a page) as sitelinks—only full pages can be added. These two constraints mean that Wikisource pages for works are not to be added as sitelinks to the author of the work's item page on Wikidata. Instead, these pages should be linked to a completely different item (i.e. an item that is just for the work in question).

Examples:

Wikidata item: Homer (Q6691)
Wikisource page to add as sitelink: http://en.wikisource.org/wiki/Author:Homer#Works wrong

Wikidata item: Homer (Q6691)
Wikisource page to add as sitelink: http://en.wikisource.org/wiki/Odyssey_(Pope) wrong

Wikidata item: The Odyssey (Pope) (Q15628433)
Wikisource page to add as sitelink: http://en.wikisource.org/wiki/Odyssey_(Pope) right

Note: If you receive an error message but believe the item you are editing is the most appropriate one for a sitelink, you may need to merge two items. Please consult Help:Merge or visit Wikidata:Interwiki_conflicts to report a conflict and ask for others to look at the situation.

Works edit

There are four kind of pages associated with works in the main namespace:

  1. table of content pages that are the entry points for texts. These should be added as sitelinks to edition items
    Example: table of content page on Wikisourceedition item on Wikidata (see the section below for the difference between edition and work items)
  2. disambiguation pages that list completely different works with the same title. These should be added as sitelinks to Wikimedia disambiguation page items
    Example: disambiguation page on Wikisourcedisambiguation page item on Wikidata
  3. version pages that lists the different versions of the same work in Wikisource. They should be linked to the work items in Wikidata as they list some/all editions of the given work.
    Example: version page on Wikisourcework item on Wikidata
  4. single pages that contain a full work like a poem, a speech, etc. They should be linked to the related Wikidata items if, and only if, they are considered stand-alone works (i.e. a typical book chapter won't have its own item on Wikidata)
    Example: stand-alone page on Wikisourceitem on Wikidata

Other pages in the main space are disambiguation pages for works that happen to have the same title but have nothing else in common or pages for collections of works.

Use data edit

For Wikisource pages that have been linked to Wikidata, it's possible to access data for the corresponding item directly and use it on the Wikisource page, for example, by adding it to the author and header templates.

This is possible by using the #property parser function and requires that you know the property of a data statement. As discussed above, statements provide facts and informations about items like the data of birth of an author and or the date of publication of a work.

 
Diagram of a Wikidata statement

In order to fully express all the knowledge of the projects that are part of Wikimedia family, statements are composed of a series of elements including properties, qualifiers, sources, and so on. For the purpose of using the #property parser function, it is only necessary to know the property of a given statement of an item.

Properties can be accessed by the name of the property or by the property number. For example:

  • {{#property:genre}} or {{#property:P136}} will return the "genre" value.
  • {{#property:date of birth}} or {{#property:P569}} will return the date of birth value.

The above is added directly to the wikitext of a Wikisource page.

Wikidata has a list of its properties, to show what can be returned (if the data item contains the property as one of its statements). Wikisource also provides an overview of properties specifically relevant to authors and works.

Modules edit

Data can also be accessed with Lua modules, which are much more flexible. For more information on using modules, please see w:Module:Wikidata#Usage.

Improve data edit

You can help grow the data for Wikisource pages on Wikidata by adding new statements.

Authors edit

Wikisource maintains a page of important properties that should be added to all author items, including date of birth (P569), country of citizenship (P27), occupation (P106), native language (P103), and VIAF ID (P214).

Works edit

Works on Wikidata are futher split into two types of items:

  • Work items: for the work in general, e.g. The Odyssey
  • Edition items: for each specific version or edition, e.g. The Odyssey (Pope); The Odyssey of Homer (Cowper)

This distinction is further explained at Help:Sources and covered in Wikisource's documentation for Wikidata. The Wikisource page also includes important properties that should be added to work and edition items, including instance of (P31), author (P50), title (P1476), publication date (P577), and language of work or name (P407).

Other pages edit

For all other Wikisource pages that are neither authors or works, but can have items in Wikidata, follow the rules outlined here and here. This includes portal pages, templates, category pages, help pages, and special pages.

Typically, the only statements added to such pages will be "instance of" and "topic of" statements. For example, portals should use instance of→Wikimedia portal and Wikimedia portal's main topic (P1204), while a category page will use instance of→Wikimedia category page and category's main topic (P301).

For more information on different Wikisource pages and namespaces and their treatment on Wikidata, see Wikidata:Wikisource/Development.