Module:RQ:pi:Sinhala Dhammapada

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). There are three optional items - normalisation, which corrects significant aberrant spelling or significant grammatical errors in the quoted text (item norm), literal translation (item lit), and normalisation of the transliteration (item ts) to bring it into line with Roman script Pali. The changed text is delimited by ⧁⧀ pairs so that it may be flexibly highlighted, and the effects should cascade from normalisation to transliteration to normalised transliteration.

The table has one named element, "reference", that holds the name of the template (namely, {{RQ:pi:Sinhala Dhammapada}}) used to identify the source to the reader and format the quote, its transliteration and its translation. The table structure allows fields lang, p1 and p2 for uninterpreted passage to the reference template to customise its output. This particular module's table uses lang as the language code of the quoted passage andp1 as the Pali name of the section, e.g. Yamakavagga. The field applied to the innermost of the passage, page and table is the value passed on.

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:Sinhala Dhammapada quote|26|akkocchi4|13}}; this example produces the text:

c. 50 BC, The Buddha, Dhammapada(pāḷi), Yamakavagga, page 26; republished in The Eighteenth Book in the Suttanta-Pitaka: Khuddaka-Nikāya[1], Colombo, 2009:
4. අක‍්කොච‍්ඡි මං අවධි මං අජිනි මං අහාසි මෙ 4
යෙ තං න උපනය‍්හන‍්ති වෙරං තෙසූපසම‍්මති.
4. Akkocchi maṃ avadhi maṃ ajini maṃ ahāsi me 4
Ye taṃ na upanayhanti veraṃ tesūpasammati.
He abused me, he struck me, he defeated me, he robbed me.
Hatred subsides in those who do not nurse grudges thus.
(Wiktionary translation adapted from translation of the Pali by Ajahn Sujato.)

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


local data = {}
data.reference = "RQ:pi:Sinhala Dhammapada"
data.lang = 'pi'

