Module:RQ:pi:Dhtm

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:Dhtm}}) 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:Dhtm quote|36|s62|6}}; this example produces the text:

c. 500 AD, Dhatumañjusa; republished in Dines Andersen & Helmer Smith, The Pāli Dhātupāṭha and the Dhātumañjūsā, Copenhagen: Andr. Fred. Host & son, 1921, page 36:
62. Tara taraṇasmiṃ thara santharaṇe
bhara bharaṇasmiṃ phara sampharaṇe
sara gati-cintā-hiṃsā-sadde
phura calanādo hara haraṇamhi
62. Tar for crossing, thar for spreading, / bhar for supporting, phar for pervasion, / sar for motion, thought, crushing and noise, / phur for shaking, har for taking.

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


data = {}
data.reference = "RQ:pi:Dhtm"
data.lang = 'pi'

-- Authoritative source:
-- https://archive.org/details/palidhatupathadh00andeuoft

data[36] = {
	s62 = {
		"62. {1-Tara} {2-taraṇasmiṃ} {3-thara} {4-santharaṇe}<br/>"..
		"{5-bhara} {6-bharaṇasmiṃ} {7-phara} {8-sampharaṇe}<br/>"..
		"{9-sara} {10-{11-gati}-{12-cintā}-{13-hiṃsā}-{14-sadde}}<br/>" ..
		"{15-phura} {16-calanādo} {17-hara} {18-haraṇamhi}",

		"",

		"62. {1-Tar} {2-for crossing}, {3-thar} {4-for spreading}, / "..
		"{5-bhar} {6-for supporting}, {7-phar} {8-for pervasion}, / "..
		"{9-sar} {10-for {11-motion}, {12-thought}, {13-crushing} and {14-noise}, / "..
		"{15-phur} {16-for shaking}, {17-har} {18-for taking}."
	},
}

data[43] = {
	s103 = {
		"103. Duve pi rā lā ādāne / "..
		"Vā ɡati-bandhanesu pi. / "..
		"Asa dhātu bhuvi khyato / "..
		"si saye sā samattiyaṃ. / / "..
		"* Hū-bhūvādayo luttavikaraṇā.*",

		"",

		"",
	},
}

return data