Module:RQ:pi:Singthon

From Wiktionary, the free dictionary
Jump to navigation Jump to search

This module is a data module providing a catalogue of passages from one particular book or article for each passage to demonstrate the existence of multiple Pali words. The modules returns a 3-D array (technically a Lua table), indexed as follows:

  1. The outer index is the page number.
  2. The second index is a character string serving as the name of the passage within the page - using the first word is the simplest scheme.
  3. The third index is an element number - the text (item 1), its transliteration (item 2) (optional) and its translation (item 3).

The table has one named element, "reference", that holds the name of the template (namely, {{RQ:pi:Singthon}}) used to identify the source to the reader and format the quote, its transliteration and its translation.

The intention is that the word will be highlighted when selected by these three indices. Words are assigned positive numbers and their boundaries are marked up in the form {number-word}. This mark up can be nested, so that words may contain other words. Different sections may have the same number; this allows for repeated words, overlapping words, and discontiguous translations.

The words are transcluded into a page using an invocation of the form {{RQ:pi:Singthon quote|5|itipi|25}}; this example produces the text:

2011, พระอาจารย์ ดร.สิงห์ทน นราสโภ, บทสวดมนต์ แปล ดุริยมนตรา [Chanting book with translations]‎[1] (overall work in Thai), Bangkok: Sahadhamick, page 5:
อิติปิ โส ภะคะวา อะระหัง สัมมาสัมพุทโธ วิจจา
จะระณะ สัมปันโน สุคะโต โลกะวิทู อะนุตตะโร ปุริสะทัม-
มะสาระถิ สัทถา เทวะมะนุสสานัง พุทโธ ภะคะวาติ ฯ
itipi so bhaɡavā arahaṃ sammāsambuddho vijjā caraṇa sampanno sugato lokavidū anuttaro purisadammasārathi satthā devamanussānaṃ buddho bhagavāti.
Surely, he is a blessed one, an arahat, correctly and completely enlightened, endowed with knowledge and good behaviour, faring well, knowing the universe, an unequalled driver of men who need taming, teacher of gods and men, a buddha, the Blessed One.

There is no advantage in including a passage for the sake of one word; one can use {{RQ:pi:Singthon}} directly for that purpose.


data = {}
data.reference = "RQ:pi:Singthon"