data[26] = {
	p1 = 'Yamakavagga',
	akkochi3 = {
		lang = 'pi',
		"3. {1-අක‍්කොච‍්ඡි} {2-{3-මං}} {4-අවධි} {2-{3-මං}} {5-අජිනි} {2-{3-මං}} "..
			"{6-අහාසි} {2-{14-මෙ}}<br/>"..
			"{7-යෙ} {8-තං} {9-උපනය‍්හන‍්ති} {10-වෙරං} {11-තෙසං} {12-න} {13-සම‍්මති}",
		"",
		"{1-He abused} {2-{3-me}}, {4-he struck} {2-{3-me}}, {5-he defeated} "..
			"{2-{3-me}}, {6-he robbed} {2-{14-me}}.<br/>"..
			"{10-Hatred} {13-does} {12-not} {13-subside} {11-for those} {7-who} "..
			"{9-nurse grudges} {8-thus}. "
	},

	akrosan3 = {
		lang = 'sa',
		"3 {1-ආක්‍රොශ{2-න‍්මා}}{2-{4-ම}}{4-වොච{2-න‍්මා}}{5-ම} {5-ජය{2-න‍්මා}}"..
			"{2-{6-ම}}{6-හාපයත්}<br/>"..
			"{8-අත්‍ර} {7-යෙ} {9-උපනහ්‍යන‍්තෙ} {10-වෛරං} {11-තෙෂාං} {12-න} {13-ශාම්‍යති}",
		"3 {1-Ākrośan}{2-mām}{4-avocan}{2-mām}{5-a jayan}{2-mām}"..
			"{6-ahāpayat}<br/>"..
			"{8-Atra} {7-ye} {9-upanahyante} {10-vairaṃ} {11-teṣāṃ} {12-na} {13-śāmyati}.",
		"{1-They abused} {2-me}, {4-they reviled} {2-me}, {5-they defeated} "..
			"{2-me} {13-and plundered} me.<br/>"..
			"{10-Hatred} {13-does} {12-not} {13-subside} {11-for those} "..
			"{7-who} {9-nurse grudges} {8-thus}. "
	},

	akkocchi4 = { -- Only words 11 and 13 are new.
		lang = 'pi',
		"4. {1-අක‍්කොච‍්ඡි} {2-{3-මං}} {4-අවධි} {2-{3-මං}} {5-අජිනි} {2-{3-මං}} "..
			"{6-අහාසි} {2-{14-මෙ}} 4<br/>"..
			"{7-යෙ} {8-තං} {12-න} {9-උපනය‍්හන‍්ති} {10-වෙරං} {11-තෙ{13-සූ}}{13-පසම‍්මති}.",
		"4. {1-Akkocchi} {2-{3-maṃ}} {4-avadhi} {2-{3-maṃ}} {5-ajini} {2-{3-maṃ}} "..
			"{6-ahāsi} {2-{14-me}} 4<br/>"..
			"{7-Ye} {8-taṃ} {12-na} {9-upanayhanti} {10-veraṃ} {11-tes{13-ū}}{13-pasammati}.",
		"{1-He abused} {2-{3-me}}, {4-he struck} {2-{3-me}}, {5-he defeated} "..
			"{2-{3-me}}, {6-he robbed} {2-{4-me}}.<br/>"..
			"{10-Hatred} {13-subsides} {11-in those} {7-who} {9-do} {12-not} "..
			"{9-nurse grudges} {8-thus}. "
	},

	akrosan4 = { -- Only word 13 is new.
		lang = 'sa',
		"4. {1-ආක්‍රොශ{2-න‍්මා}}{4-{2-ම}}{4-වොච{2-න‍්මා}}{2-{5-ම}}{5-ජය{2-න‍්මා}}"..
			"{2-{6-ම}}{6-හාපයත්}<br/>"..
			"{8-අත්‍ර} {7-යෙ} {9-{12-නො}පනහ්‍යන‍්තෙ} {10-වෛරං} {11-තෙෂාං} {13-ප්‍රශාම්‍යති}.",
		"4. {1-Ākrośan}{2-mām}{4-avocan}{2-mām}{5-ajayan}{2-mām}{6-ahāpayat}<br/>"..
			"{8-Atra} {7-ye} {12-n{9-o}}{9-panahyante} {10-vairaṃ} {11-teṣāṃ} {13-praśāmyati}.",
		"{1-They abused} {2-me}, {4-they reviled} {2-me}, {5-they defeated} "..
			"{2-me} {13-and plundered} me.<br/>"..
			"{10-Hatred} {13-subsides} {11-for those} {7-who} {9-do} {12-not} "..
			"{9-nurse grudges} {8-thus}."
	},

	naP = {
		lang='pi',
		"5. {1-න} {2-හි} {3-වෙරෙන} {3-වෙරාචී} {5-සම‍්ම{6-න‍්තී}}{6-ධ} {7-කුදාචනං} 5<br/>"..
			"{8-අඞවරෙන} {9-ච} {5-සම‍්මන‍්ති} {11-එස} {12-ධම‍්මො} {13-සනන‍්තනො}.",
		"5. {1-Na} {2-hi} {3-verena} {3-verāni} {5-sammant{6-ī}}{6-dha} {7-kudācanaṃ} 5<br/>"..
			"{8-Averena} {9-ca} {5-sammanti} {11-esa} {12-dhammo} {13-sanantano}.",
		"5. {2-For} {6-in this world} {3-hatreds} {5-are} {1-not} {7-ever} {5-settled} {3-by hatred},<br/>"..
			"{9-but} {5-are settled} {8-by love}.  {11-This} is {12-an} {13-eternal} {12-truth}.",
		lit = "5. {2-For} {6-in this world} {3-hatreds} {5-are} {1-not} {7-ever} {5-settled} {3-by hatred},<br/>"..
			"{9-but} {5-are settled} {8-by love}.  {11-This} {12-truth} is {13-eternal}."
	},

	naS = {
		lang = 'sa',
		"5. {1-න} {2-හි} {3-වෛරෙණ} {3-වෛරාණී} {5-ශාම්‍ය{6-න‍්තී}}{6-හ} {7-කදාචන}<br/>"..
			"{8-ක්‍ෂාන‍්ත්‍යා} {3-වෛරාණී} {5-ශම්‍යන‍්ති} {11-එෂ} {12-ධර්‍මඃ} {13-සනාතනඃ}.",
		"5. {1-Na} {2-hi} {3-vaireṇa} {3-vairāṇi} {5-śāmyant{6-ī}}{6-ha} {7-kadācana}.<br/>"..
			"{8-Kṣāntyā} {3-vairāṇi} {5-śāmyanti} {11-eṣa} {12-dharmaḥ} {13-sanātanaḥ}.",
		"5. {2-For} {6-in this world} {3-hatreds} {5-are} {1-not} {7-ever} {5-settled} {3-by hatred}. <br>"..
			"{3-Hatreds} {5-are settled} {8-by forbearance}.  {11-This} is {12-an} {13-eternal} {12-truth}.",
		lit = "5. {2-For} {6-in this world} {3-hatreds} {5-are} {1-not} {7-ever} {5-settled} {3-by hatred}. <br>"..
			"{3-Hatreds} {5-are settled} {8-by forbearance}.  {11-This} {12-truth} is {13-eternal}.",
	},
}

local p32t8a = "8. {3-When} {5-the astute} {4-dispel} {1-negligence} "..
					"{2-by means of diligence},"
