Jump to content
Wikimedia Meta-Wiki

Module:Sandbox/AbstractWikipedia/AbstractContent

From Meta, a Wikimedia project coordination wiki
Module documentation

The AbstractContent module contains manually curated abstract content for the use of template-renderer prototype. The abstract content for each Q-id should be a list of instantiated constructors outlining an article about that topic.

Note that for each Constructor (whether it is a top-level constructor, or a sub-constructor embedded within another one), we must specify a _predicate field. This field essentially identifies the type of the constructor, and allows matching it with a language-specific renderer of the same name (e.g. the Person constructor is matched with a Person renderer). One can see the predicate name as the name of a function (being the renderer), and the other fields of the constructor as the arguments of that function.

Currently the constructor fields (with the exception of the _predicate field), as well as the constructor names, are given arbitrary names in English (which should hint at their semantics). A possible more rigorous approach would be to name them using Wikidata property identifiers. For instance, the AwardedPrize constructor could possible be named P166, but it should be kept in mind that there are some important differences between Wikidata properties and constructor fields: The former are intended to convey "pure" data, while the latter are intended to convey linguistically-relevant data.

This data is used by the Constructors module to fetch manually-curated abstract content.


The above documentation is transcluded from Module:Sandbox/AbstractWikipedia/AbstractContent/doc. (edit | history)
Editors can experiment in this module’s sandbox (create | mirror) and testcases (create) pages.
Please add categories to the /doc subpage. Subpages of this module.

 localcontent={}

 -- Marie Curie
 content.Q7186={
 {
 _predicate="Person",-- Introductory information about a person
 person="Q7186",-- Marie Curie
 birth={
 _predicate="Birth",
 date={
 _predicate="Date",
 day="7",
 month="11",
 year="1867",
 },
 place="Q270",-- Warsaw
 },
 death={
 _predicate="Death",
 date={
 _predicate="Date",
 day="4",
 month="7",
 year="1934",
 },
 place="Q388949",
 },
 origin="Q36",-- Poland. Extend this to a list including France
 occupation={
 _predicate="List",
 first="Q593644",-- Chemist
 second="Q169470",-- Physicist
 }
 },
 {
 _predicate="Pioneer",
 person="Q7186",-- Marie Curie
 in_what={
 _predicate="Research",
 research_field="Q11448",-- Radioactivity
 },
 },
 {
 _predicate="Research",
 person="Q7186",-- Marie Curie
 pronominalize=true,-- This should possibly done by a post-processor
 research_field="Q1128",-- Radium
 },
 {
 _predicate="AwardedPrize",
 person="Q7186",-- Marie Curie
 pronominalize=true,
 prize="Q38104",-- Nobel prize in physics
 date={
 _predicate="Date",
 year="1903",
 },
 with={
 _predicate="List",
 first="Q37463",-- Pierre Curie
 second="Q41269",-- Henri Becquerel
 },
 reason={
 _predicate="Pioneer",
 person="Q7186",-- Marie Curie
 in_what={
 _predicate="Research",
 research_field="Q11448",-- Radioactivity
 },
 },
 },
 {
 _predicate="AwardedPrize",
 person="Q7186",-- Marie Curie
 pronominalize=true,
 prize="Q44585",-- Nobel prize in physics
 date={
 _predicate="Date",
 year="1911",
 },
 reason={
 _predicate="Discovery",
 discovery={
 _predicate="List",
 first="Q979",-- Polonium
 second="Q1128"-- Radium

 }
 }
 },
 {
 _predicate="Rank",
 rank=1,
 person="Q7186",
 reference_group="Q467",-- woman
 activity={
 _predicate="AwardedPrize",
 prize="Q7191",-- Nobel Prize
 }
 }
 }

 returncontent

AltStyle によって変換されたページ (->オリジナル) /