data[5] = {
	itipi = {
		"{1-อิติปิ} {2-โส} {24-{3-ภะคะวา} {4-อะระหัง} {5-สัมมา}{6-สัมพุทโธ}} {7-วิจจา}<br/>"..
		"{8-จะระณะ} {9-สัมปันโน} {10-สุคะโต} {25-{11-โลกะ}{12-วิทู}} {23-{13-อะนุตตะโร} {14-ปุริสะ}{15-ทัม-}<br/>"..
		"{15-มะ}{16-สาระถิ}} {17-สัทถา} {18-เทวะ}{19-มะนุสสานัง} {20-พุทโธ} {3-ภะคะวา}{22-ติ} ฯ",
-- cf. data[24].itipi of Module:RQ:pi:Phaya Luang Maha Sena.  Apart from spacing, duplicates
-- Module:RQ:pi;Thai chant book.
		"{1-itipi} {2-so} {24-{3-bhaɡavā} {4-arahaṃ} {5-sammā}{6-sambuddho}} {7-vijjā} {8-caraṇa} {9-sampanno} {10-sugato} {25-{11-loka}{12-vidū}} {23-{13-anuttaro} {14-purisa}{15-damma}{16-sārathi}} {17-satthā} {18-deva}{19-manussānaṃ} {20-buddho} {3-bhagavā}{22-ti}.",
		"{1-Surely}, {2-he} is a {24-{3-blessed one}, an {4-arahat}, {5-correctly} and {6-completely enlightened}}, {9-endowed with} {7-knowledge} and {8-good behaviour}, {10-faring well},  {25-{12-knowing} the {11-universe}}, an {13-unequalled} {16-driver} of {14-men} {15-who need taming}, {17-teacher} {19-of} {18-gods} and {19-men}, a {20-buddha}, {3-the Blessed One}."
	},

	svakkhato = {
		"{1-สวากขาโต} {2-ภะคะวะตา} {3-ธัมโม} {4-สันทิฎฐิโก} {5-{6-อะ}{7-กาลิโก}}<br/>"..
		"{8-เอหิปัสสิโก} {9-โอปะนะยิโก} {10-ปัจจัตตัง} {11-เวทิตัพโพ} {12-วิญญูหี}{13-{14-ติ}}",
-- Almost as data[26].svakkhato.
		"{1-svākkhāto} {2-bhaɡavatā} {3-dhammo} {4-sandiṭṭhiko} {5-{6-a}{7-kāliko}} {8-ehipassiko} {9-opanayiko} {10-paccattaṃ} {11-veditabbo} {12-viññūh}{13-{12-ī}{14-ti}}.",
		"{3-The dhamma} {1-has been expounded well} {2-by the Exalted One}, it {13-{14-is}} {4-not esoteric}, it is {5-{6-not} {7-timebound}}, it is {8-open to all}, {9-leading to nirvana}, it {11-should be known} {12-by the wise} {10-individually}."
	},
}
data[6] = {
	supatipanno = {
		"{1-{2-สุ}{3-ปะฎืปันโน}} {4-ภะคะวะโต} {31-{5-สาวะกะ}{6-สังโฆ}} {7-อุชุ}{3-ปะฎิปันโน}<br/>"..
		"{4-ภะคะวะโต} {31-{5-สาวะกะ}{6-สังโฆ}} {8-{9-ญายะ}{3-ปะฎิปันโน}} {4-ภะคะวะโค}<br/>"..
		"{31-{5-สาวะกะ}{6-สังโฆ}} {10-{11-สามีจิ}{3-ปะฎิปันโน}} {4-ภะคะวะโต} {31-{33-{5-สาวะกะ}{6-{32-สังโฆ}}}}<br/>"..
		"{12-{13-ยะ{14-ทิ}}{14-ทัง}} {15-จัตตาริ} {16-{17-ปุริสะ}{18-ยุคานิ}} {19-อัฎฐะ} {20-ปุริสะปุคคะลา} {21-เอสะ}<br/>"..
		"{4-ภะคะวะโต} {31-{5-สาวะกะ}{6-สังโฆ}} {22-อาหุเนยโย} {23-ปาหุเนยโย} {24-ทักขิ-<br/>"..
		"เณยโย} {25-{34-อัญชะลิ}{35-กะระณีโย}} {26-อะนุตตะรัง} {27-ปุญญั}{28-กเขตตัง}<br/>"..
		"{29-โลกัสส{30-า}}{30-ติ} ฯ",
-- Differs from Lao example in several minor points.
		"{1-{2-su}{3-paṭipanno}} {4-bhagavato} {31-{5-sāvaka}{6-saṅgho}}<br/>" ..
			"{7-uju}{3-paṭipanno} {4-bhagavato} {31-{5-sāvaka}{6-saṅgho}} " ..
			"{8-{9-ñāya}<br/>{3-paṭipanno}} {4-bhagavato} {31-{5-sāvaka}{6-saṅgho}} " ..
			"{10-{11-sāmīci}{3-paṭi<br/>panno}} {4-bhagavato} {31-{33-{5-sāvaka}{6-{32-saṅgho}}}} "..
			"{12-{13-yad}{14-idaṃ}} {15-cattāri}<br/>{16-{17-purisa}{18-yugāni}} " ..
			"{19-aṭṭha}{20-purisapuggalā} {21-esa} {4-bhagavato}<br/>{31-{5-sāvaka}{6-saṅgho}} "..
			"{22-āhuneyyo} {23-pāhuneyyo} {24-dakkhiṇeyyo}<br/>" ..
			"{25-{34-añjali}{35-karaṇīyo}} {26-anuttaraṃ} {27-puñña}{28-kkhettaṃ}<br/>"..
			"{29-lokass{30-ā}}{30-ti}.",
		"{6-The assembly} {4-of the Fortunate One's} {5-disciples} is "..
			"{1-{3-followinɡ the} {2-right} {3-way}}. {6-The assembly} "..
			"{4-of the Fortunate One's} {5-disciples} is {3-followinɡ the} "..
			"{7-straight} {3-way}. {6-The assembly} {4-of the Fortunate One's} "..
			"{5-disciples} is {8-{3-followinɡ the} {9-right} {3-way}}. "..
			"{32-The assembly} {4-of the Fortunate One's} {5-disciples} is "..
			"{10-{3-followinɡ the} {11-proper} {3-way}} {12-{13-which} is "..
			"{14-this}}, {16-the} {15-four} {16-{18-pairs} {17-of persons}}, "..
			"the {19-eight} {20-types of individuals} {21-this} {6-assembly} "..
			"{4-of the Fortunate One's} {5-disciples} is {22-worthy of gifts}, "..
			"{23-worthy of hospitality}, {24-worthy of offerings}, "..
			"{25-{35-worthy of} {34-reverential salut}{35-ation}}, the {26-unsurpassed} "..
			"{28-field} {27-of merit} {29-for the world}."
	}
}

data[142] = {
	bhummanam = {
		"{1-ภุมมานัง} {2-เทวานัง} {3-สัททัง} {4-สุตวา}<br/>{5-จาตุมมะหาราชิกา} {2-เทวา} {3-สัททะม}{7-ะนุสสาเวสุง} {8-ฯ}",
		"{1-bhummānaṃ} {2-devānaṃ} {3-saddaṃ} {4-sutvā} "..
			"{5-cātummahārājikā} {2-devā} {3-saddam}{7-anussāvesuṃ} {8-pe}.",
		"{4-Having heard} {3-the word} {1-of the terrestrial} {2-gods}, {2-the gods} "..
			"{5-in the service of the [[w:Four Heavenly Kings|Four Heavenly Kings]]} {7-proclaimed} "..
			"{3-the word} {8-…}<br/>"..
			"(The ellipsis refers to the text of the proclamation.)"
	},
}


return data