local p32t8b = "<br/>{11-having ascended} {10-the palace} {7-of wisdom}, "..
					"{12-the sorrow-free} "
local p32t8c = "{20-behold} {14-this generation} {13-of sorrow},<br/>"..
					"{16-as} {18-a wise man} {15-{27-on} {26-a mountain-top}} "..
					"{20-beholds} {19-the fools} {27-{28-{17-below}}}."
local p32t8c_lit = "{20-behold} {14-this generation} {13-of sorrow},<br/>"..
					"{16-as} {18-a wise man} {15-{27-on} {26-a mountain-top}} "..
					"{20-beholds} {19-the fools} {17-{27-on} {28-the ground}}."

data[32] = {
	p1='Appamādavaɡɡa',
	pamadam = {
		lang='pi',
		"8. {1-පමාදං} {2-අප‍්පමාදෙන} {3-යදා} {4-නුදති} {5-පණ‍්ඩිතො} 28<br/>"..
			"{7-පඤ‍්ඤා}{10-පාසාද{11-මා}}{11-රුය‍්හ} {12-අසොකො} {13-සොකිනිං} {14-පජං}<br/>"..
			"{15-{26-පබ‍්බත}{27-ට‍්ඨො}}{16-’ව} {17-{28-භුම‍්ම}{27-ට‍්ඨෙ}} {18-ධීරො} {19-බාලෙ} {20-අවෙක‍්ඛති}.",
		"8. {1-Pamādaṃ} {2-appamādena} {3-yadā} {4-nudati} {5-paṇḍito} 28<br/>"..
			"{7-Paññā}{10-pāsādam}{11-āruyha} {12-asoko} {13-sokiniṃ} {14-pajaṃ}<br/>"..
		"{15-{26-Pabbata}{27-ṭṭho}}{16-'va} {17-{28-bhumma}{27-ṭṭhe}} {18-dhīro} {19-bāle} {20-avekkhati}.",
		p32t8a.." 28"..p32t8b..p32t8c,
		lit = p32t8a.." 28"..p32t8b..p32t8c_lit,
	},
	pramada1 = {
	lang='sa',
		"8. {1-ප්‍රමාද{2-ම}}{2-ප්‍රමාදෙන} {3-යදා} {4-නුදති} {5-පණ‍්ඩිතඃ}<br/>"..
			"{6-{7-ප්‍රඥා}{10-ප්‍රසාද{11-මා}}{11-රුහ්‍ය}} {21-{12-ත්‍ව}}{12-ශොකඃ} {13-ශොකිනීං} {14-ප්‍රජාම්}<br/>"..
			"{15-{26-පර්‍වත}{27-ස‍්ථ}} {16-ඉව} {17-{28-භූමි}{27-ෂ‍්ඨාන්}} {18-ධීරො} {19-බාලා{20-න}}{20-වෙක්‍ෂතෙ}",
		"8 {1-Pramādam}{2-apramādena} {3-yadā} {4-nudati} {5-paṇḍitaḥ}<br/>"..
			"{6-{7-Prajñā}{10-prasādam}{11-āruhya}} {21-tv}{12-aśokaḥ} {13-śokinīṃ} {14-prajām}<br/>"..
			"{15-{26-Parvata}{27-stha}} {16-iva} {17-{28-bhūmi}{27-ṣṭhān}} {18-dhīro} {19-bālān}{20-avekṣate}",
-- Udāna-apramāda. [V. 4]
		p32t8a..p32t8b.."{21-then} "..p32t8c,
		lit = p32t8a..p32t8b.."{21-then} "..p32t8c_lit,
	},
	prajna = {
		lang='sa',
		"{7-ප්‍රඥා}{10-ප්‍රසාද{11-මා}}{11-රු{22-හ්‍යා}}{22-ශොච්‍යඃ} {23-ශොචතො} {14-ජනාන්}<br/>"..
			"{17-{28-භූමි}{27-ෂ‍්ඨා{16-නි}}}{16-ව} {15-{26-ශෛල}{27-ස‍්ථඃ}} {24-සර්‍වාන්} {18-ප්‍රාඥො}’{25-නුපශ්‍යති}",
		"{7-Prajñā}{10-prasādam}{11-āruhy{22-ā}}{22-śocyaḥ} {23-śocato} {14-janān}<br/>"..
			"{17-{28-Bhūmi}{27-ṣṭhān}}{16-iva} {15-{26-śaila}{27-sthaḥ}} {24-sarvān} {18-prājño}{25-'nupaśyati}",
		"{11-Having ascended} {10-the palace} {7-of wisdom}, "..
			"{22-a griefless person} {25-sees} {14-people} {23-in suffering},<br/>"..
			"{16-like} {18-a wise man} {15-{27-standing on} {26-a mountain}} {25-watching} "..
			"{24-all} {17-{27-those standing on} {28-the ground} below}."
-- Yogabhāṣya. [T](40)
--There is another translation at
--https://kymyogavaisharadi.org/public/blog/index.php/2020/03/16/scaling-the-citadel-of-clarity-through-yoga/.
	},
	pramada2 = {
		lang='si', -- TBC!
		"{1-ප්‍රමද} {2-අප්‍රමදෙන} {3-යද} {4-නුදති} {5-පනිතු}.<br/>"..
			"{7-ප්‍රඤ} {10-ප්‍රසද} {11-අරුයු} {12-අශොක} {23-ශොඉනො} {14-ජන}<br/>"..
			"{15-ප්‍රවතඨො}{16-ව} {17-භුමඨ} {18-ධීරු} {19-බල} {20-අවෙඡති}.",
--"{1-Pramada} {2-apramadena} {3-yada} {4-nudati} {5-panitu}<br/>"..
--"{7-Praña} {10-prasada} {11-aruyu} {12-aśoka} {23-śoïno} {14-jana}<br/>"..
--"{15-Pravataṭho}{16-va} {11-bhumaṭha} {12-dhīru} {23-bala} {14-avechati}.",
-- Prā. Dha. [A 3](15)
	},
}

