User:AGutman-WMF/Template Examples

From Meta, a Wikimedia project coordination wiki

This page lists various example uses of the template realization module. See also the work-in-progress page .

Rendering of Templates[edit]

English[edit]

{{#invoke:Sandbox/AbstractWikipedia|render|{nummod:Cardinal(num)} {root:Lexeme(noun)}|en|num=5|noun=L7}}

5 cats

{{#invoke:Sandbox/AbstractWikipedia|render|{nummod:Cardinal(num)} {root:Lexeme(noun)}|en|num=1|noun=L1122}}

1 dog

Use of subtemplate which is a function[edit]

{{#invoke:Sandbox/AbstractWikipedia|render|There {root:L1883} {subj:QuantifiedNoun(num,noun)}|en|num=9|noun=L7}}

There are 9 cats

{{#invoke:Sandbox/AbstractWikipedia|render|There {root:L1883} {subj:QuantifiedNoun(num,noun)}|en|num=1|noun=L7}}

There is 1 cat

{{#invoke:Sandbox/AbstractWikipedia|render|There {root:Lexeme(L1883,Q442485)} {subj:QuantifiedNoun(num,noun)}|en|num=1|noun=L7}}

There was 1 cat

Use of an ad-hoc subtemplate[edit]

{{#invoke:Sandbox/AbstractWikipedia|render|There {root: Lexeme(L1883 , Q442485) } {subj:QuantifiedNoun(num,noun)}|en|num=2|noun=beautiful {L7} }}

There were 2 beautiful cats

French[edit]

{{#invoke:Sandbox/AbstractWikipedia|render|{det:L2770} {root:QuantifiedNoun(num,noun)}|fr|num=2|noun={amod:L7026} {root:L25730} }}

Les 2 belles chattes

German[edit]

{{#invoke:Sandbox/AbstractWikipedia|render|{subj:Person(person)} {root:"ist"} {det<acomp:L409194} {acomp:GenderedLexeme(L407321,L44756)}.|de|person=Q108817971}}

Maria Keet ist eine Professorin.

{{#invoke:Sandbox/AbstractWikipedia|render|{subj:Person(person)} {root:"ist"} {det<acomp:L409194} {acomp:GenderedLexeme(L407321,L44756)}.|de|person=Q102257069}}

Aarne Ranta ist ein Professor.

Hebrew[edit]

{{#invoke:Sandbox/AbstractWikipedia|render|{subj:Person(person)} {root:Copula()} {acomp:GenderedLexeme(L79674,L214019)} {amod<acomp:Demonym(Q174193)}.|he|person=Q7259}}

עדה לאבלייס הייתה מתמטיקאית בריטית.

{{#invoke:Sandbox/AbstractWikipedia|render|{subj:Person(person)} {root:Copula()} {acomp:GenderedLexeme(L79674,L214019)} {amod<acomp:Demonym(Q174193)}.|he|person=Q935}}

אייזק ניוטון היה מתמטיקאי בריטי.

Rendering of Wikidata Content[edit]

Another mode of operation of the template realizer is to fetch data from Wikidata for an item, create an ad-hoc Abstract Content container, and then realize it using pre-defined templates for that type of Abstract Content. This is intended to simulate an end-to-end article generation system, similar to what is discussed in a previous Abstract Wikipedia newsletter. Currently it can is only done for items of people, generating (for the time being), a single sentence for each:

{{#invoke:Sandbox/AbstractWikipedia|content|Q937|en}}

Albert Einstein was a German physicist. He was born 14 March 1879 in Ulm and died 18 April 1955 in Princeton.

{{#invoke:Sandbox/AbstractWikipedia|content|Q937|he}}

אלברט איינשטיין היה פיזיקאי גרמני. הוא נולד ב-14 במרץ 1879 באולם ומת ב-18 באפריל 1955 בפרינסטון.

Rendering of curated Abstract Content[edit]

The Abstract Content module allows you to manually curate abstract content for specific Q-ids. Here's an example of its use:

{{#invoke:Sandbox/AbstractWikipedia|content|Q7186|en}}

Marie Curie was a Polish chemist and physicist. She was born 7 November 1867 in Warsaw and died 4 July 1934 in Passy. Marie Curie was a pioneer in the research of radioactivity. She researched radium. She was awarded the Nobel Prize in Physics in 1903, together with Pierre Curie and Henri Becquerel, for pioneering the research of radioactivity. She was awarded the Nobel Prize in Chemistry in 1911, for the discovery of polonium and radium. Marie Curie was the first woman to win the Nobel Prize.

{{#invoke:Sandbox/AbstractWikipedia|content|Q7186|he}}

מארי קירי הייתה כימאית ופיזיקאית פולני. היא נולדה ב-7 בנובמבר 1867 בוורשה ומתה ב-4 ביולי 1934 בפאסי (סבואה עילית). מארי קירי הייתה חלוצה בחקר הרדיואקטיביות. היא חקרה רדיום. היא זכתה בפרס נובל לפיזיקה ב-1903, יחד עם פייר קירי ואנרי בקרל, על חלוציות בחקר הרדיואקטיביות. היא זכתה בפרס נובל לכימיה ב-1911, על גילוי הפולוניום והרדיום. מארי קירי הייתה האישה הראשונה שזכתה בפרס נובל.