Jump to content

Module:RQ:pi:PTS Petavatthu

From Wiktionary, the free dictionary

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:PTS Petavatthu}}) 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:PTS Petavatthu quote|6|tassa|5}}; this example produces the text:

c. 50 BC, Petavatthu; republished in Prof. Minayeff, Petavatthu, London: Pali Text Society, 1888, page 6:
7. Tassā dvemāsiko gabbho lohitañ ñeva pagghari
tad'assā mātā kupitā mayhaṃ ñātī samānayi.
7. When her unborn child was two months old, just blood flowed forth. Then her angry mother brought her kin to me.

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


data = {}
data.reference = 'RQ:pi:PTS Petavatthu'
data[6] = {
	tassa = {
		"7. {1-Tassā} {2-{3-dve}{4-māsiko}} {5-gabbho} {6-lohitañ} {7-ñeva} {8-pagghari} <br/>"..
			"{9-tad'}{10-assā} {11-mātā} {12-kupitā} {13-mayhaṃ} {14-ñātī} {15-samānayi}.",
		"",
		"7. When {1-her} {5-unborn child} was {2-{3-two} {4-months old}}, "..
			"{7-just} {6-blood} {8-flowed forth}. "..
			"{9-Then} {10-her} {12-angry} {11-mother} {15-brought} {14-her kin} {13-to me}."
	},
	sapathan = {
		"8. {1-Sapathañ} {2-ca} {3-maṃ} {4-kāresi} {5-paribhāsāpayi} {2-ca} {3-maṃ} <br/>"..
			"{6-sāhaṃ} {7-ɡhorañ} {2-ca} {1-sapathaṃ} {8-musāvādaṃ} {11-abhāsissaṃ}.",
		"",
		"8. {4-She} {2-both} {4-made} {3-me} {4-swear} {1-an oath} "..
			"{2-and} {5-had} {3-me} {5-reviled}.  "..
			"{2-And} {6-I myself} {11-told} {8-a lie} {1-under that} {7-terrible} {1-oath}."
	},
}

return data