data[34] = {
	p1='Cittavaɡɡa',
	spandanam = {
		lang='sa',
			"1. {1-ස‍්පන්‍දනං} …", "", "",
	},
}

data[48] = {
	p1=Sahassavagga,
	mase = {
		lang='pi',
		"7. {1-{2-මාසෙ} {2-මාසෙ}} {3-සහස‍්සෙන} {4-යො} {5-යජෙථ} {6-සතං} {7-සමං} 106<br/>"..
			"{8-{9-එක{10-ඤ‍්ච}}} {11-භාවිතත‍්තානං} {12-මුහුත‍්ත{13-ම}}{13-පි} {14-පූජයෙ}<br/>"..
			"{15-සා} {16-යෙව} {17-පූජනා} {18-සෙය්‍යා} {19-යඤ‍්චෙ} {20-{22-වස‍්ස}{6-සතං}} {21-හුචං}.",
		"7. {1-{2-Māse} {2-māse}} {3-sahassena} {4-yo} {5-yajetha} {6-sataṃ} {7-samaṃ} 106<br/>"..
			"{8-{9-Ekañ}{10-ca}} {11-bhāvitattānaṃ} {12-muhuttam}{13-api} {14-pūjaye}<br/>"..
			"{15-Sā} {16-yeva} {17-pūjanā} {18-seyyā} {19-yañce} {20-{22-vassa}{6-sataṃ}} {21-hutaṃ}.",
		"7. [Consider] {4-one who} {5-performs}  {3-a thousand-fold sacrifice}, "..
			"{1-every {2-month}} {7-for} {6-a hundred} {7-years}, "..
			"{8-{10-and}} [one who] {14-honours} {12-for a single moment} "..
			"{8-{9-one}} {11-who has developed themself}.<br/>"..
			"{10-And} {16-just} {15-that} {17-offering} is {18-better} "..
			"{19-than} {21-the} {20-hundred year} {21-sacrifice}."
	},

	yo = {
		lang='sa',
		"{4-යො} {5-යජෙත} {3-සහස්‍රාණාං} {1-{2-මාසෙ} {2-මාසෙ}} {11-ශතා}{6-ශතමි}<br/>".. -- -m or -mi?
			"{12-න} {13-සො} {7-බුද්‍ධෙ} {8-ප්‍රසාදස්‍ය} {9-කලාමර්‍ඝති} {10-ෂොඩශීම්}.",
--"{4-Yo} {5-yajeta} {3-sahasrāṇāṃ} {1-{2-māse} {2-māse}} {11-śatā}{6-śatam}<br/>"..
--"{12-Na} {13-so} {7-buddhe} {8-prasādasya} {9-kalāmarghati} {10-ṣoḍaśīm}.",
	},
}

data[62] = {
	p1='Jarāvaɡɡa',
	parijinipidam = {
		lang='sa',
		"3. …  {4-ප්‍රභඞ‍්ගුරම්} …", "",
	},
}

data[70] = {
	p1='Buddhavagga',
	yasya= {
		lang='sa',
		"1. … <br/> {9-ත{11-ම‍්බුද‍්ධම}නන‍්තගොචරං} …",
		"1. … <br/>{9-Tam{11-buddham}anantagocaraṃ} …",
	},
}

return data