Wiksiyonaryo tlwiktionary https://tl.wiktionary.org/wiki/Wiksiyonaryo:Unang_Pahina MediaWiki 1.48.0-wmf.1 case-sensitive Midya Natatangi Usapan Tagagamit Usapang tagagamit Wiksiyonaryo Usapang Wiksiyonaryo Talaksan Usapang talaksan MediaWiki Usapang MediaWiki Padron Usapang padron Tulong Usapang tulong Kategorya Usapang kategorya TimedText TimedText talk Module Module talk Event Event talk libro 0 3002 178590 178436 2026-11-03T07:05:21Z GinawaSaHapon 3989 178590 wikitext text/x-wiki =={{=tl=}}== [[Talaksan:Delphine, Madame de Staël, Paris, 1803 04.jpg|thumb|mga libro (kahulugan 1)]] ===Alternatibong pagbaybay=== * {{alt|tl|libdo||obsolete}} ===Etimolohiya=== {{ety|tl|:bor|es:libro|tree=1}} {{bor+|tl|es|libro}} na may paglipat sa diin, mula sa {{der|tl|la|liber|librum}}. ===Pagbigkas=== {{tl-pr|libró}} ===Pangngalan=== {{tl-noun|libró|b=+}} # {{senseid|tl|aklat}} [[aklat]] # {{lb|tl|colloquial}} [[talaan]] {{q|ng [[taya]], bayad, atbp.}} #: {{syn|tl|aklat-talaan|libro-de-rehistro}} # {{senseid|tl|iskrip}} {{lb|tl|theater}} [[iskrip]] ng isang [[dula]], [[opera]], o [[musikal]] #: {{syn|tl|libreto}} # {{senseid|tl|pagtutuos}} {{lb|tl|accounting}} [[kronolohiko|kronolohikong]] talaan ng mga [[bayad]] o [[resibo]] #: {{syn|tl|libro de-kuwenta|aklat-tuosan|ledyer|dyornal}} # {{senseid|tl|anatomiya}} {{lb|tl|anatomy}} ikatlong bahagi ng [[sikmura]] ng isang [[ruminante]] {{q|[[baka]], [[usa]], atbp.}} na karaniwang [[sangkap]] ng [[kare-kare]], [[goto]], atbp. #: {{syn|tl|tuwalya|omasum}} ====Hinangong kataga==== {{col3|tl|libruhin|pagsasalibro}} ====Kaugnay na kataga==== {{col3|tl|libreto|libreriya|libreta|libro mayor|tenedor-de-libros}} ===Magbasa pa=== * {{R:Pambansang Diksiyonaryo}} * {{R:Vocabulario de la lengua tagala 1613|389|Libro) Libdo (pc) C. qualquiera yalo entienden en eſpañol corupto}} =={{=es=}}== ===Pagbigkas=== {{es-pr}} ===Etimolohiya 1=== {{etymon|es|:inh|osp:libro|tree=1}} {{inh+|es|osp|libro}}, isang {{lbor|es|la|liber||aklat|nocap=1}}. Kapatid ng {{cog|ast|llibru}}, {{cog|ca|llibre}}, {{cog|fr|livre}}, {{cog|gl|libro}}, {{cog|it|libro}}{{,}} at {{cog|pt|livro}}. ====Pangngalan==== {{es-noun|m}} {{wp|es:}} # [[aklat]] #: {{syn|es|códice|tomo|volumen}} # [[iskrip]] ng isang [[dula]] o [[opera]]; {{l|tl|libro|id=iskrip}}; [[libreto]] #: {{syn|es|libreto}} # {{lb|es|figurative}} anumang [[lathalain]] na nagbibigay ng [[gabay]] o [[panuto]] # {{lb|es|anatomy}} ikatlong bahagi ng [[sikmura]] ng isang [[ruminante]] {{q|[[baka]], [[usa]], atbp.}}; {{l|tl|libro|id=anatomiya}} #: {{syn|es|librillo|omaso}} # [[buwis]] na kinokolekta ng [[estado]] =====Hiponimo===== {{col|es |gran libro |libro blanco |libro de acuerdos |libro de asiento |libro de becerro |libro de bolsillo |libro de caballerías |libro de cabecera |libro de caja |libro de contabilidad |libro de cuentas ajustadas |libro de cuentos |libro de escolaridad |libro de estilo |libro de familia |libro de fondo |libro de frases |libro de hechizos |libro de honor |libro de horas |libro de inventarios |libro de la vida |libro de las sombras |libro de lo salvado |libro de mano |libro de memoria |libro de misa |Libro de Mormón |libro de música |libro de oro |libro mayor |libro de surtido |libro de texto |libro de visitas |libro diario |libro electrónico |libro sagrado }} =====Hinangong kataga===== {{col|es |audiolibro |cantar a libro abierto |de libro |hablar como un libro |librito |librote |libraco |librería |libreta |libro cerrado<t:saradong aklat><ll:idyoma> |libro abierto |libro de caballerías |pulmón en libro |teneduría de libros |tragalibros }} =====Kaugnay na kataga===== {{col|es |librero |libreto }} =====Anak na kataga===== {{topN}} * {{desc|cbk|libro}} * {{desc|bcl|libro|bor=1}} * {{desc|ceb|libro|bor=1}} * {{desc|nhe|libro|bor=1}} * {{desc|ivb|libro|bor=1}} * {{desc|pbg|liuru|bor=1}} * {{desc|qu|liwru|bor=1}} * {{desc|tl|libro|bor=1}} * {{desc|bor=1|nhi|libro}} {{bottomN}} ====Tingnan din==== * {{l|es|tomo}} ===Etimolohiya 2=== ====Pandiwa==== {{head|es|verb form}} # {{es-verb form of|librar}} ===Sanggunian=== * {{R:es:DCECH|libro|643|vol=G–Ma}} ===Magbasa pa=== * {{R:es:DRAE}} ==Esperanto== ===Pangngalan=== <!--{{infl|eo|pangngalan}}--> {{eo-noun}} # [[aklat]] =={{=gl=}}== ===Alternatibong pagbaybay=== * {{alt|gl|livro||reinteg}} ===Etimolohiya 1=== Mula {{inh|gl|roa-opt|livro}} (ika-13 siglo, ''{{w|Cantigas de Santa Maria}}''), mula {{inh|gl|la|liber|liber, librum|aklat}}. Ikumpara sa {{cog|pt|livro}}. ====Pagbigkas==== {{gl-pr}} * {{hyph|gl|li|bro}} ====Pangngalan==== {{gl-noun|m}} # [[aklat]] #* {{quote-book|gl|year=2010|translator=Moisés Barcia|title=Unha lectora fóra do común|page=back cover|passage=Nunca mostrara moito interese pola lectura, pero tomou en préstamo un '''libro''', e a este seguíronlle moitos outros, tantos que pouco a pouco a afección se converteu en devoción, o que perturbou as relacións coa súa familia, os ministros, a servidume e os amigos.|translation=Hindi naman siya nagpakita ng interes sa pagbabasa, ngunit nanghiram pa rin siya ng '''aklat''', na kalauna'y sunod-sunod, hanggang sa sobrang dami ay umabot sa punto ng debosyon na gumambala sa relasyon niya sa kanyang pamilya, mga ministro, paninilbihan, at mga kaibigan niya.}} # {{lb|es|anatomy}} ikatlong bahagi ng [[sikmura]] ng isang [[ruminante]] {{q|[[baka]], [[usa]], atbp.}}; {{l|tl|libro|id=anatomiya}} #: {{syn|gl|entrefollo|santafollo}} =====Hinangong kataga===== {{col3|gl|libriño}} ====Sanggunian==== * {{R:gl:DRAG}} * {{R:gl:TILG}} * {{R:TLPGP}} * {{R:gl:DDGM}} * {{R:gl:CX}} ===Etimolohiya 2=== ====Pandiwa==== {{head|gl|verb form}} # {{gl-verb form of|librar}} =={{=osp=}}== ===Alternatibong pagbaybay=== * {{alter|osp|liuro}} ===Etimolohiya=== {{etymon|osp|:lbor|la:liber<alt:librum><id:peel>}} {{lbor|osp|la|liber|librum}}. ===Pagbigkas=== * {{IPA|osp|/ˈliβɾo/}} ===Pangngalan=== {{osp-noun|m}} # [[aklat]] #* {{quote-book|osp|year=c. 1200|author=Almerich|title=[[w:Fazienda de Ultramar|Fazienda de Ultramar]]|section=f. 20v |passage=dixo el nŕo ſenor a moẏſen qui peccare en mi deſfer loe de mio '''libro'''. Agora ue e di ami pueblo cuemo fable {{...}} |norm=Dixo el nuestro Sennor a Moysen “Qui peccare en mí, desfer-lo-é de mío '''libro'''. Agora ve e di a mi pueblo cuemo fablé {{...}}” |translation=Sinabi ng ating Panginoon kay Moises, "Kung sinuman ang nagkasala sa akin, aking buburahin sa '''aklat''' ko. Ngayon, humayo ka at sabihin mo sa aking bayan ang sinabi ko sa iyo. {{...}}”}} ====Anak na kataga==== {{topN}} * {{desc|lad|livro//ליב'רו}} * {{desc|es|libro}} {{see desc}} {{bottomN}} 6cdgok9xf2yde3zsgwzburhleanh3qb 178591 178590 2026-11-03T07:05:44Z GinawaSaHapon 3989 /* Etimolohiya 2 */ 178591 wikitext text/x-wiki =={{=tl=}}== [[Talaksan:Delphine, Madame de Staël, Paris, 1803 04.jpg|thumb|mga libro (kahulugan 1)]] ===Alternatibong pagbaybay=== * {{alt|tl|libdo||obsolete}} ===Etimolohiya=== {{ety|tl|:bor|es:libro|tree=1}} {{bor+|tl|es|libro}} na may paglipat sa diin, mula sa {{der|tl|la|liber|librum}}. ===Pagbigkas=== {{tl-pr|libró}} ===Pangngalan=== {{tl-noun|libró|b=+}} # {{senseid|tl|aklat}} [[aklat]] # {{lb|tl|colloquial}} [[talaan]] {{q|ng [[taya]], bayad, atbp.}} #: {{syn|tl|aklat-talaan|libro-de-rehistro}} # {{senseid|tl|iskrip}} {{lb|tl|theater}} [[iskrip]] ng isang [[dula]], [[opera]], o [[musikal]] #: {{syn|tl|libreto}} # {{senseid|tl|pagtutuos}} {{lb|tl|accounting}} [[kronolohiko|kronolohikong]] talaan ng mga [[bayad]] o [[resibo]] #: {{syn|tl|libro de-kuwenta|aklat-tuosan|ledyer|dyornal}} # {{senseid|tl|anatomiya}} {{lb|tl|anatomy}} ikatlong bahagi ng [[sikmura]] ng isang [[ruminante]] {{q|[[baka]], [[usa]], atbp.}} na karaniwang [[sangkap]] ng [[kare-kare]], [[goto]], atbp. #: {{syn|tl|tuwalya|omasum}} ====Hinangong kataga==== {{col3|tl|libruhin|pagsasalibro}} ====Kaugnay na kataga==== {{col3|tl|libreto|libreriya|libreta|libro mayor|tenedor-de-libros}} ===Magbasa pa=== * {{R:Pambansang Diksiyonaryo}} * {{R:Vocabulario de la lengua tagala 1613|389|Libro) Libdo (pc) C. qualquiera yalo entienden en eſpañol corupto}} =={{=es=}}== ===Pagbigkas=== {{es-pr}} ===Etimolohiya 1=== {{etymon|es|:inh|osp:libro|tree=1}} {{inh+|es|osp|libro}}, isang {{lbor|es|la|liber||aklat|nocap=1}}. Kapatid ng {{cog|ast|llibru}}, {{cog|ca|llibre}}, {{cog|fr|livre}}, {{cog|gl|libro}}, {{cog|it|libro}}{{,}} at {{cog|pt|livro}}. ====Pangngalan==== {{es-noun|m}} {{wp|es:}} # [[aklat]] #: {{syn|es|códice|tomo|volumen}} # [[iskrip]] ng isang [[dula]] o [[opera]]; {{l|tl|libro|id=iskrip}}; [[libreto]] #: {{syn|es|libreto}} # {{lb|es|figurative}} anumang [[lathalain]] na nagbibigay ng [[gabay]] o [[panuto]] # {{lb|es|anatomy}} ikatlong bahagi ng [[sikmura]] ng isang [[ruminante]] {{q|[[baka]], [[usa]], atbp.}}; {{l|tl|libro|id=anatomiya}} #: {{syn|es|librillo|omaso}} # [[buwis]] na kinokolekta ng [[estado]] =====Hiponimo===== {{col|es |gran libro |libro blanco |libro de acuerdos |libro de asiento |libro de becerro |libro de bolsillo |libro de caballerías |libro de cabecera |libro de caja |libro de contabilidad |libro de cuentas ajustadas |libro de cuentos |libro de escolaridad |libro de estilo |libro de familia |libro de fondo |libro de frases |libro de hechizos |libro de honor |libro de horas |libro de inventarios |libro de la vida |libro de las sombras |libro de lo salvado |libro de mano |libro de memoria |libro de misa |Libro de Mormón |libro de música |libro de oro |libro mayor |libro de surtido |libro de texto |libro de visitas |libro diario |libro electrónico |libro sagrado }} =====Hinangong kataga===== {{col|es |audiolibro |cantar a libro abierto |de libro |hablar como un libro |librito |librote |libraco |librería |libreta |libro cerrado<t:saradong aklat><ll:idyoma> |libro abierto |libro de caballerías |pulmón en libro |teneduría de libros |tragalibros }} =====Kaugnay na kataga===== {{col|es |librero |libreto }} =====Anak na kataga===== {{topN}} * {{desc|cbk|libro}} * {{desc|bcl|libro|bor=1}} * {{desc|ceb|libro|bor=1}} * {{desc|nhe|libro|bor=1}} * {{desc|ivb|libro|bor=1}} * {{desc|pbg|liuru|bor=1}} * {{desc|qu|liwru|bor=1}} * {{desc|tl|libro|bor=1}} * {{desc|bor=1|nhi|libro}} {{bottomN}} ====Tingnan din==== * {{l|es|tomo}} ===Etimolohiya 2=== ====Pandiwa==== {{head|es|verb form}} # {{es-verb form of|librar}} ===Sanggunian=== * {{R:es:DCECH|libro|643|vol=G–Ma}} ===Magbasa pa=== * {{R:es:DRAE}} ==Esperanto== ===Pangngalan=== <!--{{infl|eo|pangngalan}}--> {{eo-noun}} # [[aklat]] =={{=gl=}}== ===Alternatibong pagbaybay=== * {{alt|gl|livro||reinteg}} ===Etimolohiya 1=== Mula {{inh|gl|roa-opt|livro}} (ika-13 siglo, ''{{w|Cantigas de Santa Maria}}''), mula {{inh|gl|la|liber|liber, librum|aklat}}. Ikumpara sa {{cog|pt|livro}}. ====Pagbigkas==== {{gl-pr}} * {{hyph|gl|li|bro}} ====Pangngalan==== {{gl-noun|m}} # [[aklat]] #* {{quote-book|gl|year=2010|translator=Moisés Barcia|title=Unha lectora fóra do común|page=back cover|passage=Nunca mostrara moito interese pola lectura, pero tomou en préstamo un '''libro''', e a este seguíronlle moitos outros, tantos que pouco a pouco a afección se converteu en devoción, o que perturbou as relacións coa súa familia, os ministros, a servidume e os amigos.|translation=Hindi naman siya nagpakita ng interes sa pagbabasa, ngunit nanghiram pa rin siya ng '''aklat''', na kalauna'y sunod-sunod, hanggang sa sobrang dami ay umabot sa punto ng debosyon na gumambala sa relasyon niya sa kanyang pamilya, mga ministro, paninilbihan, at mga kaibigan niya.}} # {{lb|es|anatomy}} ikatlong bahagi ng [[sikmura]] ng isang [[ruminante]] {{q|[[baka]], [[usa]], atbp.}}; {{l|tl|libro|id=anatomiya}} #: {{syn|gl|entrefollo|santafollo}} =====Hinangong kataga===== {{col3|gl|libriño}} ====Sanggunian==== * {{R:gl:DRAG}} * {{R:gl:TILG}} * {{R:TLPGP}} * {{R:gl:DDGM}} * {{R:gl:CX}} ===Etimolohiya 2=== ====Pandiwa==== {{head|gl|verb form}} # {{gl-verb form of|librar}} =={{=osp=}}== ===Alternatibong pagbaybay=== * {{alter|osp|liuro}} ===Etimolohiya=== {{etymon|osp|:lbor|la:liber<alt:librum><id:peel>}} {{lbor|osp|la|liber|librum}}. ===Pagbigkas=== * {{IPA|osp|/ˈliβɾo/}} ===Pangngalan=== {{osp-noun|m}} # [[aklat]] #* {{quote-book|osp|year=c. 1200|author=Almerich|title=[[w:Fazienda de Ultramar|Fazienda de Ultramar]]|section=f. 20v |passage=dixo el nŕo ſenor a moẏſen qui peccare en mi deſfer loe de mio '''libro'''. Agora ue e di ami pueblo cuemo fable {{...}} |norm=Dixo el nuestro Sennor a Moysen “Qui peccare en mí, desfer-lo-é de mío '''libro'''. Agora ve e di a mi pueblo cuemo fablé {{...}}” |translation=Sinabi ng ating Panginoon kay Moises, "Kung sinuman ang nagkasala sa akin, aking buburahin sa '''aklat''' ko. Ngayon, humayo ka at sabihin mo sa aking bayan ang sinabi ko sa iyo. {{...}}”}} ====Anak na kataga==== {{topN}} * {{desc|lad|livro//ליב'רו}} * {{desc|es|libro}} {{see desc}} {{bottomN}} 4luw4nv8z51bcvv45fe86pemul1wv02 Padron:gl-noun 10 5437 178581 177516 2026-11-03T06:36:07Z GinawaSaHapon 3989 178581 wikitext text/x-wiki {{#invoke:gl-headword|show|nouns}}<!-- --><noinclude>{{documentation}}</noinclude> 3wg95fomsztvthmzznfpjlyt8wm4gl6 Module:labels/data 828 31105 178577 178562 2026-11-03T05:58:32Z GinawaSaHapon 3989 178577 Scribunto text/plain local labels = {} -- Grammatical labels labels["daglat"] = { --TLCHANGE aliases = {"abbreviation"}, --TLCHANGE glossary = true, pos_categories = "na daglat", --TLCHANGE "abbreviations" } labels["pangngalang basal"] = { --TLCHANGE aliases = {"abstract noun"}, --TLCHANGE display = "basal", --TLCHANGE "abstract", glossary = true, pos_categories = "na pangngalang basal", --TLCHANGE "abstract nouns", } labels["pandiwang basal"] = { --TLCHANGE aliases = {"abstract verb"}, --TLCHANGE display = "basal", --TLCHANGE "abstract", glossary = true, pos_categories = "na pandiwang basal", --TLCHANGE "abstract verbs", } labels["akronimo"] = { --TLCHANGE aliases = {"acronym"}, --TLCHANGE glossary = true, pos_categories = "na akronimo", --TLCHANGE "acronyms", } labels["active voice"] = { aliases = {"active", "in active", "in the active", "in active voice", "in the active voice"}, glossary = true, } labels["ambitransitive"] = { glossary = true, pos_categories = {"transitive verbs", "intransitive verbs"}, } labels["angry register"] = { aliases = {"angry", "anger", "said in anger"}, glossary = true, pos_categories = "angry register terms", } labels["animate"] = { glossary = true, } labels["panaganong paturol"] = { --TLCHANGE aliases = {"in the indicative", "indicative mood", "indicative"}, --TLCHANGE glossary = "panaganong paturol", --TLCHANGE "indicative mood", } labels["panaganong pasakali"] = { --TLCHANGE aliases = {"in the subjunctive", "subjunctive mood", "subjunctive"}, --TLCHANGE glossary = "panaganong pasakali", --TLCHANGE "subjunctive mood", } labels["panaganong pautos"] = { --TLCHANGE aliases = {"in the imperative", "imperative mood", "imperative"}, --TLCHANGE glossary = "panaganong pautos", --TLCHANGE "imperative mood", } labels["jussive"] = { aliases = {"in the jussive", "jussive mood"}, glossary = "jussive mood", } labels["atelic"] = { glossary = true, } labels["attenuative"] = { pos_categories = "attenuative verbs", } labels["attributive"] = { glossary = true, } labels["attributively"] = { glossary = "attributive", } labels["auxiliary"] = { glossary = true, pos_categories = "auxiliary verbs", } labels["cardinal"] = { aliases = {"cardinal number", "cardinal numeral"}, display = "[[cardinal number]]", pos_categories = "cardinal numbers", } labels["catenative"] = { glossary = "catenative verb", } labels["causative"] = { glossary = true, } labels["causative verb"] = { display = "causative", glossary = true, pos_categories = "causative verbs", } labels["cognate object"] = { aliases = {"with cognate object"}, display = "with [[w:Cognate object|cognate object]]", pos_categories = "verbs used with cognate objects", } labels["collective"] = { glossary = true, display = "collective", pos_categories = "collective nouns", } labels["collectively"] = { glossary = "collective", display = "collectively", pos_categories = "collective nouns", } labels["collective number"] = { aliases = {"collective numeral"}, display = "[[collective number]]", pos_categories = "collective numbers", } labels["common"] = { glossary = true, } labels["comparable"] = { glossary = true, } labels["completive"] = { pos_categories = "completive verbs", } labels["concrete verb"] = { display = "concrete", Wiktionary = true, pos_categories = "concrete verbs", } labels["contraction"] = { aliases = {"contractions", "contracted"}, glossary = true, pos_categories = "contractions", } labels["control verb"] = { aliases = {"control"}, Wikipedia = true, pos_categories = "control verbs", } labels["copulative"] = { aliases = {"copular"}, glossary = true, pos_categories = "copulative verbs", } labels["pamilang"] = { --TLCHANGE aliases = {"countable", "nabibilang"}, --TLCHANGE glossary = true, pos_categories = "na pangngalang pamilang", --TLCHANGE "countable nouns", } labels["cumulative"] = { pos_categories = "cumulative verbs", } labels["defective adjective"] = { aliases = {"defective a", "defective adj", "defective adjectives"}, display = "defective", glossary = true, pos_categories = "defective adjectives", } labels["defective noun"] = { aliases = {"defective n", "defective nouns"}, display = "defective", glossary = true, pos_categories = "defective nouns", } labels["defective verb"] = { aliases = {"defective v", "defective vb", "defective verbs"}, display = "defective", glossary = true, pos_categories = "defective verbs", } labels["deliberate misspelling"] = { display = "deliberate [[misspelling]]", } labels["delimitative"] = { pos_categories = "delimitative verbs", } labels["deponent"] = { glossary = true, pos_categories = "deponent verbs", } labels["distributive"] = { pos_categories = "distributive verbs", } labels["distributive number"] = { aliases = {"distributive numeral"}, display = "[[distributive number]]", pos_categories = "distributive numbers", } labels["ditransitive"] = { glossary = true, pos_categories = "ditransitive verbs", } labels["dual only"] = { aliases = {"dual-only", "dualonly", "duale tantum"}, display = "[[dual]] only", pos_categories = "dualia tantum", } labels["dysphemistic"] = { aliases = {"dysphemism"}, glossary = "dysphemism", pos_categories = "dysphemisms", } labels["by ellipsis"] = { aliases = {"ellipsis"}, glossary = "ellipsis", pos_categories = "ellipses", } labels["emphatic"] = { glossary = true, } labels["ergative"] = { glossary = true, pos_categories = "ergative verbs", } labels["expressive"] = { glossary = true, pos_categories = "expressive terms", } labels["pinalawak"] = { aliases = {"hence", "by extension"}, glossary = true } labels["feminine"] = { glossary = true, } labels["focus"] = { glossary = true, pos_categories = "focus adverbs", } labels["fractional"] = { aliases = {"fractional number", "fractional numeral"}, display = "[[fractional number]]", pos_categories = "fractional numbers", } labels["frequentative"] = { glossary = true, pos_categories = "frequentative verbs", } labels["hedge"] = { aliases = {"hedges"}, glossary = true, pos_categories = "hedges", } labels["ideophonic"] = { aliases = {"ideophone"}, glossary = true, } labels["sawikain"] = { --TLCHANGE aliases = {"idiom", "idiomatically", "idiomatic"}, --TLCHANGE glossary = true, pos_categories = "na sawikain", --TLCHANGE "idioms", } labels["imperfect"] = { glossary = true, } labels["imperfective"] = { glossary = true, pos_categories = "imperfective verbs", } labels["impersonal"] = { glossary = true, pos_categories = "impersonal verbs", } labels["in the singular"] = { aliases = {"in singular"}, display = "in the [[singular]]", } labels["in the dual"] = { aliases = {"in dual"}, display = "in the [[dual]]", } labels["in the plural"] = { aliases = {"in plural"}, display = "in the [[Appendix:Glossary#plural|plural]]", } labels["inanimate"] = { aliases = {"not animate"}, glossary = true, } labels["inchoative"] = { glossary = true, pos_categories = "inchoative verbs", } labels["indefinite"] = { aliases = {"indef", "not definite"}, glossary = true, } labels["initialism"] = { glossary = true, pos_categories = "initialisms", } labels["intensive verb"] = { display = "intensive", pos_categories = "intensive verbs", } labels["katawanin"] = { --TLCHANGE aliases = {"not transitive", "intransitive"}, --TLCHANGE glossary = true, pos_categories = "na pandiwang katawanin", --TLCHANGE "intransitive verbs", } labels["IPA"] = { aliases = {"International Phonetic Alphabet"}, Wikipedia = "International Phonetic Alphabet", plain_categories = "IPA symbols", } labels["iterative"] = { glossary = true, pos_categories = "iterative verbs", } labels["litotes"] = { aliases = {"litote", "litotic", "litotical"}, glossary = true, pos_categories = true, } labels["panlalaki"] = { --TLCHANGE aliases = {"masculine"}, --TLCHANGE glossary = true, } labels["mediopassive voice"] = { aliases = {"mediopassive", "in mediopassive", "in the mediopassive", "in mediopassive voice", "in the mediopassive voice"}, glossary = true, } labels["meiosis"] = { aliases = {"meioses", "meiotic"}, glossary = true, pos_categories = "meioses", } labels["middle voice"] = { aliases = {"middle", "in middle", "in the middle", "in middle voice", "in the middle voice"}, glossary = true, } labels["misspelling"] = { display = "[[misspelling]]", } labels["mnemonic"] = { display = "[[mnemonic]]", pos_categories = "mnemonics", } labels["modal"] = { Wikipedia = "Modality (linguistics)", } labels["modal adverb"] = { aliases = {"modal adverbs"}, display = "modal", Wikipedia = "Modality (linguistics)", pos_categories = "modal adverbs", } labels["modal verb"] = { aliases = {"modal verbs"}, display = "modal", Wikipedia = "Modality (linguistics)", pos_categories = "modal verbs", } labels["NAPA"] = { aliases = {"Americanist_phonetic_notation"}, Wikipedia = "Americanist_phonetic_notation", plain_categories = "NAPA symbols", } labels["always in the negative"] = { glossary = "negative polarity item", pos_categories = "negative polarity items", } labels["chiefly in the negative"] = { aliases = {"chiefly used in the negative", "negative polarity", "negative polarity item", "usually in the negative", "usually used in the negative"}, glossary = "negative polarity item", pos_categories = "negative polarity items", } labels["chiefly in the negative plural"] = { aliases = {"chiefly used in the negative plural", "negative polarity plural", "negative polarity plural item", "usually in the negative plural", "usually used in the negative plural"}, display = "chiefly in the [[Appendix:Glossary#negative polarity item|negative]] [[Appendix:Glossary#plural|plural]]", pos_categories = "negative polarity items", } labels["chiefly in the positive"] = { aliases = {"chiefly used in the positive", "positive polarity", "positive polarity item", "usually in the positive", "usually used in the positive"}, glossary = "positive polarity item", -- pos_categories = {"positive polarity items"}, } labels["chiefly in the positive plural"] = { aliases = {"chiefly used in the positive plural", "positive polarity plural", "positive polarity plural item", "usually in the positive plural", "usually used in the positive plural"}, display = "chiefly in the [[Appendix:Glossary#positive polarity item|positive]] [[Appendix:Glossary#plural|plural]]", -- pos_categories = "positive polarity items", } labels["balaki"] = { --TLCHANGE aliases = {"neuter"}, --TLCHANGE glossary = true, } -- British English ("ise") labels["nominalised"] = { aliases = {"nominalisation", "substantivised", "substantivisation"}, glossary = "nominalization", pos_categories = "nominalized adjectives", } -- American English ("ize") labels["nominalized"] = { aliases = {"nominalization", "substantivized", "substantivization"}, glossary = "nominalization", pos_categories = "nominalized adjectives", } labels["not comparable"] = { aliases = {"notcomp", "incomparable", "uncomparable"}, glossary = "uncomparable", } labels["onomatopoeia"] = { glossary = true, pos_categories = "onomatopoeias", } labels["ordinal"] = { aliases = {"ordinal number", "ordinal numeral"}, display = "[[ordinal number]]", pos_categories = "ordinal numbers", } labels["partitive verb"] = { display = "[[Appendix:Glossary#transitive|transitive]], usually [[Appendix:Finnic telic and atelic verbs|atelic]]", pos_categories = "transitive verbs", -- = "partitive verbs", } labels["perfect"] = { glossary = true, } labels["pandiwari"] = { --TLCHANGE aliases = {"participle"}, --TLCHANGE glossary = true, } labels["balintiyak"] = { --TLCHANGE aliases = {"passive", "in passive", "in the passive", "in passive voice", "in the passive voice", "passive voice"}, --TLCHANGE glossary = true, } labels["perfect"] = { glossary = true, } labels["perfective"] = { glossary = true, pos_categories = "perfective verbs", } labels["plural only"] = { aliases = {"plural-only", "pluralonly", "plurale tantum"}, display = "[[Appendix:Glossary#plural|plural]] only", pos_categories = "pluralia tantum", } labels["possessional adjective"] = { aliases = {"possessional", "possessional adjectives"}, display = "possessional", glossary = true, pos_categories = "possessional adjectives", } labels["possessive pronoun"] = { aliases = {"possessive determiner"}, display = "possessive", glossary = "possessive determiner", pos_categories = "possessive pronouns", } labels["postpositive"] = { glossary = true, } labels["predicative"] = { glossary = true, } labels["predicatively"] = { glossary = "predicative", } labels["prepositive"] = { glossary = true, } labels["prescriptive"] = { aliases = {"normative", "prescribed"}, glossary = true, } labels["privative"] = { pos_categories = "privative verbs", } labels["procedure word"] = { display = "[[procedure word]]", } labels["productive"] = { glossary = true, } -- TODO: This label is probably inappropriate for many languages labels["pronominal"] = { glossary = "pronominal verb", } labels["pronunciation spelling"] = { glossary = true, } labels["pro-verb"] = { Wikipedia = true, } labels["reciprocal"] = { glossary = true, pos_categories = "reciprocal verbs", } labels["reflexive"] = { glossary = true, pos_categories = "reflexive verbs", } labels["reflexive pronoun"] = { glossary = "reflexive", pos_categories = "reflexive pronouns", } labels["relational"] = { glossary = true, pos_categories = "relational adjectives", } labels["repetitive"] = { pos_categories = "repetitive verbs", } labels["respelling"] = { glossary = true, } labels["reversative"] = { pos_categories = "reversative verbs", } labels["rhetorical question"] = { glossary = true, pos_categories = "rhetorical questions", } labels["rhotic"] = { glossary = true, } labels["saturative"] = { aliases = {"sative"}, pos_categories = "saturative verbs", } labels["semelfactive"] = { glossary = true, pos_categories = "semelfactive verbs", } labels["sentence adverb"] = { glossary = true, pos_categories = "sentence adverbs", } labels["set phrase"] = { display = "[[set phrase]]", } labels["simile"] = { glossary = true, pos_categories = "similes", } labels["singular only"] = { aliases = {"singular-only", "singulare tantum", "no plural"}, display = "singular only", pos_categories = "singularia tantum", } labels["snowclone"] = { glossary = true, pos_categories = "snowclones", } labels["stative"] = { aliases = {"stative verb"}, glossary = true, pos_categories = "stative verbs", } labels["strictly"] = { aliases = {"strict", "narrowly", "narrow"}, glossary = true, } labels["substantive"] = { glossary = true, track = true, } labels["terminative"] = { pos_categories = "terminative verbs", } labels["palipat"] = { --TLCHANGE aliases = {"transitive"}, --TLCHANGE glossary = true, pos_categories = "na pandiwang palipat", --TLCHANGE "transitive verbs" } labels["transmission error"] = { Wiktionary = true, } labels["unaccusative"] = { aliases = {"not accusative"}, Wikipedia = "Unaccusative verb", } labels["di-pamilang"] = { --TLCHANGE aliases = {"not countable", "uncountable", "di-nabibilang", "di nabibilang"}, --TLCHANGE glossary = true, pos_categories = "na pangngalang di-pamilang", --TLCHANGE "uncountable nouns", } labels["unergative"] = { aliases = {"not ergative"}, Wikipedia = "Unergative verb", } labels["UPA"] = { aliases = {"Uralic Phonetic Alphabet"}, Wikipedia = "Uralic Phonetic Alphabet", plain_categories = "UPA symbols", } labels["usually plural"] = { aliases = {"usually in the plural", "usually in plural"}, display = "usually in the [[Appendix:Glossary#plural|plural]]", deprecated = true, } -- Usage labels labels["4chan"] = { aliases = {"4chan slang"}, display = "[[w:4chan|4chan]] {{glossary|slang}}", pos_categories = "4chan slang", } labels["4chan lgbt"] = { aliases = {"tttt"}, display = "[[w:4chan|4chan]] /lgbt/ {{glossary|slang}}", pos_categories = "4chan /lgbt/ slang", } labels["ACG"] = { display = "[[ACG]]", -- see also "fandom slang" pos_categories = "fandom slang", } labels["endearing"] = { aliases = {"affectionate"}, display = "[[endearing]]", -- should be "terms with X senses", leaving "X terms" to the term-context temp pos_categories = "endearing terms", } labels["endearing form"] = { aliases = {"affectionate form"}, display = "[[endearing]]", pos_categories = "endearing forms", } labels["pre-classical"] = { aliases = {"Pre-classical", "pre-Classical", "Pre-Classical", "Preclassical", "preclassical", "ante-classical", "Ante-classical", "ante-Classical", "Ante-Classical", "Anteclassical", "anteclassical"}, display = "pre-Classical", regional_categories = true, } labels["anti-LGBTQ slur"] = { -- don't add aliases "homophobia" or "transphobia" because these could be topical categories aliases = {"homophobic", "transphobic"}, display = "anti-[[LGBTQ]] [[slur]]", pos_categories = "anti-LGBTQ slurs", } labels["makaluma"] = { --TLCHANGE aliases = {"antiquated", "archaic"}, --TLCHANGE glossary = true, sense_categories = true, } labels["anyong makaluma"] = { --TLCHANGE aliases = {"archaic form"}, --TLCHANGE glossary = "makaluma", --TLCHANGE "archaic", display = "makaluma", --TLCHANGE "archaic", pos_categories = "na anyong makaluma", --TLCHANGE "archaic forms", } labels["Australian slang"] = { display = "[[Australian]] {{glossary|slang}}", regional_categories = "Australian", plain_categories = true, } labels["avoidance"] = { glossary = true, } labels["back slang"] = { aliases = {"backslang", "back-slang"}, glossary = "backslang", pos_categories = true, } labels["Bargoens"] = { Wikipedia = true, plain_categories = true, } labels["Braille"] = { Wikipedia = true, } labels["British slang"] = { aliases = {"UK slang"}, display = "[[British]] {{glossary|slang}}", plain_categories = true, } labels["Cambridge University slang"] = { aliases = {"University of Cambridge slang", "Cantab slang"}, display = "[[w:University of Cambridge|Cambridge University]] {{glossary|slang}}", topical_categories = "Universities", plain_categories = true, } labels["cant"] = { aliases = {"argot", "cryptolect"}, display = "[[cant]]", pos_categories = true, } labels["capitalized"] = { aliases = {"capitalised"}, display = "[[capitalisation|capitalized]]", } labels["Castilianism"] = { aliases = {"Hispanicism"}, display = "[[Castilianism]]", } labels["childish"] = { aliases = {"baby talk", "child language", "infantile", "puerile"}, display = "[[childish]]", -- should be "terms with X senses", leaving "X terms" to the term-context temp? pos_categories = "childish terms", } labels["chu Nom"] = { display = "[[Vietnamese]] [[chữ Nôm]]", plain_categories = "Vietnamese Han tu", } labels["Cockney rhyming slang"] = { display = "[[Cockney rhyming slang]]", plain_categories = true, } labels["kolokyal"] = { --TLCHANGE aliases = {"colloquial", "colloquially"}, --TLCHANGE glossary = true, pos_categories = "na salitang kolokyal" --TLCHANGE "colloquialisms", } -- FIXME! The following two are apparently for Persian but probably don't belong in this file. labels["colloquial-um"] = { glossary = "colloquial", pos_categories = "colloquialisms containing sequence um", } labels["colloquial-un"] = { glossary = "colloquial", pos_categories = "colloquialisms containing sequence un", } labels["corporate jargon"] = { aliases = {"business jargon", "corporatese", "businessese", "corporate speak", "business speak"}, display = "[[corporate]] [[jargon]]", pos_categories = true, } labels["costermongers"] = { aliases = {"coster", "costers", "costermonger", "costermongers back slang", "costermongers' back slang"}, display = "[[Appendix:Costermongers' back slang|costermongers]]", plain_categories = "Costermongers' back slang", } labels["criminal slang"] = { aliases = {"thieves' cant", "Thieves' Cant", "thieves cant", "thieves'", "thieves", "thieves' cant"}, -- Thieves' Cant is English-only, so defined in the English submodule; if other languages try to use it, it's just criminal slang display = "[[criminal]] {{glossary|slang}}", topical_categories = "Crime", pos_categories = true, } labels["luma"] = { --TLCHANGE aliases = {"old-fashioned", "dated"}, --TLCHANGE glossary = true, -- should be "terms with X senses", leaving "X terms" to the term-context temp pos_categories = "na salitang may kalumaan", --TLCHANGE "dated terms", } labels["anyong luma"] = { --TLCHANGE aliases = {"old-fashioned form", "dated form"}, --TLCHANGE glossary = "may kalumaan", --TLCHANGE "dated", display = "may kalumaan", --TLCHANGE "dated", pos_categories = "na anyong may kalumaan", --TLCHANGE "dated forms", } -- combine with previous? labels["dated sense"] = { glossary = "dated", sense_categories = "dated", } labels["mapanlait"] = { --TLCHANGE aliases = {"pejorative", "derogative", "disparaging", "derogatory"}, --TLCHANGE display = "[[mapanlait]]", --TLCHANGE -- should be "terms with X senses", leaving "X terms" to the term-context temp pos_categories = "na salitang mapanlait", --TLCHANGE "derogatory terms", } labels["anyong mapanlait"] = { --TLCHANGE aliases = {"pejorative form", "derogative form", "disparaging form", "derogatory form"}, --TLCHANGE display = "[[mapanlait]]", --TLCHANGE "[[derogatory]]", pos_categories = "na anyong mapanlait", --TLCHANGE "derogatory forms", } labels["dialect"] = {-- separated from "dialectal" so e.g. "obsolete|outside|the|_|dialect|of..." displays right glossary = "dayalekto", pos_categories = "dialectal terms", } labels["dialectal"] = { glossary = true, display = "dayalekto", -- should be "terms with X senses", leaving "X terms" to the term-context temp pos_categories = "dialectal terms", } labels["dialectal form"] = { glossary = "dialectal", display = "dayalekto", pos_categories = "dialectal forms", } labels["dialects"] = {-- separated from "dialectal" so e.g. "obsolete|outside|dialects" displays right glossary = "dialectal", pos_categories = "dialectal terms", } labels["dis legomenon"] = { display = "[[dis legomenon]]", pos_categories = "dis legomena", } labels["dismissal"] = { display = "[[dismissal]]", pos_categories = "dismissals", } labels["drag slang"] = { aliases = {"Drag Race slang"}, display = "[[drag]] {{glossary|slang}}", pos_categories = "drag slang", } labels["ecclesiastical"] = { display = "[[ecclesiastical#Adjective|ecclesiastical]]", pos_categories = "ecclesiastical terms", } labels["ethnic slur"] = { aliases = {"racial slur"}, display = "[[ethnic]] [[slur]]", pos_categories = "ethnic slurs", } labels["euphemistic"] = { aliases = {"euphemism"}, glossary = "euphemism", pos_categories = "euphemisms", } labels["eye dialect"] = { display = "[[eye dialect]]", pos_categories = true, } labels["familiar"] = { glossary = true, -- should be "terms with X senses", leaving "X terms" to the term-context temp? pos_categories = "familiar terms", } labels["fandom slang"] = { aliases = {"fandom"}, display = "[[fandom]] {{glossary|slang}}", pos_categories = true, } labels["matalinghaga"] = { -- tlchange figurative aliases = {"metaphorical", "metaphoric", "metaphor", "figurative"}, glossary = true, } labels["patalinghaga"] = { aliases = {"metaphorically", "figuratively"}, glossary = "matalinghaga", } labels["folk songs"] = { aliases = {"folksongs", "used in folk songs", "used in folksongs"}, pos_categories = "folk poetic terms", display = "used in [[folk song]]s", } labels["folk tales"] = { aliases = {"folktales", "used in folk tales", "used in folktales"}, pos_categories = "folk poetic terms", display = "used in [[folk tale]]s", } labels["folk poetic"] = { -- should be "terms with X senses", leaving "X terms" to the term-context temp pos_categories = "folk poetic terms", } labels["pormal"] = { --TLCHANGE aliases = {"formal"}, --TLCHANGE glossary = true, -- should be "terms with X senses", leaving "X terms" to the term-context temp? pos_categories = "na salitang pormal",--TLCHANGE "formal terms", } labels["anyong pormal"] = { --TLCHANGE aliases = {"formal form"}, --TLCHANGE glossary = "pormal", --TLCHANGE "formal" display = "pormal", --TLCHANGE "formal", pos_categories = "na anyong pormal", --TLCHANGE "formal forms", } labels["gay slang"] = { display = "[[gay]] {{glossary|slang}}", pos_categories = true, } labels["gender critical slang"] = { aliases = {"gender-critical slang", "GC slang", "TERF slang"}, display = "[[gender-critical]] {{glossary|slang}}", pos_categories = "gender-critical slang", } labels["gender-neutral"] = { glossary = "gender-neutral", pos_categories = "gender-neutral terms", } labels["graffiti slang"] = { display = "[[graffiti#Noun|graffiti]] {{glossary|slang}}", pos_categories = true, } labels["genericized trademark"] = { aliases = {"generic trademark", "proprietary eponym"}, display = "[[genericized trademark]]", pos_categories = "genericized trademarks", } labels["ghost word"] = { aliases = {"ghost"}, display = "ghost word", glossary = true, pos_categories = "ghost words", } labels["hapax legomenon"] = { aliases = {"hapax"}, display = "hapax legomenon", glossary = true, pos_categories = "hapax legomena", } labels["higher register"] = { aliases = {"high register", "elevated register", "elevated"}, glossary = "higher register", pos_categories = "higher register terms", } labels["historikal"] = { --TLCHANGE aliases = {"historic", "historical", "makasaysayan"}, --TLCHANGE glossary = true, sense_categories = true, } labels["non-native speakers"] = {-- language-agnostic version aliases = {"NNS"}, display = "[[non-native speaker]]s", -- so preceded by "used by", "error by children and", etc? or reword? regional_categories = {"Non-native speakers'"}, } -- used exclusively by languages that use the "Jpan" script code labels["historical hiragana"] = { pos_categories = true, } -- used exclusively by languages that use the "Jpan" script code labels["historical katakana"] = { pos_categories = true, } -- applies to Japanese and Korean, etc., please do not confuse with "polite" labels["honorific"] = { Wikipedia = "Honorifics (linguistics)", -- should be "terms with X senses", leaving "X terms" to the term-context temp? pos_categories = "honorific terms", } -- for Ancient Greek labels["Homeric epithet"] = { display = "[[Homeric Greek|Homeric]] [[w:Epithets in Homer|epithet]]", omit_postComma = true, plain_categories = "Epic Greek", } -- applies to Japanese and Korean, etc. labels["humble"] = { -- should be "terms with X senses", leaving "X terms" to the term-context temp? display = "[[humble]]", pos_categories = "humble terms", } -- for Akkadian labels["in hendiadys"] = { aliases = {"hendiadys"}, display = "in {{w|hendiadys}}", pos_categories = "terms used in hendiadys", } labels["humorous"] = { -- should be "terms with X senses", leaving "X terms" to the term-context temp; NB and cf a similar "jocular" label further up on this page aliases = {"humorously", "jocular"}, glossary = true, pos_categories = "humorous terms", } labels["hyperbolic"] = { aliases = {"hyperbole"}, glossary = true, pos_categories = "hyperboles", } labels["hypercorrect"] = { glossary = true, pos_categories = "hypercorrections", } labels["hyperforeign"] = { glossary = true, pos_categories = "hyperforeign terms", } labels["imperial"] = { aliases = {"emperor", "empress"}, pos_categories = "royal terms", } labels["incel slang"] = { display = "[[incel]] {{glossary|slang}}", pos_categories = true, } labels["di-pormal"] = { --TLCHANGE aliases = {"informally", "not formal", "informal", "impormal"}, --TLCHANGE glossary = true, -- should be "terms with X senses", leaving "X terms" to the term-context temp pos_categories = "na salitang di-pormal", --TLCHANGE "informal terms", } labels["anyong di-pormal"] = { --TLCHANGE aliases = {"informal form", "anyong impormal"}, --TLCHANGE glossary = "di-pormal", --TLCHANGE "informal", display = "di-pormal", --TLCHANGE "informal", pos_categories = "na anyong di-pormal" --TLCHANGE "informal forms", } labels["Internet slang"] = { aliases = {"internet slang"}, display = "[[Internet]] {{glossary|slang}}", pos_categories = "internet slang", } labels["IRC"] = { display = "[[IRC]]", pos_categories = "internet slang", } labels["ironic"] = { display = "[[irony|ironic]]", } -- Not the same as "journalism", which maps to a topical category (e.g. [[:Category:en:Journalism]], instead of [[:Category:English journalistic terms]]). labels["journalistic"] = { aliases = {"journalese"}, display = "[[journalistic]]", pos_categories = "journalistic terms", } labels["leet"] = { aliases = {"leetspeak"}, display = "[[leetspeak]]", pos_categories = "leetspeak", } labels["LGBTQ slang"] = { aliases = {"LGBT slang"}, display = "[[LGBTQ]] {{glossary|slang}}", pos_categories = true, } labels["literal"] = { glossary = "literally", } labels["literally"] = { glossary = "literally", } labels["pampanitikan"] = { --TLCHANGE -- should be "terms with X senses", leaving "X terms" to the term-context temp aliases = {"bookish", "literary"}, --TLCHANGE glossary = true, pos_categories = "na salitang pampanitikan", --TLCHANGE "literary terms", } labels["anyong pampanitikan"] = { --TLCHANGE aliases = {"bookish form", "literary form"}, --TLCHANGE glossary = "pampanitikan", --TLCHANGE "literary", display = "pampanitikan", --TLCHANGE "literary", pos_categories = "na anyong pampanitikan", --TLCHANGE "literary forms", } --see also "short scale" labels["long scale"] = { display = "[[w:Long and short scales|long scale]]" } labels["loosely"] = { aliases = {"loose", "broadly", "broad"}, glossary = true, } labels["Lubunyaca"] = { display = "[[Lubunyaca]]", pos_categories = true, } labels["medical slang"] = { display = "[[medical]] {{glossary|slang}}", pos_categories = true, } -- for Awetí, Karajá, etc., where men and women use different words labels["men's speech"] = { aliases = {"male speech"}, glossary = "men's speech", pos_categories = "men's speech terms", } labels["metonymic"] = { aliases = {"metonymically", "metonymy", "metonym"}, glossary = true, pos_categories = "metonyms", } labels["military slang"] = { display = "[[military]] {{glossary|slang}}", pos_categories = true, } labels["minced oath"] = { display = "[[minced oath]]", pos_categories = "minced oaths", } labels["multiplicative"] = { aliases = {"multiplicative number", "multiplicative numeral"}, display = "[[multiplicative number]]", pos_categories = "multiplicative numbers", } labels["multiplicity slang"] = { display = "{{l|en|multiplicity|id=multiple personalities}} {{glossary|slang}}", pos_categories = true, } labels["naval slang"] = { aliases = {"navy slang"}, display = "[[naval]] {{glossary|slang}}", pos_categories = true, } labels["neolohismo"] = { --TLCHANGE aliases = {"neologistic", "neologism"}, --TLCHANGE glossary = true, pos_categories = "na neolohismo", --TLCHANGE "neologisms", } labels["neopronoun"] = { display = "[[neopronoun]]", -- pos_categories = {"neopronouns"}, } labels["no longer productive"] = { aliases = {"non-productive"}, display = "no longer [[Appendix:Glossary#productive|productive]]", } labels["nonce word"] = { -- should be "terms with X senses", leaving "X terms" to the term-context temp? aliases = {"nonce"}, glossary = true, pos_categories = "nonce terms", } labels["di-pamantayan"] = { --TLCHANGE aliases = {"non-standard", "substandard", "sub-standard", "nonstandard"}, --TLCHANGE glossary = true, -- should be "terms with X senses", leaving "X terms" to the term-context temp pos_categories = "na salitang di-pamantayan", --TLCHANGE "nonstandard terms", } labels["anyong di-pamantayan"] = { --TLCHANGE aliases = {"non-standard form", "substandard form", "sub-standard form", "nonstandard form"}, --TLCHANGE glossary = "di-pamantayan", --TLCHANGE "nonstandard", display = "di-pamantayan", --TLCHANGE "nonstandard", pos_categories = "na anyong di-pamantayan", --TLCHANGE "nonstandard forms", } labels["numismatic slang"] = { display = "[[numismatic]] {{glossary|slang}}", pos_categories = true, } labels["lipas na"] = { --TLCHANGE aliases = {"obsolete"}, --TLCHANGE glossary = true, sense_categories = true, } labels["anyong lipas na"] = { --TLCHANGE aliases = {"obsolete form"}, --TLCHANGE glossary = "lipas na", --TLCHANGE "obsolete", display = "lipas na", --TLCHANGE "obsolete", pos_categories = "na anyong lipas na", --TLCHANGE "obsolete forms", } labels["salitang lipas na"] = { --TLCHANGE aliases = {"obsolete term"}, --TLCHANGE glossary = "lipas na", --TLCHANGE "obsolete", -- combine with previous two, q.v. pos_categories = "na salitang lipas na", --TLCHANGE "obsolete terms", } labels["offensive"] = { glossary = true, -- should be "terms with X senses", leaving "X terms" to the term-context temp pos_categories = "offensive terms", } labels["officialese"] = { aliases = {"bureaucratic"}, display = "[[officialese]]", pos_categories = "officialese terms", } labels["Oxbridge slang"] = { display = "[[w:Oxbridge|Oxbridge]] {{glossary|slang}}", topical_categories = "Universities", plain_categories = {"Cambridge University slang", "Oxford University slang"}, } labels["Oxford University slang"] = { aliases = {"University of Oxford slang", "Oxon slang"}, display = "[[w:University of Oxford|Oxford University]] {{glossary|slang}}", topical_categories = "Universities", plain_categories = true, } labels["poetic"] = { aliases = {"poi"}, -- Only used in Ancient Greek as a holdover from [[Module:grc:Dialects]]. -- should be "terms with X senses", leaving "X terms" to the term-context temp glossary = true, pos_categories = "poetic terms", } labels["poetic form"] = { glossary = "poetic", display = "poetic", pos_categories = "poetic forms", } labels["polite"] = { glossary = true, pos_categories = "polite terms", } labels["post-classical"] = { aliases = {"Post-classical", "post-Classical", "Post-Classical", "Postclassical", "postclassical"}, display = "post-Classical", regional_categories = true, } labels["prison slang"] = { display = "[[prison]] {{glossary|slang}}", pos_categories = true, } labels["proscribed"] = { glossary = true, pos_categories = "proscribed terms", } labels["purista"] = { --TLCHANGE aliases = {"purism", "puristic"}, --TLCHANGE Wikipedia = "Linguistic purism", pos_categories = "na salitang purista", --TLCHANGE "puristic terms", } labels["radio slang"] = { display = "[[radio]] {{glossary|slang}}", pos_categories = true, } labels["Reddit slang"] = { display = "[[Reddit]] {{glossary|slang}}", pos_categories = true, } labels["rare"] = { aliases = {"rare sense"}, display = "bihira", glossary = true, sense_categories = true, } labels["rare form"] = { glossary = "rare", display = "rare", pos_categories = "rare forms", } labels["rare term"] = { display = "rare", -- see comments about "obsolete" pos_categories = "rare terms", } -- cf Cockney rhyming slang labels["rhyming slang"] = { display = "[[rhyming slang]]", pos_categories = true, } labels["religious slur"] = { aliases = {"sectarian slur"}, display = "[[religious]] [[slur]]", pos_categories = "religious slurs", } labels["retronym"] = { glossary = true, pos_categories = "retronyms", } labels["reverential"] = { -- should be "terms with X senses", leaving "X terms" to the term-context temp? display = "[[reverential]]", pos_categories = "reverential terms", } labels["royal"] = { aliases = {"regal"}, pos_categories = "royal terms", } labels["rustic"] = { glossary = true, -- should be "terms with X senses", leaving "X terms" to the term-context temp? aliases = {"rural"}, pos_categories = "rustic terms", } labels["sarcastic"] = { display = "[[sarcastic]]", pos_categories = "sarcastic terms", } labels["school slang"] = { aliases = {"public school slang"}, display = "[[school]] {{glossary|slang}}", pos_categories = true, } labels["self-deprecatory"] = { aliases = {"self-deprecating"}, display = "[[self-deprecatory]]", -- should be "terms with X senses", leaving "X terms" to the term-context temp? pos_categories = "self-deprecatory terms", } -- Swahili Sheng cant / argot -- should this be in a language-specific module? labels["Sheng"] = { Wikipedia = "Sheng slang", plain_categories = true, } labels["siglum"] = { aliases = {"sigla"}, glossary = true, pos_categories = "sigla", } --see also "long scale" labels["short scale"] = { display = "[[w:Long and short scales|short scale]]" } labels["balbal"] = { --TLCHANGE aliases = {"slang"}, --TLCHANGE glossary = true, pos_categories = "na salitang balbal", --TLCHANGE true, } labels["solemn"] = { glossary = true, pos_categories = "solemn terms", } labels["Stenoscript"] = { aliases = {"stenoscript"}, display = "[[Stenoscript]]", pos_categories = "Stenoscript abbreviations", } labels["pinalitang pagbaybay"] = { --TLCHANGE aliases = {"superseded"}, --TLCHANGE glossary = true } labels["swear word"] = { aliases = {"profanity", "expletive"}, pos_categories = "swear words", } labels["syncopated"] = { aliases = {"syncope", "syncopic", "syncopation"}, glossary = true, pos_categories = "syncopic forms", } labels["synecdochically"] = { aliases = {"synecdochic", "synecdochical", "synecdoche"}, glossary = true, pos_categories = "synecdoches", } labels["technical"] = { display = "[[technical]]", pos_categories = "technical terms", } labels["telic"] = { glossary = true, } labels["text messaging"] = { aliases = {"texting"}, display = "[[text messaging]]", pos_categories = "text messaging slang", } labels["tone indicator"] = { display = "[[tone indicator]]", pos_categories = "tone indicators", } labels["trademark"] = { display = "[[trademark]]", pos_categories = "trademarks", } labels["nilipat"] = { aliases = {"transferred", "transferred sense"}, glossary = true, pos_categories = "na salitang may kahulugang nilipat", } labels["transferred senses"] = { display = "[[transferred sense#English|transferred senses]]", pos_categories = "terms with transferred senses", } labels["transgender slang"] = { aliases = {"trans slang"}, display = "[[transgender]] {{glossary|slang}}", pos_categories = true, } labels["Twitch-speak"] = { display = "[[Twitch-speak]]", pos_categories = true, } labels["uds."] = { display = "[[Appendix:Spanish pronouns#Ustedes and vosotros|used formally in Spain]]", } labels["di-karaniwan"] = { aliases = {"uncommon"}, --TLCHANGE glossary = true, sense_categories = true, } labels["anyong di-karaniwan"] = { --TLCHANGE aliases = {"uncommon form"}, --TLCHANGE glossary = "di-karaniwan", --TLCHANGE "uncommon", display = "di-karaniwan", --TLCHANGE "uncommon", pos_categories = "na anyong di-karaniwan", --TLCHANGE "uncommon forms", } labels["university slang"] = { aliases = {"college slang", "student slang"}, display = "[[university]] {{glossary|slang}}", topical_categories = "Universities", pos_categories = "student slang", } labels["verlan"] = { glossary = true, plain_categories = true, } labels["very rare"] = { display = "very [[Appendix:Glossary#rare|rare]]", sense_categories = "rare", } labels["bulgar"] = { --TLCHANGE aliases = {"coarse", "obscene", "profane", "vulgar"}, --TLCHANGE glossary = true, pos_categories = "na salitang bulgar", --TLCHANGE "vulgarities", } labels["vesre"] = { Wikipedia = true, plain_categories = true, } labels["youth slang"] = { display = "[[youth]] {{glossary|slang}}", pos_categories = "slang", } labels["2channel slang"] = { aliases = {"2channel", "2ch slang"}, display ="[[w:2channel|2channel]] {{glossary|slang}}", pos_categories = {"internet slang" , "2channel slang"}, } -- for Awetí, Karajá, etc., where men & women use different words labels["women's speech"] = { aliases = {"female speech"}, glossary = "women's speech", pos_categories = "women's speech terms", } -- terms applying to Old Norse skaldic poetry labels["kenning"] = { aliases = {"Kenning"}, Wikipedia = "Kenning", pos_categories = "kennings", } labels["heiti"] = { aliases = {"Heiti"}, Wikipedia = "Heiti", pos_categories = true, } return require("Module:labels").finalize_data(labels) kfkx23alm46iyb2kxlgkv3fepc68d5q Module:quote 828 33065 178587 178521 2026-11-03T06:58:49Z GinawaSaHapon 3989 en parity, isasalin sa susunod, since nagkakaproblema sa editor/edited by 178587 Scribunto text/plain --[=[ This module contains functions to implement quote-* templates. Author: Benwing2; conversion into Lua of {{quote-meta/source}} template, written by Sgconlaw with some help from Erutuon and Benwing2. The main interface is quote_t(). Note that the source display is handled by source(), which reads both the arguments passed to it *and* the arguments passed to the parent template, with the former overriding the latter. ]=] local export = {} --[=[ FIXME: 1. Dates like `1 march 2025` with the day of the month being 1 and the month lowercased are treated as month-year-only. The relevant code checks for a capitalized word; it should probably instead check for the actual month names or abbrevs. ]=] -- Named constants for all modules used, to make it easier to swap out sandbox versions. local check_isxn_module = "Module:check isxn" local debug_track_module = "Module:debug/track" local en_utilities_module = "Module:en-utilities" local italics_module = "Module:italics" local labels_module = "Module:labels" local languages_module = "Module:languages" local languages_error_module = "Module:languages/error" local links_module = "Module:links" local number_utilities_module = "Module:number utilities" local parameters_module = "Module:parameters" local parse_utilities_module = "Module:parse utilities" local qualifier_module = "Module:qualifier" local roman_numerals_module = "Module:roman numerals" local scribunto_module = "Module:Scribunto" local script_utilities_module = "Module:script utilities" local scripts_module = "Module:scripts" local string_pattern_escape_module = "Module:string/patternEscape" local string_replacement_escape_module = "Module:string/replacementEscape" local string_utilities_module = "Module:string utilities" local table_module = "Module:table" local template_parser_module = "Module:template parser" local usex_module = "Module:usex" local usex_templates_module = "Module:usex/templates" local utilities_module = "Module:utilities" local yesno_module = "Module:yesno" local concat = table.concat local insert = table.insert local new_title = mw.title.new local remove = table.remove local require = require local sort = table.sort local u = mw.ustring.char local ugsub = mw.ustring.gsub local umatch = mw.ustring.match local unpack = unpack or table.unpack -- Lua 5.2 compatibility -- Use HTML entities here to avoid parsing issues (esp. with brackets) local SEMICOLON_SPACE = "&#59; " local SPACE_LBRAC = " &#91;" local RBRAC = "&#93;" local TEMP_LT = u(0xFFF1) local TEMP_GT = u(0xFFF2) local TEMP_LBRAC = u(0xFFF3) local TEMP_RBRAC = u(0xFFF4) local TEMP_SEMICOLON = u(0xFFF5) local function apply_subst(...) apply_subst = require(usex_module).apply_subst return apply_subst(...) end local function check_isbn(...) check_isbn = require(check_isxn_module).check_isbn return check_isbn(...) end local function check_issn(...) check_issn = require(check_isxn_module).check_issn return check_issn(...) end local function debug_track(...) debug_track = require(debug_track_module) return debug_track(...) end local function decode_entities(...) decode_entities = require(string_utilities_module).decode_entities return decode_entities(...) end local function embedded_language_links(...) embedded_language_links = require(links_module).embedded_language_links return embedded_language_links(...) end local function escape_wikicode(...) escape_wikicode = require(parse_utilities_module).escape_wikicode return escape_wikicode(...) end local function find_best_script_without_lang(...) find_best_script_without_lang = require(scripts_module).findBestScriptWithoutLang return find_best_script_without_lang(...) end local function find_parameters(...) find_parameters = require(template_parser_module).find_parameters return find_parameters(...) end local function format_categories(...) format_categories = require(utilities_module).format_categories return format_categories(...) end local function format_processed_labels(...) format_processed_labels = require(labels_module).format_processed_labels return format_processed_labels(...) end local function format_qualifier(...) format_qualifier = require(qualifier_module).format_qualifier return format_qualifier(...) end local function format_usex(...) format_usex = require(usex_module).format_usex return format_usex(...) end local function get_lang(...) get_lang = require(languages_module).getByCode return get_lang(...) end local function get_number(...) get_number = require(number_utilities_module).get_number return get_number(...) end local function get_script(...) get_script = require(scripts_module).getByCode return get_script(...) end local function gsplit(...) gsplit = require(string_utilities_module).gsplit return gsplit(...) end local function page_should_be_ignored(...) page_should_be_ignored = require(usex_templates_module).page_should_be_ignored return page_should_be_ignored(...) end local function parse_inline_modifiers(...) parse_inline_modifiers = require(parse_utilities_module).parse_inline_modifiers return parse_inline_modifiers(...) end local function parse_inline_modifiers_from_segments(...) parse_inline_modifiers_from_segments = require(parse_utilities_module).parse_inline_modifiers_from_segments return parse_inline_modifiers_from_segments(...) end local function parse_multi_delimiter_balanced_segment_run(...) parse_multi_delimiter_balanced_segment_run = require(parse_utilities_module).parse_multi_delimiter_balanced_segment_run return parse_multi_delimiter_balanced_segment_run(...) end local function parse_term_with_lang(...) parse_term_with_lang = require(parse_utilities_module).parse_term_with_lang return parse_term_with_lang(...) end local function pattern_escape(...) pattern_escape = require(string_pattern_escape_module) return pattern_escape(...) end local function pluralize(...) pluralize = require(en_utilities_module).pluralize return pluralize(...) end local function process_params(...) process_params = require(parameters_module).process return process_params(...) end local function remove_links(...) remove_links = require(links_module).remove_links return remove_links(...) end local function roman_to_arabic(...) roman_to_arabic = require(roman_numerals_module).roman_to_arabic return roman_to_arabic(...) end local function replacement_escape(...) replacement_escape = require(string_replacement_escape_module) return replacement_escape(...) end local function scribunto_parameter_key(...) scribunto_parameter_key = require(scribunto_module).scribunto_parameter_key return scribunto_parameter_key(...) end local function serial_comma_join(...) serial_comma_join = require(table_module).serialCommaJoin return serial_comma_join(...) end local function shallow_copy(...) shallow_copy = require(table_module).shallowCopy return shallow_copy(...) end local function split(...) split = require(string_utilities_module).split return split(...) end local function split_alternating_runs(...) split_alternating_runs = require(parse_utilities_module).split_alternating_runs return split_alternating_runs(...) end local function split_and_process_raw_labels(...) split_and_process_raw_labels = require(labels_module).split_and_process_raw_labels return split_and_process_raw_labels(...) end local function split_on_comma(...) split_on_comma = require(parse_utilities_module).split_on_comma return split_on_comma(...) end local function tag_text(...) tag_text = require(script_utilities_module).tag_text return tag_text(...) end local function tag_transcription(...) tag_transcription = require(script_utilities_module).tag_transcription return tag_transcription(...) end local function tag_translit(...) tag_translit = require(script_utilities_module).tag_translit return tag_translit(...) end local function ulen(...) ulen = require(string_utilities_module).len return ulen(...) end local function unitalicize_brackets(...) unitalicize_brackets = require(italics_module).unitalicize_brackets return unitalicize_brackets(...) end local function upper(...) upper = require(string_utilities_module).upper return upper(...) end local function usub(...) usub = require(string_utilities_module).sub return usub(...) end local function yesno(...) yesno = require(yesno_module) return yesno(...) end local function track(page) debug_track("quote/" .. page) end local function maintenance_line(text) return '<span class="maintenance-line">(' .. text .. ")</span>" end local function isbn(text) return "[[Special:BookSources/" .. text .. "|→ISBN]]" .. check_isbn( text, '&nbsp;<span class="error" style="font-size:88%">Invalid&nbsp;ISBN</span>[[Category:Pages with ISBN errors]]' ) end local function issn(text) return "[https://www.worldcat.org/issn/" .. text .. " →ISSN]" .. check_issn( text, '&nbsp;<span class="error" style="font-size:88%">Invalid&nbsp;ISSN</span>[[Category:Pages with ISSN errors]]' ) end local function lccn(text) text = text:gsub(" ", "") if text:find("-") then -- old-style LCCN; reformat per request by [[User:The Editor's Apprentice]] local prefix, part1, part2 = text:match("^(.-)(%d+)%-(%d+)$") if prefix then if ulen(part2) < 6 then part2 = ("0"):rep(6 - ulen(part2)) .. part2 end text = prefix .. part1 .. part2 end end return "[https://lccn.loc.gov/" .. mw.uri.encode(text) .. " →LCCN]" end local function format_date(text) return mw.getCurrentFrame():callParserFunction("#formatdate", text, "dmy") end -- Parse a raw ll= param (or nil) to individual label info objects and then concatenate them appropriately into a -- qualifier input, respecting flags like `omit_preComma` and `omit_postSpace` in the label specs. local function parse_and_format_labels(raw_ll, lang) if not raw_ll then return nil end local labels = split_and_process_raw_labels{labels = raw_ll, lang = lang, nocat = true} labels = format_processed_labels{labels = labels, lang = lang, no_ib_content = true} if labels ~= "" then -- not sure labels can be an empty string but it seems possible in some circumstances return {labels} end end -- Convert a comma-separated list of language codes to a comma-separated list of language names. `fullname` is the -- name of the parameter from which the list of language codes was fetched. local function format_langs(langs) local names = {} for i, lang in ipairs(langs) do names[i] = lang:getCanonicalName() end if #names == 1 then return names[1] end return serial_comma_join(names) end local function get_first_lang(langs) return langs[1] or get_lang("und") end --[=[ Normally we parse off inline modifiers and language code prefixes in various places, e.g. he:מרים<tr:Miryem>. But we exclude HTML entries with <span ...>, <i ...>, <br/> or similar in it, caused by wrapping an argument in {{l|...}}, {{lang|...}} or similar. Basically, all tags of the sort we parse here should consist of a less-than sign, plus letters, plus a colon, e.g. <tr:...>, so if we see a tag on the outer level that isn't in this format, we don't try to parse it. The restriction to the outer level is to allow generated HTML inside of e.g. qualifier modifiers, such as foo<q:similar to {{m|fr|bar}}> (if we end up supporting such modifiers). Also exclude things that look like URL's from being parsed as having language code prefixes. ]=] local function val_should_not_be_parsed_for_annotations(val) return val:find("^[^<]*<%l*[^%l:]") or val:find("^%l+://") end local param_mods = { t = { -- <t:...> and <gloss:...> are aliases. item_dest = "gloss", }, gloss = {}, alt = {}, tr = {}, ts = {}, subst = {}, sc = {type = "script"}, f = { convert = function(arg, parse_err) local prefix, val = arg:match("^(.-):([^ ].*)$") if not prefix then prefix = "" val = arg end local tags, sc_code, sc = prefix:match("^(.*)/(.-)$") if sc_code then sc = get_script(sc_code) or require(languages_error_module)(sc_code, parse_err, "script code", nil, "not real lang") else tags = prefix end local quals if tags ~= "" then quals = split_on_comma(tags) for i, qual in ipairs(quals) do local obj = get_lang(qual, nil, "allow etym") or get_script(qual) quals[i] = obj or qual end end return { quals = quals, sc = sc, val = val, } end, store = "insert", }, q = {}, qq = {}, } local function generate_obj_annotated_text(text, parse_err, paramname) local obj = {} if text:find(":[^ ]") or text:find("%[%[") then local display, is_wikipedia_wikisource obj.text, obj.lang, obj.link, display, is_wikipedia_wikisource = parse_term_with_lang { term = text, parse_err = parse_err, paramname = paramname } -- HACK: If object is a Wikipedia or Wikisource link, we need to convert it to a two-part link -- to avoid the w: or s: prefix showing. We should probably avoid this by calling -- language_link() (in [[Module:links]]) in format_annotated_text() instead of the hacky stuff -- that we currently do; but we need to test that carefully to make sure it doesn't do things like -- munge % signs. if is_wikipedia_wikisource and not obj.text:find("%[%[") and not obj.text:find("%]%]") then -- Don't directly set .alt, because then if the user specifies <alt:...>, it will cause an error in -- parse_inline_modifiers(). obj.display = display end else obj.text = text obj.link = text end return obj end --[=[ Parse a textual property that may be in a foreign language or script and may be annotated with a language prefix and/or inline modifiers. `val` is the value of the parameter and `fullname` is the name of the parameter from which the value was retrieved. `explicit_gloss`, if specified and non-nil, overrides any gloss specified using the <t:...> or <gloss:...> inline modifier. If `val` is nil, the return value of this function is nil. Otherwise it is parsed for a language prefix (e.g. 'ar:مُؤَلِّف') and inline modifiers (e.g. 'ar:مُؤَلِّف<t:Author>'), and the return value is an object with the following fields: `lang`: The language object corresponding to the language prefix, if specified, or nil if no language prefix is given. `text`: The text after stripping off any language prefix and inline modifiers. `link`: The link part of the text if it consists of a two-part link; otherwise, same as `text`. `alt`: Display text specified using the <alt:...> modifier, if given; otherwise, nil. `subst`: Substitutions used to generate the transliteration, in the same format as the subst= parameter. `sc`: The script object corresponding to the <sc:...> modifier, if given; otherwise nil. `tr`: The transliteration corresponding to the <tr:...> modifier, if given; otherwise nil. `ts`: The transcription corresponding to the <ts:...> modifier, if given; otherwise nil. `gloss`: The gloss/translation corresponding to the `explicit_gloss` parameter (if given and non-nil), otherwise the <t:...> or <gloss:...> modifiers if given, otherwise nil. `f`: Foreign versions of the text. `q`: Left qualifiers. `qq`: Right qualifiers. Note that as a special case, if `val` contains HTML tags at the top level (e.g. '<span class="Arab">...</span>', as might be generated by specifying {{lang|ar|مُؤَلِّف}}), no language prefix or inline modifiers are parsed, and the return value has the `noscript` field set to true, which tells format_annotated_text() not to try to identify the script of the text and CSS-tag the text accordingly, but to leave the text untagged. This object can be passed to format_annotated_text() to format a string displaying the text (appropriately script-tagged, unless `noscript` is set, as described above) and modifiers. ]=] local function parse_annotated_text(val, fullname, explicit_gloss) if not val then return nil end -- When checking for inline modifiers, exclude HTML entry with <span ...>, <i ...>, <br/> or similar in it, caused -- by wrapping an argument in {{l|...}}, {{lang|...}} or similar. Also exclude URL's from being parsed as having -- language code prefixes. See val_should_not_be_parsed_for_annotations() for more information. If we find a -- parameter value with top-level HTML in it, add 'noscript = true' to indicate that we should not try to do script -- inference and tagging. (Otherwise, e.g. if you specify {{lang|ar|مُؤَلِّف}} as the author, you'll get an extra big -- font coming from the fact that {{lang|...}} wraps the Arabic text in CSS that increases the size from the -- default, and then we do script detection and again wrap the text in the same CSS, which increases the size even -- more.) if val_should_not_be_parsed_for_annotations(val) then return {text = val, link = val, noscript = true, gloss = explicit_gloss} end local obj if val:find("<") then -- Check for inline modifier. obj = parse_inline_modifiers(val, { paramname = fullname, param_mods = param_mods, generate_obj = generate_obj_annotated_text, }) else obj = generate_obj_annotated_text(val, nil, fullname) end if explicit_gloss then obj.gloss = explicit_gloss end return obj end local html_entity_char_to_replacement = { ["<"] = TEMP_LT, [">"] = TEMP_GT, ["["] = TEMP_LBRAC, ["]"] = TEMP_RBRAC, } local function html_entity_replacement(entity, code_without_semicolon, hash, xcode, x, code) -- Try to decode the entity. If successful, Replace certain special HTML entities (those that are bracket-like) -- with single Unicode characters; otherwise, replace the semicolon with a special character so it won't get -- interpreted as a delimiter. local ch = decode_entities(entity) if ch ~= entity then return html_entity_char_to_replacement[ch] or code_without_semicolon .. TEMP_SEMICOLON end -- If the entity doesn't decode, escape it anyway iff it follows a valid format. if hash == "" then -- Any nonstandard MediaWiki-only entities have now been filtered off, so treat any non-ASCII characters as -- invalid. return xcode:match("^[^\128-\255]+$") and code_without_semicolon .. TEMP_SEMICOLON or entity elseif x == "" then return xcode:match("^%d+$") and code_without_semicolon .. TEMP_SEMICOLON or entity end return code:match("^%x+$") and code_without_semicolon .. TEMP_SEMICOLON or entity end local html_entity_replacement_to_char = { [TEMP_LT] = "&lt;", [TEMP_GT] = "&gt;", [TEMP_LBRAC] = "&#91;", [TEMP_RBRAC] = "&#93;", [TEMP_SEMICOLON] = ";", } local function undo_html_entity_replacement(txt) -- Pattern covers everything in html_entity_replacement_to_char. return (txt:gsub("\239\191[\177-\181]", html_entity_replacement_to_char)) end -- NOTE: We try hard to optimize this function for the common cases and avoid loading [[Module:parse utilities]] -- in such cases. The cases we can handle without loading [[Module:parse utilities]] are single values (no -- semicolons present) without inline modifiers or language prefixes, and multi-entity values (semicolons present) -- without (a) brackets of any kind (including parens, braces and angle brackets; angle brackets typically indicate -- inline modifiers and other brackets may protect a semicolon from being interpreted as a delimiter); -- (b) ampersands (which may indicate HTML entities, which protect a semicolon from being interpreted as a -- delimiter); and (c) colons not followed by a space (which may indicate a language prefix). local function generate_obj_multivalued_annotated_text(text, parse_err, paramname, no_undo_html_entity_replacement) local obj = generate_obj_annotated_text(text, parse_err, paramname) if not no_undo_html_entity_replacement then obj.text = undo_html_entity_replacement(obj.text) obj.link = undo_html_entity_replacement(obj.link) end return obj end --[=[ Similar to parse_annotated_text() but the parameter value may contain multiple semicolon-separated entities, each with their own inline modifiers. Some examples: * mainauthor=Paula Pattengale; Terea Sonsthagen * author=Katie Brick; J. Cody Nielsen; Greg Jao; Eric Paul Rogers; John A. Monson * author=Suzanne Brockmann; Patrick G. Lawlor (Patrick Girard); Melanie Ewbank * author=G Ristori; et al. * author=Jason Scott; zh:王晰宁<t:Wang Xining> * editors=zh:包文俊; zh:金心雯 * quotee=zh:張福運<t:Chang Fu-yun>; zh:張景文<t:Chang Ching-wen> There may be embedded semicolons within brackets, braces or parens that should not be treated as delimiters, e.g.: * author=Oliver Optic [pseudonym; {{w|William Taylor Adams}}] * author=author=Shannon Drake (pen name; {{w|Heather Graham Pozzessere}}) * author=James (the Elder;) Humphrys There may also be HTML entities with semicolons in them: * author=&#91;{{w|Gilbert Clerke}}&#93; * 2ndauthor=Martin Biddle &amp; Sally Badham * author=Peter Christen Asbj&oslash;rnsen There may be both embedded semicolons and HTML entities with semicolons in them: * author=&#91;{{w|Voltaire}} [pseudonym; François-Marie Arouet]&#93; In general we want to treat &#91; like an opening bracket and &#93; like a closing bracket. Beware that they may be mismatched: * author=Anonymous &#91;{{w|Karl Maria Kertbeny}}] Here, `val` is the value of the parameter and `fullname` is the name of the parameter from which the value was retrieved. `explicit_gloss`, if specified and non-nil, overrides any gloss specified using the <t:...> or <gloss:...> inline modifier, and `explicit_gloss_fullname` is the name of the parameter from which this value was retrieved. (If `explicit_gloss` is specified and multiple values were seen, an error results.) Return value is a list of objects of the same sort as returned by parse_annotated_text(). ]=] local function parse_multivalued_annotated_text(val, fullname, explicit_gloss, explicit_gloss_fullname) if not val then return nil end -- NOTE: In the code that follows, we use `entity` most of the time to refer to one of the semicolon-separated -- values in the multivalued param. Entities are most commonly people (typically authors, editors, translators or -- the like), but may be the names of publishers, locations, or other entities. "Entity" can also refer to HTML -- entities; in the places where this occurs, the variable name contains 'html' in it. local splitchar, english_delim if val:find("^,") then splitchar = "," english_delim = "comma" val = val:gsub("^,", "") else splitchar = ";" english_delim = "semicolon" end -- Optimization #1: No semicolons/commas or angle brackets (indicating inline modifiers). if not val:find("[<" .. splitchar .. "]") then if val_should_not_be_parsed_for_annotations(val) then return {{text = val, link = val, noscript = true}} else return {generate_obj_multivalued_annotated_text(val, nil, fullname, "no undo html entity replacement")} end end -- Optimization #2: Semicolons/commas but no angle brackets (indicating inline modifiers), braces, brackets, or -- parens (any of which would protect the semicolon/comma from interpretation as a delimiter), and no ampersand -- (which might indicate an HTML entity with a terminating semicolon, which should not be interpreted as a -- delimiter). if not val:find("[<>%[%](){}&]") then local entity_objs = {} for entity in gsplit(val, "%s*" .. splitchar .. "%s*") do if val_should_not_be_parsed_for_annotations(entity) then insert(entity_objs, { text = entity, link = entity, noscript = true }) else insert(entity_objs, generate_obj_multivalued_annotated_text(entity, nil, fullname, "no undo html entity replacement")) end end return entity_objs end -- Escape HTML entities, and get rid of directionality markers. local amp = val:find("&", nil, true) if amp then -- The pattern is more permissive than the usual entity pattern, as MediaWiki has some nonstandard entities -- that have non-ASCII characters in their codes. val = val:gsub("((&(#?)(([xX]?)([%w\128-\255]+)));)", html_entity_replacement) end -- Pattern covers left-to-right (U+200E) and right-to-left (U+200F). val = val:gsub("\226\128[\142\143]", "") -- Parse balanced segment runs, treating HTML entities for left and right bracket and left and right angle bracket -- as matching literal versions of the same characters. local entity_runs = parse_multi_delimiter_balanced_segment_run( val, {{"[" .. TEMP_LBRAC, "]" .. TEMP_RBRAC}, {"(", ")"}, {"{", "}"}, {"<" .. TEMP_LT, ">" .. TEMP_GT}}, true ) if type(entity_runs) == "string" then local undo_val = undo_html_entity_replacement(val) -- Parse error due to unbalanced delimiters. Don't throw an error here; instead, don't attempt to parse off -- any annotations, but return the value directly, maybe allowing script tagging (not allowing it if it appears -- the text is already script-tagged). return {{text = undo_val, link = undo_val, noscript = not not val_should_not_be_parsed_for_annotations(val)}} end -- Split on semicolon (or comma), possibly surrounded by whitespace. local separated_groups = split_alternating_runs(entity_runs, "%s*" .. splitchar .. "%s*") -- Process each value. local entity_objs = {} for _, entity_group in ipairs(separated_groups) do -- Rejoin runs that don't involve <...>. local j = 2 while j <= #entity_group do if not entity_group[j]:find("^<.*>$") then entity_group[j - 1] = entity_group[j - 1] .. entity_group[j] .. entity_group[j + 1] remove(entity_group, j) remove(entity_group, j) else j = j + 2 end end local oneval = undo_html_entity_replacement(concat(entity_group)) -- When checking for inline modifiers, exclude HTML entry with <span ...>, <i ...>, <br/> or similar in it, -- caused by wrapping an argument in {{l|...}}, {{lang|...}} or similar. Also exclude URL's from being parsed -- as having language code prefixes. This works analogously to parse_annotated_text(); see there for more. if val_should_not_be_parsed_for_annotations(oneval) then insert(entity_objs, { text = oneval, link = oneval, noscript = true }) else local obj if #entity_group > 1 then -- Check for inline modifier. obj = parse_inline_modifiers_from_segments({ group = entity_group, arg = oneval, props = { paramname = fullname, param_mods = param_mods, generate_obj = generate_obj_multivalued_annotated_text, }, }) else obj = generate_obj_multivalued_annotated_text(entity_group[1], nil, fullname) end insert(entity_objs, obj) end end if explicit_gloss then if #entity_objs > 1 then error( ( "Can't specify |%s= along with multiple %s-separated entities in |%s=; use the <t:...> " .. "inline modifier attached to the individual entities" ):format(explicit_gloss_fullname, english_delim, fullname) ) end entity_objs[1].gloss = explicit_gloss end return entity_objs end --[=[ Format a text property that may be in a foreign language or script, along with annotations. This is conceptually similar to the full_link() function in [[Module:links]], but displays the annotations in a different format that is more appropriate for bibliographic entries. The output looks like this: TEXT [TRANSLIT /TRANSCRIPTION/, GLOSS] `textobj` is as returned by parse_annotated_text(). `tag_text_func`, if supplied, is a function of one argument to further wrap the text after it has been processed and CSS-tagged appropriately, directly before insertion. `tag_gloss_func` is a similar function for the gloss. ]=] local function format_annotated_text(textobj, tag_text_func, tag_gloss_func) if not textobj then return nil end local text, link = textobj.text, textobj.link local subst, tr, ts, f, gloss = textobj.subst, textobj.tr, textobj.ts, textobj.f, textobj.gloss -- Retrieve the display text, either specified by the user (.alt) or by parse_annotated_text() (.display) when a -- Wikipedia link is given. local alt = textobj.alt or textobj.display if alt then if link:find("%[%[") or link:find("%]%]") then local errmsg = ("Can't currently handle embedded links in '%s', with <alt:...> text '%s'"):format(link, alt) error(escape_wikicode(errmsg)) end text = ("[[%s|%s]]"):format(link, alt) end -- See above for `noscript`, meaning HTML was found in the text value, probably generated using {{lang|...}}. -- {{lang}} already script-tags the text and processes embedded language links, so we don't want to do it again (in -- fact, the code below within the if-clause is similar to what {{lang}} does). In such a case, an explicit language -- won't be available and find_best_script_without_lang() may not be accurate, so we can't do automatic transliteration. if not textobj.noscript then local lang = textobj.lang -- As an optimization, don't do script detection on an argument that contains only ASCII. local sc = textobj.sc or lang and lang:findBestScript(text) or not text:find("^[ -~]$") and find_best_script_without_lang(text) or nil -- As an optimization, don't do any of the following if there's no language, script, translit or transcription, -- as will be the case with simple ASCII values. if lang or sc or tr or ts then if not lang then lang = get_lang("und") end if tr == "-" then tr = nil elseif not tr and sc and not sc:getCode():find("Lat") then -- Latn, Latf, Latg, pjt-Latn -- might return nil local text_for_tr = text if subst then text_for_tr = apply_subst(text_for_tr, subst) else text_for_tr = remove_links(text) end tr = (lang:transliterate(text_for_tr, sc)) end if text:find("%[%[") then -- FIXME: embedded_language_links() replaces % signs with their URL-encoded equivalents, -- which messes up URL's that may be present (e.g. if chapterurl= is given). IMO this -- should not happen, and embedded_language_links() should do nothing if no embedded links -- are present. To work around this, only call embedded_language_links() when there are -- embedded links present. text = embedded_language_links({ term = text, lang = lang, sc = sc, }) end if lang:getCode() ~= "und" or sc:getCode() ~= "Latn" then text = tag_text(text, lang, sc) end if tr then -- Should we link to the transliteration of languages with lang:link_tr()? Probably not because `text` is not -- likely to be a term that has an entry. tr = tag_translit(tr, lang, "usex") end if ts then ts = tag_transcription(ts, lang, "usex") end end end text = unitalicize_brackets(text) if tag_text_func then text = tag_text_func(text) end local parts = {} if textobj.q then insert(parts, format_qualifier(textobj.q) .. " ") end insert(parts, text) if tr or ts or f or gloss then insert(parts, SPACE_LBRAC) local subparts = {} if tr or ts then local tr_ts if ts then ts = "/" .. ts .. "/" end if tr and ts then tr_ts = tr .. " " .. ts else tr_ts = tr or ts end insert(subparts, tr_ts) end if f then for _, ff in ipairs(f) do local sc = ff.sc local lang if not sc and ff.quals then local qual = ff.quals[1] if type(qual) == "string" then -- do nothing; we'll do script detection farther down elseif qual:hasType("script") then sc = qual else -- language sc = qual:findBestScript(ff.val) lang = qual end end if not lang then lang = get_lang("und") end sc = sc or find_best_script_without_lang(ff.val) local val = embedded_language_links({ term = ff.val, lang = lang, sc = sc, }) if lang:getCode() ~= "und" or sc:getCode() ~= "Latn" then val = tag_text(val, lang, sc) end local qual_prefix if ff.quals then for i, qual in ipairs(ff.quals) do if type(qual) ~= "string" and (qual:hasType("script") or qual:hasType("language")) then ff.quals[i] = qual:getCanonicalName() end end qual_prefix = concat(ff.quals, "/") .. ": " else qual_prefix = "" end insert(subparts, qual_prefix .. val) end end if gloss then gloss = '<span class="e-translation">' .. gloss .. "</span>" gloss = unitalicize_brackets(gloss) if tag_gloss_func then gloss = tag_gloss_func(gloss) end insert(subparts, gloss) end insert(parts, concat(subparts, ", ")) insert(parts, RBRAC) end if textobj.qq then insert(parts, " " .. format_qualifier(textobj.qq)) end return concat(parts) end --[=[ Format a multivalued text property that may be in a foreign language or script, along with annotations. This is the multivalued analog to format_annotated_text(), and formats each individual entity using format_annotated_text(), joining the results with `delimiter`, which defaults to ", ". It `delimiter` is "and" or "or", join the results using serial_comma_join() with the specified conjunction. `textobjs` is as returned by parse_multivalued_annotated_text(). `tag_text_func` and `tag_gloss_func` are as in format_annotated_text(). ]=] local function format_multivalued_annotated_text(textobjs, delimiter, tag_text_func, tag_gloss_func) if not textobjs then return nil end if #textobjs == 1 then return format_annotated_text(textobjs[1], tag_text_func, tag_gloss_func) end local parts = {} for _, textobj in ipairs(textobjs) do insert(parts, format_annotated_text(textobj, tag_text_func, tag_gloss_func)) end -- Change delimiter to semicolon if the items themselves contain commas (e.g., in ", Jr.") local use_semicolon = false for _, obj in ipairs(textobjs) do -- Use remove_links to ignore commas in links if obj.text and remove_links(obj.text):find(", ") then use_semicolon = true break end end local n = #parts if n > 0 and parts[n]:match("^'*et al[.']*$") then -- Special handling for 'et al.' parts[n] = "''et al.''" if n == 2 then -- author et al. return concat(parts, " ") else -- author 1, author 2, et al. return concat(parts, (use_semicolon and "; ") or ", ") end if delimiter == "and" or delimiter == "or" then delimiter = ", " end return concat(parts, delimiter) end if delimiter == "and" or delimiter == "or" then return serial_comma_join(parts, {conj = delimiter}) end return concat(parts, delimiter or ((use_semicolon and "; ") or ", ")) end -- Fancy version of ine() (if-not-empty). Converts empty string to nil, but also strips leading/trailing space. local function ine(arg) if not arg then return nil elseif type(arg) ~= "string" then return arg end arg = mw.text.trim(arg) if arg == "" then return nil end return arg end local abbrs = { ["a."] = {anchor = "a.", full = "ante"}, ["c."] = {anchor = "c.", full = "circa"}, ["p."] = {anchor = "p.", full = "post"}, } -- Process prefixes 'a.' (ante), 'c.' (circa) and 'p.' (post) at the beginning of an arbitrary date or year spec. -- Returns two values, the formatted version of the prefix and the date spec minus the prefix. If no prefix is found, -- returns an empty string and the full date. local function process_ante_circa_post(date) local prefix = usub(date, 1, 2) local abbr = abbrs[prefix] local abbr_prefix = "" if abbr then abbr_prefix = "''[[Appendix:Glossary#" .. abbr.anchor .. '|<abbr title="' .. abbr.full .. '">' .. abbr.anchor .. "</abbr>]]'' " -- Remove lowercase letter, period, and space from beginning of date parameter. date = ugsub(date, "^%l%.%s*", "") end return abbr_prefix, date end -- Format the arguments that specify the date of the quotation. These include the following: -- |date=: The date. If |start_date= is given, this is the end date. -- |year=, |month=: Year and month of quotation date or end of range, if |date= isn't given. -- |start_date=: The start date, to specify a range. -- |start_year=, |start_month=: Year and month of start of range, if |start_date= isn't given. -- |accessdate=: Date a website was accessed; processed if no other date was given. -- |nodate=: Indicate that no date is present; otherwise a maintenance line will be displayed if there is no date. -- -- If `parampref` and/or `paramsuf` are given, this modifies all the date arguments accordingly. For example, if -- `parampref` == "orig" and `paramsuf` is omitted, the date is specified using |origdate= or |origyear=/|origmonth=, -- and the start of the range is |origstart_date=, etc. Similarly, if `parampref` is omitted and `paramsuf` is -- "_published", the date is specified using |date_published= or |year_published=/|month_published=, and the start of -- the range is |start_date_published=, etc. -- -- `a` and `get_full_paramname` are functions with the same interpretation as the local functions of the same name in -- source(). These are used to fetch parameters and get their full names. Note that this may cause all arguments to -- have an index added to them (|date2=, |year2=, |month2=, etc.). -- -- `alias_map` is as in source() and is used to map canonical arguments to their aliases when aliases were used. -- -- If `bold_year` is given, displayed years are boldfaced unless boldface is present in the parameter value. -- -- If `maintenance_line_no_date` is specified, it should be a string that will be returned if no date is found (i.e. -- neither |date= nor |year=, or their appropriate equivalents per `parampref` and `paramsuf`, are specified, and -- neither |nodate= is given to indicate that there is no date, or |accessdate= is given). -- -- Returns two values: the formatted date and a boolean indicating whether to add a maintenance category -- [[:Category:Requests for date in LANG entries]]. The first return value will be nil if nothing is to be added -- (in which case the scond return value will always be nil). local function format_date_args( a, get_full_paramname, alias_map, parampref, paramsuf, bold_year, maintenance_line_no_date, year_last ) local output = {} parampref = parampref or "" paramsuf = paramsuf or "" local function getp(param) return a(parampref .. param .. paramsuf) end local function pname(param) local fullname = get_full_paramname(parampref .. param .. paramsuf) return alias_map[fullname] or fullname end -- Format `timestamp` (a timestamp referencing a date) according to the spec in `code`. `param` is the base name of -- the parameter from which the timestamp was fetched, for error messages. local function format_date_with_code(code, timestamp, param) local language = mw.getContentLanguage() local ok, date = pcall(language.formatDate, language, code, timestamp) if ok then return date else -- All the formats used in format_date_args() are fine, so the timestamp must be at fault. error( ( "Timestamp |%s=%s (possibly canonicalized from its original format) could not be parsed; see the " .. "[[mw:Help:Extension:ParserFunctions##time|documentation for the #time parser function]]" ):format(pname(param), tostring(timestamp)) ) end end -- Try to figure out if the given timestamp has the day of the month explicitly given. We use the following -- algorithm: -- 1. Format as year-month-day; if the day is not 1, the day was explicitly given, since if only the year/month are -- given, the day shows up as 1. -- 2. If the day shows up as 1 and there isn't a 1 or 01 in the timestamp, the day wasn't explicitly given. -- 3. Otherwise, if there are three separate numbers (e.g. 2022-07-01), or two separate numbers plus a capitalized -- letter (taken as an English month, e.g. 2022 July 1), the day was explicitly given, otherwise not. -- -- `param` is the base name of the parameter from which the timestamp was fetched. local function date_has_day_specified(timestamp, param) local day = format_date_with_code("j", timestamp, param) if day ~= "1" then return true end local english_month = timestamp:find("%u") local canon_timestamp = mw.text.trim((timestamp:gsub("%D+", " "))) local seen_nums = split(canon_timestamp, " ", true) local saw_one = false for _, num in ipairs(seen_nums) do if num == "1" or num == "01" then saw_one = true break end end if not saw_one then return false end return #seen_nums >= 3 or english_month and #seen_nums >= 2 end -- Format a date with boldfaced year, as e.g. '''2023''' August 3. `explicit_day_given` indicates whether to include -- the day; if false, the return value will be e.g. '''2023''' August. `date_param` is the base name of the param -- from which the date was fetched, for error messages. local function format_bold_date(date, explicit_day_given, date_param) local day_month_code = explicit_day_given and "j F" or "F" local month_day_code = explicit_day_given and "F j" or "F" if year_last then if bold_year then -- This formats like "3 August '''2023'''" (or "August '''2023'''" if day not explicitly given). return format_date_with_code(day_month_code .. " '''Y'''", date, date_param) else -- This formats like "3 August 2023" (or "August 2023" if day not explicitly given). return format_date_with_code(day_month_code .. " Y", date, date_param) end else if bold_year then -- This formats like "'''2023''' August 3" (or "'''2023''' August" if day not explicitly given). return format_date_with_code("'''Y''' " .. month_day_code, date, date_param) else -- This formats like "2023 August 3" (or "2023 August" if day not explicitly given). return format_date_with_code("Y " .. month_day_code, date, date_param) end end end -- The formatDate method of the mw.language object behaves like the {{#time:}} parser function, which doesn't -- accept the formats "monthday monthname, year" or "year monthname monthday", but outputs garbage when it receives -- them, behavior inherited from PHP. {{#formatdate:}} magic word is more forgiving. Fix dates so that, for -- instance, the |date= parameter of {{quote-journal}} (which uses this code) and the |accessdate= parameter (which -- uses {{#formatdate:}}) accept similar date formats. See: -- * [[mw:Extension:Scribunto/Lua_reference_manual#mw.language:formatDate]] -- * [[mw:Help:Extension:ParserFunctions##time]] -- * [[mw:Help:Magic_words#Formatting]] -- `date` is the date spec from the user, which is assumed to come from a parameter whose base name ends in "date"; -- `parampref` is the prefix added to "date" to get the parameter name. local function fix_date(date, param_pref) if tonumber(date) ~= nil then error( ("|%s= should contain a full date (year, month, day of month); use |%s= for year"):format( pname(param_pref .. "date"), pname(param_pref .. "year") ) ) elseif date and date:find("%s*%a+,%s*%d+%s*$") then error( ("|%s= should contain a full date (year, month, day of month); use |%s=, |%s= for month and year"):format( pname(param_pref .. "date"), pname(param_pref .. "month"), pname(param_pref .. "year") ) ) end if date then -- Commas are replaced with spaces to prevent parsing issues local fixed_date = ugsub(date, ", *", " ") return (ugsub(ugsub(fixed_date or date, "(%d+ %a+),", "%1"), "^(%d%d%d%d) (%a+ %d%d?)$", "%2 %1")) end end local start_date, date = fix_date(getp("start_date"), "start_"), fix_date(getp("date"), "") local year = getp("year") local month = getp("month") local start_year = getp("start_year") local start_month = getp("start_month") if date and year then error(("Only one of |%s= or |%s= should be specified"):format(pname("date"), pname("year"))) end if date and month then error( ("|%s= should only be specified in conjunction with |%s=, not with |%s="):format( pname("month"), pname("year"), pname("date") ) ) end if start_date and start_year then error(("Only one of |%s= or |%s= should be specified"):format(pname("start_date"), pname("start_year"))) end if start_date and start_month then error( ("|%s= should only be specified in conjunction with |%s=, not with |%s="):format( pname("start_month"), pname("start_year"), pname("start_date") ) ) end if (start_date or start_year) and not (date or year) then error( ("|%s= or |%s=/|%s= cannot be specified without specifying |%s= or |%s=/|%s="):format( pname("start_date"), pname("start_year"), pname("start_month"), pname("date"), pname("year"), pname("month") ) ) end local dash = "&nbsp;– " local day_explicitly_given = date and date_has_day_specified(date, "date") local start_day_explicitly_given = start_date and date_has_day_specified(start_date, "start_date") -- Format a date with boldfaced year, as e.g. '''2023''' August 3 (if `explicit_day_given` specified) or -- '''2023''' August (if `explicit_day_given` not specified). If no date specified, fall back to formatting based -- on the year and (optionally) month params given in `yearobj` and `monthobj`, boldfacing the year if not already. -- `date_param` is the base name of the param from which the date was fetched, for error messages. local function format_date_or_year_month(date, yearobj, monthobj, explicit_day_given, date_param) if date then return format_bold_date(date, explicit_day_given, date_param) else -- Boldface a year spec if it's not already boldface. if bold_year and not yearobj.text:find("'''") then -- Clone the year object before modifying it because we may use it later to check against the current -- year (if we're dealing with start_year). yearobj = shallow_copy(yearobj) yearobj.text = "'''" .. yearobj.text .. "'''" if yearobj.alt then yearobj.alt = "'''" .. yearobj.alt .. "'''" end end if year_last then return (monthobj and format_annotated_text(monthobj) .. " " or "") .. format_annotated_text(yearobj) else return format_annotated_text(yearobj) .. (monthobj and " " .. format_annotated_text(monthobj) or "") end end end local yearobj = parse_annotated_text(year, pname("year")) local monthobj = parse_annotated_text(month, pname("month")) local start_yearobj = parse_annotated_text(start_year, pname("start_year")) local start_monthobj = parse_annotated_text(start_month, pname("start_month")) if start_yearobj then local abbr_prefix abbr_prefix, start_yearobj.text = process_ante_circa_post(start_yearobj.text) start_yearobj.link = select(2, process_ante_circa_post(start_yearobj.link)) insert(output, abbr_prefix) elseif yearobj then local abbr_prefix abbr_prefix, yearobj.text = process_ante_circa_post(yearobj.text) yearobj.link = select(2, process_ante_circa_post(yearobj.link)) insert(output, abbr_prefix) end if start_date or start_year then local cur_year = yearobj and yearobj.text or format_date_with_code("Y", date, "date") local cur_month = monthobj and monthobj.text or date and format_date_with_code("F", date, "date") or nil local cur_day = date and day_explicitly_given and format_date_with_code("j", date, "date") or nil local beg_year = start_yearobj and start_yearobj.text or format_date_with_code("Y", start_date, "start_date") local beg_month = start_monthobj and start_monthobj.text or start_date and format_date_with_code("F", start_date, "start_date") or nil local beg_day = start_date and start_day_explicitly_given and format_date_with_code("j", start_date, "start_date") or nil if year_last then if beg_day then insert(output, beg_day .. " " .. beg_month) else insert(output, beg_month) end if beg_year ~= cur_year then insert(output, " " .. beg_year) end else insert(output, format_date_or_year_month( start_date, start_yearobj, start_monthobj, start_day_explicitly_given, "start_date" )) end if cur_year ~= beg_year then -- Different years; insert current date in full. if beg_month or cur_month then insert(output, dash) else insert(output, "–") end insert(output, format_date_or_year_month(date, yearobj, monthobj, day_explicitly_given, "date")) elseif cur_month and cur_month ~= beg_month then local month_ins = monthobj and format_annotated_text(monthobj) or cur_month -- Same year but different months; insert current month and (if available) current day. if cur_day then insert(output, dash) if year_last then insert(output, cur_day .. " " .. month_ins) else insert(output, month_ins .. " " .. cur_day) end else if beg_day then insert(output, dash) else insert(output, "–") end insert(output, month_ins) end elseif cur_day and cur_day ~= beg_day then -- Same year and month but different days; insert current day. insert(output, "–") insert(output, cur_day) else -- Same year, month and day; or same year and month, and day not available; or same year, and month and -- day not available. Do nothing. FIXME: Should we throw an error? end if year_last and beg_year == cur_year then if cur_month then insert(output, " " .. cur_year) else insert(output, " " .. cur_year) end end elseif date or yearobj then insert(output, format_date_or_year_month(date, yearobj, monthobj, day_explicitly_given, "date")) elseif not maintenance_line_no_date then -- Not main quote date. Return nil, caller will handle. return nil, nil elseif not getp("nodate") then local accessdate = getp("accessdate") if accessdate then local explicit_day_given = date_has_day_specified(accessdate, "accessdate") insert(output, format_bold_date(accessdate, explicit_day_given, "accessdate") .. " (last accessed)") else if mw.title.getCurrentTitle().namespace ~= 10 then return maintenance_line(maintenance_line_no_date), true end return nil, nil end end return ine(concat(output)), nil end local function tag_with_cite(txt) return "<cite>" .. txt .. "</cite>" end -- Display the source line of the quote, above the actual quote text. This contains the majority of the logic of this -- module (formerly contained in {{quote-meta/source}}). function export.source(args, alias_map, format_as_cite, other_controls) local tracking_categories = {} local argslang = args[1] or args.lang if not argslang then -- For the moment, only trigger an error on mainspace pages and -- other pages that are not user pages or pages containing discussions. -- These are the same pages that appear in the appropriate tracking -- categories. User and discussion pages have not generally been -- fixed up to include a language code and so it's more helpful -- to use a maintenance line than signal an error. local current_title = mw.title.getCurrentTitle() if not (current_title.namespace == 10 or page_should_be_ignored(current_title.fullText)) then require(languages_error_module)(nil, 1) end end -- Given a canonical param, convert it to the original parameter specified by the user (which may have been an -- alias). local function alias(param) return alias_map[param] or param end local output, sep = {} local overrides = other_controls and other_controls.overrides or {} -- Add text to the output. The text goes into a list, and we concatenate all the list components together at the -- end. To make it easier to handle comma-separated items, we keep track (in `sep`) of the separator (if any) that -- needs to be inserted before the next item added. For example, if we're in the "newversion" code (ind ~= ""), and -- there's no title and no URL, then the first time we add anything after the title, we don't want to add a -- separating comma because the preceding text will say "republished " or "republished as " or "translated as " or -- similar. In all- other cases, we do want to add a separating comma. The bare add() function reset the separator -- to be nothing, while the add_with_sep() function resets the separator to be the value of `next_sep` (defaulting -- to ", "), so the next time around we do add a comma to separate `text` from the preceding piece of text. local function add(text) if sep then insert(output, sep) end insert(output, text) sep = nil end local function add_with_sep(text, next_sep) add(text) sep = next_sep or ", " end -- FIXME: This is all very over-engineered, which makes it slow and memory-inefficient. -- Return a function that generates the actual parameter name associated with a base param (e.g. "author", "last"). -- The actual parameter name may have an index added (an empty string for the first set of params, e.g. author=, -- last=, or a numeric index for further sets of params, e.g. author2=, last2=, etc.). local function make_get_full_paramname(ind) return function(param) return param .. ind end end -- Function to fetch the actual parameter name associated with a base param (see make_get_full_paramname() above). -- Assigned at various times below by calling make_get_full_paramname(). We do it this way so that we can have -- wrapper functions that access params and define them only once. local get_full_paramname -- Return two values: the value of a parameter given the base param name (which may have a numeric index added), -- and the parameter name from which the value was fetched (which may be an alias, i.e. you can't necessarily fetch -- the parameter value from args[] given this name). The base parameter can be a list of such base params, which -- are checked in turn, or nil, in which case nil is returned. local function a_with_name(param) if not param then return nil elseif type(param) ~= "table" then local fullname = get_full_paramname(param) return args[fullname], alias(fullname) end for _, par in ipairs(param) do local val, fullname = a_with_name(par) if val then return val, alias(fullname) end end return nil end -- Fetch the value of a parameter given the base param name (which may have a numeric index added). The base -- parameter can be a list of such base params, which are checked in turn, or nil, in which case nil is returned. local function a(param) return (a_with_name(param)) end -- Identical to a_with_name(param) except that it verifies that no space is present. Should be used for URL's. local function aurl_with_name(param) local value, fullname = a_with_name(param) if value and value:find(" ") and not value:find("%[") then error(("URL not allowed to contain a space, but saw |%s=%s"):format(fullname, value)) end return value, fullname end -- Identical to a(param) except that it verifies that no space is present. Should be used for URL's. local function aurl(param) return (aurl_with_name(param)) end -- Convenience function to fetch a parameter that may be in a foreign language or text (and may consequently have -- a language prefix and/or inline modifiers), parse the annotations and convert the result into a formatted string. -- This is the same as parse_and_format_annotated_text() below but also returns the full param name as the second -- return value. local function parse_and_format_annotated_text_with_name(param, tag_text_func, tag_gloss_func) local val, fullname = a_with_name(param) local obj = parse_annotated_text(val, fullname) return format_annotated_text(obj, tag_text_func, tag_gloss_func), fullname end -- Convenience function to fetch a parameter that may be in a foreign language or text (and may consequently have -- a language prefix and/or inline modifiers), parse the modifiers and convert the result into a formatted string. -- This is a wrapper around parse_annotated_text() and format_annotated_text(). `param` is the base parameter name (see -- a_with_name()), `tag_text_func` is an optional function to tag the parameter text after all other processing (e.g. -- wrap in <cite>...</cite> tags), and `tag_gloss_func` is a similar function for the parameter translation/gloss. local function parse_and_format_annotated_text(param, tag_text_func, tag_gloss_func) return (parse_and_format_annotated_text_with_name(param, tag_text_func, tag_gloss_func)) end -- Convenience function to fetch a multivalued parameter that may be in a foreign language or text (and may -- consequently have a language prefix and/or inline modifiers), parse the modifiers and convert the result into a -- formatted string. This is the multivalued analog to parse_and_format_annotated_text_with_name() and returns two -- values, the formatted string and the full name of the parameter fetched. `delimiter` is as in -- format_multivalued_annotated_text(). local function parse_and_format_multivalued_annotated_text_with_name(param, delimiter, tag_text_func, tag_gloss_func) local val, fullname = a_with_name(param) local objs = parse_multivalued_annotated_text(val, fullname) local num_objs = objs and #objs or 0 return format_multivalued_annotated_text(objs, delimiter, tag_text_func, tag_gloss_func), fullname, num_objs end -- Convenience function to fetch a multivalued parameter that may be in a foreign language or text (and may -- consequently have a language prefix and/or inline modifiers), parse the modifiers and convert the result into a -- formatted string. This is the multivalued analog to parse_and_format_annotated_text(). `delimiter` is as in -- format_multivalued_annotated_text(). local function parse_and_format_multivalued_annotated_text(param, delimiter, tag_text_func, tag_gloss_func) return (parse_and_format_multivalued_annotated_text_with_name(param, delimiter, tag_text_func, tag_gloss_func)) end -- This determines whether to display "Mary Bloggs, transl." (if there's no author preceding) or "translated by -- Mary Bloggs" (if there's an author preceding). local author_outputted = false -- When formatting as a citation, the priority is to display a name and a date before the book/chapter title -- this tracks whether or not the author/date has been displayed local date_outputted, formatted_date, formatted_origdate, need_date = false local function add_date(no_paren) if not date_outputted then if no_paren then sep = ", " else sep = " " end if formatted_date then if no_paren then add(formatted_date) else add("(" .. formatted_date .. ")") end end if formatted_origdate then add(SPACE_LBRAC .. formatted_origdate .. RBRAC) end sep = ", " date_outputted = true end end local function is_anonymous(val) return val:match("^[Aa]nonymous$") or val:match("^[Aa]non%.?$") end -- Add a formatted author (whose values may be specified using `author` or, for compatibility purposes, split -- among various parameters): -- * `author` is the value of the author param (e.g. "author", "author2" or "2ndauthor"), and `author_fullname` is -- the full parameter name holding that value; -- * `trans_author` is the optional value of the param holding the gloss/translation of the author, and -- `trans_author_fullname` is the full parameter name holding that value (or nil for no such parameter); -- * `authorlink` is the value of the authorlink param, which holds the Wikipedia link of the author(s) in `author`, -- and `authorlink_fullname` is the full parameter name holding that value; -- * `trans_authorlink` is the optional value of the param holding the Wikipedia link of the gloss/translation of -- the author, and `trans_authorlink_fullname` is the full parameter name holding that value (or nil for no such -- parameter); -- * `first` is the value of the parameter holding the first name of the author, and `first_fullname` is the full -- parameter name holding that value; -- * `trans_first` is the value of the corresponding parameter holding the gloss/translation of the first name -- (e.g. "trans-first"), and `trans_first_fullname` is the full parameter name holding that value (or nil for -- no such parameter); -- * `last` is the value of the parameter holding the last name of the author, and `last_fullname` is the full -- parameter name holding that value; -- * `trans_last` is the value of the corresponding parameter holding the gloss/translation of the last name -- (e.g. "trans-last"), and `trans_last_fullname` is the full parameter name holding that value (or nil for -- no such parameter). -- * `last_first` if set, when parameters `first` and `last` are used, display the author name as "last, first" local function add_author( author, author_fullname, trans_author, trans_author_fullname, authorlink, authorlink_fullname, trans_authorlink, trans_authorlink_fullname, first, first_fullname, trans_first, trans_first_fullname, last, last_fullname, trans_last, trans_last_fullname, last_first ) local function make_author_with_url(txt, txtparam, authorlink, authorlink_param) if authorlink then if authorlink:find("%[%[") then error(("Can't specify links in |%s=%s"):format(authorlink_param, authorlink)) end if txt:find("%[%[") then error(("Can't specify links in %s=%s"):format(txtparam, txt)) end return "[[w:" .. authorlink .. "|" .. txt .. "]]" else return txt end end local num_authorobjs if author then local authorobjs = parse_multivalued_annotated_text(author, author_fullname, trans_author, trans_author_fullname) num_authorobjs = #authorobjs if num_authorobjs == 1 then if is_anonymous(authorobjs[1].text) then authorobjs[1].text = "anonymous author" authorobjs[1].link = "anonymous author" end if authorlink then authorobjs[1].text = make_author_with_url( authorobjs[1].text, "|" .. author_fullname, authorlink, "|" .. authorlink_fullname ) authorobjs[1].link = make_author_with_url( authorobjs[1].link, "|" .. author_fullname, authorlink, "|" .. authorlink_fullname ) end if authorobjs[1].gloss and trans_authorlink then authorobjs[1].gloss = make_author_with_url( authorobjs[1].gloss, ("<t:...> in |%s"):format(author_fullname), trans_authorlink, "|" .. trans_author_fullname ) end add(format_multivalued_annotated_text(authorobjs)) elseif trans_authorlink then error( ( "Can't specify |%s= along with multiple semicolon-separated entities in |%s=; use the " .. "<t:...> inline modifier attached to the individual entities and put the link directly " .. "in the value of the inline modifier" ):format(trans_authorlink_fullname, author_fullname) ) else -- Allow an authorlink with multiple authors, e.g. for use with |author=Max Mills; Harvey Mills -- with |authorlink=Max and Harvey. For this we have to generate the entire text and link it -- all. local formatted_text = format_multivalued_annotated_text(authorobjs) if authorlink then formatted_text = make_author_with_url( formatted_text, "|" .. author_fullname, authorlink, "|" .. authorlink_fullname ) end add(formatted_text) end else num_authorobjs = 1 -- Author separated into first name + last name. We don't currently support non-Latin-script -- authors separated this way and probably never will. if first then if last_first then author = last .. ", " .. first else author = first .. " " .. last end else author = last end if authorlink then local authorparam = first and ("|%s |%s"):format(first_fullname, last_fullname) or "|" .. last_fullname author = make_author_with_url(author, authorparam, authorlink, authorlink_fullname) end local trans_author if trans_last then if trans_first then trans_author = trans_first .. " " .. trans_last else trans_author = trans_last end if trans_authorlink then local trans_authorparam = trans_first and ("|%s |%s"):format(trans_first_fullname, trans_last_fullname) or "|" .. trans_last_fullname trans_author = make_author_with_url( trans_author, trans_authorparam, trans_authorlink, trans_authorlink_fullname ) end end add(author) if trans_author then add(SPACE_LBRAC) add(trans_author) add(RBRAC) end end author_outputted = true return num_authorobjs end local function add_authorlike( param, prefix_with_preceding_authors, suffix_without_preceding_authors, suffix_if_multiple, anonymous_suffix ) local delimiter = author_outputted and "and" or ", " local entities, _, num_entities = parse_and_format_multivalued_annotated_text_with_name(param, delimiter) if not entities then return end if is_anonymous(entities) then -- If tlr=anonymous or similar given, display as "anonymous translator" or similar. If a specific -- anonymous suffix not given, try to derive the anonymous suffix from the non-preceding-author suffix. if not anonymous_suffix then local cleaned_suffix = suffix_without_preceding_authors :gsub("&#32;", " ") :gsub("&nbsp;", " ") :gsub("&#160;", " ") :gsub("&#91;", "[") :gsub("&#93;", "]") cleaned_suffix = mw.text.trim(cleaned_suffix) if not anonymous_suffix then anonymous_suffix = " " .. cleaned_suffix:match("^, (.*)$") end if not anonymous_suffix then anonymous_suffix = " " .. cleaned_suffix:match("^%((.*)%)$") end if not anonymous_suffix then anonymous_suffix = " " .. cleaned_suffix:match("^%[(.*)%]$") end if not anonymous_suffix then anonymous_suffix = suffix_without_preceding_authors end end add_with_sep("anonymous" .. anonymous_suffix) elseif prefix_with_preceding_authors and (author_outputted or not suffix_without_preceding_authors) then add_with_sep(prefix_with_preceding_authors .. entities) elseif suffix_if_multiple and num_entities > 1 then add_with_sep(entities .. suffix_if_multiple) else add_with_sep(entities .. suffix_without_preceding_authors) end author_outputted = true end local function add_authorlabel() local default_authorlabel = a("default-authorlabel") if default_authorlabel and yesno(a("authorlabel"), true) then sep = nil add_with_sep(" " .. default_authorlabel) end end local function has_new_title_or_author() return args["2ndauthor"] or args["2ndlast"] or args.chapter2 or args.title2 or args.tlr2 or args.edtlr2 or args.mainauthor2 or args.editor2 or args.editors2 or args.compiler2 or args.compilers2 or args.director2 or args.directors2 end local function has_newversion() return args.newversion or args.location2 or has_new_title_or_author() end -- Handle chapter=, section=, etc. `param` is the base name of the parameter in question, e.g. "chapter" or -- "section". If numeric (either Arabic or Roman), add `numeric_prefix`; otherwise, parse as textual (allowing for -- language prefixes, inline modifiers, etc.), prefix with `textual_prefix` (if given) and suffix with -- `textual_suffix` (if given). Also checks for and handles the following (assuming param == "chapter"): -- * chapterurl=: URL of the chapter. -- * trans-chapter=: Chapter translation (can be given using an inline modifier <t:...>). -- * chapter_number=: Chapter number, when chapter= is also given (otherwise put the chapter number in chapter=). -- * chapter_plain=: Plain version of the chapter number; the "chapter " prefix isn't added. -- * chapter_series=: Series that the chapter is within (used e.g. for journal articles part of a series). -- * chapter_seriesvolume=: Volume of the series (compare seriesvolume=). -- -- Returns nil if no value specified for the main parameter, otherwise the formatted value. local function format_chapterlike(param, numeric_prefix, textual_prefix, textual_suffix) local chap, chap_fullname = a_with_name(param) local chap_num, chap_num_fullname = a_with_name(param .. "_number") local chap_plain, chap_plain_fullname = parse_and_format_annotated_text_with_name(param .. "_plain") if chap_num and chap_plain then error(("Specify only one of |%s= or %s="):format(chap_num_fullname, chap_plain_fullname)) end local chap_series, chap_series_fullname = parse_and_format_annotated_text_with_name(param .. "_series", tag_with_cite, tag_with_cite) local chap_seriesvolume, chap_seriesvolume_fullname = parse_and_format_annotated_text_with_name(param .. "_seriesvolume") if chap_series then chap_series = ", " .. chap_series end if chap_seriesvolume then if not chap_series then error(("Cannot specify |%s= without %s="):format(chap_series_fullname, chap_seriesvolume_fullname)) end chap_series = chap_series .. " (" .. chap_seriesvolume .. ")" end local chapterurl local function make_chapter_with_url(chap) if chapterurl then return "[" .. chapterurl .. " " .. chap .. "]" else return chap end end if not chap then if chap_num then error( ("Cannot specify |%s= without |%s=; put the numeric value in |%s= directly"):format( chap_num_fullname, chap_fullname, chap_fullname ) ) end if chap_plain then chapterurl = aurl(param .. "url") return make_chapter_with_url(chap_plain .. (chap_series or "")) end return nil end local cleaned_chap = chap:gsub("<sup>[^<>]*</sup>", ""):gsub("[*+#]", "") chapterurl = aurl(param .. "url") local formatted if numeric_prefix and get_number(cleaned_chap) then -- Arabic chapter number formatted = numeric_prefix .. make_chapter_with_url(chap) elseif numeric_prefix and cleaned_chap:match("^[mdclxviMDCLXVI]+$") and roman_to_arabic(cleaned_chap, true) and (not overrides[param] or not overrides[param].noroman) then -- Roman chapter number formatted = numeric_prefix .. make_chapter_with_url(upper(chap)) else -- strip leading ! (used to force text-mode for titles that look like Roman numerals like "mil" and "dill") if chap:find("^!") then chap = chap:gsub("^!", "") end -- Must be a chapter name local chapterobj = parse_annotated_text(chap, chap_fullname, a("trans-" .. param)) chapterobj.text = make_chapter_with_url(chapterobj.text) chapterobj.link = make_chapter_with_url(chapterobj.link) formatted = (textual_prefix or "") .. format_annotated_text(chapterobj) .. (textual_suffix or "") end if chap_num or chap_plain then -- NOTE: Up above we throw an error if both chap_num and chap_plain are specified. formatted = formatted .. " (" .. (chap_plain or numeric_prefix .. chap_num) .. ")" end if chap_series then formatted = formatted .. chap_series end return formatted end -- This handles everything after displaying the author, starting with the chapter and ending with page, column, -- line and then other=. It is currently called twice: Once to handle the main portion of the citation, and once to -- handle a "newversion" citation. `ind` is either "" for the main portion or a number (currently only 2) for a -- "newversion" citation. In a few places we conditionalize on `ind` to take actions depending on its value. local function postauthor(ind, num_authors, format_as_cite) get_full_paramname = make_get_full_paramname(ind) if author_outputted then add_authorlabel() end local coauthors = parse_and_format_multivalued_annotated_text("coauthors", "and") if coauthors then local with_prefix = "" if author_outputted then with_prefix = "with " if num_authors == 1 then sep = " " end end add_with_sep(with_prefix .. coauthors) author_outputted = true end add_authorlike("quotee", "quoting ", ", quotee", ", quotees") if format_as_cite and author_outputted and not date_outputted then add_date() sep = ", " end add_authorlike("chapter_tlr", "translated by ", ", transl.", nil, " translator") add_authorlike("chapter_edtlr", "edited and translated by ", ", ed. and transl.", nil, " editor and translator") local function add_sg_and_pl_authorlike(noun, verbed) local sgparam = noun local plparam = noun .. "s" local sgval, sgval_fullname = a_with_name(sgparam) local plval, plval_fullname = a_with_name(plparam) if sgval and plval then error(("Can't specify both |%s= and |%s="):format(sgval_fullname, plval_fullname)) end if sgval or plval then local verbed_by = verbed .. " by " local comma_sgnoun = ", " .. noun local comma_plnoun = ", " .. noun .. "s" add_authorlike(sgparam, verbed_by, comma_sgnoun, comma_plnoun) add_authorlike(plparam, verbed_by, comma_plnoun) end end local formatted_entry = format_chapterlike("entry", nil, "“", "”") local formatted_chapter = format_chapterlike("chapter", "chapter ", "“", "”") local function add_entry() if formatted_entry then add_with_sep(formatted_entry) if not a("notitle") then add("in ") author_outputted = false else author_outputted = true end formatted_entry = nil end end local function add_chapter() add_entry() if formatted_chapter then add_with_sep(formatted_chapter) if not a("notitle") then add("in ") author_outputted = false end formatted_chapter = nil end end local function add_actor_role(format_as_cite) local role = parse_and_format_multivalued_annotated_text("role", "and") local actor_val, actor_fullname = a_with_name("actor") local actor_objs = parse_multivalued_annotated_text(actor_val, actor_fullname) local actor = format_multivalued_annotated_text(actor_objs, "and") if format_as_cite then if role then if actor then add_with_sep(actor .. " as ") end sep = nil add_with_sep(role) elseif actor then add_with_sep(actor .. " (" .. (#actor_objs > 1 and "actors" or "actor") .. ")") end else if role then add_with_sep("spoken by " .. role) if actor then sep = nil add_with_sep(" (" .. actor .. ")") end elseif actor then add_with_sep(actor .. " (" .. (#actor_objs > 1 and "actors" or "actor") .. ")") end end end if format_as_cite then if date_outputted then add_chapter() end local output_len = #output local mainauthor = parse_and_format_multivalued_annotated_text("mainauthor") if mainauthor then add_with_sep(mainauthor) end -- quote-* templates display "jobbed by name" after the author, controlled by the author_outputted flag author_outputted = false add_authorlike("tlr", "translated by ", ", transl.", nil, " translator") add_authorlike("edtlr", "edited and translated by ", ", ed. and transl.", nil, " editor and translator") author_outputted = false add_sg_and_pl_authorlike("editor", "edited") add_sg_and_pl_authorlike("compiler", "compiled") add_sg_and_pl_authorlike("director", "directed") add_authorlike("lyricist", nil, " (lyrics)", nil, " lyricist") add_authorlike("lyrics-translator", nil, " (translation)", nil, " lyrics translator") add_authorlike("composer", nil, " (music)", nil, " composer") add_actor_role("format_as_cite") -- if the output length has changed, a credit name has been printed -- and we can print the date if output_len ~= #output then author_outputted = true add_date() end add_chapter() else add_chapter() local mainauthor = parse_and_format_multivalued_annotated_text("mainauthor") if mainauthor then add_with_sep(mainauthor) author_outputted = true end add_authorlike("tlr", "translated by ", ", transl.", nil, " translator") add_authorlike("edtlr", "edited and translated by ", ", ed. and transl.", nil, " editor and translator") add_sg_and_pl_authorlike("editor", "edited") add_sg_and_pl_authorlike("compiler", "compiled") add_sg_and_pl_authorlike("director", "directed") add_authorlike("lyricist", nil, " (lyrics)", nil, " lyricist") add_authorlike("lyrics-translator", nil, " (translation)", nil, " lyrics translator") add_authorlike("composer", nil, " (music)", nil, " composer") end local title, title_fullname = a_with_name("title") local need_comma = false if title then local titleobj = parse_annotated_text(title, title_fullname, a("trans-title")) add(format_annotated_text(titleobj, tag_with_cite, tag_with_cite)) local series = parse_and_format_annotated_text("series") if series then add(" (" .. series) local seriesvolume = parse_and_format_annotated_text("seriesvolume") if seriesvolume then add(SEMICOLON_SPACE .. seriesvolume) end add(")") end need_comma = true elseif ind == "" then if not a("notitle") then add(maintenance_line("Please provide the book title or journal name")) need_comma = true end end local archiveurl, archiveurl_fullname = aurl_with_name("archiveurl") local url, url_fullname = aurl_with_name("url") local urls, urls_fullname = aurl_with_name("urls") if url and urls then error(("Supply only one of |%s= and |%s="):format(url_fullname, urls_fullname)) end local function verify_title_supplied(url_name) -- There are too many cases of this to throw an error at this time. -- if not title then -- error(("If |%s= is given, |%s= must also be supplied"):format(url_name, title_fullname)) -- end end if archiveurl or url then verify_title_supplied(archiveurl and archiveurl_fullname or url_fullname) sep = nil add("&lrm;<sup>[" .. (archiveurl or url) .. "]</sup>") elseif urls then verify_title_supplied(urls_fullname) sep = nil add("&lrm;<sup>" .. urls .. "</sup>") end -- display (in Language) if language is provided and is not English and not overriden by termlang or worklang if format_as_cite and ind == "" and not (args.termlang or args.worklang) and (args[1] or args.lang) then local lang = get_first_lang(args[1] or args.lang) if lang then local langcode = lang:getCode() if not (langcode == "und" or langcode == "en") then local langs = format_langs(args[1] or args.lang) if langs then add(" (in " .. langs .. ")") end end end end if need_comma then sep = ", " end local edition, edition_fullname = parse_and_format_annotated_text_with_name("edition") local edition_plain, edition_plain_fullname = parse_and_format_annotated_text_with_name("edition_plain") if edition and edition_plain then error(("Supply only one of |%s= and |%s="):format(edition_fullname, edition_plain_fullname)) end if edition then add_with_sep(edition .. " edition") end if edition_plain then add_with_sep(edition_plain) end -- Display a numeric param such as page=, volume=, column=. For each `paramname`, four params are actually -- recognized, e.g. for paramname == "page", the params page=, pages=, page_plain= and pageurl= are recognized -- and checked (or the same with an index, e.g. page2=, pages2=, page_plain2= and pageurl2= respectively if -- ind == "2"). Only one of the first three can be specified; an error results if more than one are given. -- If none are given, the return value is nil; otherwise it is a string. The numeric spec is taken directly -- from e.g. page_plain= if given; otherwise if e.g. pages= is given, or if page= is given and looks like a -- combination of numbers (i.e. it has a hyphen or dash in it, a comma, or the word " and "), it is prefixed -- by `singular_desc` + "s" (e.g. "pages "), otherwise it is prefixed by just `singular_desc` (e.g. "page "). -- (As a special case, if either e.g. page=unnumbered or pages=unnumbered is given, the numeric spec is -- "unnumbered page".) The resulting spec is returned directly unless e.g. pageurl= is given, in which case -- it is linked to the specified URL. Note that any of the specs can be foreign text, e.g. foreign numbers -- (including with optional inline modifiers), and such text is handled appropriately. local function format_numeric_param(paramname, singular_desc) local sgval = a_with_name(paramname) local sgobj = parse_annotated_text(sgval, paramname) local plparamname = paramname .. "s" local plval = a_with_name(plparamname) local plobj = parse_annotated_text(plval, plparamname) local plainval, plain_fullname = parse_and_format_annotated_text_with_name(paramname .. "_plain") local numspec if not sgval and not plval and not plainval then return elseif plainval and (sgval or plval) then error(("Can't specify " .. plain_fullname .. " with " .. paramname .. " or " .. plparamname)) elseif sgval and plval then -- if both singular and plural, display "page 1 of 1-10" numspec = singular_desc .. " " .. sgval .. " of " .. plval else -- Merge page= and pages= and treat alike because people often mix them up in both directions. if plainval then numspec = plainval else local val = sgobj and sgobj.text or plobj.text if val == "unnumbered" then numspec = "unnumbered " .. singular_desc else local desc if val:find("^!") then val = val:gsub("^!", "") desc = sgval and singular_desc or pluralize(singular_desc) else local check_val = val if check_val:find("%[") then check_val = remove_links(check_val) -- convert URL's of the form [URL DISPLAY] to the displayed value check_val = check_val:gsub("%[[^ %[%]]* ([^%[%]]*)%]", "%1") end -- in case of negative page numbers (do they exist?), don't treat as multiple pages check_val = check_val:gsub("^%-", "") -- replace HTML entity en-dashes and em-dashes with their literal codes check_val = check_val:gsub("&ndash;", "–") check_val = check_val:gsub("&#8211;", "–") check_val = check_val:gsub("&mdash;", "—") check_val = check_val:gsub("&#8212;", "—") -- Check for en-dash or em-dash, or two numbers (possibly with stuff after like 12a-15b) -- separated by a hyphen or by comma a followed by a space (to avoid firing on thousands separators). if umatch(check_val, "[–—]") or check_val:find(" and ") or check_val:match("%d+[^ ]* *%- *%d+") or check_val:match("%d+[^ ]* *, +%d+") then desc = pluralize(singular_desc) else desc = singular_desc end end local obj = sgobj or plobj obj.text = val if obj.link:find("^!") then obj.link = obj.link:gsub("^!", "") end val = format_annotated_text(obj) numspec = desc .. " " .. val end end end local url = a(paramname .. "url") if url then return "[" .. url .. " " .. numspec .. "]" else return numspec end end local volume = format_numeric_param("volume", a("volume_prefix") or "volume") if volume then add_with_sep(volume) end local issue = format_numeric_param("issue", a("issue_prefix") or "number") if issue then add_with_sep(issue) end -- number= is an alias for issue= (except in {{quote-av}}, where it is the episode number) local number = format_numeric_param("number", a("number_prefix") or "number") if number then add_with_sep(number) end local annotations = {} local genre = a("genre") if genre then insert(annotations, genre) end local format = a("format") if format then insert(annotations, format) end local medium = a("medium") if medium then insert(annotations, medium) end -- Now handle the display of language annotations like "(in French)" or -- "(quotation in Nauruan; overall work in German)". local quotelang = args[1] or args.lang if not quotelang then if ind == "" then -- This can only happen for certain non-mainspace pages, e.g. Talk pages; otherwise an error is thrown -- above. insert(annotations, maintenance_line("Please specify the language of the quote using |1=")) else -- do nothing in newversion= portion end elseif ind == "" then local worklang = a("worklang") local termlang = a("termlang") worklang = worklang or quotelang termlang = termlang or quotelang if worklang == quotelang then if worklang == termlang then -- do nothing else insert(annotations, "in " .. format_langs(quotelang)) end else if quotelang ~= termlang then insert(annotations, "quotation in " .. format_langs(quotelang)) end insert(annotations, "overall work in " .. format_langs(worklang)) end else local lang2 = a("lang2") if lang2 then insert(annotations, "in " .. format_langs(lang2)) end end if #annotations > 0 then sep = nil add_with_sep(" (" .. concat(annotations, SEMICOLON_SPACE) .. ")") end local artist = parse_and_format_multivalued_annotated_text("artist", "and") if artist then add_with_sep("performed by " .. artist) end local feat = parse_and_format_multivalued_annotated_text("feat", "and") if feat then sep = " " add_with_sep("ft. " .. feat) end if not format_as_cite then add_actor_role() end local others = parse_and_format_annotated_text("others") if others then add_with_sep(others) end local quoted_in = parse_and_format_annotated_text("quoted_in", tag_with_cite, tag_with_cite) if quoted_in then add_with_sep("quoted in " .. quoted_in) insert(tracking_categories, "Quotations using quoted-in parameter") end local location = parse_and_format_multivalued_annotated_text("location", "; ") local publisher = parse_and_format_multivalued_annotated_text("publisher", "; ") if publisher then if location then add_with_sep(location) -- colon sep = "&#58; " -- colon end add_with_sep(publisher) elseif location then add_with_sep(location) end if not date_outputted then add_date("no_paren") end local source = parse_and_format_multivalued_annotated_text("source", "and") if source then add_with_sep("sourced from " .. source) end local original = parse_and_format_annotated_text("original", tag_with_cite, tag_with_cite) local by = parse_and_format_multivalued_annotated_text("by", "and") local origtype = a("deriv") or "translation" if original or by then add_with_sep(origtype .. " of " .. (original or "original") .. (by and " by " .. by or "")) end -- Handle origlang=, origworklang=. How we handle them depends on whether the original title or author are explicitly -- given. local origlang = a("origlang") local origworklang = a("origworklang") local origlangtext, origworklangtext if origlang then origlangtext = "in " .. format_langs(origlang) end if origworklang then origworklangtext = "overall work in " .. format_langs(origworklang) end if origlang or origworklang then if original or by then local orig_annotations = {} if origlangtext then insert(orig_annotations, origlangtext) end if origworklangtext then insert(orig_annotations, origworklangtext) end sep = nil add_with_sep(" (" .. concat(orig_annotations, SEMICOLON_SPACE) .. ")") else add_with_sep(origtype .. " of original" .. (origlangtext and " " .. origlangtext or "")) if origworklangtext then sep = nil add_with_sep(" (" .. origworklangtext .. ")") end end end if ind ~= "" and has_newversion() then local formatted_new_date = format_date_args(a, get_full_paramname, alias_map, "", "", nil, "Please provide a date or year", true) if formatted_new_date then add_with_sep(formatted_new_date) end end -- Fetch date_published=/year_published=/month_published= and format appropriately. local formatted_date_published = format_date_args(a, get_full_paramname, alias_map, "", "_published", nil, nil, true) local platform = parse_and_format_multivalued_annotated_text("platform", "and") if formatted_date_published then add_with_sep("published " .. formatted_date_published .. (platform and " via " .. platform or "")) elseif platform then add_with_sep("via " .. platform) end -- From here on out, there should always be a preceding item, so we -- can dispense with add_with_sep() and always insert the comma. sep = nil local function small(txt) add(", <small>") add(txt) add("</small>") end -- Add an identifier to a book or article database such as DOI, ISBN, JSTOR, etc. `param_or_params` -- is a string identifying the base param, or a list of such strings to check in turn. If found, the value -- of the parameter is processed using `process` (a function of one argument, defaulting to mw.uri.encode()), -- and then the actual URL to insert is generated by preceding with `pretext`, following with `posttext`, -- and running the resulting string through small(), which first adds a comma and then the URL in small font. local function add_identifier(param_or_params, pretext, posttext, process) local val = a(param_or_params) if val then val = (process or mw.uri.encode)(val) small(pretext .. val .. posttext) end end add_identifier("bibcode", "[https://adsabs.harvard.edu/abs/", " →Bibcode]") add_identifier("doi", '<span class="neverexpand">[https://doi.org/', " →DOI]</span>") add_identifier("isbn", "", "", isbn) add_identifier("issn", "", "", issn) add_identifier("jstor", "[https://www.jstor.org/stable/", " →JSTOR]") add_identifier("lccn", "", "", lccn) add_identifier("oclc", "[https://search.worldcat.org/title/", " →OCLC]") add_identifier("ol", "[https://openlibrary.org/works/OL", "/ →OL]") add_identifier("pmid", "[https://www.ncbi.nlm.nih.gov/pubmed/", " →PMID]") add_identifier("pmcid", "[https://www.ncbi.nlm.nih.gov/pmc/articles/", "/ →PMCID]") add_identifier("ssrn", "[https://ssrn.com/abstract=", " →SSRN]") -- add_identifier("urn", "", "", urn) local id = a("id") if id then small(id) end archiveurl, archiveurl_fullname = aurl_with_name("archiveurl") if archiveurl then add(", archived from ") local url, url_fullname = aurl_with_name("url") if not url then -- attempt to infer original URL from archive URL; this works at -- least for Wayback Machine (web.archive.org) URL's url = archiveurl:match("/(https?:.*)$") if not url then error( ("When |%s= is specified, |%s= must also be included"):format(archiveurl_fullname, url_fullname) ) end end add("[" .. url .. " the original] on ") local archivedate, archivedate_fullname = a_with_name("archivedate") if archivedate then add(format_date(archivedate)) elseif string.sub(archiveurl, 1, 28) == "https://web.archive.org/web/" then -- If the archive is from the Wayback Machine, then it already contains the date -- Get the date and format it local wayback_date = string.sub(archiveurl, 29, 29 + 7) wayback_date = string.sub(wayback_date, 1, 4) .. "-" .. string.sub(wayback_date, 5, 6) .. "-" .. string.sub(wayback_date, 7, 8) add(format_date(wayback_date)) elseif string.sub(archiveurl, 1, 21) == "https://megalodon.jp/" then local megalodon_date = string.sub(archiveurl, 22, 25) .. "-" .. string.sub(archiveurl, 27, 28) .. "-" .. string.sub(archiveurl, 29, 30) add(format_date(megalodon_date)) else error( ("When |%s= is specified, |%s= must also be included"):format( archiveurl_fullname, archivedate_fullname ) ) end end if a("accessdate") then --Otherwise do not display here, as already used as a fallback for missing date= or year= earlier. if (a("date") or a("nodate") or a("year")) and not a("archivedate") then add(", retrieved " .. format_date(a("accessdate"))) end end local formatted_section = format_chapterlike("section", "section ") if formatted_section then add(", ") add(formatted_section) end -- video game stuff local system = parse_and_format_annotated_text("system") if system then add(", " .. system) end local scene = parse_and_format_annotated_text("scene") if scene then add(", scene: " .. scene) end local level = parse_and_format_annotated_text("level") if level then add(", level/area: " .. level) end local note = parse_and_format_annotated_text("note") if note then add(", " .. note) end local note_plain = parse_and_format_annotated_text("note_plain") if note_plain then add(" " .. note_plain) end -- Wrapper around format_numeric_param that inserts the formatted text with optional preceding text. local function handle_numeric_param(paramname, singular_desc, pretext) local numspec = format_numeric_param(paramname, singular_desc) if numspec then add((pretext or "") .. numspec) end end handle_numeric_param("page", a("page_prefix") or "page", ", ") handle_numeric_param("column", a("column_prefix") or "column", ", ") handle_numeric_param("line", a("line_prefix") or "line", ", ") -- FIXME: Does this make sense? What is other=? local other = parse_and_format_annotated_text("other") if other then add(", " .. other) end end local function add_authors(args, last_first) -- Find maximum indexed author or last name. local maxind = math.max(args.author.maxindex, args.last.maxindex) -- Include max index of ancillary params so we get an error message about their use without the primary params. local ancillary_params = {"trans-author", "authorlink", "trans-authorlink", "first", "trans-first", "trans-last"} for _, ancillary in ipairs(ancillary_params) do maxind = math.max(maxind, args[ancillary].maxindex) end local num_authors = 0 for i = 1, maxind do local ind = i == 1 and "" or i local author, last = args.author[i], args.last[i] if author or last then local this_num_authors = add_author( author, "author" .. ind, args["trans-author"][i], "trans-author" .. ind, args.authorlink[i], "authorlink" .. ind, args["trans-authorlink"][i], "trans-authorlink" .. ind, args.first[i], "first" .. ind, args["trans-first"][i], "trans-first" .. ind, last, "last" .. ind, args["trans-last"][i], "trans-last" .. ind, last_first ) num_authors = num_authors + this_num_authors sep = last_first and "; " or ", " else for _, cant_have in ipairs(ancillary_params) do if args[cant_have][i] then error(("Can't have |%s%s= without |author%s= or |last%s="):format(cant_have, ind, ind, ind)) end end end end return num_authors end local function add_newversion() -- If there's a "newversion" section, add the new-version text. if has_newversion() then sep = nil --Test for new version of work. add(SEMICOLON_SPACE) -- newversion= is intended for English text, e.g. "quoted in" or "republished as". -- FIXME, explain the 'not args.edition2' here local newversion = args.newversion or not args.edition2 and "republished as" if newversion then -- If no title, author or chapter, chop off "as" and "in" so we don't get e.g. -- 'translated as c. 1025'. if not has_new_title_or_author() then newversion = newversion:gsub(" as$", ""):gsub(" in$", "") end add(newversion) end add(" ") return "" else return ", " end end ------------------- Now we start outputting text ---------------------- local need_comma = false -- Set this now so a() works just below. get_full_paramname = make_get_full_paramname("") if args.brackets then add("[") end bold_year = not format_as_cite year_last = format_as_cite formatted_date, need_date = format_date_args( a, get_full_paramname, alias_map, nil, nil, bold_year, "Can we [[:Category:Requests for date|date]] this quote?", year_last ) -- Fetch origdate=/origyear=/origmonth= and format appropriately. formatted_origdate = format_date_args(a, get_full_paramname, alias_map, "orig", nil, nil, nil, year_last) local num_authors if format_as_cite then num_authors = add_authors(args, "last_first") if author_outputted then sep = " " end -- Display all the text that comes after the author, for the main portion. postauthor("", num_authors, "format_as_cite") author_outputted = false sep = add_newversion() -- Add the newversion author(s). if args["2ndauthor"] or args["2ndlast"] then num_authors = add_author( args["2ndauthor"], "2ndauthor", nil, nil, args["2ndauthorlink"], "2ndauthorlink", nil, nil, args["2ndfirst"], "2ndfirst", nil, nil, args["2ndlast"], "2ndlast", nil, nil, "last_first" ) sep = ", " else for _, cant_have in ipairs{"2ndauthorlink", "2ndfirst"} do if args[cant_have] then error(("Can't have |%s= without |2ndauthor= or |2ndlast="):format(cant_have)) end end end -- Display all the text that comes after the author, for the "newversion" section. postauthor(2, num_authors, "format_as_cite") else if formatted_date then need_comma = true add(formatted_date) end if formatted_origdate then need_comma = true add(SPACE_LBRAC .. formatted_origdate .. RBRAC) end if need_comma then sep = ", " end date_outputted = true num_authors = add_authors(args) -- Display all the text that comes after the author, for the main portion. postauthor("", num_authors) author_outputted = false sep = add_newversion() -- Add the newversion author(s). if args["2ndauthor"] or args["2ndlast"] then num_authors = add_author( args["2ndauthor"], "2ndauthor", nil, nil, args["2ndauthorlink"], "2ndauthorlink", nil, nil, args["2ndfirst"], "2ndfirst", nil, nil, args["2ndlast"], "2ndlast", nil, nil ) sep = ", " else for _, cant_have in ipairs{"2ndauthorlink", "2ndfirst"} do if args[cant_have] then error(("Can't have |%s= without |2ndauthor= or |2ndlast="):format(cant_have)) end end end -- Display all the text that comes after the author, for the "newversion" section. postauthor(2, num_authors) end if not args.nocolon then sep = nil add(":") elseif args.usenodot and not args.nodot then add(".") end -- Concatenate output portions to form output text. local output_text = concat(output) -- Remainder of code handles adding categories. We add one or more of the following categories: -- -- 1. [[Category:LANG terms with quotations]], based on the first language code in termlang= or 1=. Added to -- mainspace, Reconstruction: and Appendix: pages as well as Citations: pages if the corresponding mainspace -- page exists. Not added if nocat= is given. Note that [[Module:usex]] adds the same category using the same -- logic, but we do it here too because we may not have a quotation to format. (We add in those circumstances -- because typically when there's no quotation to format, it's because it's formatted manually underneath the -- citation, or using {{ja-x}}, {{th-x}} or similar.) -- 2. [[Category:Requests for date in LANG entries]], based on the first language code in 1=. Added to mainspace, -- Reconstruction:, Appendix: and Citations: pages unless nocat= is given. -- 3. [[Category:Quotations using nocat parameter]], if nocat= is given. Added to mainspace, Reconstruction:, -- Appendix: and Citations: pages. local categories = {} local termlang = get_first_lang(args.termlang or argslang) if args.nocat then if format_as_cite then insert(tracking_categories, "Citations using nocat parameter") else insert(tracking_categories, "Quotations using nocat parameter") end else -- don't create language tracking categories for citations if not format_as_cite then local title if args.pagename then -- for testing, doc pages, etc. title = mw.title.new(args.pagename) if not title then error(("Bad value for `args.pagename`: '%s'"):format(args.pagename)) end else title = mw.title.getCurrentTitle() end -- Only add [[Citations:foo]] to [[:Category:LANG terms with quotations]] if [[foo]] exists. local ok_to_add_cat if title.nsText ~= "Citations" then ok_to_add_cat = true else local mainspace_title = mw.title.new(title.text) if mainspace_title and mainspace_title.exists then ok_to_add_cat = true end end if ok_to_add_cat then insert(categories, termlang:getFullName() .. " terms with quotations") end end if need_date then local argslangobj = get_first_lang(argslang) insert(categories, "Requests for date in " .. argslangobj:getCanonicalName() .. " entries") end end return output_text .. ( not termlang and "" or (#categories > 0 and format_categories(categories, termlang, args.sort) or "") .. ( #tracking_categories > 0 and format_categories( tracking_categories, termlang, args.sort, nil, not page_should_be_ignored(mw.title.getCurrentTitle().fullText) ) or "" ) ) end -- Alias specs for type= and type2=. Each spec is `{canon, aliases, with_newversion}` where `canon` is the canonical -- parameter (with "2" added if type2= is being handled), `aliases` is a comma-separated string of aliases (with "2" -- added if type2= is being handled, except for numeric params), and `with_newversion` indicates whether we should -- process this spec if type2= is being handled. local type_alias_specs = { av = { {"author", "writer,writers", true}, {"chapter", "episode", true}, {"chapterurl", "episodeurl", true}, {"trans-chapter", "trans-episode", true}, {"chapter_tlr", "episode_tlr,episode_tlrs,episode_translator,episode_translators", true}, {"chapter_edtlr", "episode_edtlr,episode_edtlrs,episode_editor_translator,episode_editors_translators", true}, {"chapter_series", "episode_series", true}, {"chapter_seriesvolume", "episode_seriesvolume", true}, {"chapter_number", "episode_number", true}, {"chapter_plain", "episode_plain", true}, {"volume", "season", true}, {"volumes", "seasons", true}, {"volume_plain", "season_plain", true}, {"volumeurl", "seasonurl", true}, {"platform", "network", true}, }, book = { {"author", "3"}, {"title", "4"}, {"url", "5"}, {"year", "2"}, {"page", "6"}, {"text", "7"}, {"t", "8"}, }, journal = { {"year", "2"}, {"author", "3"}, {"chapter", "title,article,4", true}, {"chapterurl", "titleurl,articleurl", true}, {"trans-chapter", "trans-title,trans-article", true}, {"chapter_tlr", "title_tlr,title_tlrs,title_translator,title_translators,article_tlr,article_tlrs,article_translator,article_translators", true}, {"chapter_edtlr", "title_edtlr,title_edtlrs,title_editor_translator,title_editors_translators,article_edtlr,article_edtlrs,article_editor_translator,article_editors_translators", true}, {"chapter_series", "title_series,article_series", true}, {"chapter_seriesvolume", "title_seriesvolume,article_seriesvolume", true}, {"chapter_number", "title_number,article_number", true}, {"chapter_plain", "title_plain,article_plain", true}, {"title", "journal,magazine,newspaper,work,5", true}, {"trans-title", "trans-journal,trans-magazine,trans-newspaper,trans-work", true}, {"tlr", "journal_tlr,journal_tlrs,journal_translator,journal_translators,magazine_tlr,magazine_tlrs,magazine_translator,magazine_translators,newspaper_tlr,newspaper_tlrs,newspaper_translator,newspaper_translators,work_tlr,work_tlrs,work_translator,work_translators", true}, {"edtlr", "journal_edtlr,journal_edtlrs,journal_editor_translator,journal_editors_translators,magazine_edtlr,magazine_edtlrs,magazine_editor_translator,magazine_editors_translators,newspaper_edtlr,newspaper_edtlrs,newspaper_editor_translator,newspaper_editors_translators,work_edtlr,work_edtlrs,work_editor_translator,work_editors_translators", true}, {"url", "6,journalurl,magazineurl,newspaperurl,workurl", true}, {"page", "7"}, {"source", "newsagency,news_agency", true}, {"text", "8"}, {"t", "9"}, }, } -- Process interally-handled aliases related to type= or type2=. `args` is a table of arguments; `typ` is the value of -- type= or type2=; newversion=true if we're dealing with type2=; alias_map is used to keep track of alias mappings -- seen. local function process_type_aliases(args, typ, newversion, alias_map) local ind = newversion and "2" or "" local deprecated = ine(args.lang) if not type_alias_specs[typ] then local possible_values = {} for possible, _ in pairs(type_alias_specs) do insert(possible_values, possible) end sort(possible_values) error( ("Unrecognized value '%s' for type%s=; possible values are %s"):format( typ, ind, concat(possible_values, ",") ) ) end for _, alias_spec in ipairs(type_alias_specs[typ]) do local canon, aliases, with_newversion = unpack(alias_spec) if with_newversion or not newversion then canon = canon .. ind aliases = split(aliases, ",", true) local saw_alias = nil for _, alias in ipairs(aliases) do if alias:match("^%d+$") then alias = tonumber(alias) if deprecated then alias = alias - 1 end else alias = alias .. ind end if args[alias] then if saw_alias == nil then saw_alias = alias else error(("|%s= and |%s= are aliases; cannot specify a value for both"):format(saw_alias, alias)) end end end if saw_alias and (not newversion or type(saw_alias) == "string") then if args[canon] then error(("|%s= is an alias of |%s=; cannot specify a value for both"):format(saw_alias, canon)) end args[canon] = args[saw_alias] -- Wipe out the original after copying. This is important in case of a param that has general significance -- but has been redefined (e.g. {{quote-av}} redefines number= for the episode number, and -- {{quote-journal}} redefines title= for the chapter= (article). It's also important due to unhandled -- parameter checking. args[saw_alias] = nil alias_map[canon] = saw_alias end end end end -- Clone and combine frame's and parent's args while also assigning nil to empty strings. Handle aliases and ignores. local function clone_args(direct_args, parent_args) local args = {} -- Processing parent args must come first so that direct args override parent args. Note that if a direct arg is -- specified but is blank, it will still override the parent arg (with nil). for pname, param in pairs(parent_args) do -- [[Special:WhatLinksHere/Wiktionary:Tracking/quote/param/PARAM]] track("param/" .. pname) args[pname] = ine(param) end -- Process ignores. The value of `ignore` is a comma-separated list of parameter names to ignore (erase). We need to -- do this before aliases due to {{quote-song}}, which sets chapter= to the value of title= in the direct params and -- sets title= to the value of album= using an alias. If we do the ignores after aliases, we get an error during alias -- processing, saying that title= and its alias album= are both present. local ignores = ine(direct_args.ignore) if ignores then for ignore in gsplit(ignores, "%s*,%s*") do args[ignore] = nil end end local alias_map = {} local other_controls = {} -- noroman local noroman = ine(direct_args.noroman) if noroman then other_controls.overrides = other_controls.overrides or {} for param in gsplit(noroman, "%s*,%s*") do other_controls.overrides[param] = (other_controls.overrides[param] or {}) other_controls.overrides[param].noroman = true end end -- Process internally-specified aliases using type= or type2=. local typ = args.type or direct_args.type if typ then process_type_aliases(args, typ, false, alias_map) end local typ2 = args.type2 or direct_args.type2 if typ2 then process_type_aliases(args, typ2, true, alias_map) end -- Process externally-specified aliases. The value of `alias` is a list of semicolon-separated specs, each of which -- is of the form DEST:SOURCE,SOURCE,... where DEST is the canonical name of a parameter and SOURCE refers to an -- alias. Whitespace is allowed between all delimiters. The order of aliases may be important. For example, for -- {{quote-journal}}, title= contains the article name and is an alias of underlying chapter=, while journal= or -- work= contains the journal name and is an alias of underlying title=. As a result, the title -> chapter alias -- must be specified before the journal/work -> title alias. -- -- Whenever we copy a value from argument SOURCE to argument DEST, we record an entry for the pair in alias_map, so -- that when we would display an error message about DEST, we display SOURCE instead. -- -- Do alias processing (and ignore and error_if processing) before processing direct_args so that e.g. we can set up -- an alias of title -> chapter and then set title= to something else in the direct args ({{quote-hansard}} does -- this). -- -- FIXME: Delete this once we've converted all alias processing to internal. local aliases = ine(direct_args.alias) if aliases then -- Allow and discard a trailing semicolon, to make managing multiple aliases easier. aliases = ugsub(aliases, "%s*;$", "") for alias_spec in gsplit(aliases, "%s*;%s*") do local alias_spec_parts = split(alias_spec, "%s*:%s*") if #alias_spec_parts ~= 2 then error(("Alias spec '%s' should have one colon in it"):format(alias_spec)) end local dest, sources = unpack(alias_spec_parts) sources = split(sources, "%s*,%s*") local saw_source = nil for _, source in ipairs(sources) do if source:match("^%d+$") then source = tonumber(source) end if args[source] then if saw_source == nil then saw_source = source else error(("|%s= and |%s= are aliases; cannot specify a value for both"):format(saw_source, source)) end end end if saw_source then if args[dest] then error(("|%s= is an alias of |%s=; cannot specify a value for both"):format(saw_source, dest)) end args[dest] = args[saw_source] -- Wipe out the original after copying. This important in case of a param that has general significance -- but has been redefined (e.g. {{quote-av}} redefines number= for the episode number, and -- {{quote-journal}} redefines title= for the chapter= (article). It's also important due to unhandled -- parameter checking. args[saw_source] = nil alias_map[dest] = saw_source end end end -- Process error_if. The value of `error_if` is a comma-separated list of parameter names to throw an error if seen -- in parent_args (they are params we overwrite in the direct args). local error_ifs = ine(direct_args.error_if) if error_ifs then for error_if in gsplit(error_ifs, "%s*,%s*") do if ine(parent_args[error_if]) then error( ("Cannot specify a value |%s=%s as it would be overwritten or ignored"):format( error_if, ine(parent_args[error_if]) ) ) end end end for pname, param in pairs(direct_args) do -- ignore control params if pname ~= "ignore" and pname ~= "alias" and pname ~= "error_if" and pname ~= "noroman" then args[pname] = ine(param) end end return args, alias_map, other_controls end local function get_args(frame_args, parent_args, require_lang) -- FIXME: We are processing arguments twice, once in clone_args() and then again in [[Module:parameters]]. This is -- wasteful of memory. local cloned_args, alias_map, other_controls = clone_args(frame_args, parent_args) local deprecated = ine(parent_args.lang) local alias_of_t = {alias_of = "t"} local boolean = {type = "boolean"} local language_sublist = {type = "language", sublist = true} local list_allow_holes = {list = true, allow_holes = true} local script = {type = "script"} -- First, the "single" params that don't have FOO2 or FOOn versions. local params = { [deprecated and "lang" or 1] = {required = require_lang, type = "language", sublist = true, default = "und"}, ["lang2"] = language_sublist, ["newversion"] = true, ["author"] = list_allow_holes, ["2ndauthor"] = true, ["trans-author"] = list_allow_holes, ["authorlink"] = list_allow_holes, ["2ndauthorlink"] = true, ["trans-authorlink"] = list_allow_holes, ["first"] = list_allow_holes, ["2ndfirst"] = true, ["trans-first"] = list_allow_holes, ["last"] = list_allow_holes, ["2ndlast"] = true, ["trans-last"] = list_allow_holes, ["nocat"] = boolean, ["nocolon"] = boolean, -- quote params text = true, passage = {alias_of = "text"}, tr = true, transliteration = {alias_of = "tr"}, ts = true, transcription = {alias_of = "ts"}, norm = true, normalization = {alias_of = "norm"}, normurl = true, normalizationurl = {alias_of = "normurl"}, sc = script, normsc = script, sort = true, subst = true, footer = true, lit = true, liturl = true, t = true, turl = true, translation = alias_of_t, translationurl = {alias_of = "turl"}, gloss = alias_of_t, ll = true, lb = {alias_of = "ll", deprecated = true}, brackets = boolean, -- original quote params origtext = true, origtr = true, origts = true, origurl = true, orignorm = true, origsc = script, orignormsc = script, orignormurl = true, origsubst = true, origll = true, origlb = {alias_of = "origll", deprecated = true}, usenodot = boolean, nodot = boolean, inline = boolean, asquote = boolean, ascite = boolean, } -- Most params have PARAM2 variants for use with `newversion`. FIXME: We should generalize this to -- allow PARAMN variants for any N. local function add_with_2(param, value) params[param] = value params[param .. "2"] = value end local function alias_with_2(alias, canon) params[alias] = {alias_of = canon} params[alias .. "2"] = {alias_of = canon .. "2"} end for _, param12 in ipairs{ "worklang", "termlang", "origlang", "origworklang" } do add_with_2(param12, language_sublist) end -- Then the newversion params (which have FOO2 versions). for _, param12 in ipairs{ -- author-like params; author params themselves are either list params (author=, last=, etc.) or single params -- (2ndauthor=, 2ndlast=, etc.) "coauthors", "quotee", "tlr", "edtlr", "editor", "editors", "mainauthor", "compiler", "compilers", "director", "directors", "lyricist", "lyrics-translator", "composer", "role", "actor", "artist", "feat", -- author control params "default-authorlabel", "authorlabel", -- title "title", "trans-title", "series", "seriesvolume", "notitle", -- entry "entry", "entryurl", "trans-entry", -- chapter "chapter", "chapterurl", "chapter_number", "chapter_plain", "chapter_series", "chapter_seriesvolume", "trans-chapter", "chapter_tlr", "chapter_edtlr", -- section "section", "sectionurl", "section_number", "section_plain", "section_series", "section_seriesvolume", "trans-section", -- other video-game params "system", "scene", "level", -- URL "url", "urls", "archiveurl", -- edition "edition", "edition_plain", -- ID params "bibcode", "doi", "isbn", "issn", "jstor", "lccn", "oclc", "ol", "pmid", "pmcid", "ssrn", "urn", "id", -- misc date params; most date params handled below "archivedate", "accessdate", "nodate", -- numeric params handled below -- other params "type", "genre", "format", "medium", "others", "quoted_in", "location", "publisher", "original", "by", "deriv", "note", "note_plain", "other", "source", "platform", } do add_with_2(param12, true) end -- Then the aliases of newversion params (which have FOO2 versions). for _, param12_aliased in ipairs{ {"role", "roles"}, {"role", "speaker"}, {"tlr", "tlrs"}, {"tlr", "translator"}, {"tlr", "translators"}, {"edtlr", "edtlrs"}, {"edtlr", "editor_translator"}, {"edtlr", "editors_translators"}, {"chapter_tlr", "chapter_tlrs"}, {"chapter_tlr", "chapter_translator"}, {"chapter_tlr", "chapter_translators"}, {"chapter_edtlr", "chapter_edtlrs"}, {"chapter_edtlr", "chapter_editor_translator"}, {"chapter_edtlr", "chapter_editors_translators"}, {"doi", "DOI"}, {"isbn", "ISBN"}, {"issn", "ISSN"}, {"jstor", "JSTOR"}, {"lccn", "LCCN"}, {"oclc", "OCLC"}, {"ol", "OL"}, {"pmid", "PMID"}, {"pmcid", "PMCID"}, {"ssrn", "SSRN"}, {"urn", "URN"}, } do local canon, alias = unpack(param12_aliased) alias_with_2(alias, canon) end -- Then the date params. for _, datelike in ipairs{{"", ""}, {"orig", ""}, {"", "_published"}} do local pref, suf = unpack(datelike) for _, arg in ipairs{"date", "year", "month", "start_date", "start_year", "start_month"} do add_with_2(pref .. arg .. suf, true) end end local numeric_param_suffixes = {"", "s", "_plain", "url", "_prefix"} -- Then the numeric params. for _, numeric in ipairs{"volume", "issue", "number", "line", "page", "column"} do for _, suf in ipairs(numeric_param_suffixes) do add_with_2(numeric .. suf, true) end end -- And the aliases of numeric params. for _, numeric_aliased in ipairs{{"volume", "vol"}} do local canon, alias = unpack(numeric_aliased) for _, suf in ipairs(numeric_param_suffixes) do alias_with_2(alias .. suf, canon .. suf) end end return process_params(cloned_args, params), alias_map, other_controls end local function get_origtext_params(args) local origtext, origtextlang, origsc, orignormsc if args.origtext then -- Wiktionary language codes have at least two lowercase letters followed possibly by lowercase letters and/or -- hyphens (there are more restrictions but this is close enough). Also check for nonstandard Latin etymology -- language codes (e.g. VL. or LL.). (There used to be more nonstandard codes but they have all been -- eliminated.) origtextlang, origtext = args.origtext:match("^(%l%l[%l-]*):([^ ].*)$") if not origtextlang then -- Special hack for Latin variants, which can have nonstandard etym codes, e.g. VL., LL. origtextlang, origtext = args.origtext:match("^(%uL%.):([^ ].*)$") end if not origtextlang then error("origtext= should begin with a language code prefix") end origtextlang = get_lang(origtextlang, nil, "allow etym") or error("origtext= should begin with a language code prefix") origsc = args.origsc orignormsc = args.orignormsc else for _, noparam in ipairs{"origtr", "origts", "origsc", "orignorm", "orignormsc", "origsubst", "origll"} do if args[noparam] then error(("Cannot specify %s= without origtext="):format(noparam)) end end end return origtext, origtextlang, origsc, orignormsc end local function get_quote(args, is_cite) local text = args.text local gloss = args.t local tr = args.tr local ts = args.ts local norm = args.norm local sc = args.sc local normsc = args.normsc -- Fetch original-text parameters. local origtext, origtextlang, origsc, orignormsc = get_origtext_params(args) -- If any quote-related args are present, display the actual quote; otherwise, display nothing. if text or gloss or tr or ts or norm or args.origtext then -- Pass "und" here rather than cause an error; there will be an error on mainspace, Citations, etc. pages -- in any case in source() if the language is omitted. local lang = get_first_lang(args[1] or args.lang) local termlang = args.termlang and get_first_lang(args.termlang) or lang local usex_data = { lang = lang, termlang = termlang, usex = text, -- We don't supply url here as we handle url= separately. sc = sc, translation = gloss, translationurl = args.turl, normalization = norm, normsc = normsc, normurl = args.normurl, transliteration = tr, transcription = ts, brackets = args.brackets, subst = args.subst, lit = args.lit, liturl = args.liturl, footer = args.footer, qq = parse_and_format_labels(args.ll, lang), quote = "quote-meta", orig = origtext, origlang = origtextlang, origsc = origsc, origurl = args.origurl, orignorm = args.orignorm, orignormsc = orignormsc, orignormurl = args.orignormurl, origtr = args.origtr, origts = args.origts, origsubst = args.origsubst, origqq = parse_and_format_labels(args.origll, lang), noreq = args.noreq, nocat = is_cite or args.nocat, } if args.inline then -- don't let usex format the footer, otherwise it gets inlined with the rest of the quoted text usex_data.footer = nil usex_data.inline = 1 text = format_usex(usex_data) if text then text = " “" .. text .. "”" else text = "" end if args.footer then text = text .. "<dl><dd>" .. args.footer .. "</dd></dl>" end else text = "<dl><dd>" .. format_usex(usex_data) .. "</dd></dl>" end elseif args.footer then text = "<dl><dd>" .. args.footer .. "</dd></dl>" end return text end -- External interface, meant to be called from a template. Replaces {{quote-meta}} and meant to be the primary -- interface for {{quote-*}} templates. function export.quote_t(frame) local args, alias_map, other_controls = get_args(frame.args, frame:getParent().args, "require_lang") if args.ascite then return export.cite_t(frame) end return show_quote(args, alias_map, other_controls) end function show_quote(args, alias_map, other_controls) local parts = {} insert(parts, '<div class="citation-whole"><span class="cited-source">') insert(parts, export.source(args, alias_map, nil, other_controls)) insert(parts, "</span>") insert(parts, get_quote(args)) insert(parts, "</div>") local retval = concat(parts) return deprecated and frame:expandTemplate({ title = "check deprecated lang param usage", args = {retval, lang = args.lang}, }) or retval end -- External interface, meant to be called from a template. Replaces {{cite-meta}} and meant to be the primary -- interface for {{cite-*}} templates. function export.cite_t(frame) local parent_args = {} for k, v in pairs(frame:getParent().args) do parent_args[k] = v end -- use "und" as lang if none provided if parent_args[1] == nil then parent_args[1] = "und" end local args, alias_map, other_controls = get_args(frame.args, parent_args) if args.asquote then return show_quote(args, alias_map, other_controls) end return show_cite(args, alias_map, other_controls) end function show_cite(args, alias_map, other_controls) local parts = {} -- don't nag for translations if args.text and not args.t then args.noreq = 1 end local len_visible = args.text and ulen((args.text:gsub("<[^<>]+>", ""))) or 0 if len_visible == 0 then if not args.t or args.t == "-" then args.nocolon = true end elseif args.inline == nil then args.inline = not ( args.block_text or len_visible > 300 or (args.t and not args.t == "-" and len_visible < 80) or string.match(args.text, "<br>") ) end insert(parts, '<span class="citation-whole"><span class="cited-source">') insert(parts, export.source(args, alias_map, "format_as_cite", other_controls)) insert(parts, "</span>") insert(parts, get_quote(args, "is_cite")) insert(parts, "</span>") local retval = concat(parts) return deprecated and frame:expandTemplate({ title = "check deprecated lang param usage", args = {retval, lang = args.lang}, }) or retval end -- External interface, meant to be called from a template. function export.call_quote_template(frame) return export.call_template(frame) end -- External interface, for calling a template with overloaded parameters. function export.overload(frame) local iargs, overloaded_args = process_params(frame.args, { [1] = {required = true} }, true) local parent_args = frame:getParent().args for k, v in pairs(parent_args) do overloaded_args[k] = v end return frame:expandTemplate{title = iargs[1], args = overloaded_args} end -- External interface, meant to be called from a template. function export.call_template(frame) local parameter_sublist = {type = "parameter", sublist = true} local iargs, other_direct_args = process_params(frame.args, { ["template"] = true, ["textparam"] = parameter_sublist, ["pageparam"] = parameter_sublist, ["propagateparams"] = parameter_sublist, ["allowparams"] = {sublist = true}, -- Doesn't use type = "parameter", because any that end in :list get processed differently. }, true) local function fetch_param(source, params) for _, param in ipairs(params) do if source[param] then return source[param] end end return nil end local params = { ["text"] = true, ["passage"] = true, ["footer"] = true, -- always propagates, but gets special formatting } -- paramaters that can be used during template declaration or included in template calls -- if the template is called with param=- it will set any declared value to nil local always_propagate = { ["brackets"] = true, ["usenodot"] = true, ["nodot"] = true, ["ascite"] = true, ["asquote"] = true, } for k,v in pairs(always_propagate) do params[k] = v end local textparam = iargs.textparam or {} for _, param in ipairs(textparam) do params[param] = true end local pageparam = iargs.pageparam or {} local pageparam1 = pageparam[1] if pageparam1 ~= nil then params["page"], params["pages"] = true, true for _, param in ipairs(pageparam) do params[param] = true end end local allowparams, allow_all, list = iargs.allowparams, false if allowparams ~= nil then for _, allow in ipairs(allowparams) do local param = allow:match("^(.*):list$") if param then if list == nil then list = {list = true} end params[scribunto_parameter_key(param)] = list elseif allow == "*" then track("no parameter checking") allow_all = true else params[scribunto_parameter_key(allow)] = true end end else local parent = frame:getParent() local template_name = parent:getTitle() local template_title = new_title(template_name) local content = template_title:getContent() local allowed_params, seen = {}, {} -- Detect all params used by the parent template. param:get_name() takes the -- parent frame arg table as an argument so that preprocessing will take -- them into account, since it will matter if the name contains another -- parameter (e.g. the outer param in "{{{foo{{{bar}}}baz}}}" will change -- depending on the value for bar=). `seen` memoizes results based on the -- raw parameter text (which is stored as a string in the parameter object), -- which avoids unnecessary param:get_name() calls, which are non-trivial. for param in find_parameters(content) do local raw = param.raw if not seen[raw] then allow = param:get_name(template_args) params[scribunto_parameter_key(allow)] = true seen[raw] = true end end end local propagateparams = iargs.propagateparams or {} for _, param in ipairs(propagateparams) do params[param] = true end local parent_args = frame:getParent().args local args = process_params(parent_args, params, allow_all) parent_args = shallow_copy(parent_args) if textparam[1] ~= "-" then other_direct_args.passage = args.text or args.passage or fetch_param(args, textparam) end if not (pageparam1 == nil or pageparam1 == "-") then other_direct_args.page = fetch_param(args, pageparam) or args.page or other_direct_args.page or nil other_direct_args.pages = args.pages or other_direct_args.pages or nil if other_direct_args.page == "-" then other_direct_args.page = nil end if other_direct_args.pages == "-" then other_direct_args.pages = nil end end if args.footer then other_direct_args.footer = frame:expandTemplate{title = "small", args = {args.footer}} end for param, _ in pairs(always_propagate) do if args[param] == "-" then other_direct_args[param] = nil else other_direct_args[param] = args[param] or other_direct_args[param] or nil end end -- authorlink=- can be used to prevent copying of author= to authorlink= but we don't want to propagate this to -- the actual {{quote-*}} code. if other_direct_args.authorlink == "-" then other_direct_args.authorlink = nil end for _, param in ipairs(propagateparams) do if args[param] then other_direct_args[param] = args[param] end end return frame:expandTemplate{title = iargs.template or "quote-book", args = other_direct_args} end local paramdoc_param_replacements = { passage = { param_with_synonym = "<<synonym>>, {{para|text}}, or {{para|passage}}", param_no_synonym = "{{para|text}} or {{para|passage}}", text = [=[ * <<params>> – the passage to be quoted.]=], }, page = { param_with_synonym = "<<synonym>> or {{para|page}}, or {{para|pages}}", param_no_synonym = "{{para|page}} or {{para|pages}}", text = [=[ * <<params>> – '''mandatory in some cases''': the page number(s) quoted from. When quoting a range of pages, note the following: ** Separate the first and last pages of the range with an [[en dash]], like this: {{para|pages|10–11}}. ** You must also use {{para|pageref}} to indicate the page to be linked to (usually the page on which the Wiktionary entry appears). : This parameter must be specified to have the template link to the online version of the work.]=], }, page_with_roman_preface = { param_with_synonym = {"inherit", "page"}, param_no_synonym = {"inherit", "page"}, text = [=[ * <<params>> – '''mandatory in some cases''': the page number(s) quoted from. If quoting from the preface, specify the page number(s) in lowercase Roman numerals. When quoting a range of pages, note the following: ** Separate the first and last page number of the range with an [[en dash]], like this: {{para|pages|10–11}} or {{para|pages|iii–iv}}. ** You must also use {{para|pageref}} to indicate the page to be linked to (usually the page on which the Wiktionary entry appears). : This parameter must be specified to have the template link to the online version of the work.]=], }, chapter = { param_with_synonym = "<<synonym>> or {{para|chapter}}", param_no_synonym = "{{para|chapter}}", text = [=[ * <<params>> – the name of the chapter quoted from.]=], }, roman_chapter = { param_with_synonym = {"inherit", "chapter"}, param_no_synonym = {"inherit", "chapter"}, text = [=[ * <<params>> – the chapter number quoted from in uppercase Roman numerals.]=], }, arabic_chapter = { param_with_synonym = {"inherit", "chapter"}, param_no_synonym = {"inherit", "chapter"}, text = [=[ * <<params>> – the chapter number quoted from in Arabic numerals.]=], }, trailing_params = { text = [=[ * {{para|footer}} – a comment on the passage quoted. * {{para|brackets}} – use {{para|brackets|on}} to surround a quotation with [[bracket#Noun|brackets]]. This indicates that the quotation either contains a mere mention of a term (for example, “some people find the word '''''manoeuvre''''' hard to spell”) rather than an actual use of it (for example, “we need to '''manoeuvre''' carefully to avoid causing upset”), or does not provide an actual instance of a term but provides information about related terms.]=], }, } function export.paramdoc(frame) local parargs = frame:getParent().args local args = process_params(parargs, { [1] = true, }) local text = args[1] local function do_param_with_optional_synonym(param, text_to_sub, paramtext_synonym, paramtext_no_synonym) local function sub_param(synonym) local subbed_paramtext if synonym then subbed_paramtext = paramtext_synonym:gsub("<<synonym>>", "{{para|" .. replacement_escape(synonym) .. "}}") else subbed_paramtext = paramtext_no_synonym end return frame:preprocess((text_to_sub:gsub("<<params>>", replacement_escape(subbed_paramtext)))) end text = text:gsub("<<" .. pattern_escape(param) .. ">>", function() return sub_param() end) text = text:gsub("<<" .. pattern_escape(param) .. ":(.-)>>", sub_param) end local function fetch_text(param_to_replace, key) local spec = paramdoc_param_replacements[param_to_replace] local val = spec[key] if type(val) == "string" then return val end if type(val) == "table" and val[1] == "inherit" then return fetch_text(val[2], key) end error( "Internal error: Unrecognized value for param '" .. param_to_replace .. "', key '" .. key .. "': " .. mw.dumpObject(val) ) end for param_to_replace, spec in pairs(paramdoc_param_replacements) do if not spec.param_no_synonym then -- Text to substitute directly. text = text:gsub("<<" .. pattern_escape(param_to_replace) .. ">>", function() return frame:preprocess(fetch_text(param_to_replace, "text")) end) else do_param_with_optional_synonym( param_to_replace, fetch_text(param_to_replace, "text"), fetch_text(param_to_replace, "param_with_synonym"), fetch_text(param_to_replace, "param_no_synonym") ) end end -- Remove final newline so template code can add a newline after invocation text = text:gsub("\n$", "") return text end return export 15xcjvsjukdtnsz46eew814garwn9of Module:gl-headword 828 34966 178582 168438 2026-11-03T06:49:10Z GinawaSaHapon 3989 178582 Scribunto text/plain -- This module contains code for Galician headword templates. -- Templates covered are: -- * {{gl-noun}}, {{gl-reinteg-noun}}, {{gl-proper noun}}; -- * {{gl-verb}}, {{gl-reinteg-verb}}; -- * {{gl-adj}}, {{gl-reinteg-adj}}, {{gl-adj-comp}}, {{gl-adj-sup}}; -- * {{gl-det}}; -- * {{gl-pron-adj}}; -- * {{gl-contr-adj}}; -- * {{gl-pp}}; -- * {{gl-cardinal}}; -- * {{gl-adv}}. -- See [[Module:gl-verb]] and [[Module:gl-reinteg-verb]] for Galician conjugation templates. local export = {} local pos_functions = {} local force_cat = false -- for testing; if true, categories appear in non-mainspace pages local m_links = require("Module:links") local m_table = require("Module:table") local com_module = "Module:gl-common" local reinteg_com_module = "Module:gl-reinteg-common" local en_utilities_module = "Module:en-utilities" local gl_verb_module = "Module:gl-verb" local gl_reinteg_verb_module = "Module:gl-reinteg-verb" local inflection_utilities_module = "Module:inflection utilities" local romut_module = "Module:romance utilities" local lang = require("Module:languages").getByCode("gl") local langname = lang:getCanonicalName() local rfind = mw.ustring.find local rmatch = mw.ustring.match local rsplit = mw.text.split local usub = mw.ustring.sub -- When followed by a hyphen in a hyphenated compound, the hyphen will be included with the prefix when linked. local include_hyphen_prefixes = m_table.listToSet { "ab", "afro", "anarco", "anglo", "ântero", "anti", "auto", "contra", "ex", "franco", "hiper", "infra", "inter", "intra", "macro", "micro", "neo", "pan", "pós", "pré", "pró", "proto", "sobre", "sub", "super", "vice", } local function track(page) require("Module:debug/track")("gl-headword/" .. page) return true end local function glossary_link(entry, text) text = text or entry return "[[Apendise:Glosaryo#" .. entry .. "|" .. text .. "]]" end local function check_all_missing(forms, plpos, tracking_categories) for _, form in ipairs(forms) do if type(form) == "table" then form = form.term end if form then local title = mw.title.new(form) if title and not title.exists then table.insert(tracking_categories, langname .. " " .. plpos .. " with red links in their headword lines") end end end end local function do_headword(parargs, poscat, is_reinteg) local params = { ["head"] = {list = true}, ["id"] = {}, ["splithyph"] = {type = "boolean"}, ["nolinkhead"] = {type = "boolean"}, ["json"] = {type = "boolean"}, ["pagename"] = {}, -- for testing ["reinteg"] = {}, -- processed in show() } if pos_functions[poscat] then for key, val in pairs(pos_functions[poscat].params) do params[key] = val end end local args = require("Module:parameters").process(parargs, params) local pagename = args.pagename or mw.loadData("Module:headword/data").pagename local user_specified_heads = args.head local heads = user_specified_heads if args.nolinkhead then if #heads == 0 then heads = {pagename} end else local romut = require(romut_module) local auto_linked_head = romut.add_links_to_multiword_term(pagename, args.splithyph, nil, include_hyphen_prefixes) if #heads == 0 then heads = {auto_linked_head} else for i, head in ipairs(heads) do if head:find("^~") then head = romut.apply_link_modifiers(auto_linked_head, usub(head, 2)) heads[i] = head end end end end local data = { lang = lang, pos_category = poscat, categories = {}, heads = heads, user_specified_heads = user_specified_heads, no_redundant_head_cat = #user_specified_heads == 0, genders = {}, inflections = {}, pagename = pagename, id = args.id, force_cat_output = force_cat, is_reinteg = is_reinteg, } local is_suffix = false if pagename:find("^%-") and poscat ~= "suffix forms" then is_suffix = true data.pos_category = "suffixes" local singular_poscat = poscat table.insert(data.categories, langname .. " na hulaping gumagawa ng " .. singular_poscat) table.insert(data.inflections, {label = "hulaping gumagawa ng " .. singular_poscat}) end local tracking_categories = {} if pos_functions[poscat] then pos_functions[poscat].func(args, data, tracking_categories, is_suffix) end if is_reinteg then table.insert(data.inflections, {label = "[[Apendise:Reintegrasyonismo|reintegrasyonista]]"}) end if args.json then return require("Module:JSON").toJSON(data) end return require("Module:headword").full_headword(data) .. (#tracking_categories > 0 and require("Module:utilities").format_categories(tracking_categories, lang, nil, nil, force_cat) or "") end -- The main entry point. -- This is the only function that can be invoked from a template. function export.show(frame) local poscat = frame.args[1] or error("Part of speech has not been specified. Please pass parameter 1 to the module invocation.") local is_reinteg = frame.args.reinteg and require("Module:yesno")(frame.args.reinteg, false) or false local parargs = frame:getParent().args local also_reinteg = parargs.reinteg and require("Module:yesno")(parargs.reinteg, false) or false if is_reinteg and also_reinteg then error("Can't specify reinteg= when using a reintegrationist-specific template") end local parts = {} if also_reinteg or not is_reinteg then table.insert(parts, do_headword(parargs, poscat, false)) end if also_reinteg or is_reinteg then table.insert(parts, do_headword(parargs, poscat, true)) end return table.concat(parts, "<br />") end local function fetch_qualifiers(qual, existing) if not qual then return existing end if not existing then return {qual} end local retval = {} for _, e in ipairs(existing) do table.insert(retval, e) end table.insert(retval, qual) return retval end local function process_terms_with_qualifiers(terms, quals) local infls = {} for i, term in ipairs(terms) do table.insert(infls, {term = term, q = fetch_qualifiers(quals[i])}) end return infls end local function replace_hash_with_lemma(term, lemma) -- If there is a % sign in the lemma, we have to replace it with %% so it doesn't get interpreted as a capture replace -- expression. lemma = lemma:gsub("%%", "%%%%") -- Assign to a variable to discard second return value. term = term:gsub("#", lemma) return term end ----------------------------------------------------------------------------------------- -- Nouns -- ----------------------------------------------------------------------------------------- local allowed_genders = m_table.listToSet( {"m", "f", "mf", "mfbysense", "m-p", "f-p", "mf-p", "mfbysense-p", "?", "?-p", "n", "n-p"} ) local function process_genders(data, genders, g_qual) for i, g in ipairs(genders) do if not allowed_genders[g] then error("Unrecognized gender: " .. g) end if g_qual[i] then table.insert(data.genders, {spec = g, qualifiers = {g_qual[i]}}) else table.insert(data.genders, g) end end end local function do_noun(args, data, tracking_categories, pos, is_suffix, is_proper) local com = require(data.is_reinteg and reinteg_com_module or com_module) local is_plurale_tantum = false local has_singular = false if is_suffix then pos = "hulapi" end local plpos = pos data.genders = {} local saw_m = false local saw_f = false local gender_for_default_plural process_genders(data, args[1], args.g_qual) -- Check for specific genders and pluralia tantum. for i, g in ipairs(args[1]) do if g:find("-p$") then is_plurale_tantum = true else has_singular = true if g == "m" or g == "mf" or g == "mfbysense" then saw_m = true end if g == "f" or g == "mf" or g == "mfbysense" then saw_f = true end end end if saw_m and saw_f then gender_for_default_plural = "m" elseif saw_f then gender_for_default_plural = "f" else gender_for_default_plural = "m" end local lemma = m_links.remove_links(data.heads[1]) -- should always be specified local function insert_inflection(list, term, accel, qualifiers, no_inv) local infl = {q = qualifiers, accel = accel} --if term == lemma and not no_inv then -- infl.label = glossary_link("invariable") --else infl.term = term --end infl.term_for_further_inflection = term table.insert(list, infl) end -- Plural local plurals = {} local args_mpl = args.mpl local args_fpl = args.fpl local args_pl = args[2] if is_plurale_tantum and not has_singular then if #args_pl > 0 then error("Can't specify plurals of plurale tantum " .. pos) end table.insert(data.inflections, {label = glossary_link("maramihan lamang")}) else if is_plurale_tantum then -- both singular and plural table.insert(data.inflections, {label = "minsan " .. glossary_link("maramihan lamang") .. ", paiba-iba"}) end -- If no plurals, use the default plural if not a proper noun. if #args_pl == 0 and not is_proper then args_pl = {"+"} end -- If only ~ given (countable and uncountable), add the default plural after it. if #args_pl == 1 and args_pl[1] == "~" then args_pl = {"~", "+"} end -- Gather plurals, handling requests for default plurals for i, pl in ipairs(args_pl) do local function insert_pl(term) local quals = fetch_qualifiers(args.pl_qual[i]) if term == lemma and i == 1 and #args_pl == 1 then table.insert(data.inflections, {label = glossary_link("di-nababago"), q = quals}) table.insert(data.categories, langname .. " na di-nababanghay na " .. plpos) else insert_inflection(plurals, term, nil, quals) end table.insert(data.categories, langname .. " na mabibilang na " .. plpos) end local function make_plural_and_insert(form, special) local pl = com.make_plural(lemma, special) if pl then insert_pl(pl) end end if pl == "+" then make_plural_and_insert(lemma) elseif pl:find("^%+") then pl = require(romut_module).get_special_indicator(pl) make_plural_and_insert(lemma, pl) elseif pl == "?" or pl == "!" then if i > 1 or #args_pl > 1 then error("Can't specify ? or ! with other plurals") end if pl == "?" then -- Plural is unknown -- Better not to display anything -- table.insert(data.inflections, {label = "plural unknown or uncertain"}) table.insert(data.categories, langname .. " na " .. plpos .. " na may di-alam o di-siguradong anyong pangmaramihan") else -- Plural is not attested table.insert(data.inflections, {label = "di-kumpirmado ang maramihan"}) table.insert(data.categories, langname .. " na " .. plpos .. " na may di-kumpirmadong anyong pangmaramihan") end elseif pl == "-" then if i > 1 then error("Plural specifier - must be first") end -- Uncountable noun; may occasionally have a plural table.insert(data.categories, langname .. " na di-mabibilang na " .. plpos) -- If plural forms were given explicitly, then show "usually" if #args_pl > 1 then table.insert(data.inflections, {label = "madalas " .. glossary_link("di-mabibilang")}) table.insert(data.categories, langname .. " na mabibilang na " .. plpos) else table.insert(data.inflections, {label = glossary_link("di-mabibilang")}) end elseif pl == "~" then if i > 1 then error("Plural specifier ~ must be first") end -- Countable and uncountable noun; will have a plural table.insert(data.categories, langname .. " na mabibilang na " .. plpos) table.insert(data.categories, langname .. " na di-mabibilang na " .. plpos) table.insert(data.inflections, {label = glossary_link("mabibilang") .. " at " .. glossary_link("di-mabibilang")}) else insert_pl(replace_hash_with_lemma(pl, lemma)) end end end if #plurals > 1 then table.insert(data.categories, langname .. " na " .. plpos .. " na may maraming anyong pangmaramihan") end -- Gather masculines/feminines. For each one, generate the corresponding plural(s). local function handle_mf(mfs, qualifiers, inflect, default_plurals) local retval = {} for i, mf in ipairs(mfs) do local function insert_infl(list, term, accel, existing_qualifiers) insert_inflection(list, term, accel, fetch_qualifiers(qualifiers[i], existing_qualifiers), "no inv") end if mf == "+" then -- Generate default feminine. mf = inflect(lemma) else mf = replace_hash_with_lemma(mf, lemma) end local special = require(romut_module).get_special_indicator(mf) if special then mf = inflect(lemma, special) end insert_infl(retval, mf) local mfpl = com.make_plural(mf, special) if mfpl then -- Add an accelerator for each masculine/feminine plural whose lemma -- is the corresponding singular, so that the accelerated entry -- that is generated has a definition that looks like -- # {{plural of|gl|MFSING}} insert_infl(default_plurals, mfpl, {form = "p", lemma = mf}) end end return retval end local feminine_plurals = {} local feminines = handle_mf(args.f, args.f_qual, function(term, special) return com.make_feminine(term, "is noun", special) end, feminine_plurals) local masculine_plurals = {} local masculines = handle_mf(args.m, args.m_qual, com.make_masculine, masculine_plurals) local function handle_mf_plural(mfpl, qualifiers, default_plurals, singulars) local new_mfpls = {} for i, mfpl in ipairs(mfpl) do local function insert_infl(term, accel, existing_qualifiers, no_inv) insert_inflection(new_mfpls, term, accel, fetch_qualifiers(qualifiers[i], existing_qualifiers), no_inv) end local accel if #mfpl == #singulars then -- If same number of overriding masculine/feminine plurals as singulars, -- assume each plural goes with the corresponding singular -- and use each corresponding singular as the lemma in the accelerator. -- The generated entry will have # {{plural of|gl|SINGULAR}} as the -- definition. accel = {form = "p", lemma = singulars[i].term} else accel = nil end if mfpl == "+" then if #default_plurals > 0 then for _, defpl in ipairs(default_plurals) do -- defpl is a table -- don't use "invariable" because the plural is not with respect to the lemma but -- with respect to the masc/fem singular insert_infl(defpl.term_for_further_inflection, defpl.accel, defpl.q, "no inv") end else -- mf is a table local default_mfpl = com.make_plural(lemma) if default_mfpl then insert_infl(default_mfpl, accel) end end elseif mfpl:find("^%+") then mfpl = require(romut_module).get_special_indicator(mfpl) if #singulars > 0 then for _, mf in ipairs(singulars) do -- mf is a table local default_mfpl = com.make_plural(mf.term_for_further_inflection, mfpl) if default_mfpl then -- don't use "invariable" because the plural is not with respect to the lemma but -- with respect to the masc/fem singular insert_infl(default_mfpl, accel, mf.q, "no inv") end end else local default_mfpl = com.make_plural(lemma, mfpl) if default_mfpl then insert_infl(default_mfpl, accel) end end else mfpl = replace_hash_with_lemma(mfpl, lemma) -- don't use "invariable" if masc/fem singular present because the plural is not with respect to -- the lemma but with respect to the masc/fem singular insert_infl(mfpl, accel, nil, #singulars > 0) end end return new_mfpls end if #args_fpl > 0 then -- Override feminine plurals. feminine_plurals = handle_mf_plural(args_fpl, args.fpl_qual, feminine_plurals, feminines) end if #args_mpl > 0 then -- Override masculine plurals. masculine_plurals = handle_mf_plural(args_mpl, args.mpl_qual, masculine_plurals, masculines) end check_all_missing(plurals, plpos, tracking_categories) check_all_missing(feminines, plpos, tracking_categories) check_all_missing(feminine_plurals, plpos, tracking_categories) check_all_missing(masculines, plpos, tracking_categories) check_all_missing(masculine_plurals, plpos, tracking_categories) local function redundant_plural(pl) for _, p in ipairs(plurals) do if p.term_for_further_inflection == pl.term_for_further_inflection then return true end end return false end for _, mpl in ipairs(masculine_plurals) do if redundant_plural(mpl) then track("noun-redundant-mpl") end end for _, fpl in ipairs(feminine_plurals) do if redundant_plural(fpl) then track("noun-redundant-fpl") end end if #plurals > 0 then plurals.label = "maramihan" plurals.accel = {form = "p"} table.insert(data.inflections, plurals) end if #masculines > 0 then masculines.label = "panlalaki" table.insert(data.inflections, masculines) end if #masculine_plurals > 0 then masculine_plurals.label = "panlalaki maramihan" table.insert(data.inflections, masculine_plurals) end if #feminines > 0 then feminines.label = "pambabae" feminines.accel = {form = "f"} table.insert(data.inflections, feminines) end if #feminine_plurals > 0 then feminine_plurals.label = "pambabae maramihan" table.insert(data.inflections, feminine_plurals) end -- Maybe add category 'Galician nouns with irregular gender' (or similar) local irreg_gender_lemma = com.rsub(lemma, " .*", "") -- only look at first word if (rfind(irreg_gender_lemma, "[^ã]o$") and (gender_for_default_plural == "f" or gender_for_default_plural == "mf" or gender_for_default_plural == "mfbysense")) or (irreg_gender_lemma:find("a$") and (gender_for_default_plural == "m" or gender_for_default_plural == "mf" or gender_for_default_plural == "mfbysense")) then table.insert(data.categories, langname .. " na " .. plpos .. " na may di-regular na kasarian") end end local function get_noun_params() return { [1] = {list = "g", required = true, default = "?"}, [2] = {list = "pl"}, ["g_qual"] = {list = "g\1_qual", allow_holes = true}, ["pl_qual"] = {list = "pl\1_qual", allow_holes = true}, ["m"] = {list = true}, ["m_qual"] = {list = "m\1_qual", allow_holes = true}, ["f"] = {list = true}, ["f_qual"] = {list = "f\1_qual", allow_holes = true}, ["mpl"] = {list = true}, ["mpl_qual"] = {list = "mpl\1_qual", allow_holes = true}, ["fpl"] = {list = true}, ["fpl_qual"] = {list = "fpl\1_qual", allow_holes = true}, } end pos_functions["nouns"] = { --TLCHANGE "nouns" params = get_noun_params(), func = function(args, data, tracking_categories, is_suffix) do_noun(args, data, tracking_categories, "pangngalan", is_suffix) end, } pos_functions["proper nouns"] = { --TLCHANGE "proper nouns" params = get_noun_params(), func = function(args, data, tracking_categories, is_suffix) do_noun(args, data, tracking_categories, "pangngalang pantangi", is_suffix, "is proper noun") end, } ----------------------------------------------------------------------------------------- -- Pronouns -- ----------------------------------------------------------------------------------------- local function do_pronoun(args, data, tracking_categories, pos, is_suffix) if is_suffix then pos = "hulapi" end local plpos = pos if not is_suffix then data.pos_category = plpos end local lemma = m_links.remove_links(data.heads[1]) -- should always be specified data.genders = {} for i, g in ipairs(args[1]) do if g ~= "n" and g ~= "n-p" and not allowed_genders[g] then error("Unrecognized gender: " .. g) end if args.g_qual[i] then table.insert(data.genders, {spec = g, qualifiers = {args.g_qual[i]}}) else table.insert(data.genders, g) end end local function do_inflection(forms, quals, label) if #forms > 0 then local terms = process_terms_with_qualifiers(forms, quals) check_all_missing(terms, plpos, tracking_categories) terms.label = label table.insert(data.inflections, terms) end end do_inflection(args.m, args.m_qual, "panlalaki") do_inflection(args.f, args.f_qual, "pambabae") do_inflection(args.sg, args.sg_qual, "isahan") do_inflection(args.pl, args.pl_qual, "maramihan") do_inflection(args.mpl, args.mpl_qual, "panlalaki maramihan") do_inflection(args.fpl, args.fpl_qual, "pambabae maramihan") do_inflection(args.n, args.n_qual, "di-tiyak") end local function get_pronoun_params() local params = { [1] = {list = "g"}, --gender(s) ["g_qual"] = {list = "g\1_qual", allow_holes = true}, ["m"] = {list = true}, --masculine form(s) ["m_qual"] = {list = "m\1_qual", allow_holes = true}, ["f"] = {list = true}, --feminine form(s) ["f_qual"] = {list = "f\1_qual", allow_holes = true}, ["sg"] = {list = true}, --singular form(s) ["sg_qual"] = {list = "sg\1_qual", allow_holes = true}, ["pl"] = {list = true}, --plural form(s) ["pl_qual"] = {list = "pl\1_qual", allow_holes = true}, ["mpl"] = {list = true}, --masculine plural form(s) ["mpl_qual"] = {list = "mpl\1_qual", allow_holes = true}, ["fpl"] = {list = true}, --feminine plural form(s) ["fpl_qual"] = {list = "fpl\1_qual", allow_holes = true}, ["n"] = {list = true}, --neuter form(s) ["n_qual"] = {list = "n\1_qual", allow_holes = true}, } return params end pos_functions["panghalip"] = { --TLCHANGE "pronouns" params = get_pronoun_params(), func = function(args, data, tracking_categories, is_suffix) do_pronoun(args, data, tracking_categories, "panghalip", is_suffix) end, } ----------------------------------------------------------------------------------------- -- Adjectives -- ----------------------------------------------------------------------------------------- local function insert_ancillary_inflection(data, forms, quals, label, plpos, tracking_categories) if forms and #forms > 0 then local terms = process_terms_with_qualifiers(forms, quals) check_all_missing(terms, plpos, tracking_categories) terms.label = label table.insert(data.inflections, terms) end end -- Handle comparatives and superlatives for adjectives and adverbs, including user-specified comparatives and -- superlatives, default-requested comparatives/superlatives using '+', autogenerated comparatives/superlatives, -- and hascomp=. Code is the same for adjectives and adverbs. local function handle_adj_adv_comp(args, data, plpos, is_adv, tracking_categories) local com = require(data.is_reinteg and reinteg_com_module or com_module) local lemma = m_links.remove_links(data.heads[1]) -- should always be specified local stem if is_adv then stem = com.rsub(lemma, "mente$", "") else stem = lemma end local function make_absolute_superlative(special) if is_adv then return com.make_adverbial_absolute_superlative(stem, special) else return com.make_absolute_superlative(stem, special) end end -- Maybe autogenerate default comparative/superlative. if args.comp and args.sup then-- comp= and sup= were given as options to the user -- If no comp, but a non-default sup given, then add the default comparative/superlative. -- This is useful when an absolute superlative is given. local saw_sup_plus = false if #args.comp == 0 and #args.sup > 0 then for i, supval in ipairs(args.sup) do if supval == "+" then saw_sup_plus = true end end if not saw_sup_plus then args.comp = {"+"} table.insert(args.sup, 1, "+") end end -- If comp=+, use default comparative 'mais ...', and set a default superlative if unspecified. local saw_comp_plus = false for i, compval in ipairs(args.comp) do if compval == "+" then saw_comp_plus = true args.comp[i] = "[[mais]] [[" .. lemma .. "]]" end end if saw_comp_plus and #args.sup == 0 then args.sup = {"+"} end -- If sup=+ (possibly from comp=+), use default superlative 'o mais ...'. Also handle absolute superlatives. for i, supval in ipairs(args.sup) do if supval == "+" then args.sup[i] = "[[o]] [[mais]] [[" .. lemma .. "]]" elseif supval == "+abs" then args.sup[i] = make_absolute_superlative() elseif rfind(supval, "^%+abs:") then local sp = rmatch(supval, "^%+abs:(.*)$") args.sup[i] = make_absolute_superlative(sp) end end end if args.hascomp then if args.hascomp == "both" then table.insert(data.inflections, {label = "minsan " .. glossary_link("pahambing")}) table.insert(data.categories, langname .. " na pahambing na " .. plpos) table.insert(data.categories, langname .. " na di-mahahambing na " .. plpos) else local hascomp = require("Module:yesno")(args.hascomp) if hascomp == true then table.insert(data.inflections, {label = glossary_link("mahahambing")}) table.insert(data.categories, langname .. " na mahahambing na " .. plpos) elseif hascomp == false then table.insert(data.inflections, {label = "hindi " .. glossary_link("mahahambing")}) table.insert(data.categories, langname .. " na di-mahahambing na " .. plpos) else error("Unrecognized value for hascomp=: " .. args.hascomp) end end elseif args.comp and #args.comp > 0 or args.sup and #args.sup > 0 then table.insert(data.inflections, {label = glossary_link("mahahambing")}) table.insert(data.categories, langname .. " na mahahambing na " .. plpos) end insert_ancillary_inflection(data, args.comp, args.comp_qual, "pahambing", plpos, tracking_categories) insert_ancillary_inflection(data, args.sup, args.sup_qual, "pasukdol", plpos, tracking_categories) end local function do_adjective(args, data, tracking_categories, pos, is_suffix, is_superlative) local com = require(data.is_reinteg and reinteg_com_module or com_module) local feminines = {} local masculine_plurals = {} local feminine_plurals = {} if is_suffix then pos = "hulapi" end local plpos = pos if not is_suffix then data.pos_category = plpos end if args.sp then local romut = require(romut_module) if not romut.allowed_special_indicators[args.sp] then local indicators = {} for indic, _ in pairs(romut.allowed_special_indicators) do table.insert(indicators, "'" .. indic .. "'") end table.sort(indicators) error("Special inflection indicator beginning can only be " .. mw.text.listToText(indicators) .. ": " .. args.sp) end end local lemma = m_links.remove_links(data.heads[1]) -- should always be specified local function insert_inflection(forms, label, accel) if #forms > 0 then if forms[1].term == "-" then table.insert(data.inflections, {label = "walang " .. label}) else forms.label = label forms.accel = {form = accel} table.insert(data.inflections, forms) end end end if args.short then table.insert(data.inflections, {label = "[[Apendise:Galyego na pandiwa|maikling pandiwari]]"}) end if args.inv then -- invariable adjective table.insert(data.inflections, {label = glossary_link("di-nababago")}) table.insert(data.categories, langname .. " na di-nababanghay na " .. plpos) if args.sp or #args.f > 0 or #args.pl > 0 or #args.mpl > 0 or #args.fpl > 0 then error("Can't specify inflections with an invariable " .. pos) end elseif args.fonly then -- feminine-only if #args.f > 0 then error("Can't specify explicit feminines with feminine-only " .. pos) end if #args.pl > 0 then error("Can't specify explicit plurals with feminine-only " .. pos .. ", use fpl=") end if #args.mpl > 0 then error("Can't specify explicit masculine plurals with feminine-only " .. pos) end local argsfpl = args.fpl if #argsfpl == 0 then argsfpl = {"+"} end for i, fpl in ipairs(argsfpl) do if fpl == "+" then local defpl = com.make_plural(lemma, args.sp) if not defpl then error("Unable to generate default plural of '" .. lemma .. "'") end fpl = defpl else fpl = replace_hash_with_lemma(fpl, lemma) end table.insert(feminine_plurals, {term = fpl, q = fetch_qualifiers(args.fpl_qual[i])}) end check_all_missing(feminine_plurals, plpos, tracking_categories) table.insert(data.inflections, {label = "pambabae lamang"}) insert_inflection(feminine_plurals, "pambabae maramihan", "f|p") else -- Gather feminines. local argsf = args.f if #argsf == 0 then argsf = {"+"} end for i, f in ipairs(argsf) do if f == "+" then -- Generate default feminine. f = com.make_feminine(lemma, false, args.sp) else f = replace_hash_with_lemma(f, lemma) end table.insert(feminines, {term = f, q = fetch_qualifiers(args.f_qual[i])}) end local argsmpl = args.mpl local argsfpl = args.fpl if #args.pl > 0 then if #argsmpl > 0 or #argsfpl > 0 or args.mpl_qual.maxindex > 0 or args.fpl_qual.maxindex > 0 then error("Can't specify both pl= and mpl=/fpl=") end argsmpl = args.pl args.mpl_qual = args.pl_qual argsfpl = args.pl args.fpl_qual = args.pl_qual end if #argsmpl == 0 then argsmpl = {"+"} end if #argsfpl == 0 then argsfpl = {"+"} end for i, mpl in ipairs(argsmpl) do if mpl == "+" then -- Generate default masculine plural. local defpl = com.make_plural(lemma, args.sp) if not defpl then error("Unable to generate default plural of '" .. lemma .. "'") end mpl = defpl else mpl = replace_hash_with_lemma(mpl, lemma) end table.insert(masculine_plurals, {term = mpl, q = fetch_qualifiers(args.mpl_qual[i])}) end for i, fpl in ipairs(argsfpl) do if fpl == "+" then for _, f in ipairs(feminines) do -- Generate default feminine plural; f is a table. local defpl = com.make_plural(f.term, args.sp) if not defpl then error("Unable to generate default plural of '" .. f.term .. "'") end table.insert(feminine_plurals, {term = defpl, q = fetch_qualifiers(args.fpl_qual[i], f.q)}) end else fpl = replace_hash_with_lemma(fpl, lemma) table.insert(feminine_plurals, {term = fpl, q = fetch_qualifiers(args.fpl_qual[i])}) end end check_all_missing(feminines, plpos, tracking_categories) check_all_missing(masculine_plurals, plpos, tracking_categories) check_all_missing(feminine_plurals, plpos, tracking_categories) local fem_like_lemma = #feminines == 1 and feminines[1].term == lemma and not feminines[1].q local fem_pl_like_masc_pl = #masculine_plurals > 0 and #feminine_plurals > 0 and m_table.deepEquals(masculine_plurals, feminine_plurals) local masc_pl_like_lemma = #masculine_plurals == 1 and masculine_plurals[1].term == lemma and not masculine_plurals[1].q if fem_like_lemma and fem_pl_like_masc_pl and masc_pl_like_lemma then -- actually invariable table.insert(data.inflections, {label = glossary_link("di-nababago")}) table.insert(data.categories, langname .. " na di-nababanghay na " .. plpos) else -- Make sure there are feminines given and not same as lemma. if not fem_like_lemma then insert_inflection(feminines, "pambabae", "f|s") end if fem_pl_like_masc_pl then insert_inflection(masculine_plurals, "maramihan", "p") data.genders = {"mf"} else insert_inflection(masculine_plurals, "panlalaki maramihan", "m|p") insert_inflection(feminine_plurals, "pambabae maramihan", "f|p") end end end insert_ancillary_inflection(data, args.n, args.n_qual, "di-tiyak", plpos, tracking_categories) handle_adj_adv_comp(args, data, plpos, false, tracking_categories) -- Handle requests for default diminutive. if args.dim then for i, dim in ipairs(args.dim) do if dim == "+" then args.dim[i] = com.make_diminutive(lemma) elseif dim:find("^%+") then dim = require(romut_module).get_special_indicator(dim) args.dim[i] = com.make_diminutive(lemma, dim) end end end -- Handle requests for default augmentative. if args.aug then for i, aug in ipairs(args.aug) do if aug == "+" then args.aug[i] = com.make_augmentative(lemma) elseif aug:find("^%+") then aug = require(romut_module).get_special_indicator(aug) args.aug[i] = com.make_augmentative(lemma, aug) end end end insert_ancillary_inflection(data, args.dim, args.dim_qual, "pampaliit", plpos, tracking_categories) insert_ancillary_inflection(data, args.aug, args.aug_qual, "pampalaki", plpos, tracking_categories) if args.irreg and is_superlative then table.insert(data.categories, langname .. " na di-regular na pasukdol na " .. plpos) end end local function get_adjective_params(adjtype) local params = { ["inv"] = {type = "boolean"}, --invariable ["sp"] = {}, -- special indicator: "first", "first-last", etc. ["f"] = {list = true}, --feminine form(s) ["f_qual"] = {list = "f\1_qual", allow_holes = true}, ["pl"] = {list = true}, --plural override(s) ["pl_qual"] = {list = "pl\1_qual", allow_holes = true}, ["mpl"] = {list = true}, --masculine plural override(s) ["mpl_qual"] = {list = "mpl\1_qual", allow_holes = true}, ["fpl"] = {list = true}, --feminine plural override(s) ["fpl_qual"] = {list = "fpl\1_qual", allow_holes = true}, } if adjtype == "base" then params["comp"] = {list = true} --comparative(s) params["comp_qual"] = {list = "comp\1_qual", allow_holes = true} params["sup"] = {list = true} --superlative(s) params["sup_qual"] = {list = "sup\1_qual", allow_holes = true} params["dim"] = {list = true} --diminutive(s) params["dim_qual"] = {list = "dim\1_qual", allow_holes = true} params["aug"] = {list = true} --augmentative(s) params["aug_qual"] = {list = "aug\1_qual", allow_holes = true} params["fonly"] = {type = "boolean"} -- feminine only params["hascomp"] = {} -- has comparative end if adjtype == "part" then params["short"] = {type = "boolean"} -- short participle end if adjtype == "sup" then params["irreg"] = {type = "boolean"} end if adjtype == "pron" or adjtype == "contr" then params["n"] = {list = true} --neuter form(s) params["n_qual"] = {list = "n\1_qual", allow_holes = true} end return params end pos_functions["pang-uri"] = { --TLCHANGE "adjectives" params = get_adjective_params("base"), func = function(args, data, tracking_categories, is_suffix) do_adjective(args, data, tracking_categories, "pang-uri", is_suffix) end, } pos_functions["comparative adjectives"] = { params = get_adjective_params("comp"), func = function(args, data, tracking_categories, is_suffix) do_adjective(args, data, tracking_categories, "pang-uri", is_suffix) end, } pos_functions["superlative adjectives"] = { params = get_adjective_params("sup"), func = function(args, data, tracking_categories, is_suffix) do_adjective(args, data, tracking_categories, "pang-uri", is_suffix, "is superlative") end, } pos_functions["past participles"] = { params = get_adjective_params("part"), func = function(args, data, tracking_categories, is_suffix) do_adjective(args, data, tracking_categories, "pandiwari", is_suffix) data.pos_category = "past participles" end, } pos_functions["pantukoy"] = { --TLCHANGE "determiners" params = get_adjective_params("det"), func = function(args, data, tracking_categories, is_suffix) do_adjective(args, data, tracking_categories, "pantukoy", is_suffix) end, } pos_functions["adjective-like pronouns"] = { params = get_adjective_params("pron"), func = function(args, data, tracking_categories, is_suffix) do_adjective(args, data, tracking_categories, "panghalip", is_suffix) end, } pos_functions["adjective-like contractions"] = { params = get_adjective_params("contr"), func = function(args, data, tracking_categories, is_suffix) do_adjective(args, data, tracking_categories, "kontraksiyon", is_suffix) end, } ----------------------------------------------------------------------------------------- -- Adverbs -- ----------------------------------------------------------------------------------------- local function do_adverb(args, data, tracking_categories, pos, is_suffix) if is_suffix then pos = "hulapi" end local plpos = pos if not is_suffix then data.pos_category = plpos end handle_adj_adv_comp(args, data, plpos, "is adv", tracking_categories) end local function get_adverb_params(advtype) local params = {} if advtype == "base" then params["comp"] = {list = true} --comparative(s) params["comp_qual"] = {list = "comp\1_qual", allow_holes = true} params["sup"] = {list = true} --superlative(s) params["sup_qual"] = {list = "sup\1_qual", allow_holes = true} params["hascomp"] = {} -- has comparative end return params end pos_functions["pang-abay"] = { --TLCHANGE "adverbs" params = get_adverb_params("base"), func = function(args, data, tracking_categories, is_suffix) do_adverb(args, data, tracking_categories, "pang-abay", is_suffix) end, } pos_functions["comparative adverbs"] = { params = get_adverb_params("comp"), func = function(args, data, tracking_categories, is_suffix) do_adverb(args, data, tracking_categories, "pang-abay", is_suffix) end, } pos_functions["superlative adverbs"] = { params = get_adverb_params("sup"), func = function(args, data, tracking_categories, is_suffix) do_adverb(args, data, tracking_categories, "pang-abay", is_suffix) end, } ----------------------------------------------------------------------------------------- -- Verbs -- ----------------------------------------------------------------------------------------- pos_functions["pandiwa"] = { --TLCHANGE "verbs" params = { [1] = {}, ["pres"] = {list = true}, --present ["pres_qual"] = {list = "pres\1_qual", allow_holes = true}, ["pres3s"] = {list = true}, --third-singular present ["pres3s_qual"] = {list = "pres3s\1_qual", allow_holes = true}, ["pret"] = {list = true}, --preterite ["pret_qual"] = {list = "pret\1_qual", allow_holes = true}, ["part"] = {list = true}, --participle ["part_qual"] = {list = "part\1_qual", allow_holes = true}, ["short_part"] = {list = true}, --short participle ["short_part_qual"] = {list = "short_part\1_qual", allow_holes = true}, ["noautolinktext"] = {type = "boolean"}, ["noautolinkverb"] = {type = "boolean"}, ["attn"] = {type = "boolean"}, }, func = function(args, data, tracking_categories) local preses, preses_3s, prets, parts, short_parts if args.attn then table.insert(tracking_categories, "Requests for attention concerning " .. langname) return end local gl_verb = require(data.is_reinteg and gl_reinteg_verb_module or gl_verb_module) local alternant_multiword_spec = gl_verb.do_generate_forms(args, data.is_reinteg and "gl-reinteg-verb" or "gl-verb", data.heads[1]) local specforms = alternant_multiword_spec.forms local function slot_exists(slot) return specforms[slot] and #specforms[slot] > 0 end local function do_finite(slot_tense, label_tense) -- Use pres_3s if it exists and pres_1s doesn't exist (e.g. impersonal verbs); similarly for pres_3p (only3p verbs); -- but fall back to pres_1s if neither pres_1s nor pres_3s nor pres_3p exist (e.g. [[empedernir]]). local has_1s = slot_exists(slot_tense .. "_1s") local has_3s = slot_exists(slot_tense .. "_3s") local has_3p = slot_exists(slot_tense .. "_3p") if has_1s or (not has_3s and not has_3p) then return { slot = slot_tense .. "_1s", label = ("unang panauhan na isahan %s"):format(label_tense), }, true elseif has_3s then return { slot = slot_tense .. "_3s", label = ("ikatlong panauhan na isahan %s"):format(label_tense), }, false else return { slot = slot_tense .. "_3p", label = ("ikatlong panauhan na maramihan %s"):format(label_tense), }, false end end local did_pres_1s preses, did_pres_1s = do_finite("pres", "pangkasalukuyan") preses_3s = { slot = "pres_3s", label = "ikatlong panauhan na isahan na pangkasalukuyan", } prets = do_finite("pret", "preterite") parts = { slot = "pp_ms", label = "pandiwaring pangnakaraan", } short_parts = { slot = "short_pp_ms", label = "maikling pandiwaring pangnakaraan", } if #args.pres > 0 or #args.pres3s > 0 or #args.pret > 0 or #args.part > 0 or #args.short_part > 0 then track("verb-old-multiarg") end local function strip_brackets(qualifiers) if not qualifiers then return nil end local stripped_qualifiers = {} for _, qualifier in ipairs(qualifiers) do local stripped_qualifier = qualifier:match("^%[(.*)%]$") if not stripped_qualifier then error("Internal error: Qualifier should be surrounded by brackets at this stage: " .. qualifier) end table.insert(stripped_qualifiers, stripped_qualifier) end return stripped_qualifiers end local function do_verb_form(args, qualifiers, slot_desc, skip_if_empty) local forms local to_insert if #args == 0 then forms = specforms[slot_desc.slot] if not forms or #forms == 0 then if skip_if_empty then return end forms = {{form = "-"}} end elseif #args == 1 and args[1] == "-" then forms = {{form = "-"}} else forms = {} for i, arg in ipairs(args) do local qual = qualifiers[i] if qual then -- FIXME: It's annoying we have to add brackets and strip them out later. The inflection -- code adds all footnotes with brackets around them; we should change this. qual = {"[" .. qual .. "]"} end local form = arg if not args.noautolinkverb then -- [[Module:inflection utilities]] already loaded by [[Module:gl-verb]] or -- [[Module:gl-reinteg-verb]] form = require(inflection_utilities_module).add_links(form) end table.insert(forms, {form = form, footnotes = qual}) end end if forms[1].form == "-" then to_insert = {label = "walang " .. slot_desc.label} else local into_table = {label = slot_desc.label} for _, form in ipairs(forms) do local qualifiers = strip_brackets(form.footnotes) -- Strip redundant brackets surrounding entire form. These may get generated e.g. -- if we use the angle bracket notation with a single word. local stripped_form = rmatch(form.form, "^%[%[([^%[%]]*)%]%]$") or form.form -- The reintegrationist code uses variant codes to track "Portuguese-ending" vs. "Galician-ending" -- forms and "less common" forms. Remove them now. if data.is_reinteg then stripped_form = gl_verb.remove_variant_codes(stripped_form) end -- Don't include accelerators if brackets remain in form, as the result will be wrong. -- FIXME: For now, don't include accelerators. We should use the new {{gl-verb form of}} once implemented. -- local this_accel = not stripped_form:find("%[%[") and accel or nil local this_accel = nil table.insert(into_table, {term = stripped_form, q = qualifiers, accel = this_accel}) end to_insert = into_table end table.insert(data.inflections, to_insert) end local skip_pres_if_empty if alternant_multiword_spec.no_pres1_and_sub then table.insert(data.inflections, {label = "walang unang panauhan na isahan na pangkasalukuyan"}) table.insert(data.inflections, {label = "walang pasakali na pangkasalukuyan"}) end if alternant_multiword_spec.no_pres_stressed then table.insert(data.inflections, {label = "walang nakadiin na pangkasalukuyan na paturol o pasakali"}) skip_pres_if_empty = true end if alternant_multiword_spec.only3s then table.insert(data.inflections, {label = glossary_link("di-panao")}) elseif alternant_multiword_spec.only3sp then table.insert(data.inflections, {label = "ikatlong panauhan lamang"}) elseif alternant_multiword_spec.only3p then table.insert(data.inflections, {label = "ikatlong panauhan maramihan lamang"}) end local has_vowel_alt if alternant_multiword_spec.vowel_alt then for _, vowel_alt in ipairs(alternant_multiword_spec.vowel_alt) do if vowel_alt ~= "+" and vowel_alt ~= "í" and vowel_alt ~= "ú" then has_vowel_alt = true break end end end do_verb_form(args.pres, args.pres_qual, preses, skip_pres_if_empty) -- We want to include both the pres_1s and pres_3s if there is a vowel alternation in the present singular. But we -- don't want to redundantly include the pres_3s if we already included it. if did_pres_1s and has_vowel_alt then do_verb_form(args.pres3s, args.pres3s_qual, preses_3s, skip_pres_if_empty) end do_verb_form(args.pret, args.pret_qual, prets) do_verb_form(args.part, args.part_qual, parts) do_verb_form(args.short_part, args.short_part_qual, short_parts, "skip if empty") -- Add categories. for _, cat in ipairs(alternant_multiword_spec.categories) do table.insert(data.categories, cat) end -- If the user didn't explicitly specify head=, or specified exactly one head (not 2+) and we were able to -- incorporate any links in that head into the 1= specification, use the infinitive generated by -- [[Module:gl-verb]]/[[Module:gl-reinteg-verb]] in place of the user-specified or auto-generated head. This was -- copied from [[Module:it-headword]], where doing this gets accents marked on the verb(s). We don't have -- accents marked on the verb but by doing this we do get any footnotes on the infinitive propagated here. Don't -- do this if the user gave multiple heads or gave a head with a multiword-linked verbal expression such as -- Italian '[[dare esca]] [[al]] [[fuoco]]' (FIXME: give Galician equivalent). if #data.user_specified_heads == 0 or ( #data.user_specified_heads == 1 and alternant_multiword_spec.incorporated_headword_head_into_lemma ) then data.heads = {} for _, lemma_obj in ipairs(alternant_multiword_spec.forms.infinitive_linked) do local quals, refs = require(inflection_utilities_module). convert_footnotes_to_qualifiers_and_references(lemma_obj.footnotes) table.insert(data.heads, {term = lemma_obj.form, q = quals, refs = refs}) end end end } ----------------------------------------------------------------------------------------- -- Suffix forms -- ----------------------------------------------------------------------------------------- pos_functions["anyong hulapi"] = { --TLCHANGE "suffix forms" params = { [1] = {required = true, list = true}, ["g"] = {list = true}, ["g_qual"] = {list = "g\1_qual", allow_holes = true}, }, func = function(args, data, is_suffix) data.genders = {} process_genders(data, args.g, args.g_qual) local suffix_type = {} for _, typ in ipairs(args[1]) do table.insert(suffix_type, "hulaping gumagawa ng " .. typ) end table.insert(data.inflections, {label = "di-anyong lema ng " .. m_table.serialCommaJoin(suffix_type, {conj = "o"})}) end, } return export 9uo524xm7r2ybzleq14tv9edfsynlde Module:labels/data/lang/gl 828 35522 178578 169457 2026-11-03T06:13:56Z GinawaSaHapon 3989 178578 Scribunto text/plain local labels = {} labels["Reintegrasyonistang Galyego"] = { aliases = {"reinteg", "reintegrationist", "AGAL", "Reintegrationist Galician"}, display = "reintegrasyonista", Wikipedia = "Reintegrasyonismo", } return require("Module:labels").finalize_data(labels) 69bn0aa6ipvv30pbwhodv5hfbw9k156 Apendise:Glosaryo 0 35981 178574 178536 2026-11-03T02:52:13Z GinawaSaHapon 3989 178574 wikitext text/x-wiki Ito ang glosaryo ng mga katagang pambalarila na ginagamit sa diksiyonaryong ito. <!-- Paunawa: wag pong tanggalin ang mga kataga sa Ingles para po masuportahan yung mga module at template na hindi pa nasasalin nang maayos. Ang pangunahing kahulugan ay para sa salin nito sa Tagalog. Para sa kataga sa Ingles, ire-redirect natin sa kataga sa Tagalog. Ngayon, posibleng magkaroon ng samu't saring kataga para sa isang konsepto (hal. unang panauhan vs panauhan una), sa ganitong kaso, pakigamit po ang {{anchor}} kung ito ay variation lang ng kataga. Irereserba lang sa mga kataga dito ang mga katagang natatangi. --> <!-- Wag munang i-link hanggat walang entry dito sa tlwikt. --> {{compact TOC|num=yes}} ==0-9== ; 1st person : ''tingnan ang '''{{lg|unang panauhan}}''''' ; 2nd person : ''tingnan ang '''{{lg|ikalawang panauhan}}''''' ; 3rd person : ''tingnan ang '''{{lg|ikatlong panauhan}}''''' ==Simbolo== ; {{anchor|*|asterisk|asterisko}} * : kapag nakalagay bago ang isang kataga, ipinapahiwatig nito na ang naturang kataga ay isa lamang pagtataya at hindi kumpirmado sa pamamagitan ng aktuwal na pagsulat, halimbawa, ang katagang {{m|phi-pro|*dilaw}} ay ang salitang Proto-Pilipino para sa ''[[dilaw]]''. ; {{anchor|**|double asterisk|dobleng asterisko|dalawang asterisko}} ** : kapag nakalagay bago ang isang kataga, ipinapahiwatig nito ang naturang anyo ng kataga ay inaasahan kung susundin ang mga tuntunin, ngunit mali sa katunayan at may ibang anyo na aktuwal na ginagamit, halimbawa ang salitang Ingles na ''[[knife]]'', na kung susundin ang regular na paghuhulaping pangmaramihan ay magiging ''**knifes'', ngunit mali ito dahil ang tama ay ''[[knives]]''. ; {{anchor|[ ]|bracket|brackets|square bracket|square brackets}} [&nbsp;] : kung ginagamit sa isang pagbanggit, ipinapahiwatig nito na ang kataga ay nabanggit lamang nang pahapyaw at hindi aktuwal na ginamit: ikumpara ang salitang Ingles na {{m|en|manoeuvre}} sa mga pangungusap na ''Many will find ''manoeuvre'' hard to spell'' ("Marami ang nahihirapan baybayin ang salitang ''manoeuvre''") at ''He ''manoeuvres'' his car to avoid a collision'' ("Minaneobra niya ang kanyang sasakyan para makaiwas sa banggaan"). Bukod dito, ginagamit din ang mga ito upang magbigay impormasyon o konteksto, halimbawa ay "mahilig siyang kumain ng {{l|tl|libro|id=anatomiya}} [ng baka]". ==A== ; {{anchor|a|a.}} a. : [[#daglat|daglat]] para sa Latin ''[[ante]]'' ("[[bago]] [hindi ngayon o mamaya]"). Ibig sabihin, ang isang pagbanggit na may taon na ''a.'' 1924 ay nangangahulugan na ang naturang pagbanggit na yon ay bago ang taong 1924. ; abbreviation : ''tingnan ang '''{{lg|daglat}}''''' ; ablatibo, ablative, kaukulang ablatibo : ''tingnan ang '''{{lg|palayo}}''''' ; {{anchor|ablaut|grade|grado}} ablaut : sa Proto-Indo-Europeo at mga anak nito (pamilyang Indo-Europeo), tumutukoy ito sa sistema ng pagpapalitan ng mga patinig kung saan maaaring magbago ang mga patinig ng isang salita depende sa kahulugan. Halimbawa sa Ingles (isa sa mga anak na wika nito) ang {{m|en|goose}} at {{m|en|geese}}, kung saan ang nauna ay ang anyong pang-isahan at ang huli ay ang anyong pangmaramihan. Ginagamit ang sistemang ito sa [[#banghay|pagbabanghay]] at paggawa ng salita. May partikular na klase ng ablaut na tinatawag na '''grade''' o ''grado'' (kagaya ng [[#zero-grade|zero-grade]]). Ikumpara sa [[#umlaut|umlaut]]. ; absolutibo, absolutive : ''tingnan ang '''{{lg|patanggap}}''''' ; abstraktong pangngalan, abstract noun : ''tingnan ang '''{{lg|pangngalang basal}}''''' ; {{anchor|AD}} AD : daglat para sa ''Anno Domini'', katumbas ng [[#KP|KP]] sa mundong Kristiyano. ; adjective, adj. ''tingnan ang '''{{lg|pang-uri}}''''' ; adverb, adv. : ''tingnan ang '''{{lg|pang-abay}}''''' ; {{anchor|aktibong tinig|tahasang tinig|active voice}} aktibong tinig, active voice : [[#tinig|tinig]] na nagpapakita sa anyo ng pandiwa kung saan ang simuno mismo ang siyang nagsasagawa sa kilos. Ikumpara sa ''[[#pasibong tinig|pasibong tinig]]''. ; {{anchor|aral na hiram|arál na hiram|learned borrowing|learned loan}} aral na hiram : [[#hiram|salitang hiram]] na sadyang hiniram mula sa ibang wika imbes na dumaan sa likas na panghihiram ng mga wika sa isa't isa. Kadalasang resulta ito ng pagpunan ng mga mananalita sa mga konseptong wala sa kanilang wika. Halimbawa nito sa Tagalog ang {{m|tl|bansa}}, na isang aral na hiram mula sa Malay {{m|ms|bangsa}} upang punan ang konsepto ng Espanyol {{m|es|nacion}} dahil hindi maituturing na direktang katumbas nito ang {{m|tl|bayan}}. ; arkaiko, archaic : ''tingnan ang '''{{lg|makaluma}}''''' ; {{anchor|aspect|aspekto|aspeto|grammatical aspect}} aspekto, aspeto, aspect : katangian ng pandiwa na magbago ayon sa kakumpletuhan ng kilos. Wag ikalito sa [[#panahon|panahon]], na tumutukoy sa oras o panahon kung kailan isinagawa ang kilos. Sa Tagalog, ito ang [[#naganap|naganap]], [[#nagaganap|nagaganap]], [[#magaganap|magaganap]], at [[#kagaganap|kagaganap]]. ==B== ; balintiyak na tinig : ''tingnan ang '''{{lg|pasibong tinig}}''''' ; {{anchor|banghay|pagbabanghay|conjugation|inflection}} banghay, pagbabanghay : pagbabago sa anyo ng mga salita ayon sa kategorya kagaya ng [[#aspekto|aspekto]], [[#panahon|panahon]], o [[#kailanan|kailanan]]. Karaniwang tumutukoy ito sa Tagalog sa proseso sa mga pandiwa, [[#deklinasyon|deklinasyon]] ang katumbas sa ibang bahagi ng pananalita kagaya ng sa pangngalan, panghalip, at pang-uri. ; {{anchor|bahagi ng pananalita|part of speech|PoS|POS|BNP|BnP}} bahagi ng pananalita, BNP, BnP : kategorya ng salita ayon sa tungkulin nito sa isang pangungusap. Ilan sa mga halimbawa ang [[#pangngalan|pangngalan]], [[#panghalip|panghalip]], [[#pandiwa|pandiwa]], at [[#pang-uri|pang-uri]]. Maaaring kabilang ang mga salita sa higit sa isang kategorya, gaya ng sa Tagalog {{m|tl|pula}}, na maaaring gamitin bilang pangngalan (''ang kotse ay pula'') o pang-uri (''ang pulang kotse''). ; {{anchor|bahagyang aral|bahagyang arál|bahagyang aral na hiram|semi-learned|semi-learned borrowing}} bahagyang aral na hiram : [[#hiram|hiram]] na salitang sadyang hiniram sa isang lumang wika na bahagyang binago upang umayon sa ponolohiya at morpolohiya ng nanghiram na wika. Ikumpara sa mga ''[[#aral na hiram|aral na hiram]]'', na may katulad na proseso ng panghihiram ngunit walang pagbabago, at ''[[#mana|mana]]'', na likas na nagmula sa isang lumang salita at dumaan sa mga likas na proseso ng wika. ; basal na pangngalan : ''tingnan ang '''{{lg|pangngalang basal}}''''' ; {{anchor|BC|BK}} BC, BK : daglat para sa Bago si Kristo, katumbas ng [[#BKP|BKP]] sa mundong Kristiyano. ; {{anchor|bihira|madalang|rare}} bihira, madalang : ipinapahiwatig na ang naturang salita o kahulugan ay kumpirmadong ginagamit sa iilang piling konteksto at hindi karaniwang makikita o ginagamit labas sa mga kontekstong ito. Ikumpara sa [[#di-karaniwan|di-karaniwan]], na kahit papaano ay ginagamit ng malaki-laking grupo ngunit hindi ng mayorya. ; {{anchor|BCE|BKP}} BKP, BCE : daglat para sa Bago ang Karaniwang Panahon, katumbas ng [[#BK|BK]] sa mundong sekular. ; borrowing, borrowed : ''tingnan ang '''{{lg|hiram}}''''' ; by extension : ''tingnan ang '''{{lg|pinalawak}}''''' ==C== ; {{anchor|c.|circa|sirka}} circa, sirka, c. : ginagamit upang ipahiwatig na ang taon ay isa lamang pagtataya at hindi tumutukoy sa mismong taon. ; colloquial : ''tingnan ang '''{{lg|kolokyal}}''''' ; comparative : ''tingnan ang '''{{lg|pahambing}}''''' ; concrete noun : ''tingnan ang '''{{lg|pangngalang tahas}}''''' ; conjugation : [[#banghay|pagbabanghay]] sa pandiwa ; contemplative : ''tingnan ang '''{{lg|magaganap}}''''' ==D== ; {{anchor|abbr|abbreviation|daglat}} daglat : pinaikling anyo ng isang salita, halimbawa ay ''[[Dr.]]'' para sa [[doktor]]. ; dated : ''tingnan ang '''{{lg|luma}}''''' ; {{anchor|declination|declension|deklinasyon}} deklinasyon, declination, declension : [[#banghay|pagbabanghay]] sa pangngalan at katulad ; diaresis, diaeresis : ''tingnan ang '''{{lg|patuldok}}''''' ; di-literal : ''tingnan ang '''{{lg|matalinghaga}}''''' ; doblete, doublet : ''tingnan ang '''{{lg|magkaparehong pinagmulan}}''''' ==E== ; extended, extended sense : ''tingnan ang '''{{lg|pinalawak}}''''' ==F== ; figurative : ''tingnan ang '''{{lg|matalinghaga}}''''' ; first person, first-person : ''tingnan ang '''{{lg|unang panauhan}}''''' ; future tense : ''tingnan ang '''{{lg|panghinaharap}}''''' ==G== ; genitive : ''tingnan ang '''{{lg|paari}}''''' ==H== ; henitibo, kaukulang henitibo : ''tingnan ang '''{{lg|paari}}''''' ; hinaharap : ''tingnan ang '''{{lg|panghinaharap}}''''' ; {{anchor|hiram na salita|salitang hiram|salitang-hiram|hiniram|hiniram na salita|salitang hiniram|hiram|loanword|loan word|loaned|borrowing|borrowed|borrowed term}} hiram, hiram na salita, panghihiram : salitang nagmula sa ibang wika. Iba ito sa pagbuo ng salita na nagmula sa mas matandang anyo ng parehong wika. Humihiram madalas ang Tagalog sa Espanyol at Ingles, bagamat marami rin itong wika na pinanghihiraman. Ilan sa mga halimbawa ang {{m|tl|trak}} at {{m|tl|magasin}} mula Ingles at {{m|tl|oras}} at {{m|tl|maleta}} mula naman sa Espanyol. Maaari itong binago nang lubusan upang umakma sa pagbaybay ng wikang humiram gaya ng {{m|tl|kumpisal}} mula Espanyol {{m|es|confesar}}, o hindi, lalo na kung umaakma ang orihinal na baybay sa pagbaybay ng wikang humihiram gaya ng {{m|tl|bola}}, na nagmula sa Espanyol {{m|es|bola}}. Ikumpara sa ''[[#kalko|kalko]]'', kung saan tanging kahulugan lamang ang hiniram. ==I== ; {{anchor|second person|second-person|2nd person|pangalawang panauhan|ikalawang panauhan}} ikalawang panauhan, pangalawang panauhan : [[#panauhan|panauhan]] na tumutukoy sa kausap ng nagsasalita, halimbawa sa Tagalog ang mga panghalip na ''[[ikaw]]'', ''[[ka]]'', at ''[[kayo]]''. ; {{anchor|third person|third-person|3rd person|pangatlong panauhan|ikatlong panauhan}} ikatlong panauhan, pangatlong panauhan : [[#panauhan|panauhan]] na tumutukoy sa pinag-uusapan ng nagsasalita kung saan hindi siya kabilang, halimbawa sa Tagalog ang mga panghalip na ''[[siya]]'', ''[[niya]]'', at ''[[sila]]''. ; imperpektibo, imperfective : ''tingnan ang '''{{lg|nagaganap}}''''' ; indicative : ''tingnan ang '''{{lg|paturol}}''''' ; inflection : ''tingnan ang '''{{lg|banghay}}''''' ; inherited : ''tingnan ang '''{{lg|mana}}''''' ; {{anchor|isahan|isa|singular|pang-isahan|sing.|isahang bilang}} isahan : [[#kailanan|kailanan]] na nagpapahiwatig na iisa lamang ang bagay. ==K== ; {{anchor|kagaganap|kakaganap}} kagaganap, kakaganap : [[#aspekto|aspekto]] na nagpapahiwatig na kamakailan lang natapos ang isang kilos, halimbawa, ''kakakain''. ; {{anchor|number|grammatical number|kailanan|bilang}} kailanan : kategorya ng balarila na naglalarawan sa dami o bilang ng isang bagay. Ilan sa mga halimbawa ang [[#maramihan|maramihan]] at [[#isahan|isahan]] ; kasalukuyan : ''tingnan ang '''{{lg|pangkasalukuyan}}''''' ; kaso : ''tingnan ang '''{{lg|kaukulan}}''''' ; {{anchor|case|grammatical case|kaukulan|kaso}} kaukulan : isa sa mga anyo ng pangngalan depende sa tungkulin nito sa isang pangungusap, ilan sa mga halimbawa nito ang [[#palagyo|palagyo]] at [[#paari|paari]]. ; {{anchor|colloquial|kolokyal}} kolokyal : ipinapahiwatig na ang naturang salita o kahulugan ay ginagamit sa isang partikular na barayti ng wika. Ginagamit lamang ang mga salitang ito sa kalapit o kaswal na konteksto. Maaaring katumbas ng ''[[#di-pormal|di-pormal]]'' sa ibang mga wika, at kung itinatangi ang dalawa kagaya ng sa Tagalog, mas malakas ang kolokyal kesa di-pormal. ; komparatibo, kumparatibo : ''tingnan ang '''{{lg|pahambing}}''''' ; kongkretong pangngalan, pangngalang kongkreto : ''tingnan ang '''{{lg|pangngalang tahas}}''''' ; kontemplatibo : ''tingnan ang '''{{lg|magaganap}}''''' ; {{anchor|KP|CE}} KP, CE : daglat para sa Karaniwang Panahon, katumbas ng [[#AD|AD]] sa mundong sekular ==L== ; learned borrowing, learned loan : ''tingnan ang '''{{lg|aral na hiram}}''''' ; {{anchor|obsolete|lipas na|obs.}} lipas na : hindi na ginagamit, at hindi na maiintindihan ng karaniwang tao. Mas malakas kesa ''[[#makaluma|makaluma]]'', at di hamak na mas malakas kesa ''[[#luma|luma]]''. Iba ito sa ''[[#historikal|historikal]]'', na ginagamit pa sa kasalukuyan ngunit tumutukoy sa isang bagay na wala na. ; loanword, loan word : ''tingnan ang '''{{lg|hiram}}''''' ; {{anchor|dated|luma|laos}} luma, laos : ginagamit noon, ngunit hindi na ngayon, bagamat ginagamit pa rin ng nakakatandang henerasyon. Kumbaga, laos na, gaya ng {{m|tl|walastik}}. Mas mahina sa ''[[#makaluma|makaluma]]'', na hindi na ginagamit maliban kung gustong magtunog-luma, o ''[[#lipas na|lipas na]]'', na wala na'ng gumagamit at nakakaintindi sa kahit anong konteksto. ==M== ; {{anchor|contemplative|magaganap|kontemplatibo}} magaganap : [[#aspekto|aspekto]] na nagpapahiwatig na hindi pa nagsisimula ang isang kilos, halimbawa, ''kakain''. Sa Tagalog, karaniwan itong naipagkakamali sa [[#panahon|panahong]] [[#panghinaharap|panghinaharap]] dahil sa pagsasagawa sa kilos sa hinaharap (ikumpara ang ''kakain ako'' sa ''kakain ako mamaya''). ; {{anchor|doublet|doblete|magkaparehong pinagmulan|parehong ninuno|parehong pinagmulan}} magkaparehong pinagmulan : mga pares ng salita ng isang wika na parehong nagmula sa iisang ninunong salita ngunit ay dalawang magkaibang salita sa modernong panahon. Madalas itong nangyayari dahil sa resulta ng [[#hiram|panghihiram]] sa mga wikang may kaugnayan dito gaya ng kaso ng {{m|tl|baliw}} at {{m|tl|ibayo}} na pawang tumutukoy sa magkakaibang konsepto ngunit parehong nagmula sa iisang ninunong salitang Proto-Malayo-Polinesyo {{m|map-pro|*baliw}}, o di kaya'y nabuo sa magkaibang punto ng kasaysayan ng wika gaya naman ng kaso ng Tagalog {{m|tl|ahedres}} at {{m|tl|satol}}, parehong tumutukoy sa laro ngunit ang nauna ay direktang hiniram sa Espanyol at ang huli ay isang [[#lipas na|lipas na salitang]] nagmula sa Sanskrit, na pinakapinagmulan naman ng salitang Espanyol. ; {{anchor|makaluma|archaic|arkaiko}} makaluma : hindi na madalas gamitin, at kung gamitin man sa kasalukuyan ay upang magbigay ng tono ng kalumaan gaya ng mga nobelang historikal. Halimbawa ang paggamit sa salitang ''[[kalatas]]'' imbes na ''[[papel]]''. Mas mahina kesa ''[[#lipas na|lipas na]]'', na hindi na talaga ginagamit at maiintindihan, ngunit mas malakas pa rin kesa ''[[#luma|luma]]'', na naiintindihan pa rin at ginagamit ng marami-rami na bahagi ng mas matandang henerasyon. ; {{anchor|inherited|inherited term|inheritance|mana|manang salita|minanang salita|minana}} mana, manang salita, pagmamana : tumutukoy sa mga salitang nagmula sa isang lumang salita mula sa magulang wika nito sa pamamagitan ng likas na pagbabago ng tunog at walang karagdagang paglalapi, hindi tulad ng sa mga [[#hiram|hiram]]. Halimbawa, nagmula ang salitang {{m|tl|dahon}} sa magulang wika nitong Proto-Pilipino {{m|phi-pro|*dahun}}. ; {{anchor|maramihan|marami|pangmaramihan|plural|pl.|maramihang bilang}} maramihan : [[#kailanan|kailanan]] na nagpapahiwatig na higit sa isa ang dami ng mga bagay. Sa Tagalog, minamarkahan ito ng partikulong ''[[mga]]'', habang sa ibang wika, binabanghay ito gaya ng sa Ingles {{m|en|books}}, na anyong maramihan ng {{m|en|book}}. ; {{anchor|figurative|non-literal|di-literal|matalinghaga}} matalinghaga : hindi [[#literal|literal]], pawang tumutukoy sa mga [[metapora]], [[idyoma]], at katulad na paraan ng pananalita na hindi dapat unawain sa literal nitong kahulugan gaya ng ''[[balat-sibuyas]] ''("madaling umiyak; iyakin"). ; mood : ''tingnan ang '''{{lg|panagano}}''''' ==N== ; {{anchor|perpektibo|naganap|perfective}} naganap : [[#aspekto|aspekto]] na nagpapahiwatig na tapos na ang isang kilos, halimbawa, ''kumain''. Sa Tagalog, karaniwan itong naipagkakamali sa [[#panahon|panahong]] [[#pangnakaraan|pangnakaraan]] dahil sa pagkakumpleto ng kilos (ikumpara ang ''kumain ako'' sa ''kumain na ako''). Wag ikalito sa ''[[#perpekto|perpekto]]'', na wala sa Tagalog ngunit mabubuo sa mga wikang may panahon kagaya ng sa Ingles. ; {{anchor|imperpektibo|nagaganap|imperfective}} nagaganap : [[#aspekto|aspekto]] na nagpapahiwatig na hindi pa tapos ang isang kilos, halimbawa, ''kumakain''. Sa Tagalog, karaniwan itong naipagkakamali sa [[#panahon|panahong]] [[#pangkasalukuyan|pangkasalukuyan]] dahil sa pagsasagawa sa kilos sa kasalukuyan (ikumpara ang ''kumakain ako'' sa ''kumakain ako ngayon''). Wag ikalito sa ''[[#imperpekto|imperpekto]]'', na wala sa Tagalog ngunit mabubuo sa mga wikang may panahon kagaya ng sa Ingles. ; nakaraan, nagdaan : ''tingnan ang '''{{lg|pangnakaraan}}''''' ; {{anchor|nilipat|transferred|transferred sense}} nilipat : ipinapahiwatig na ang orihinal na kahulugan ng isang salita ay ginamit upang tumukoy sa isang partikular na konseptong may kaugnayan dito. Halimbawa, sa Latin, pumapatungkol ang salitang {{m|la|liber}} sa paglaya, ngunit nagkaroon ito ng nilipat na kahulugan para tumukoy sa mga malalayang tao (hindi alipin). Ikumpara sa ''[[#pinalawak|pinalawak]]'', na pumapatungkol naman sa kahulugan na pinalawak upang tumukoy sa ibang konseptong katulad nito. ; nominatibo, nominative, kaukulang nominatibo : ''tingnan ang '''{{lg|palagyo}}''''' ; non-literal : ''tingnan ang '''{{lg|matalinghaga}}''''' ; noun, n. : ''tingnan ang '''{{lg|pangngalan}}''''' ==O== ; obsolete, obs. : ''tingnan ang '''{{lg|lipas na}}''''' ==P== ; {{anchor|genitive|genitive case|kaukulang paari|paari}} paari, kaukulang paari : [[#kaukulan|kaukulan]] na nagpapahiwatig sa pag-aari o kaugnayan, sa Tagalog, minamarkahan ito ng ''[[ng]]'' para sa mga di-tao at ''[[ni]]'' (''[[nina]]'' kapag maramihan) para sa mga tao. ; {{anchor|pahambing|kumparatibo|komparatibo|comparative}} pahambing : [[#banghay|pagbabanghay]] sa isang pang-uri upang ipakita ang antas ng paghahambing na higit sa karaniwan ngunit hindi nasa tugatog. Sa Tagalog, ginagamit ang partikulong ''[[mas]]'' gaya ng ''mas masarap'' upang ipakita ang antas na ito. ; {{anchor|nominative|nominative case|kaukulang palagyo|palagyo}} palagyo, kaukulang palagyo : [[#kaukulan|kaukulan]] na nagpapahiwatig sa gumagawa ng kilos, sa Tagalog, minamarkahan ito ng ''[[ang]]'' para sa mga di-tao o ''[[si]]'' (''[[sina]]'' kapag maramihan) para sa mga tao. ; {{anchor|ablative|ablative case|kaukulang palayo|palayo}} palayo, kaukulang palayo : [[#kaukulan|kaukulan]] na nagpapahiwatig ng paglayo mula sa isang bagay. Para sa mga wikang meron nito, ginagamit ito nang mag-isa o may kasamang pang-ukol. Pinakamalapit na halimbawa sa Tagalog ay ang paggamit sa pang-ukol na ''[[mula]]'', kagaya ng sa ''mula Buendia''. May mga wikang tulad ng Latin na meron nito ngunit nakakuha ng maraming gamit bukod sa pagpapahiwatig ng paglayo. ; {{anchor|grammatical mood|mood|panagano}} panagano : anyo ng pandiwa na nagpapahiwatig sa paano sinabi ng nagsasalita ang isang bagay, gaya halimbawa ng ''[[#pasakali|pasakali]]'', na nagpapahiwatig na ang sinabi ay maaaring mangyari. ; {{anchor|panahon|tense|grammatical tense}} panahon : katangian ng pandiwa na magbago depende sa oras o panahon kung kailan isinagawa ang kilos. Wag ikalito sa [[#aspekto|aspekto]], na tumutukoy sa kakumpletuhan ng kilos. Walang ganito sa Tagalog; pinakamalapit na katumbas ang paggamit sa mga salitang nagpapahiwatig ng oras gaya ng ''[[ngayon]]'', ''[[na]]'', ''[[kanina]]'', ''[[kasalukuyan]]'', at ''[[mamaya]]''. Ilan sa mga halimbawa ang [[#pangnakaraan|pangnakaraan]], [[#panghinaharap|panghinaharap]], at [[#pangkasalukuyan|pangkasalukuyan]]. ; {{anchor|person|grammatical person|panauhan}} panauhan : kategorya sa balarila na naglalarawan sa kaugnayan ng nagsasalita sa pinag-uusapan, ilan sa mga halimbawa ang [[#unang panauhan|unang panauhan]], [[#ikalawang panauhan|ikalawang panauhan]], at [[#ikatlong panauhan|ikatlong panauhan]]. ; {{anchor|pandiwa|pnd|v.|vb.|verb}} pandiwa : [[#bahagi ng pananalita|bahagi ng pananalita]] na tumutukoy sa kilos, kaganapan, o katayuan. Tinatawag na [[#pagbabanghay|pagbabanghay]] ang proseso ng pagbabago ng anyo nito ayon sa tungkulin nito sa pangungusap. ; {{anchor|pang-abay|pnb|adverb|adv.}} pang-abay : [[#bahagi ng pananalita|bahagi ng pananalita]] na naglalarawan sa pang-uri, pandiwa, o kapwa pang-abay. Sa Tagalog, umaakto ito na parang pang-uri at [[#banghay|binabanghay]] din sa kaparehong paraan, ang pagkakaiba lamang ay kung anong bahagi ng pananalita ang inilalarawan nito. Halimbawa ay ''mabilis maglakad'', kung saan ''mabilis'' ang pang-abay sa pandiwang ''maglakad''. Pansinin na magagamit din ang mga ito bilang pang-uri, gaya ng sa ''mabilis na lakad''. ; {{anchor|panghalip|pnh|pron.|pro.|pronoun}} panghalip : [[#bahagi ng pananalita|bahagi ng pananalita]] na humahalili sa isang pangngalan at tumutukoy sa paksa ng pinag-uusapan. Maaari itong humalili sa pangalan ng tao na nasa usapan gaya ng mga panghalip panao {{m|tl|ikaw}} at {{m|tl|ako}}, o tumukoy sa ibang tao ({{m|tl|siya}}) o bagay ({{m|tl|iyon}}). ; {{anchor|pang-uri|pnu|adjective|adj.}} pang-uri : [[bahagi ng pananalita]] na naglalarawan sa pangngalan o panghalip. Marami, ngunit hindi lahat, ng mga pang-uri sa Tagalog ang kinakabitan ng unlaping {{m|tl|ma-}} gaya ng ''maganda''. Halimbawa ay ''pulang mansanas'' o ''mansanas na pula'', sa parehong kaso, ''pula'' ang pang-uri. ; {{anchor|panghinaharap|hinaharap|future tense|panahong panghinaharap}} panghinaharap : [[#panahon|panahon]] na nagpapahiwatig na ang kilos ay isasagawa sa hinaharap. Sa Tagalog, minamarkahan ito ng mga salitang umuukol sa hinaharap gaya ng ''[[mamaya]]'' o ''[[bukas]]''. Sa Ingles, minamarkahan ito ng mga salitang {{m|en|will}} o {{m|en|shall}}. ; pang-isahan : ''tingnan ang '''{{lg|isahan}}''''' ; {{anchor|pangkasalukuyan|kasalukuyan|panahong pangkasalukuyan|present tense}} pangkasalukuyan : [[#panahon|panahon]] na nagpapahiwatig na ang kilos ay isinasagawa sa ngayon. Sa Tagalog, minamarkahan ito ng mga salitang umuukol sa kasalukuyan gaya ng ''[[ngayon]]'' o ''[[na]]''. Sa Ingles, karaniwang binabanghay ang mga pandiwa gamit ang hulaping {{m|en|-ing}} para maipahiwatig ang panahong ito. ; pangmaramihan : ''tingnan ang '''{{lg|maramihan}}''''' ; {{anchor|pangnakaraan|nakaraan|nagdaan|pangnagdaan|panahong pangnakaraan|past tense}} pangnakaraan, pangnagdaan : [[#panahon|panahon]] na nagpapahiwatig na ang kilos ay isinagawa sa nakaraan. Sa Tagalog, minamarkahan ito ng mga salitang umuukol sa nakaraan gaya ng ''[[kanina]]'' o ''[[kahapon]]''. Halimbawa ay ang salitang Ingles na {{m|en|saw}}, ang anyong pangnakaraan ng {{m|en|see}}. ; {{anchor|noun|pangngalan|n.|png}} pangngalan : [[#bahagi ng pananalita|bahagi ng pananalita]] na tumutukoy sa [[tao]], [[bagay]], [[lugar]], o [[konsepto]]. ; {{anchor|basal na pangngalan|pangngalang basal|abstract noun|abstraktong pangngalan|pangngalang abstrakto}} pangngalang basal, basal na pangangalan : [[#pangngalan|pangngalan]] na tumutukoy sa mga konsepto, kumpara sa mga [[#pangngalang tahas|pangngalang tahas]], na tumutukoy naman sa mga pisikal na bagay. ; {{anchor|tahas na pangngalan|pangngalang tahas|concrete noun|kongkretong pangngalan|pangngalang kongkreto}} pangngalang tahas, tahas na pangangalan : [[#pangngalan|pangngalan]] na tumutukoy sa mga pisikal na bagay, kumpara sa mga [[#pangngalang basal|pangngalang basal]], na tumutukoy naman sa mga konsepto. ; part of speech, POS, PoS : ''tingnan ang '''{{lg|bahagi ng pananalita}}''''' ; {{anchor|subjunctive|subjunctive mood|pasakali|panaganong pasakali}} pasakali : [[#panagano|panagano]] na nagpapahiwatig na ang sinabi ng nagsasalita ay maaaring mangyari. Ikumpara sa ''[[#paturol|paturol]]'', na naglalarawan sa isang tunay na pangyayari. ; {{anchor|pasibong tinig|balintiyak na tinig|passive voice}} pasibong tinig, passive voice : [[#tinig|tinig]] na nagpapakita sa anyo ng pandiwa kung saan hindi simuno ang nagsasagawa sa kilos, at minsan ay ito mismo ang tumatanggap ng kilos. Ikumpara sa [[#aktibong tinig|aktibong tinig]]. ; past tense : ''tingnan ang '''{{lg|pangnakaraan}}''''' ; {{anchor|pasukdol|superlative|superlatibo}} pasukdol : [[#banghay|pagbabanghay]] sa pang-uri upang ipakita ang antas ng paghahambing na higit sa lahat. Sa Tagalog, ikinakabit ang mga unlaping {{m|tl|pinaka-}} o {{m|tl|napaka-}} gaya ng ''pinakamasarap'' o ''napakasarap'' upang ipakita ang antas na ito. ; {{anchor|absolutive|absolutibo|kaukulang absolutibo|kaukulang patanggap|patanggap}} patanggap, kaukulang patanggap : [[#kaukulan|kaukulan]] na nagpapahiwatig sa tumatanggap o nakakaranas ng resulta ng kilos. ; {{anchor|diaresis|diaeresis|patuldok}} patuldok : [[#tuldik|tuldik]] ( ¨ ) na karaniwang inilalagay sa taas ng isang patinig. Sa mga wikang Pilipino, ginagamit lamang ito para sa titik ''e'' (''ë'') upang kumatawan sa tunog na schwa sa ilang mga wika gaya ng Maranaw (''Mëranaw''). Sa ibang mga wika, inilalagay ito sa mga patinig upang sabihin na dapat itong bigkasin nang hiwalay at hindi bilang [[diptonggo]], gaya ng {{m+|fr|naïf|t=walang muwang}}, o para sabihin na iba ang pagbigkas sa naturang patinig kumpara sa karaniwan, gaya ng sa Aleman {{m|de|über|t=ibabaw}} at {{m|de|König|t=hari}}, sa prosesong tinatawag na [[#umlaut|umlaut]]. ; {{anchor|indicative mood|indicative|paturol|panaganong paturol}} paturol : [[papagayo|panagano]] na nagpapahiwatig na ang sinabi ng nagsasalita ay naganap o naglalarawan sa isang tunay na pangyayari o bagay. Ikumpara sa ''[[#pasakali|pasakali]]'', na naglalarawan ng mga pangyayaring maaaring mangyari. ; perpektibo, perfective : ''tingnan ang '''{{lg|naganap}}''''' ; person : ''tingnan ang '''{{lg|panauhan}}''''' ; {{anchor|pinalawak|extended sense|by extension}} pinalawak : ipinapahiwatig na ang orihinal na kahulugan nito ay pinalawak upang tumukoy sa mas maraming konsepto na hindi kasama sa orihinal na kahulugan nito. Halimbawa, tumutukoy ang salitang {{m|tl|mabigat}} sa literal na pisikal na bigat, ngunit nagkaroon ito kalaunan ng pinalawak na kahulugan na "nakakapagod, mahirap, seryoso" gaya ng sa ''mabigat na parusa''. Ikumpara ito sa ''[[#nilipat|nilipat]]'', na tumutukoy naman sa paglipat ng kahulugan upang tumukoy sa isang partikular na konseptong may kaugnayan dito. ; plural, pl : ''tingnan ang '''{{lg|maramihan}}''''' ; pnb<!-- daglat sa Diksiyonaryo.ph --> : ''tingnan ang '''{{lg|pang-abay}}''''' ; pnd <!-- daglat sa Diksiyonaryo.ph --> : ''tingnan ang '''{{lg|pandiwa}}''''' ; png <!-- daglat sa Diksiyonaryo.ph --> : ''tingnan ang '''{{lg|pangngalan}}''''' ; pnh <!-- daglat sa Diksiyonaryo.ph --> : ''tingnan ang '''{{lg|panghalip}}''''' ; pnu <!-- daglat sa Diksiyonaryo.ph --> : ''tingnan ang '''{{lg|pang-uri}}''''' ; present tense : ''tingnan ang '''{{lg|pangkasalukuyan}}''''' ; pronoun, pron., pro. : ''tingnan ang '''{{lg|panghalip}}''''' ==R== ; rare : ''tingnan ang '''{{lg|bihira}}''''' ==S== ; salitang-hiram, salitang hiram : ''tingnan ang '''{{lg|hiram}}''''' ; second person, second-person : ''tingnan ang '''{{lg|ikalawang panauhan}}''''' ; semi-learned, semi-learned borrowing : ''tingnan ang '''{{lg|bahagyang aral na hiram}}''''' ; singular, sing. : ''tingnan ang '''{{lg|isahan}}''''' ; subjunctive : ''tingnan ang '''{{lg|pasakali}}''''' ; superlatibo, superlative : ''tingnan ang '''{{lg|pasukdol}}''''' ==T== ; tahas na pangngalan : ''tingnan ang '''{{lg|pangngalang tahas}}''''' ; tahasang tinig : ''tingnan ang '''{{lg|aktibong tinig}}''''' ; tense : ''tingnan ang '''{{lg|panahon}}''''' ; third person, third-person : ''tingnan ang '''{{lg|ikatlong panauhan}}''''' ; {{anchor|tinig|voice}} tinig : katangian ng pandiwa na nagpapahiwatig ng kaugnayan nito sa simuno. Ilan sa mga halimbawa ang [[#aktibong tinig|aktibo]] at [[#pasibong tinig|pasibo]]. ; tiyempo : ''tingnan ang '''{{lg|panahon}}''''' ; transferred, transferred sense : ''tingnan ang '''{{lg|nilipat}}''''' ; {{anchor|tuldik|diacritic|diacritical mark|diakritiko|diyakritiko|dayakritiko|accent|accent mark|aksent}} tuldik : simbolong ikinakabit o inilalagay sa isang titik upang baguhin ang tunog nito. Sa Tagalog at mga wikang Pilipino, may tatlong tuldik na ginagamit, [[#pahilis|pahilis]] ( ´ ), [[#paiwa|paiwa]] ( ` ), at [[#pakupya|pakupya]] ( ^ ), na ginagamit upang ipakita ang pagbigkas sa mga salita para maitangi ito sa mga may kaparehong baybay. Bukod dito, ginagamit din sa ilang mga wikang Pilipino ang tuldik na [[#patuldok|patuldok]], gaya ng sa Maranaw, upang isulat ang tunog na schwa. ==U== ; {{anchor|umlaut}} umlaut : pagbabago sa tunog kung saan binabago ang isang patinig upang umayon sa patinig ng kasunod nitong pantig. Ikumpara sa ''[[#ablaut|ablaut]]''. Ginagamit rin ang kataga para sa tuldik na [[#patuldok|patuldok]], upang ilarawan ang isang patinig na sumailalim sa prosesong ito. ; {{anchor|first person|first-person|1st person|unang panauhan}} unang panauhan : [[#panauhan|panauhan]] na tumutukoy sa nagsasalita o grupo ng mga nagsasalita, halimbawa sa Tagalog ang mga panghalip na ''[[ako]]'', ''[[ko]]'', at ''[[kami]]''. ==V== ; verb, v., vb. : ''tingnan ang '''{{lg|pandiwa}}''''' ; voice : ''tingnan ang '''{{lg|tinig}}''''' ==Z== ; {{anchor|zero-grade|zero grade}} zero-grade : sa Proto-Indo-Europeo, tumutukoy sa anyo ng [[#ablaut|ablaut]] ng isang ugat na hindi nagtataglay ng mga pangunahing ponemang patinig {{ic|*/e/}} at {{ic|*/o/}}. Halimbawa, {{m|ine-pro||*bʰr̥-}} ang ''zero-grade'' ng Indo-Europeong ugat {{m|ine-pro|*bʰer-|t=magbuhat, magpasan}}. jwqyb6xiuddawnnfxe4zdlv8hq30x1r 178575 178574 2026-11-03T02:53:38Z GinawaSaHapon 3989 178575 wikitext text/x-wiki Ito ang glosaryo ng mga katagang pambalarila na ginagamit sa diksiyonaryong ito. <!-- Paunawa: wag pong tanggalin ang mga kataga sa Ingles para po masuportahan yung mga module at template na hindi pa nasasalin nang maayos. Ang pangunahing kahulugan ay para sa salin nito sa Tagalog. Para sa kataga sa Ingles, ire-redirect natin sa kataga sa Tagalog. Ngayon, posibleng magkaroon ng samu't saring kataga para sa isang konsepto (hal. unang panauhan vs panauhan una), sa ganitong kaso, pakigamit po ang {{anchor}} kung ito ay variation lang ng kataga. Irereserba lang sa mga kataga dito ang mga katagang natatangi. --> <!-- Wag munang i-link hanggat walang entry dito sa tlwikt. --> {{compact TOC|num=yes}} ==0-9== ; 1st person : ''tingnan ang '''{{lg|unang panauhan}}''''' ; 2nd person : ''tingnan ang '''{{lg|ikalawang panauhan}}''''' ; 3rd person : ''tingnan ang '''{{lg|ikatlong panauhan}}''''' ==Simbolo== ; {{anchor|*|asterisk|asterisko}} * : kapag nakalagay bago ang isang kataga, ipinapahiwatig nito na ang naturang kataga ay isa lamang pagtataya at hindi kumpirmado sa pamamagitan ng aktuwal na pagsulat, halimbawa, ang katagang {{m|phi-pro|*dilaw}} ay ang salitang Proto-Pilipino para sa ''[[dilaw]]''. ; {{anchor|**|double asterisk|dobleng asterisko|dalawang asterisko}} ** : kapag nakalagay bago ang isang kataga, ipinapahiwatig nito ang naturang anyo ng kataga ay inaasahan kung susundin ang mga tuntunin, ngunit mali sa katunayan at may ibang anyo na aktuwal na ginagamit, halimbawa ang salitang Ingles na ''[[knife]]'', na kung susundin ang regular na paghuhulaping pangmaramihan ay magiging ''**knifes'', ngunit mali ito dahil ang tama ay ''[[knives]]''. ; {{anchor|[ ]|bracket|brackets|square bracket|square brackets}} [&nbsp;] : kung ginagamit sa isang pagbanggit, ipinapahiwatig nito na ang kataga ay nabanggit lamang nang pahapyaw at hindi aktuwal na ginamit: ikumpara ang salitang Ingles na {{m|en|manoeuvre}} sa mga pangungusap na ''Many will find ''manoeuvre'' hard to spell'' ("Marami ang nahihirapan baybayin ang salitang ''manoeuvre''") at ''He ''manoeuvres'' his car to avoid a collision'' ("Minaneobra niya ang kanyang sasakyan para makaiwas sa banggaan"). Bukod dito, ginagamit din ang mga ito upang magbigay impormasyon o konteksto, halimbawa ay "mahilig siyang kumain ng {{l|tl|libro|id=anatomiya}} [ng baka]". ==A== ; {{anchor|a|a.}} a. : [[#daglat|daglat]] para sa Latin ''[[ante]]'' ("[[bago]] [hindi ngayon o mamaya]"). Ibig sabihin, ang isang pagbanggit na may taon na ''a.'' 1924 ay nangangahulugan na ang naturang pagbanggit na yon ay bago ang taong 1924. ; abbreviation : ''tingnan ang '''{{lg|daglat}}''''' ; ablatibo, ablative, kaukulang ablatibo : ''tingnan ang '''{{lg|palayo}}''''' ; {{anchor|ablaut|grade|grado}} ablaut : sa Proto-Indo-Europeo at mga anak nito (pamilyang Indo-Europeo), tumutukoy ito sa sistema ng pagpapalitan ng mga patinig kung saan maaaring magbago ang mga patinig ng isang salita depende sa kahulugan. Halimbawa sa Ingles (isa sa mga anak na wika nito) ang {{m|en|goose}} at {{m|en|geese}}, kung saan ang nauna ay ang anyong pang-isahan at ang huli ay ang anyong pangmaramihan. Ginagamit ang sistemang ito sa [[#banghay|pagbabanghay]] at paggawa ng salita. May partikular na klase ng ablaut na tinatawag na '''grade''' o ''grado'' (kagaya ng [[#zero-grade|zero-grade]]). Ikumpara sa [[#umlaut|umlaut]]. ; absolutibo, absolutive : ''tingnan ang '''{{lg|patanggap}}''''' ; abstraktong pangngalan, abstract noun : ''tingnan ang '''{{lg|pangngalang basal}}''''' ; {{anchor|AD}} AD : daglat para sa ''Anno Domini'', katumbas ng [[#KP|KP]] sa mundong Kristiyano. ; adjective, adj. ''tingnan ang '''{{lg|pang-uri}}''''' ; adverb, adv. : ''tingnan ang '''{{lg|pang-abay}}''''' ; {{anchor|aktibong tinig|tahasang tinig|active voice}} aktibong tinig, active voice : [[#tinig|tinig]] na nagpapakita sa anyo ng pandiwa kung saan ang simuno mismo ang siyang nagsasagawa sa kilos. Ikumpara sa ''[[#pasibong tinig|pasibong tinig]]''. ; {{anchor|aral na hiram|arál na hiram|learned borrowing|learned loan}} aral na hiram : [[#hiram|salitang hiram]] na sadyang hiniram mula sa ibang wika imbes na dumaan sa likas na panghihiram ng mga wika sa isa't isa. Kadalasang resulta ito ng pagpunan ng mga mananalita sa mga konseptong wala sa kanilang wika. Halimbawa nito sa Tagalog ang {{m|tl|bansa}}, na isang aral na hiram mula sa Malay {{m|ms|bangsa}} upang punan ang konsepto ng Espanyol {{m|es|nacion}} dahil hindi maituturing na direktang katumbas nito ang {{m|tl|bayan}}. ; arkaiko, archaic : ''tingnan ang '''{{lg|makaluma}}''''' ; {{anchor|aspect|aspekto|aspeto|grammatical aspect}} aspekto, aspeto, aspect : katangian ng pandiwa na magbago ayon sa kakumpletuhan ng kilos. Wag ikalito sa [[#panahon|panahon]], na tumutukoy sa oras o panahon kung kailan isinagawa ang kilos. Sa Tagalog, ito ang [[#naganap|naganap]], [[#nagaganap|nagaganap]], [[#magaganap|magaganap]], at [[#kagaganap|kagaganap]]. ==B== ; balintiyak na tinig : ''tingnan ang '''{{lg|pasibong tinig}}''''' ; {{anchor|banghay|pagbabanghay|conjugation|inflection}} banghay, pagbabanghay : pagbabago sa anyo ng mga salita ayon sa kategorya kagaya ng [[#aspekto|aspekto]], [[#panahon|panahon]], o [[#kailanan|kailanan]]. Karaniwang tumutukoy ito sa Tagalog sa proseso sa mga pandiwa, [[#deklinasyon|deklinasyon]] ang katumbas sa ibang bahagi ng pananalita kagaya ng sa pangngalan, panghalip, at pang-uri. ; {{anchor|bahagi ng pananalita|part of speech|PoS|POS|BNP|BnP}} bahagi ng pananalita, BNP, BnP : kategorya ng salita ayon sa tungkulin nito sa isang pangungusap. Ilan sa mga halimbawa ang [[#pangngalan|pangngalan]], [[#panghalip|panghalip]], [[#pandiwa|pandiwa]], at [[#pang-uri|pang-uri]]. Maaaring kabilang ang mga salita sa higit sa isang kategorya, gaya ng sa Tagalog {{m|tl|pula}}, na maaaring gamitin bilang pangngalan (''ang kotse ay pula'') o pang-uri (''ang pulang kotse''). ; {{anchor|bahagyang aral|bahagyang arál|bahagyang aral na hiram|bahagyang arál na hiram|semi-learned|semi-learned borrowing}} bahagyang aral na hiram : [[#hiram|hiram]] na salitang sadyang hiniram sa isang lumang wika na bahagyang binago upang umayon sa ponolohiya at morpolohiya ng nanghiram na wika. Ikumpara sa mga ''[[#aral na hiram|aral na hiram]]'', na may katulad na proseso ng panghihiram ngunit walang pagbabago, at ''[[#mana|mana]]'', na likas na nagmula sa isang lumang salita at dumaan sa mga likas na proseso ng wika. ; basal na pangngalan : ''tingnan ang '''{{lg|pangngalang basal}}''''' ; {{anchor|BC|BK}} BC, BK : daglat para sa Bago si Kristo, katumbas ng [[#BKP|BKP]] sa mundong Kristiyano. ; {{anchor|bihira|madalang|rare}} bihira, madalang : ipinapahiwatig na ang naturang salita o kahulugan ay kumpirmadong ginagamit sa iilang piling konteksto at hindi karaniwang makikita o ginagamit labas sa mga kontekstong ito. Ikumpara sa [[#di-karaniwan|di-karaniwan]], na kahit papaano ay ginagamit ng malaki-laking grupo ngunit hindi ng mayorya. ; {{anchor|BCE|BKP}} BKP, BCE : daglat para sa Bago ang Karaniwang Panahon, katumbas ng [[#BK|BK]] sa mundong sekular. ; borrowing, borrowed : ''tingnan ang '''{{lg|hiram}}''''' ; by extension : ''tingnan ang '''{{lg|pinalawak}}''''' ==C== ; {{anchor|c.|circa|sirka}} circa, sirka, c. : ginagamit upang ipahiwatig na ang taon ay isa lamang pagtataya at hindi tumutukoy sa mismong taon. ; colloquial : ''tingnan ang '''{{lg|kolokyal}}''''' ; comparative : ''tingnan ang '''{{lg|pahambing}}''''' ; concrete noun : ''tingnan ang '''{{lg|pangngalang tahas}}''''' ; conjugation : [[#banghay|pagbabanghay]] sa pandiwa ; contemplative : ''tingnan ang '''{{lg|magaganap}}''''' ==D== ; {{anchor|abbr|abbreviation|daglat}} daglat : pinaikling anyo ng isang salita, halimbawa ay ''[[Dr.]]'' para sa [[doktor]]. ; dated : ''tingnan ang '''{{lg|luma}}''''' ; {{anchor|declination|declension|deklinasyon}} deklinasyon, declination, declension : [[#banghay|pagbabanghay]] sa pangngalan at katulad ; diaresis, diaeresis : ''tingnan ang '''{{lg|patuldok}}''''' ; di-literal : ''tingnan ang '''{{lg|matalinghaga}}''''' ; doblete, doublet : ''tingnan ang '''{{lg|magkaparehong pinagmulan}}''''' ==E== ; extended, extended sense : ''tingnan ang '''{{lg|pinalawak}}''''' ==F== ; figurative : ''tingnan ang '''{{lg|matalinghaga}}''''' ; first person, first-person : ''tingnan ang '''{{lg|unang panauhan}}''''' ; future tense : ''tingnan ang '''{{lg|panghinaharap}}''''' ==G== ; genitive : ''tingnan ang '''{{lg|paari}}''''' ==H== ; henitibo, kaukulang henitibo : ''tingnan ang '''{{lg|paari}}''''' ; hinaharap : ''tingnan ang '''{{lg|panghinaharap}}''''' ; {{anchor|hiram na salita|salitang hiram|salitang-hiram|hiniram|hiniram na salita|salitang hiniram|hiram|loanword|loan word|loaned|borrowing|borrowed|borrowed term}} hiram, hiram na salita, panghihiram : salitang nagmula sa ibang wika. Iba ito sa pagbuo ng salita na nagmula sa mas matandang anyo ng parehong wika. Humihiram madalas ang Tagalog sa Espanyol at Ingles, bagamat marami rin itong wika na pinanghihiraman. Ilan sa mga halimbawa ang {{m|tl|trak}} at {{m|tl|magasin}} mula Ingles at {{m|tl|oras}} at {{m|tl|maleta}} mula naman sa Espanyol. Maaari itong binago nang lubusan upang umakma sa pagbaybay ng wikang humiram gaya ng {{m|tl|kumpisal}} mula Espanyol {{m|es|confesar}}, o hindi, lalo na kung umaakma ang orihinal na baybay sa pagbaybay ng wikang humihiram gaya ng {{m|tl|bola}}, na nagmula sa Espanyol {{m|es|bola}}. Ikumpara sa ''[[#kalko|kalko]]'', kung saan tanging kahulugan lamang ang hiniram. ==I== ; {{anchor|second person|second-person|2nd person|pangalawang panauhan|ikalawang panauhan}} ikalawang panauhan, pangalawang panauhan : [[#panauhan|panauhan]] na tumutukoy sa kausap ng nagsasalita, halimbawa sa Tagalog ang mga panghalip na ''[[ikaw]]'', ''[[ka]]'', at ''[[kayo]]''. ; {{anchor|third person|third-person|3rd person|pangatlong panauhan|ikatlong panauhan}} ikatlong panauhan, pangatlong panauhan : [[#panauhan|panauhan]] na tumutukoy sa pinag-uusapan ng nagsasalita kung saan hindi siya kabilang, halimbawa sa Tagalog ang mga panghalip na ''[[siya]]'', ''[[niya]]'', at ''[[sila]]''. ; imperpektibo, imperfective : ''tingnan ang '''{{lg|nagaganap}}''''' ; indicative : ''tingnan ang '''{{lg|paturol}}''''' ; inflection : ''tingnan ang '''{{lg|banghay}}''''' ; inherited : ''tingnan ang '''{{lg|mana}}''''' ; {{anchor|isahan|isa|singular|pang-isahan|sing.|isahang bilang}} isahan : [[#kailanan|kailanan]] na nagpapahiwatig na iisa lamang ang bagay. ==K== ; {{anchor|kagaganap|kakaganap}} kagaganap, kakaganap : [[#aspekto|aspekto]] na nagpapahiwatig na kamakailan lang natapos ang isang kilos, halimbawa, ''kakakain''. ; {{anchor|number|grammatical number|kailanan|bilang}} kailanan : kategorya ng balarila na naglalarawan sa dami o bilang ng isang bagay. Ilan sa mga halimbawa ang [[#maramihan|maramihan]] at [[#isahan|isahan]] ; kasalukuyan : ''tingnan ang '''{{lg|pangkasalukuyan}}''''' ; kaso : ''tingnan ang '''{{lg|kaukulan}}''''' ; {{anchor|case|grammatical case|kaukulan|kaso}} kaukulan : isa sa mga anyo ng pangngalan depende sa tungkulin nito sa isang pangungusap, ilan sa mga halimbawa nito ang [[#palagyo|palagyo]] at [[#paari|paari]]. ; {{anchor|colloquial|kolokyal}} kolokyal : ipinapahiwatig na ang naturang salita o kahulugan ay ginagamit sa isang partikular na barayti ng wika. Ginagamit lamang ang mga salitang ito sa kalapit o kaswal na konteksto. Maaaring katumbas ng ''[[#di-pormal|di-pormal]]'' sa ibang mga wika, at kung itinatangi ang dalawa kagaya ng sa Tagalog, mas malakas ang kolokyal kesa di-pormal. ; komparatibo, kumparatibo : ''tingnan ang '''{{lg|pahambing}}''''' ; kongkretong pangngalan, pangngalang kongkreto : ''tingnan ang '''{{lg|pangngalang tahas}}''''' ; kontemplatibo : ''tingnan ang '''{{lg|magaganap}}''''' ; {{anchor|KP|CE}} KP, CE : daglat para sa Karaniwang Panahon, katumbas ng [[#AD|AD]] sa mundong sekular ==L== ; learned borrowing, learned loan : ''tingnan ang '''{{lg|aral na hiram}}''''' ; {{anchor|obsolete|lipas na|obs.}} lipas na : hindi na ginagamit, at hindi na maiintindihan ng karaniwang tao. Mas malakas kesa ''[[#makaluma|makaluma]]'', at di hamak na mas malakas kesa ''[[#luma|luma]]''. Iba ito sa ''[[#historikal|historikal]]'', na ginagamit pa sa kasalukuyan ngunit tumutukoy sa isang bagay na wala na. ; loanword, loan word : ''tingnan ang '''{{lg|hiram}}''''' ; {{anchor|dated|luma|laos}} luma, laos : ginagamit noon, ngunit hindi na ngayon, bagamat ginagamit pa rin ng nakakatandang henerasyon. Kumbaga, laos na, gaya ng {{m|tl|walastik}}. Mas mahina sa ''[[#makaluma|makaluma]]'', na hindi na ginagamit maliban kung gustong magtunog-luma, o ''[[#lipas na|lipas na]]'', na wala na'ng gumagamit at nakakaintindi sa kahit anong konteksto. ==M== ; {{anchor|contemplative|magaganap|kontemplatibo}} magaganap : [[#aspekto|aspekto]] na nagpapahiwatig na hindi pa nagsisimula ang isang kilos, halimbawa, ''kakain''. Sa Tagalog, karaniwan itong naipagkakamali sa [[#panahon|panahong]] [[#panghinaharap|panghinaharap]] dahil sa pagsasagawa sa kilos sa hinaharap (ikumpara ang ''kakain ako'' sa ''kakain ako mamaya''). ; {{anchor|doublet|doblete|magkaparehong pinagmulan|parehong ninuno|parehong pinagmulan}} magkaparehong pinagmulan : mga pares ng salita ng isang wika na parehong nagmula sa iisang ninunong salita ngunit ay dalawang magkaibang salita sa modernong panahon. Madalas itong nangyayari dahil sa resulta ng [[#hiram|panghihiram]] sa mga wikang may kaugnayan dito gaya ng kaso ng {{m|tl|baliw}} at {{m|tl|ibayo}} na pawang tumutukoy sa magkakaibang konsepto ngunit parehong nagmula sa iisang ninunong salitang Proto-Malayo-Polinesyo {{m|map-pro|*baliw}}, o di kaya'y nabuo sa magkaibang punto ng kasaysayan ng wika gaya naman ng kaso ng Tagalog {{m|tl|ahedres}} at {{m|tl|satol}}, parehong tumutukoy sa laro ngunit ang nauna ay direktang hiniram sa Espanyol at ang huli ay isang [[#lipas na|lipas na salitang]] nagmula sa Sanskrit, na pinakapinagmulan naman ng salitang Espanyol. ; {{anchor|makaluma|archaic|arkaiko}} makaluma : hindi na madalas gamitin, at kung gamitin man sa kasalukuyan ay upang magbigay ng tono ng kalumaan gaya ng mga nobelang historikal. Halimbawa ang paggamit sa salitang ''[[kalatas]]'' imbes na ''[[papel]]''. Mas mahina kesa ''[[#lipas na|lipas na]]'', na hindi na talaga ginagamit at maiintindihan, ngunit mas malakas pa rin kesa ''[[#luma|luma]]'', na naiintindihan pa rin at ginagamit ng marami-rami na bahagi ng mas matandang henerasyon. ; {{anchor|inherited|inherited term|inheritance|mana|manang salita|minanang salita|minana}} mana, manang salita, pagmamana : tumutukoy sa mga salitang nagmula sa isang lumang salita mula sa magulang wika nito sa pamamagitan ng likas na pagbabago ng tunog at walang karagdagang paglalapi, hindi tulad ng sa mga [[#hiram|hiram]]. Halimbawa, nagmula ang salitang {{m|tl|dahon}} sa magulang wika nitong Proto-Pilipino {{m|phi-pro|*dahun}}. ; {{anchor|maramihan|marami|pangmaramihan|plural|pl.|maramihang bilang}} maramihan : [[#kailanan|kailanan]] na nagpapahiwatig na higit sa isa ang dami ng mga bagay. Sa Tagalog, minamarkahan ito ng partikulong ''[[mga]]'', habang sa ibang wika, binabanghay ito gaya ng sa Ingles {{m|en|books}}, na anyong maramihan ng {{m|en|book}}. ; {{anchor|figurative|non-literal|di-literal|matalinghaga}} matalinghaga : hindi [[#literal|literal]], pawang tumutukoy sa mga [[metapora]], [[idyoma]], at katulad na paraan ng pananalita na hindi dapat unawain sa literal nitong kahulugan gaya ng ''[[balat-sibuyas]] ''("madaling umiyak; iyakin"). ; mood : ''tingnan ang '''{{lg|panagano}}''''' ==N== ; {{anchor|perpektibo|naganap|perfective}} naganap : [[#aspekto|aspekto]] na nagpapahiwatig na tapos na ang isang kilos, halimbawa, ''kumain''. Sa Tagalog, karaniwan itong naipagkakamali sa [[#panahon|panahong]] [[#pangnakaraan|pangnakaraan]] dahil sa pagkakumpleto ng kilos (ikumpara ang ''kumain ako'' sa ''kumain na ako''). Wag ikalito sa ''[[#perpekto|perpekto]]'', na wala sa Tagalog ngunit mabubuo sa mga wikang may panahon kagaya ng sa Ingles. ; {{anchor|imperpektibo|nagaganap|imperfective}} nagaganap : [[#aspekto|aspekto]] na nagpapahiwatig na hindi pa tapos ang isang kilos, halimbawa, ''kumakain''. Sa Tagalog, karaniwan itong naipagkakamali sa [[#panahon|panahong]] [[#pangkasalukuyan|pangkasalukuyan]] dahil sa pagsasagawa sa kilos sa kasalukuyan (ikumpara ang ''kumakain ako'' sa ''kumakain ako ngayon''). Wag ikalito sa ''[[#imperpekto|imperpekto]]'', na wala sa Tagalog ngunit mabubuo sa mga wikang may panahon kagaya ng sa Ingles. ; nakaraan, nagdaan : ''tingnan ang '''{{lg|pangnakaraan}}''''' ; {{anchor|nilipat|transferred|transferred sense}} nilipat : ipinapahiwatig na ang orihinal na kahulugan ng isang salita ay ginamit upang tumukoy sa isang partikular na konseptong may kaugnayan dito. Halimbawa, sa Latin, pumapatungkol ang salitang {{m|la|liber}} sa paglaya, ngunit nagkaroon ito ng nilipat na kahulugan para tumukoy sa mga malalayang tao (hindi alipin). Ikumpara sa ''[[#pinalawak|pinalawak]]'', na pumapatungkol naman sa kahulugan na pinalawak upang tumukoy sa ibang konseptong katulad nito. ; nominatibo, nominative, kaukulang nominatibo : ''tingnan ang '''{{lg|palagyo}}''''' ; non-literal : ''tingnan ang '''{{lg|matalinghaga}}''''' ; noun, n. : ''tingnan ang '''{{lg|pangngalan}}''''' ==O== ; obsolete, obs. : ''tingnan ang '''{{lg|lipas na}}''''' ==P== ; {{anchor|genitive|genitive case|kaukulang paari|paari}} paari, kaukulang paari : [[#kaukulan|kaukulan]] na nagpapahiwatig sa pag-aari o kaugnayan, sa Tagalog, minamarkahan ito ng ''[[ng]]'' para sa mga di-tao at ''[[ni]]'' (''[[nina]]'' kapag maramihan) para sa mga tao. ; {{anchor|pahambing|kumparatibo|komparatibo|comparative}} pahambing : [[#banghay|pagbabanghay]] sa isang pang-uri upang ipakita ang antas ng paghahambing na higit sa karaniwan ngunit hindi nasa tugatog. Sa Tagalog, ginagamit ang partikulong ''[[mas]]'' gaya ng ''mas masarap'' upang ipakita ang antas na ito. ; {{anchor|nominative|nominative case|kaukulang palagyo|palagyo}} palagyo, kaukulang palagyo : [[#kaukulan|kaukulan]] na nagpapahiwatig sa gumagawa ng kilos, sa Tagalog, minamarkahan ito ng ''[[ang]]'' para sa mga di-tao o ''[[si]]'' (''[[sina]]'' kapag maramihan) para sa mga tao. ; {{anchor|ablative|ablative case|kaukulang palayo|palayo}} palayo, kaukulang palayo : [[#kaukulan|kaukulan]] na nagpapahiwatig ng paglayo mula sa isang bagay. Para sa mga wikang meron nito, ginagamit ito nang mag-isa o may kasamang pang-ukol. Pinakamalapit na halimbawa sa Tagalog ay ang paggamit sa pang-ukol na ''[[mula]]'', kagaya ng sa ''mula Buendia''. May mga wikang tulad ng Latin na meron nito ngunit nakakuha ng maraming gamit bukod sa pagpapahiwatig ng paglayo. ; {{anchor|grammatical mood|mood|panagano}} panagano : anyo ng pandiwa na nagpapahiwatig sa paano sinabi ng nagsasalita ang isang bagay, gaya halimbawa ng ''[[#pasakali|pasakali]]'', na nagpapahiwatig na ang sinabi ay maaaring mangyari. ; {{anchor|panahon|tense|grammatical tense}} panahon : katangian ng pandiwa na magbago depende sa oras o panahon kung kailan isinagawa ang kilos. Wag ikalito sa [[#aspekto|aspekto]], na tumutukoy sa kakumpletuhan ng kilos. Walang ganito sa Tagalog; pinakamalapit na katumbas ang paggamit sa mga salitang nagpapahiwatig ng oras gaya ng ''[[ngayon]]'', ''[[na]]'', ''[[kanina]]'', ''[[kasalukuyan]]'', at ''[[mamaya]]''. Ilan sa mga halimbawa ang [[#pangnakaraan|pangnakaraan]], [[#panghinaharap|panghinaharap]], at [[#pangkasalukuyan|pangkasalukuyan]]. ; {{anchor|person|grammatical person|panauhan}} panauhan : kategorya sa balarila na naglalarawan sa kaugnayan ng nagsasalita sa pinag-uusapan, ilan sa mga halimbawa ang [[#unang panauhan|unang panauhan]], [[#ikalawang panauhan|ikalawang panauhan]], at [[#ikatlong panauhan|ikatlong panauhan]]. ; {{anchor|pandiwa|pnd|v.|vb.|verb}} pandiwa : [[#bahagi ng pananalita|bahagi ng pananalita]] na tumutukoy sa kilos, kaganapan, o katayuan. Tinatawag na [[#pagbabanghay|pagbabanghay]] ang proseso ng pagbabago ng anyo nito ayon sa tungkulin nito sa pangungusap. ; {{anchor|pang-abay|pnb|adverb|adv.}} pang-abay : [[#bahagi ng pananalita|bahagi ng pananalita]] na naglalarawan sa pang-uri, pandiwa, o kapwa pang-abay. Sa Tagalog, umaakto ito na parang pang-uri at [[#banghay|binabanghay]] din sa kaparehong paraan, ang pagkakaiba lamang ay kung anong bahagi ng pananalita ang inilalarawan nito. Halimbawa ay ''mabilis maglakad'', kung saan ''mabilis'' ang pang-abay sa pandiwang ''maglakad''. Pansinin na magagamit din ang mga ito bilang pang-uri, gaya ng sa ''mabilis na lakad''. ; {{anchor|panghalip|pnh|pron.|pro.|pronoun}} panghalip : [[#bahagi ng pananalita|bahagi ng pananalita]] na humahalili sa isang pangngalan at tumutukoy sa paksa ng pinag-uusapan. Maaari itong humalili sa pangalan ng tao na nasa usapan gaya ng mga panghalip panao {{m|tl|ikaw}} at {{m|tl|ako}}, o tumukoy sa ibang tao ({{m|tl|siya}}) o bagay ({{m|tl|iyon}}). ; {{anchor|pang-uri|pnu|adjective|adj.}} pang-uri : [[bahagi ng pananalita]] na naglalarawan sa pangngalan o panghalip. Marami, ngunit hindi lahat, ng mga pang-uri sa Tagalog ang kinakabitan ng unlaping {{m|tl|ma-}} gaya ng ''maganda''. Halimbawa ay ''pulang mansanas'' o ''mansanas na pula'', sa parehong kaso, ''pula'' ang pang-uri. ; {{anchor|panghinaharap|hinaharap|future tense|panahong panghinaharap}} panghinaharap : [[#panahon|panahon]] na nagpapahiwatig na ang kilos ay isasagawa sa hinaharap. Sa Tagalog, minamarkahan ito ng mga salitang umuukol sa hinaharap gaya ng ''[[mamaya]]'' o ''[[bukas]]''. Sa Ingles, minamarkahan ito ng mga salitang {{m|en|will}} o {{m|en|shall}}. ; pang-isahan : ''tingnan ang '''{{lg|isahan}}''''' ; {{anchor|pangkasalukuyan|kasalukuyan|panahong pangkasalukuyan|present tense}} pangkasalukuyan : [[#panahon|panahon]] na nagpapahiwatig na ang kilos ay isinasagawa sa ngayon. Sa Tagalog, minamarkahan ito ng mga salitang umuukol sa kasalukuyan gaya ng ''[[ngayon]]'' o ''[[na]]''. Sa Ingles, karaniwang binabanghay ang mga pandiwa gamit ang hulaping {{m|en|-ing}} para maipahiwatig ang panahong ito. ; pangmaramihan : ''tingnan ang '''{{lg|maramihan}}''''' ; {{anchor|pangnakaraan|nakaraan|nagdaan|pangnagdaan|panahong pangnakaraan|past tense}} pangnakaraan, pangnagdaan : [[#panahon|panahon]] na nagpapahiwatig na ang kilos ay isinagawa sa nakaraan. Sa Tagalog, minamarkahan ito ng mga salitang umuukol sa nakaraan gaya ng ''[[kanina]]'' o ''[[kahapon]]''. Halimbawa ay ang salitang Ingles na {{m|en|saw}}, ang anyong pangnakaraan ng {{m|en|see}}. ; {{anchor|noun|pangngalan|n.|png}} pangngalan : [[#bahagi ng pananalita|bahagi ng pananalita]] na tumutukoy sa [[tao]], [[bagay]], [[lugar]], o [[konsepto]]. ; {{anchor|basal na pangngalan|pangngalang basal|abstract noun|abstraktong pangngalan|pangngalang abstrakto}} pangngalang basal, basal na pangangalan : [[#pangngalan|pangngalan]] na tumutukoy sa mga konsepto, kumpara sa mga [[#pangngalang tahas|pangngalang tahas]], na tumutukoy naman sa mga pisikal na bagay. ; {{anchor|tahas na pangngalan|pangngalang tahas|concrete noun|kongkretong pangngalan|pangngalang kongkreto}} pangngalang tahas, tahas na pangangalan : [[#pangngalan|pangngalan]] na tumutukoy sa mga pisikal na bagay, kumpara sa mga [[#pangngalang basal|pangngalang basal]], na tumutukoy naman sa mga konsepto. ; part of speech, POS, PoS : ''tingnan ang '''{{lg|bahagi ng pananalita}}''''' ; {{anchor|subjunctive|subjunctive mood|pasakali|panaganong pasakali}} pasakali : [[#panagano|panagano]] na nagpapahiwatig na ang sinabi ng nagsasalita ay maaaring mangyari. Ikumpara sa ''[[#paturol|paturol]]'', na naglalarawan sa isang tunay na pangyayari. ; {{anchor|pasibong tinig|balintiyak na tinig|passive voice}} pasibong tinig, passive voice : [[#tinig|tinig]] na nagpapakita sa anyo ng pandiwa kung saan hindi simuno ang nagsasagawa sa kilos, at minsan ay ito mismo ang tumatanggap ng kilos. Ikumpara sa [[#aktibong tinig|aktibong tinig]]. ; past tense : ''tingnan ang '''{{lg|pangnakaraan}}''''' ; {{anchor|pasukdol|superlative|superlatibo}} pasukdol : [[#banghay|pagbabanghay]] sa pang-uri upang ipakita ang antas ng paghahambing na higit sa lahat. Sa Tagalog, ikinakabit ang mga unlaping {{m|tl|pinaka-}} o {{m|tl|napaka-}} gaya ng ''pinakamasarap'' o ''napakasarap'' upang ipakita ang antas na ito. ; {{anchor|absolutive|absolutibo|kaukulang absolutibo|kaukulang patanggap|patanggap}} patanggap, kaukulang patanggap : [[#kaukulan|kaukulan]] na nagpapahiwatig sa tumatanggap o nakakaranas ng resulta ng kilos. ; {{anchor|diaresis|diaeresis|patuldok}} patuldok : [[#tuldik|tuldik]] ( ¨ ) na karaniwang inilalagay sa taas ng isang patinig. Sa mga wikang Pilipino, ginagamit lamang ito para sa titik ''e'' (''ë'') upang kumatawan sa tunog na schwa sa ilang mga wika gaya ng Maranaw (''Mëranaw''). Sa ibang mga wika, inilalagay ito sa mga patinig upang sabihin na dapat itong bigkasin nang hiwalay at hindi bilang [[diptonggo]], gaya ng {{m+|fr|naïf|t=walang muwang}}, o para sabihin na iba ang pagbigkas sa naturang patinig kumpara sa karaniwan, gaya ng sa Aleman {{m|de|über|t=ibabaw}} at {{m|de|König|t=hari}}, sa prosesong tinatawag na [[#umlaut|umlaut]]. ; {{anchor|indicative mood|indicative|paturol|panaganong paturol}} paturol : [[papagayo|panagano]] na nagpapahiwatig na ang sinabi ng nagsasalita ay naganap o naglalarawan sa isang tunay na pangyayari o bagay. Ikumpara sa ''[[#pasakali|pasakali]]'', na naglalarawan ng mga pangyayaring maaaring mangyari. ; perpektibo, perfective : ''tingnan ang '''{{lg|naganap}}''''' ; person : ''tingnan ang '''{{lg|panauhan}}''''' ; {{anchor|pinalawak|extended sense|by extension}} pinalawak : ipinapahiwatig na ang orihinal na kahulugan nito ay pinalawak upang tumukoy sa mas maraming konsepto na hindi kasama sa orihinal na kahulugan nito. Halimbawa, tumutukoy ang salitang {{m|tl|mabigat}} sa literal na pisikal na bigat, ngunit nagkaroon ito kalaunan ng pinalawak na kahulugan na "nakakapagod, mahirap, seryoso" gaya ng sa ''mabigat na parusa''. Ikumpara ito sa ''[[#nilipat|nilipat]]'', na tumutukoy naman sa paglipat ng kahulugan upang tumukoy sa isang partikular na konseptong may kaugnayan dito. ; plural, pl : ''tingnan ang '''{{lg|maramihan}}''''' ; pnb<!-- daglat sa Diksiyonaryo.ph --> : ''tingnan ang '''{{lg|pang-abay}}''''' ; pnd <!-- daglat sa Diksiyonaryo.ph --> : ''tingnan ang '''{{lg|pandiwa}}''''' ; png <!-- daglat sa Diksiyonaryo.ph --> : ''tingnan ang '''{{lg|pangngalan}}''''' ; pnh <!-- daglat sa Diksiyonaryo.ph --> : ''tingnan ang '''{{lg|panghalip}}''''' ; pnu <!-- daglat sa Diksiyonaryo.ph --> : ''tingnan ang '''{{lg|pang-uri}}''''' ; present tense : ''tingnan ang '''{{lg|pangkasalukuyan}}''''' ; pronoun, pron., pro. : ''tingnan ang '''{{lg|panghalip}}''''' ==R== ; rare : ''tingnan ang '''{{lg|bihira}}''''' ==S== ; salitang-hiram, salitang hiram : ''tingnan ang '''{{lg|hiram}}''''' ; second person, second-person : ''tingnan ang '''{{lg|ikalawang panauhan}}''''' ; semi-learned, semi-learned borrowing : ''tingnan ang '''{{lg|bahagyang aral na hiram}}''''' ; singular, sing. : ''tingnan ang '''{{lg|isahan}}''''' ; subjunctive : ''tingnan ang '''{{lg|pasakali}}''''' ; superlatibo, superlative : ''tingnan ang '''{{lg|pasukdol}}''''' ==T== ; tahas na pangngalan : ''tingnan ang '''{{lg|pangngalang tahas}}''''' ; tahasang tinig : ''tingnan ang '''{{lg|aktibong tinig}}''''' ; tense : ''tingnan ang '''{{lg|panahon}}''''' ; third person, third-person : ''tingnan ang '''{{lg|ikatlong panauhan}}''''' ; {{anchor|tinig|voice}} tinig : katangian ng pandiwa na nagpapahiwatig ng kaugnayan nito sa simuno. Ilan sa mga halimbawa ang [[#aktibong tinig|aktibo]] at [[#pasibong tinig|pasibo]]. ; tiyempo : ''tingnan ang '''{{lg|panahon}}''''' ; transferred, transferred sense : ''tingnan ang '''{{lg|nilipat}}''''' ; {{anchor|tuldik|diacritic|diacritical mark|diakritiko|diyakritiko|dayakritiko|accent|accent mark|aksent}} tuldik : simbolong ikinakabit o inilalagay sa isang titik upang baguhin ang tunog nito. Sa Tagalog at mga wikang Pilipino, may tatlong tuldik na ginagamit, [[#pahilis|pahilis]] ( ´ ), [[#paiwa|paiwa]] ( ` ), at [[#pakupya|pakupya]] ( ^ ), na ginagamit upang ipakita ang pagbigkas sa mga salita para maitangi ito sa mga may kaparehong baybay. Bukod dito, ginagamit din sa ilang mga wikang Pilipino ang tuldik na [[#patuldok|patuldok]], gaya ng sa Maranaw, upang isulat ang tunog na schwa. ==U== ; {{anchor|umlaut}} umlaut : pagbabago sa tunog kung saan binabago ang isang patinig upang umayon sa patinig ng kasunod nitong pantig. Ikumpara sa ''[[#ablaut|ablaut]]''. Ginagamit rin ang kataga para sa tuldik na [[#patuldok|patuldok]], upang ilarawan ang isang patinig na sumailalim sa prosesong ito. ; {{anchor|first person|first-person|1st person|unang panauhan}} unang panauhan : [[#panauhan|panauhan]] na tumutukoy sa nagsasalita o grupo ng mga nagsasalita, halimbawa sa Tagalog ang mga panghalip na ''[[ako]]'', ''[[ko]]'', at ''[[kami]]''. ==V== ; verb, v., vb. : ''tingnan ang '''{{lg|pandiwa}}''''' ; voice : ''tingnan ang '''{{lg|tinig}}''''' ==Z== ; {{anchor|zero-grade|zero grade}} zero-grade : sa Proto-Indo-Europeo, tumutukoy sa anyo ng [[#ablaut|ablaut]] ng isang ugat na hindi nagtataglay ng mga pangunahing ponemang patinig {{ic|*/e/}} at {{ic|*/o/}}. Halimbawa, {{m|ine-pro||*bʰr̥-}} ang ''zero-grade'' ng Indo-Europeong ugat {{m|ine-pro|*bʰer-|t=magbuhat, magpasan}}. 8vj5syzqkiicp4t0yk4oj5kef0qzqy2 178576 178575 2026-11-03T05:55:19Z GinawaSaHapon 3989 178576 wikitext text/x-wiki Ito ang glosaryo ng mga katagang pambalarila na ginagamit sa diksiyonaryong ito. <!-- Paunawa: wag pong tanggalin ang mga kataga sa Ingles para po masuportahan yung mga module at template na hindi pa nasasalin nang maayos. Ang pangunahing kahulugan ay para sa salin nito sa Tagalog. Para sa kataga sa Ingles, ire-redirect natin sa kataga sa Tagalog. Ngayon, posibleng magkaroon ng samu't saring kataga para sa isang konsepto (hal. unang panauhan vs panauhan una), sa ganitong kaso, pakigamit po ang {{anchor}} kung ito ay variation lang ng kataga. Irereserba lang sa mga kataga dito ang mga katagang natatangi. --> <!-- Wag munang i-link hanggat walang entry dito sa tlwikt. --> {{compact TOC|num=yes}} ==0-9== ; 1st person : ''tingnan ang '''{{lg|unang panauhan}}''''' ; 2nd person : ''tingnan ang '''{{lg|ikalawang panauhan}}''''' ; 3rd person : ''tingnan ang '''{{lg|ikatlong panauhan}}''''' ==Simbolo== ; {{anchor|*|asterisk|asterisko}} * : kapag nakalagay bago ang isang kataga, ipinapahiwatig nito na ang naturang kataga ay isa lamang pagtataya at hindi kumpirmado sa pamamagitan ng aktuwal na pagsulat, halimbawa, ang katagang {{m|phi-pro|*dilaw}} ay ang salitang Proto-Pilipino para sa ''[[dilaw]]''. ; {{anchor|**|double asterisk|dobleng asterisko|dalawang asterisko}} ** : kapag nakalagay bago ang isang kataga, ipinapahiwatig nito ang naturang anyo ng kataga ay inaasahan kung susundin ang mga tuntunin, ngunit mali sa katunayan at may ibang anyo na aktuwal na ginagamit, halimbawa ang salitang Ingles na ''[[knife]]'', na kung susundin ang regular na paghuhulaping pangmaramihan ay magiging ''**knifes'', ngunit mali ito dahil ang tama ay ''[[knives]]''. ; {{anchor|[ ]|bracket|brackets|square bracket|square brackets}} [&nbsp;] : kung ginagamit sa isang pagbanggit, ipinapahiwatig nito na ang kataga ay nabanggit lamang nang pahapyaw at hindi aktuwal na ginamit: ikumpara ang salitang Ingles na {{m|en|manoeuvre}} sa mga pangungusap na ''Many will find ''manoeuvre'' hard to spell'' ("Marami ang nahihirapan baybayin ang salitang ''manoeuvre''") at ''He ''manoeuvres'' his car to avoid a collision'' ("Minaneobra niya ang kanyang sasakyan para makaiwas sa banggaan"). Bukod dito, ginagamit din ang mga ito upang magbigay impormasyon o konteksto, halimbawa ay "mahilig siyang kumain ng {{l|tl|libro|id=anatomiya}} [ng baka]". ==A== ; {{anchor|a|a.}} a. : [[#daglat|daglat]] para sa Latin ''[[ante]]'' ("[[bago]] [hindi ngayon o mamaya]"). Ibig sabihin, ang isang pagbanggit na may taon na ''a.'' 1924 ay nangangahulugan na ang naturang pagbanggit na yon ay bago ang taong 1924. ; abbreviation : ''tingnan ang '''{{lg|daglat}}''''' ; ablatibo, ablative, kaukulang ablatibo : ''tingnan ang '''{{lg|palayo}}''''' ; {{anchor|ablaut|grade|grado}} ablaut : sa Proto-Indo-Europeo at mga anak nito (pamilyang Indo-Europeo), tumutukoy ito sa sistema ng pagpapalitan ng mga patinig kung saan maaaring magbago ang mga patinig ng isang salita depende sa kahulugan. Halimbawa sa Ingles (isa sa mga anak na wika nito) ang {{m|en|goose}} at {{m|en|geese}}, kung saan ang nauna ay ang anyong pang-isahan at ang huli ay ang anyong pangmaramihan. Ginagamit ang sistemang ito sa [[#banghay|pagbabanghay]] at paggawa ng salita. May partikular na klase ng ablaut na tinatawag na '''grade''' o ''grado'' (kagaya ng [[#zero-grade|zero-grade]]). Ikumpara sa [[#umlaut|umlaut]]. ; absolutibo, absolutive : ''tingnan ang '''{{lg|patanggap}}''''' ; abstraktong pangngalan, abstract noun : ''tingnan ang '''{{lg|pangngalang basal}}''''' ; {{anchor|AD}} AD : daglat para sa ''Anno Domini'', katumbas ng [[#KP|KP]] sa mundong Kristiyano. ; adjective, adj. ''tingnan ang '''{{lg|pang-uri}}''''' ; adverb, adv. : ''tingnan ang '''{{lg|pang-abay}}''''' ; {{anchor|aktibong tinig|tahasang tinig|active voice}} aktibong tinig, active voice : [[#tinig|tinig]] na nagpapakita sa anyo ng pandiwa kung saan ang simuno mismo ang siyang nagsasagawa sa kilos. Ikumpara sa ''[[#pasibong tinig|pasibong tinig]]''. ; {{anchor|aral na hiram|arál na hiram|learned borrowing|learned loan}} aral na hiram : [[#hiram|salitang hiram]] na sadyang hiniram mula sa ibang wika imbes na dumaan sa likas na panghihiram ng mga wika sa isa't isa. Kadalasang resulta ito ng pagpunan ng mga mananalita sa mga konseptong wala sa kanilang wika. Halimbawa nito sa Tagalog ang {{m|tl|bansa}}, na isang aral na hiram mula sa Malay {{m|ms|bangsa}} upang punan ang konsepto ng Espanyol {{m|es|nacion}} dahil hindi maituturing na direktang katumbas nito ang {{m|tl|bayan}}. ; arkaiko, archaic : ''tingnan ang '''{{lg|makaluma}}''''' ; {{anchor|aspect|aspekto|aspeto|grammatical aspect}} aspekto, aspeto, aspect : katangian ng pandiwa na magbago ayon sa kakumpletuhan ng kilos. Wag ikalito sa [[#panahon|panahon]], na tumutukoy sa oras o panahon kung kailan isinagawa ang kilos. Sa Tagalog, ito ang [[#naganap|naganap]], [[#nagaganap|nagaganap]], [[#magaganap|magaganap]], at [[#kagaganap|kagaganap]]. ==B== ; balintiyak na tinig : ''tingnan ang '''{{lg|pasibong tinig}}''''' ; {{anchor|banghay|pagbabanghay|conjugation|inflection}} banghay, pagbabanghay : pagbabago sa anyo ng mga salita ayon sa kategorya kagaya ng [[#aspekto|aspekto]], [[#panahon|panahon]], o [[#kailanan|kailanan]]. Karaniwang tumutukoy ito sa Tagalog sa proseso sa mga pandiwa, [[#deklinasyon|deklinasyon]] ang katumbas sa ibang bahagi ng pananalita kagaya ng sa pangngalan, panghalip, at pang-uri. ; {{anchor|bahagi ng pananalita|part of speech|PoS|POS|BNP|BnP}} bahagi ng pananalita, BNP, BnP : kategorya ng salita ayon sa tungkulin nito sa isang pangungusap. Ilan sa mga halimbawa ang [[#pangngalan|pangngalan]], [[#panghalip|panghalip]], [[#pandiwa|pandiwa]], at [[#pang-uri|pang-uri]]. Maaaring kabilang ang mga salita sa higit sa isang kategorya, gaya ng sa Tagalog {{m|tl|pula}}, na maaaring gamitin bilang pangngalan (''ang kotse ay pula'') o pang-uri (''ang pulang kotse''). ; {{anchor|bahagyang aral|bahagyang arál|bahagyang aral na hiram|bahagyang arál na hiram|semi-learned|semi-learned borrowing}} bahagyang aral na hiram : [[#hiram|hiram]] na salitang sadyang hiniram sa isang lumang wika na bahagyang binago upang umayon sa ponolohiya at morpolohiya ng nanghiram na wika. Ikumpara sa mga ''[[#aral na hiram|aral na hiram]]'', na may katulad na proseso ng panghihiram ngunit walang pagbabago, at ''[[#mana|mana]]'', na likas na nagmula sa isang lumang salita at dumaan sa mga likas na proseso ng wika. ; basal na pangngalan : ''tingnan ang '''{{lg|pangngalang basal}}''''' ; {{anchor|BC|BK}} BC, BK : daglat para sa Bago si Kristo, katumbas ng [[#BKP|BKP]] sa mundong Kristiyano. ; {{anchor|bihira|madalang|rare}} bihira, madalang : ipinapahiwatig na ang naturang salita o kahulugan ay kumpirmadong ginagamit sa iilang piling konteksto at hindi karaniwang makikita o ginagamit labas sa mga kontekstong ito. Ikumpara sa [[#di-karaniwan|di-karaniwan]], na kahit papaano ay ginagamit ng malaki-laking grupo ngunit hindi ng mayorya. ; {{anchor|BCE|BKP}} BKP, BCE : daglat para sa Bago ang Karaniwang Panahon, katumbas ng [[#BK|BK]] sa mundong sekular. ; borrowing, borrowed : ''tingnan ang '''{{lg|hiram}}''''' ; by extension : ''tingnan ang '''{{lg|pinalawak}}''''' ==C== ; {{anchor|c.|circa|sirka}} circa, sirka, c. : ginagamit upang ipahiwatig na ang taon ay isa lamang pagtataya at hindi tumutukoy sa mismong taon. ; colloquial : ''tingnan ang '''{{lg|kolokyal}}''''' ; comparative : ''tingnan ang '''{{lg|pahambing}}''''' ; concrete noun : ''tingnan ang '''{{lg|pangngalang tahas}}''''' ; conjugation : [[#banghay|pagbabanghay]] sa pandiwa ; contemplative : ''tingnan ang '''{{lg|magaganap}}''''' ==D== ; {{anchor|abbr|abbreviation|daglat}} daglat : pinaikling anyo ng isang salita, halimbawa ay ''[[Dr.]]'' para sa [[doktor]]. ; dated : ''tingnan ang '''{{lg|luma}}''''' ; {{anchor|declination|declension|deklinasyon}} deklinasyon, declination, declension : [[#banghay|pagbabanghay]] sa pangngalan at katulad ; diaresis, diaeresis : ''tingnan ang '''{{lg|patuldok}}''''' ; di-literal : ''tingnan ang '''{{lg|matalinghaga}}''''' ; {{anchor|di-pormal|impormal|inpormal|informal}} di-pormal : ipinapahiwatig na ang naturang salita o balarila ay ginagamit sa pamilyar o kaswal na konteksto. Kabaligtaran ito ng ''[[#pormal|pormal]]'', na ginagamit naman sa mga pormal na konteksto. Kabilang sa mga di-pormal na pananalita ang [[#kolokyal|kolokyal]], ngunit hindi dapat ikalito sa ''[[#balbal|balbal]]'' o ''[[#di-pamantayan|di-pamantayan]]''. ; doblete, doublet : ''tingnan ang '''{{lg|magkaparehong pinagmulan}}''''' ==E== ; extended, extended sense : ''tingnan ang '''{{lg|pinalawak}}''''' ==F== ; figurative : ''tingnan ang '''{{lg|matalinghaga}}''''' ; first person, first-person : ''tingnan ang '''{{lg|unang panauhan}}''''' ; formal : ''tingnan ang '''{{lg|pormal}}''''' ; future tense : ''tingnan ang '''{{lg|panghinaharap}}''''' ==G== ; genitive : ''tingnan ang '''{{lg|paari}}''''' ==H== ; henitibo, kaukulang henitibo : ''tingnan ang '''{{lg|paari}}''''' ; hinaharap : ''tingnan ang '''{{lg|panghinaharap}}''''' ; {{anchor|hiram na salita|salitang hiram|salitang-hiram|hiniram|hiniram na salita|salitang hiniram|hiram|loanword|loan word|loaned|borrowing|borrowed|borrowed term}} hiram, hiram na salita, panghihiram : salitang nagmula sa ibang wika. Iba ito sa pagbuo ng salita na nagmula sa mas matandang anyo ng parehong wika. Humihiram madalas ang Tagalog sa Espanyol at Ingles, bagamat marami rin itong wika na pinanghihiraman. Ilan sa mga halimbawa ang {{m|tl|trak}} at {{m|tl|magasin}} mula Ingles at {{m|tl|oras}} at {{m|tl|maleta}} mula naman sa Espanyol. Maaari itong binago nang lubusan upang umakma sa pagbaybay ng wikang humiram gaya ng {{m|tl|kumpisal}} mula Espanyol {{m|es|confesar}}, o hindi, lalo na kung umaakma ang orihinal na baybay sa pagbaybay ng wikang humihiram gaya ng {{m|tl|bola}}, na nagmula sa Espanyol {{m|es|bola}}. Ikumpara sa ''[[#kalko|kalko]]'', kung saan tanging kahulugan lamang ang hiniram. ; {{anchor|historikal|historical|makasaysayan}} historikal, historical : ipinapahiwatig na ang naturang salita ay tumutukoy sa isang konseptong wala na sa kasalukuyan, gaya ng [[Unyong Sobyet]]. Iba ito sa ''[[#lipas na|lipas na]]'' o ''[[#makaluma|makaluma]]'', na maaari pa ring tumukoy sa isang bagay na meron sa kasalukuyan kahit na hindi na ginagamit ng marami ang mga salitang ito. ; {{anchor|homopono|homophone}} homopono, homophone : tumutukoy sa mga salitang magkapareho ng bigkas ngunit nagkakaiba sa pagbaybay, kahulugan, o salin. ==I== ; {{anchor|second person|second-person|2nd person|pangalawang panauhan|ikalawang panauhan}} ikalawang panauhan, pangalawang panauhan : [[#panauhan|panauhan]] na tumutukoy sa kausap ng nagsasalita, halimbawa sa Tagalog ang mga panghalip na ''[[ikaw]]'', ''[[ka]]'', at ''[[kayo]]''. ; {{anchor|third person|third-person|3rd person|pangatlong panauhan|ikatlong panauhan}} ikatlong panauhan, pangatlong panauhan : [[#panauhan|panauhan]] na tumutukoy sa pinag-uusapan ng nagsasalita kung saan hindi siya kabilang, halimbawa sa Tagalog ang mga panghalip na ''[[siya]]'', ''[[niya]]'', at ''[[sila]]''. ; imperatibo, imperative : ''tingnan ang '''{{lg|pautos}}''''' ; imperpektibo, imperfective : ''tingnan ang '''{{lg|nagaganap}}''''' ; indicative : ''tingnan ang '''{{lg|paturol}}''''' ; inflection : ''tingnan ang '''{{lg|banghay}}''''' ; informal : ''tingnan ang '''{{lg|di-pormal}}''''' ; inherited : ''tingnan ang '''{{lg|mana}}''''' ; {{anchor|isahan|isa|singular|pang-isahan|sing.|isahang bilang}} isahan : [[#kailanan|kailanan]] na nagpapahiwatig na iisa lamang ang bagay. ==K== ; {{anchor|kagaganap|kakaganap}} kagaganap, kakaganap : [[#aspekto|aspekto]] na nagpapahiwatig na kamakailan lang natapos ang isang kilos, halimbawa, ''kakakain''. ; {{anchor|number|grammatical number|kailanan|bilang}} kailanan : kategorya ng balarila na naglalarawan sa dami o bilang ng isang bagay. Ilan sa mga halimbawa ang [[#maramihan|maramihan]] at [[#isahan|isahan]] ; kasalukuyan : ''tingnan ang '''{{lg|pangkasalukuyan}}''''' ; kaso : ''tingnan ang '''{{lg|kaukulan}}''''' ; {{anchor|case|grammatical case|kaukulan|kaso}} kaukulan : isa sa mga anyo ng pangngalan depende sa tungkulin nito sa isang pangungusap, ilan sa mga halimbawa nito ang [[#palagyo|palagyo]] at [[#paari|paari]]. ; {{anchor|colloquial|kolokyal}} kolokyal : ipinapahiwatig na ang naturang salita o kahulugan ay ginagamit sa isang partikular na barayti ng wika. Ginagamit lamang ang mga salitang ito sa kalapit o kaswal na konteksto. Maaaring katumbas ng ''[[#di-pormal|di-pormal]]'' sa ibang mga wika, at kung itinatangi ang dalawa kagaya ng sa Tagalog, mas malakas ang kolokyal kesa di-pormal. ; komparatibo, kumparatibo : ''tingnan ang '''{{lg|pahambing}}''''' ; kongkretong pangngalan, pangngalang kongkreto : ''tingnan ang '''{{lg|pangngalang tahas}}''''' ; kontemplatibo : ''tingnan ang '''{{lg|magaganap}}''''' ; {{anchor|KP|CE}} KP, CE : daglat para sa Karaniwang Panahon, katumbas ng [[#AD|AD]] sa mundong sekular ==L== ; learned borrowing, learned loan : ''tingnan ang '''{{lg|aral na hiram}}''''' ; {{anchor|obsolete|lipas na|obs.}} lipas na : hindi na ginagamit, at hindi na maiintindihan ng karaniwang tao. Mas malakas kesa ''[[#makaluma|makaluma]]'', at di hamak na mas malakas kesa ''[[#luma|luma]]''. Iba ito sa ''[[#historikal|historikal]]'', na ginagamit pa sa kasalukuyan ngunit tumutukoy sa isang bagay na wala na. ; loanword, loan word : ''tingnan ang '''{{lg|hiram}}''''' ; {{anchor|dated|luma|laos}} luma, laos : ginagamit noon, ngunit hindi na ngayon, bagamat ginagamit pa rin ng nakakatandang henerasyon. Kumbaga, laos na, gaya ng {{m|tl|walastik}}. Mas mahina sa ''[[#makaluma|makaluma]]'', na hindi na ginagamit maliban kung gustong magtunog-luma, o ''[[#lipas na|lipas na]]'', na wala na'ng gumagamit at nakakaintindi sa kahit anong konteksto. ==M== ; {{anchor|contemplative|magaganap|kontemplatibo}} magaganap : [[#aspekto|aspekto]] na nagpapahiwatig na hindi pa nagsisimula ang isang kilos, halimbawa, ''kakain''. Sa Tagalog, karaniwan itong naipagkakamali sa [[#panahon|panahong]] [[#panghinaharap|panghinaharap]] dahil sa pagsasagawa sa kilos sa hinaharap (ikumpara ang ''kakain ako'' sa ''kakain ako mamaya''). ; {{anchor|doublet|doblete|magkaparehong pinagmulan|parehong ninuno|parehong pinagmulan}} magkaparehong pinagmulan : mga pares ng salita ng isang wika na parehong nagmula sa iisang ninunong salita ngunit ay dalawang magkaibang salita sa modernong panahon. Madalas itong nangyayari dahil sa resulta ng [[#hiram|panghihiram]] sa mga wikang may kaugnayan dito gaya ng kaso ng {{m|tl|baliw}} at {{m|tl|ibayo}} na pawang tumutukoy sa magkakaibang konsepto ngunit parehong nagmula sa iisang ninunong salitang Proto-Malayo-Polinesyo {{m|map-pro|*baliw}}, o di kaya'y nabuo sa magkaibang punto ng kasaysayan ng wika gaya naman ng kaso ng Tagalog {{m|tl|ahedres}} at {{m|tl|satol}}, parehong tumutukoy sa laro ngunit ang nauna ay direktang hiniram sa Espanyol at ang huli ay isang [[#lipas na|lipas na salitang]] nagmula sa Sanskrit, na pinakapinagmulan naman ng salitang Espanyol. ; {{anchor|makaluma|archaic|arkaiko}} makaluma : hindi na madalas gamitin, at kung gamitin man sa kasalukuyan ay upang magbigay ng tono ng kalumaan gaya ng mga nobelang historikal. Halimbawa ang paggamit sa salitang ''[[kalatas]]'' imbes na ''[[papel]]''. Mas mahina kesa ''[[#lipas na|lipas na]]'', na hindi na talaga ginagamit at maiintindihan, ngunit mas malakas pa rin kesa ''[[#luma|luma]]'', na naiintindihan pa rin at ginagamit ng marami-rami na bahagi ng mas matandang henerasyon. ; makasaysayan : ''tingnan ang '''{{lg|historikal}}''''' ; {{anchor|inherited|inherited term|inheritance|mana|manang salita|minanang salita|minana}} mana, manang salita, pagmamana : tumutukoy sa mga salitang nagmula sa isang lumang salita mula sa magulang wika nito sa pamamagitan ng likas na pagbabago ng tunog at walang karagdagang paglalapi, hindi tulad ng sa mga [[#hiram|hiram]]. Halimbawa, nagmula ang salitang {{m|tl|dahon}} sa magulang wika nitong Proto-Pilipino {{m|phi-pro|*dahun}}. ; {{anchor|maramihan|marami|pangmaramihan|plural|pl.|maramihang bilang}} maramihan : [[#kailanan|kailanan]] na nagpapahiwatig na higit sa isa ang dami ng mga bagay. Sa Tagalog, minamarkahan ito ng partikulong ''[[mga]]'', habang sa ibang wika, binabanghay ito gaya ng sa Ingles {{m|en|books}}, na anyong maramihan ng {{m|en|book}}. ; {{anchor|figurative|non-literal|di-literal|matalinghaga}} matalinghaga : hindi [[#literal|literal]], pawang tumutukoy sa mga [[metapora]], [[idyoma]], at katulad na paraan ng pananalita na hindi dapat unawain sa literal nitong kahulugan gaya ng ''[[balat-sibuyas]] ''("madaling umiyak; iyakin"). ; mood : ''tingnan ang '''{{lg|panagano}}''''' ==N== ; {{anchor|perpektibo|naganap|perfective}} naganap : [[#aspekto|aspekto]] na nagpapahiwatig na tapos na ang isang kilos, halimbawa, ''kumain''. Sa Tagalog, karaniwan itong naipagkakamali sa [[#panahon|panahong]] [[#pangnakaraan|pangnakaraan]] dahil sa pagkakumpleto ng kilos (ikumpara ang ''kumain ako'' sa ''kumain na ako''). Wag ikalito sa ''[[#perpekto|perpekto]]'', na wala sa Tagalog ngunit mabubuo sa mga wikang may panahon kagaya ng sa Ingles. ; {{anchor|imperpektibo|nagaganap|imperfective}} nagaganap : [[#aspekto|aspekto]] na nagpapahiwatig na hindi pa tapos ang isang kilos, halimbawa, ''kumakain''. Sa Tagalog, karaniwan itong naipagkakamali sa [[#panahon|panahong]] [[#pangkasalukuyan|pangkasalukuyan]] dahil sa pagsasagawa sa kilos sa kasalukuyan (ikumpara ang ''kumakain ako'' sa ''kumakain ako ngayon''). Wag ikalito sa ''[[#imperpekto|imperpekto]]'', na wala sa Tagalog ngunit mabubuo sa mga wikang may panahon kagaya ng sa Ingles. ; nakaraan, nagdaan : ''tingnan ang '''{{lg|pangnakaraan}}''''' ; {{anchor|nilipat|transferred|transferred sense}} nilipat : ipinapahiwatig na ang orihinal na kahulugan ng isang salita ay ginamit upang tumukoy sa isang partikular na konseptong may kaugnayan dito. Halimbawa, sa Latin, pumapatungkol ang salitang {{m|la|liber}} sa paglaya, ngunit nagkaroon ito ng nilipat na kahulugan para tumukoy sa mga malalayang tao (hindi alipin). Ikumpara sa ''[[#pinalawak|pinalawak]]'', na pumapatungkol naman sa kahulugan na pinalawak upang tumukoy sa ibang konseptong katulad nito. ; nominatibo, nominative, kaukulang nominatibo : ''tingnan ang '''{{lg|palagyo}}''''' ; non-literal : ''tingnan ang '''{{lg|matalinghaga}}''''' ; noun, n. : ''tingnan ang '''{{lg|pangngalan}}''''' ==O== ; obsolete, obs. : ''tingnan ang '''{{lg|lipas na}}''''' ==P== ; {{anchor|genitive|genitive case|kaukulang paari|paari}} paari, kaukulang paari : [[#kaukulan|kaukulan]] na nagpapahiwatig sa pag-aari o kaugnayan, sa Tagalog, minamarkahan ito ng ''[[ng]]'' para sa mga di-tao at ''[[ni]]'' (''[[nina]]'' kapag maramihan) para sa mga tao. ; {{anchor|pahambing|kumparatibo|komparatibo|comparative}} pahambing : [[#banghay|pagbabanghay]] sa isang pang-uri upang ipakita ang antas ng paghahambing na higit sa karaniwan ngunit hindi nasa tugatog. Sa Tagalog, ginagamit ang partikulong ''[[mas]]'' gaya ng ''mas masarap'' upang ipakita ang antas na ito. ; {{anchor|nominative|nominative case|kaukulang palagyo|palagyo}} palagyo, kaukulang palagyo : [[#kaukulan|kaukulan]] na nagpapahiwatig sa gumagawa ng kilos, sa Tagalog, minamarkahan ito ng ''[[ang]]'' para sa mga di-tao o ''[[si]]'' (''[[sina]]'' kapag maramihan) para sa mga tao. ; {{anchor|ablative|ablative case|kaukulang palayo|palayo}} palayo, kaukulang palayo : [[#kaukulan|kaukulan]] na nagpapahiwatig ng paglayo mula sa isang bagay. Para sa mga wikang meron nito, ginagamit ito nang mag-isa o may kasamang pang-ukol. Pinakamalapit na halimbawa sa Tagalog ay ang paggamit sa pang-ukol na ''[[mula]]'', kagaya ng sa ''mula Buendia''. May mga wikang tulad ng Latin na meron nito ngunit nakakuha ng maraming gamit bukod sa pagpapahiwatig ng paglayo. ; {{anchor|grammatical mood|mood|panagano}} panagano : anyo ng pandiwa na nagpapahiwatig sa paano sinabi ng nagsasalita ang isang bagay, gaya halimbawa ng ''[[#pasakali|pasakali]]'', na nagpapahiwatig na ang sinabi ay maaaring mangyari. ; {{anchor|panahon|tense|grammatical tense}} panahon : katangian ng pandiwa na magbago depende sa oras o panahon kung kailan isinagawa ang kilos. Wag ikalito sa [[#aspekto|aspekto]], na tumutukoy sa kakumpletuhan ng kilos. Walang ganito sa Tagalog; pinakamalapit na katumbas ang paggamit sa mga salitang nagpapahiwatig ng oras gaya ng ''[[ngayon]]'', ''[[na]]'', ''[[kanina]]'', ''[[kasalukuyan]]'', at ''[[mamaya]]''. Ilan sa mga halimbawa ang [[#pangnakaraan|pangnakaraan]], [[#panghinaharap|panghinaharap]], at [[#pangkasalukuyan|pangkasalukuyan]]. ; {{anchor|person|grammatical person|panauhan}} panauhan : kategorya sa balarila na naglalarawan sa kaugnayan ng nagsasalita sa pinag-uusapan, ilan sa mga halimbawa ang [[#unang panauhan|unang panauhan]], [[#ikalawang panauhan|ikalawang panauhan]], at [[#ikatlong panauhan|ikatlong panauhan]]. ; {{anchor|pandiwa|pnd|v.|vb.|verb}} pandiwa : [[#bahagi ng pananalita|bahagi ng pananalita]] na tumutukoy sa kilos, kaganapan, o katayuan. Tinatawag na [[#pagbabanghay|pagbabanghay]] ang proseso ng pagbabago ng anyo nito ayon sa tungkulin nito sa pangungusap. ; {{anchor|pang-abay|pnb|adverb|adv.}} pang-abay : [[#bahagi ng pananalita|bahagi ng pananalita]] na naglalarawan sa pang-uri, pandiwa, o kapwa pang-abay. Sa Tagalog, umaakto ito na parang pang-uri at [[#banghay|binabanghay]] din sa kaparehong paraan, ang pagkakaiba lamang ay kung anong bahagi ng pananalita ang inilalarawan nito. Halimbawa ay ''mabilis maglakad'', kung saan ''mabilis'' ang pang-abay sa pandiwang ''maglakad''. Pansinin na magagamit din ang mga ito bilang pang-uri, gaya ng sa ''mabilis na lakad''. ; {{anchor|panghalip|pnh|pron.|pro.|pronoun}} panghalip : [[#bahagi ng pananalita|bahagi ng pananalita]] na humahalili sa isang pangngalan at tumutukoy sa paksa ng pinag-uusapan. Maaari itong humalili sa pangalan ng tao na nasa usapan gaya ng mga panghalip panao {{m|tl|ikaw}} at {{m|tl|ako}}, o tumukoy sa ibang tao ({{m|tl|siya}}) o bagay ({{m|tl|iyon}}). ; {{anchor|pang-uri|pnu|adjective|adj.}} pang-uri : [[bahagi ng pananalita]] na naglalarawan sa pangngalan o panghalip. Marami, ngunit hindi lahat, ng mga pang-uri sa Tagalog ang kinakabitan ng unlaping {{m|tl|ma-}} gaya ng ''maganda''. Halimbawa ay ''pulang mansanas'' o ''mansanas na pula'', sa parehong kaso, ''pula'' ang pang-uri. ; {{anchor|panghinaharap|hinaharap|future tense|panahong panghinaharap}} panghinaharap : [[#panahon|panahon]] na nagpapahiwatig na ang kilos ay isasagawa sa hinaharap. Sa Tagalog, minamarkahan ito ng mga salitang umuukol sa hinaharap gaya ng ''[[mamaya]]'' o ''[[bukas]]''. Sa Ingles, minamarkahan ito ng mga salitang {{m|en|will}} o {{m|en|shall}}. ; pang-isahan : ''tingnan ang '''{{lg|isahan}}''''' ; {{anchor|pangkasalukuyan|kasalukuyan|panahong pangkasalukuyan|present tense}} pangkasalukuyan : [[#panahon|panahon]] na nagpapahiwatig na ang kilos ay isinasagawa sa ngayon. Sa Tagalog, minamarkahan ito ng mga salitang umuukol sa kasalukuyan gaya ng ''[[ngayon]]'' o ''[[na]]''. Sa Ingles, karaniwang binabanghay ang mga pandiwa gamit ang hulaping {{m|en|-ing}} para maipahiwatig ang panahong ito. ; pangmaramihan : ''tingnan ang '''{{lg|maramihan}}''''' ; {{anchor|pangnakaraan|nakaraan|nagdaan|pangnagdaan|panahong pangnakaraan|past tense}} pangnakaraan, pangnagdaan : [[#panahon|panahon]] na nagpapahiwatig na ang kilos ay isinagawa sa nakaraan. Sa Tagalog, minamarkahan ito ng mga salitang umuukol sa nakaraan gaya ng ''[[kanina]]'' o ''[[kahapon]]''. Halimbawa ay ang salitang Ingles na {{m|en|saw}}, ang anyong pangnakaraan ng {{m|en|see}}. ; {{anchor|noun|pangngalan|n.|png}} pangngalan : [[#bahagi ng pananalita|bahagi ng pananalita]] na tumutukoy sa [[tao]], [[bagay]], [[lugar]], o [[konsepto]]. ; {{anchor|basal na pangngalan|pangngalang basal|abstract noun|abstraktong pangngalan|pangngalang abstrakto}} pangngalang basal, basal na pangangalan : [[#pangngalan|pangngalan]] na tumutukoy sa mga konsepto, kumpara sa mga [[#pangngalang tahas|pangngalang tahas]], na tumutukoy naman sa mga pisikal na bagay. ; {{anchor|tahas na pangngalan|pangngalang tahas|concrete noun|kongkretong pangngalan|pangngalang kongkreto}} pangngalang tahas, tahas na pangangalan : [[#pangngalan|pangngalan]] na tumutukoy sa mga pisikal na bagay, kumpara sa mga [[#pangngalang basal|pangngalang basal]], na tumutukoy naman sa mga konsepto. ; part of speech, POS, PoS : ''tingnan ang '''{{lg|bahagi ng pananalita}}''''' ; {{anchor|subjunctive|subjunctive mood|pasakali|panaganong pasakali}} pasakali : [[#panagano|panagano]] na nagpapahiwatig na ang sinabi ng nagsasalita ay maaaring mangyari. Ikumpara sa ''[[#paturol|paturol]]'', na naglalarawan sa isang tunay na pangyayari. ; {{anchor|pasibong tinig|balintiyak na tinig|passive voice}} pasibong tinig, passive voice : [[#tinig|tinig]] na nagpapakita sa anyo ng pandiwa kung saan hindi simuno ang nagsasagawa sa kilos, at minsan ay ito mismo ang tumatanggap ng kilos. Ikumpara sa [[#aktibong tinig|aktibong tinig]]. ; past tense : ''tingnan ang '''{{lg|pangnakaraan}}''''' ; {{anchor|pasukdol|superlative|superlatibo}} pasukdol : [[#banghay|pagbabanghay]] sa pang-uri upang ipakita ang antas ng paghahambing na higit sa lahat. Sa Tagalog, ikinakabit ang mga unlaping {{m|tl|pinaka-}} o {{m|tl|napaka-}} gaya ng ''pinakamasarap'' o ''napakasarap'' upang ipakita ang antas na ito. ; {{anchor|absolutive|absolutibo|kaukulang absolutibo|kaukulang patanggap|patanggap}} patanggap, kaukulang patanggap : [[#kaukulan|kaukulan]] na nagpapahiwatig sa tumatanggap o nakakaranas ng resulta ng kilos. ; {{anchor|diaresis|diaeresis|patuldok}} patuldok : [[#tuldik|tuldik]] ( ¨ ) na karaniwang inilalagay sa taas ng isang patinig. Sa mga wikang Pilipino, ginagamit lamang ito para sa titik ''e'' (''ë'') upang kumatawan sa tunog na schwa sa ilang mga wika gaya ng Maranaw (''Mëranaw''). Sa ibang mga wika, inilalagay ito sa mga patinig upang sabihin na dapat itong bigkasin nang hiwalay at hindi bilang [[diptonggo]], gaya ng {{m+|fr|naïf|t=walang muwang}}, o para sabihin na iba ang pagbigkas sa naturang patinig kumpara sa karaniwan, gaya ng sa Aleman {{m|de|über|t=ibabaw}} at {{m|de|König|t=hari}}, sa prosesong tinatawag na [[#umlaut|umlaut]]. ; {{anchor|indicative mood|indikatibo|indicative|paturol|panaganong paturol}} paturol : [[#panagano|panagano]] na nagpapahiwatig na ang sinabi ng nagsasalita ay naganap o naglalarawan sa isang tunay na pangyayari o bagay. Ikumpara sa ''[[#pasakali|pasakali]]'', na naglalarawan ng mga pangyayaring maaaring mangyari. ; {{anchor|imperative|imperative mood|imperatibo|pautos|panaganong pautos}} pautos : [[#panagano|panagano]] na nagpapahiwatig na isang utos ang pahayag. Sa Tagalog, binabanghay ang mga pandiwa upang maipakita ito, gaya ng ''[[kumuha|kunin]]'' o ''[[magligpit|iligpit]]''. ; perpektibo, perfective : ''tingnan ang '''{{lg|naganap}}''''' ; person : ''tingnan ang '''{{lg|panauhan}}''''' ; {{anchor|pinalawak|extended sense|by extension}} pinalawak : ipinapahiwatig na ang orihinal na kahulugan nito ay pinalawak upang tumukoy sa mas maraming konsepto na hindi kasama sa orihinal na kahulugan nito. Halimbawa, tumutukoy ang salitang {{m|tl|mabigat}} sa literal na pisikal na bigat, ngunit nagkaroon ito kalaunan ng pinalawak na kahulugan na "nakakapagod, mahirap, seryoso" gaya ng sa ''mabigat na parusa''. Ikumpara ito sa ''[[#nilipat|nilipat]]'', na tumutukoy naman sa paglipat ng kahulugan upang tumukoy sa isang partikular na konseptong may kaugnayan dito. ; plural, pl : ''tingnan ang '''{{lg|maramihan}}''''' ; pnb<!-- daglat sa Diksiyonaryo.ph --> : ''tingnan ang '''{{lg|pang-abay}}''''' ; pnd <!-- daglat sa Diksiyonaryo.ph --> : ''tingnan ang '''{{lg|pandiwa}}''''' ; png <!-- daglat sa Diksiyonaryo.ph --> : ''tingnan ang '''{{lg|pangngalan}}''''' ; pnh <!-- daglat sa Diksiyonaryo.ph --> : ''tingnan ang '''{{lg|panghalip}}''''' ; pnu <!-- daglat sa Diksiyonaryo.ph --> : ''tingnan ang '''{{lg|pang-uri}}''''' ; {{anchor|formal|pormal}} pormal : ipinapahiwatig na ang naturang salita o balarila ay ginagamit sa mga pormal na konteksto, gaya ng sa opisyal o legal na dokumento, panitikan, o minsan kapag kausap ang mas nakakatanda (sa edad o trabaho). Kabaligtaran ito ng ''[[#di-pormal|di-pormal]]'', na karaniwang ginagamit sa mga kaswal na konteksto. ; present tense : ''tingnan ang '''{{lg|pangkasalukuyan}}''''' ; pronoun, pron., pro. : ''tingnan ang '''{{lg|panghalip}}''''' ==R== ; rare : ''tingnan ang '''{{lg|bihira}}''''' ==S== ; salitang-hiram, salitang hiram : ''tingnan ang '''{{lg|hiram}}''''' ; second person, second-person : ''tingnan ang '''{{lg|ikalawang panauhan}}''''' ; semi-learned, semi-learned borrowing : ''tingnan ang '''{{lg|bahagyang aral na hiram}}''''' ; singular, sing. : ''tingnan ang '''{{lg|isahan}}''''' ; subjunctive : ''tingnan ang '''{{lg|pasakali}}''''' ; superlatibo, superlative : ''tingnan ang '''{{lg|pasukdol}}''''' ==T== ; tahas na pangngalan : ''tingnan ang '''{{lg|pangngalang tahas}}''''' ; tahasang tinig : ''tingnan ang '''{{lg|aktibong tinig}}''''' ; tense : ''tingnan ang '''{{lg|panahon}}''''' ; third person, third-person : ''tingnan ang '''{{lg|ikatlong panauhan}}''''' ; {{anchor|tinig|voice}} tinig : katangian ng pandiwa na nagpapahiwatig ng kaugnayan nito sa simuno. Ilan sa mga halimbawa ang [[#aktibong tinig|aktibo]] at [[#pasibong tinig|pasibo]]. ; tiyempo : ''tingnan ang '''{{lg|panahon}}''''' ; transferred, transferred sense : ''tingnan ang '''{{lg|nilipat}}''''' ; {{anchor|tuldik|diacritic|diacritical mark|diakritiko|diyakritiko|dayakritiko|accent|accent mark|aksent}} tuldik : simbolong ikinakabit o inilalagay sa isang titik upang baguhin ang tunog nito. Sa Tagalog at mga wikang Pilipino, may tatlong tuldik na ginagamit, [[#pahilis|pahilis]] ( ´ ), [[#paiwa|paiwa]] ( ` ), at [[#pakupya|pakupya]] ( ^ ), na ginagamit upang ipakita ang pagbigkas sa mga salita para maitangi ito sa mga may kaparehong baybay. Bukod dito, ginagamit din sa ilang mga wikang Pilipino ang tuldik na [[#patuldok|patuldok]], gaya ng sa Maranaw, upang isulat ang tunog na schwa. ==U== ; {{anchor|umlaut}} umlaut : pagbabago sa tunog kung saan binabago ang isang patinig upang umayon sa patinig ng kasunod nitong pantig. Ikumpara sa ''[[#ablaut|ablaut]]''. Ginagamit rin ang kataga para sa tuldik na [[#patuldok|patuldok]], upang ilarawan ang isang patinig na sumailalim sa prosesong ito. ; {{anchor|first person|first-person|1st person|unang panauhan}} unang panauhan : [[#panauhan|panauhan]] na tumutukoy sa nagsasalita o grupo ng mga nagsasalita, halimbawa sa Tagalog ang mga panghalip na ''[[ako]]'', ''[[ko]]'', at ''[[kami]]''. ==V== ; verb, v., vb. : ''tingnan ang '''{{lg|pandiwa}}''''' ; voice : ''tingnan ang '''{{lg|tinig}}''''' ==Z== ; {{anchor|zero-grade|zero grade}} zero-grade : sa Proto-Indo-Europeo, tumutukoy sa anyo ng [[#ablaut|ablaut]] ng isang ugat na hindi nagtataglay ng mga pangunahing ponemang patinig {{ic|*/e/}} at {{ic|*/o/}}. Halimbawa, {{m|ine-pro||*bʰr̥-}} ang ''zero-grade'' ng Indo-Europeong ugat {{m|ine-pro|*bʰer-|t=magbuhat, magpasan}}. 2g1h9yfoifvpc2rx6ah3fbub2svccgy Padron:gl-pr 10 39012 178579 2026-11-03T06:15:26Z GinawaSaHapon 3989 Nilikha ang pahina na may '<includeonly>{{#invoke:gl-pron|show_pr}}</includeonly><noinclude>{{documentation}}</noinclude>' 178579 wikitext text/x-wiki <includeonly>{{#invoke:gl-pron|show_pr}}</includeonly><noinclude>{{documentation}}</noinclude> grbkuhlqnm1odgi807mejitbjcivcpt Module:gl-pron 828 39013 178580 2026-11-03T06:22:47Z GinawaSaHapon 3989 Nilikha ang pahina na may '--Based on [[Module:es-pronunc]] by Benwing2 --[=[ --FIXME: 1. [WORKING] when "cui" is unstressed, it should be read like /kwi/ 1.1.[WORKING] the same for "güi" being /gwi/ 2. [WORKING] when "cui" is stressed, it should be read like /'kuj/ 3. [WORKING] "cuí" makes /ku'i/ or /'kwi/ 4. [WORKING] other "<C>ui" combinations (that aren't gui/qui) never result in /Cwi/, always /Cuj/ 5. [WORKING] gui/qui make /ki/ and /gi/ 6. [WORKING] word-final -eo (sanguíneo, c...' 178580 Scribunto text/plain --Based on [[Module:es-pronunc]] by Benwing2 --[=[ --FIXME: 1. [WORKING] when "cui" is unstressed, it should be read like /kwi/ 1.1.[WORKING] the same for "güi" being /gwi/ 2. [WORKING] when "cui" is stressed, it should be read like /'kuj/ 3. [WORKING] "cuí" makes /ku'i/ or /'kwi/ 4. [WORKING] other "<C>ui" combinations (that aren't gui/qui) never result in /Cwi/, always /Cuj/ 5. [WORKING] gui/qui make /ki/ and /gi/ 6. [WORKING] word-final -eo (sanguíneo, coetáneo) should make /nio/, not /neo/ 7. [WORKING] syllable-final x should default to /ks/, not /ʃ/ ]=] local export = {} local m_IPA = require("Module:IPA") local m_table = require("Module:table") local audio_module = "Module:audio" local decorations_module = "Module:decorations" local put_module = "Module:parse utilities" local force_cat = false local lang = require("Module:languages").getByCode("gl") local u = mw.ustring.char local rfind = mw.ustring.find local rsubn = mw.ustring.gsub local rsplit = mw.text.split local ulower = mw.ustring.lower local usub = mw.ustring.sub local ulen = mw.ustring.len local unfd = mw.ustring.toNFD local unfc = mw.ustring.toNFC local AC = u(0x0301) -- acute = ́ local GR = u(0x0300) -- grave = ̀ local CFLEX = u(0x0302) -- circumflex = ^ local CARO = u(0x030C) -- caron local TILDE = u(0x0303) -- tilde = ̃ local DIA = u(0x0308) -- diaeresis = ̈ local CEDILLA = u(0x0327) -- cedilla = ̧ local DOTA = u(0x0307) -- dot above local DOTB = u(0x0323) --dot below local BREVE = u(0x0306) --breve local vowel = "aeiouüɛɔɐɪʊɑAEIOUÜ" -- vowel local V = "[" .. vowel .. "]" -- vowel class local accent = AC .. GR .. CARO local accent_c = "[" .. accent .. "]" local stress = AC local stress_c = "[" .. AC .. "]" local ipa_stress = "ˈˌ" local ipa_stress_c = "[" .. ipa_stress .. "]" local sylsep = "%-." -- hyphen included for syllabifying from spelling local sylsep_c = "[" .. sylsep .. "]" local wordsep = "# " local separator_not_wordsep = accent .. ipa_stress .. sylsep local separator = separator_not_wordsep .. wordsep local separator_c = "[" .. separator .. "]" local C = "[^" .. vowel .. separator .. "]" -- consonant class local unstressed_words = m_table.listToSet({ --all words in this list containing non-final <e,o> should be listed later (look for "handle vowels"). FIXME add more unstressed words "a", "as", "o", "os", -- definite articles "con", "de", "en", "por", "sen", "so", --prepositions }) -- version of rsubn() that discards all but the first return value local function rsub(term, foo, bar) local retval = rsubn(term, foo, bar) return retval end -- version of rsubn() that returns a 2nd argument boolean indicating whether -- a substitution was made. local function rsubb(term, foo, bar) local retval, nsubs = rsubn(term, foo, bar) return retval, nsubs > 0 end -- apply rsub() repeatedly until no change local function rsub_repeatedly(term, foo, bar) while true do local new_term = rsub(term, foo, bar) if new_term == term then return term end term = new_term end end local function decompose(text) -- decompose everything but ñ, ç and ü text = unfd(text) text = rsub(text, ".[" .. TILDE .. CEDILLA .. DIA .. "]", { ["n" .. TILDE] = "ñ", ["N" .. TILDE] = "Ñ", ["c" .. CEDILLA] = "ç", ["C" .. CEDILLA] = "Ç", ["u" .. DIA] = "ü", ["U" .. DIA] = "Ü", }) return text end local function split_on_comma(term) if term:find(",%s") then return require(put_module).split_on_comma(term) else return rsplit(term, ",") end end -- Remove any HTML from the formatted text and resolve links, since the extra characters don't contribute to the -- displayed length. local function convert_to_raw_text(text) text = rsub(text, "<.->", "") if text:find("%[%[") then text = require("Module:links").remove_links(text) end return text end -- Return the approximate displayed length in characters. local function textual_len(text) return ulen(convert_to_raw_text(text)) end local function construct_default_differences(dialect) if dialect == "Standard" then return { need_seseo = false, gheada_different = false, } end return nil end -- Main syllable-division algorithm local function syllabify_from_spelling_or_pronun(text) -- Part 1: Divide before the last consonant in a cluster of consonants between vowels. -- Then move the syllable division marker leftwards over clusters that can form onsets. text = rsub_repeatedly(text, "(" .. V .. accent_c .. "*)(" .. C .. V .. ")", "%1.%2") text = rsub_repeatedly(text, "(" .. V .. accent_c .. "*" .. C .. "+)(" .. C .. V .. ")", "%1.%2") local cluster_r = is_spelling and "rɾ" or "ɾ" -- Don't divide Cl or Cr where C is a stop or fricative, except for dl. text = rsub(text, "([pbfvkctg])%.([l" .. cluster_r .. "])", ".%1%2") text = text:gsub("d%.([" .. cluster_r .. "])", ".d%1") -- Don't divide ll or rr. text = rsub(text, "([lr])%.%1", ".%1%1") -- Part 2: Divide hiatuses. Any aeo, or stressed iuüy, should be syllabically divided from a following aeo or -- stressed iuüy. Also divide ii and uu sequences text = rsub_repeatedly(text, "([aeoɛɔAEO]" .. accent_c .. "*)(h?[aeoɛɔ])", "%1.%2") text = rsub_repeatedly(text, "([aeoɛɔAEO]" .. accent_c .. "*)(h?" .. V .. stress_c .. ")", "%1.%2") text = rsub(text, "([iuüyIUÜY]" .. stress_c .. ")(h?[aeoɛɔ])", "%1.%2") text = rsub_repeatedly(text, "([iuüyIUÜY]" .. stress_c .. ")(h?" .. V .. stress_c .. ")", "%1.%2") text = rsub_repeatedly(text, "([iI]" .. accent_c .. "*)(h?i)", "%1.%2") text = rsub_repeatedly(text, "([uU]" .. accent_c .. "*)(h?u)", "%1.%2") return text end -- Generate the IPA of a given respelling. function export.IPA(text, dialect, phonetic) local distincion = dialect == "Standard" or dialect == "Gheada" local gheismo = dialect == "Gheada" or dialect == "Gheada-seseo" local gheada_different = false local need_seseo = false text = ulower(text or mw.loadData("Module:headword/data").pagename) -- decompose everything but ñ and ü text = decompose(text) -- convert commas and en/en dashes to IPA foot boundaries text = rsub(text, "%s*[,–—]%s*", " | ") -- question mark or exclamation point in the middle of a sentence -> IPA foot boundary text = rsub(text, "([^%s])%s*[¡!¿?]%s*([^%s])", "%1 | %2") -- canonicalize multiple spaces and remove leading and trailing spaces local function canon_spaces(text) text = rsub(text, "%s+", " ") text = rsub(text, "^ ", "") text = rsub(text, " $", "") return text end text = canon_spaces(text) -- Make prefixes unstressed unless they have an explicit stress marker; also make certain monosyllabic words unstressed. local words = rsplit(text, " ") for i, word in ipairs(words) do if rfind(word, "%-$") and not rfind(word, accent_c) or unstressed_words[word] then -- add CARO to the last vowel not the first one, or we will mess up 'que' by -- adding the CARO after the 'u' words[i] = rsub(word, "^(.*" .. V .. ")", "%1" .. CARO) end end text = table.concat(words, " ") -- Convert hyphens to spaces text = rsub(text, "%-", " ") -- canonicalize multiple spaces again, which may have been introduced by hyphens text = canon_spaces(text) -- now eliminate punctuation text = rsub(text, "[¡!¿?']", "") -- put # at word beginning and end and double ## at text/foot boundary beginning/end text = rsub(text, " | ", "# | #") text = "##" .. rsub(text, " ", "# #") .. "##" --handle vowels (internally, we use an accute accent to denote stress) text = rsub(text, "a" .. BREVE, "ɐ") text = rsub(text, "e" .. BREVE, "ɪ") text = rsub(text, "o" .. BREVE, "ʊ") text = rsub(text, "e" .. GR, "ɛ" .. AC) text = rsub(text, "o" .. GR, "ɔ" .. AC) text = rsub(text, "e" .. CFLEX, "E" .. AC) --temporary symbol text = rsub(text, "o" .. CFLEX, "O" .. AC) --temporary symbol text = rsub(text, "o".. DOTB, "ɔ") text = rsub(text, "e" .. DOTB, "ɛ") text = rsub(text, "e" .. DOTA, "E") --temporary symbols. we will use <e o> for undetermined mid vowels. The template will return an error text = rsub(text, "o" .. DOTA, "O") --if they remain in pre-tonic or accented syllables --turn x into ks in words like "texto" where X isn't before a vowel text = rsub(text, "x([^" .. vowel .. "])", "ks%1") --handle reintegrationist norm forms, if any -- "nh" and word-final M stay mostly unchanged so they won't affect standard forms. text = rsub(text, "mh", "nh") text = rsub(text, "lh", "ll") text = rsub(text, "ç(" .. V .. ")(" .. stress_c .. "*)m#", "z%1%2n#") text = rsub(text, "ç", "z") text = rsub(text, "ss", "s") text = rsub(text, "g([ieɛE])", "x%1") text = rsub(text, "j", "x") --determine the values of <e,o> automatically (in some cases only) text = rsub(text, "ol#", "ɔl#") text = rsub(text, "ols#", "ɔls#") text = rsub(text, "el#", "ɛl#") text = rsub(text, "els#", "ɛls#") text = rsub(text, "ou", "Ou") text = rsub(text, "edo#", "Edo#") text = rsub(text, "edos#", "Edos#") text = rsub(text, "ello#", "Ello#") text = rsub(text, "ellos#", "Ellos#") text = rsub(text, "eza#", "Eza#") text = rsub(text, "ezas#", "Ezas#") text = rsub(text, "o" .. AC .. "n#", "O" .. AC .. "n#") text = rsub(text, "o" .. AC .. "ns#", "O" .. AC .. "ns#") text = rsub(text, "mente#", "mEnte#") --the -mente ending in adverbs will be handled automatically --some prepositions/function words will be handled automatically (no need to add "de") text = rsub(text, "#en#", "#En") text = rsub(text, "#co" .. CARO .. "n#", "#cʊ" .. CARO .. "n#") text = rsub(text, "#po" .. CARO .. "r#", "#pʊ" .. CARO .. "r#") text = rsub(text, "#si" .. CARO .. "n#", "#sɪn#") --FIXME add automatic suport for prefixes such as termo-, ... -- handle certain combinations text = rsub(text, "ch", "ĉ") --not the real sound text = rsub(text, "nh", "ŋ") text = rsub(text, "ll", "ɟ") text = rsub(text, "#p([st])", "#%1") -- [[psicoloxía]], [[pterodáctilo]] --c, g, q text = rsub(text, "c([ieɛE])", (distincion and "θ" or "z") .. "%1") -- not the real seseo sound text = rsub(text, "gu([ieɛE])", "g%1") text = rsub(text, "gü([ieɛE])", "gu%1") text = rsub(text, "qu([ieɛE])", "k%1") text = rsub(text, "z", distincion and "θ" or "z") -- not the real seseo sound if rfind(text, "[θz]") then need_seseo = true end -- map various consonants to their phoneme equivalent (we will switch to the correct <ɡ> later) text = rsub(text, "[vgñrxc]", {["v"]="b", ["ñ"]="ɲ", ["r"]="ɾ", ["x"]="ʃ", ["c"] = "k" }) -- trill/tap text = rsub(text, "ɾɾ", "r") text = rsub(text, "([#lnszθ])ɾ", "%1r") --assimilation of nasals text = rsub(text, "n([# .]*[bp])", "m%1") text = rsub(text, "n([# .]*[kg])", "ŋ%1") text = rsub(text, "ns#", "ŋs#") text = rsub(text, "mn", "ŋn") text = rsub(text, "nm", "ŋm") text = rsub(text, "(" .. V .. ")gn(" .. V .. ")", "%1ŋn%2") text = rsub(text, "n##", "ŋ##") text = rsub(text, "n# #(" .. V .. ")", "ŋ# #%1") -- remove silent h before syllable division text = rsub(text, "h", "") -- convert i/u between vowels to glide local vowel_to_glide = { ["i"] = "j", ["u"] = "w" } -- i and u between vowels -> consonant-like substitutions: [[paranoia]]... text = rsub_repeatedly(text, "(.*" .. V .. accent_c .. "*h?)([iu])(" .. V .. ")", function (v1, iu, v2) return v1 .. vowel_to_glide[iu] .. v2 end ) --some special cases involving the sequences <iu, ui> text = rsub(text, "iu#", "iw#") text = rsub(text, "iu" .. AC, "i.u" .. AC) text = rsub(text, "([^kgħ])ui" .. AC, "%1u*i" .. AC) -- Mark diphthong Us so we can resolve then to /Cuj/ or /Cwi/ later (see below). text = rsub(text, "([kg])ui", "%1Ui") text = rsub(text, "Ui" .. AC, "ui" .. AC) -- accented "cuí"/"güí" don't need it --syllable division text = syllabify_from_spelling_or_pronun(text) --diphthongs text = rsub(text, "i([aeɛoɔuEO])", "j%1") text = rsub(text, "u([aeɛoɔuiEO])", "w%1") --we will use /wi/ after velar sounds and /uj/ elsewhere text = rsub(text, "([^kgħ])wi", "%1uj") text = rsub(text, "([kgħ])u%*i", "%1wi") local accent_to_stress_mark = { [AC] = "ˈ", [GR] = "ˌ", [CARO] = "" } local function accent_word(word, syllables) -- Now stress the word. If any accent exists in the word (including ^ indicating an unaccented word), -- put the stress mark(s) at the beginning of the indicated syllable(s). Otherwise, apply the default -- stress rule. if rfind(word, accent_c) then for i = 1, #syllables do syllables[i] = rsub(syllables[i], "^(.*)(" .. accent_c .. ")(.*)$", function(pre, accent, post) return accent_to_stress_mark[accent] .. pre .. post end ) end else -- Default stress rule. Words without vowels (e.g. IPA foot boundaries) don't get stress. if #syllables > 1 and (rfind(word, "[^" .. vowel .. "nŋs#]#") or rfind(word, C .. "[nŋs]#")) or #syllables == 1 and rfind(word, V) then syllables[#syllables] = "ˈ" .. syllables[#syllables] elseif #syllables > 1 then syllables[#syllables - 1] = "ˈ" .. syllables[#syllables - 1] end end end local words = rsplit(text, " ") for j, word in ipairs(words) do -- accentuation local syllables = rsplit(word, "%.") if rfind(word, "mEn%.te#") then local mente_syllables -- Words ends in -mente (converted above to -mênte); add a stress to the preceding portion mente_syllables = {} mente_syllables[2] = table.remove(syllables) mente_syllables[1] = table.remove(syllables) accent_word(table.concat(syllables, "."), syllables) accent_word(table.concat(mente_syllables, "."), mente_syllables) table.insert(syllables, mente_syllables[1]) table.insert(syllables, mente_syllables[2]) else accent_word(word, syllables) end -- Resolve deferred <c/g>Ui sequences now that stress is known: stressed -> /Cuj/, unstressed -> /Cwi/ for i = 1, #syllables do if rfind(syllables[i], "Ui") then if rfind(syllables[i], "ˈ") then syllables[i] = rsub(syllables[i], "Ui", "uj") else syllables[i] = rsub(syllables[i], "Ui", "wi") end end end --if the aperture of the stressed vowel is not given, throw an error for i = 1, #syllables do if string.find(syllables[i], "ˈ") and (string.find(syllables[i], "e") or string.find(syllables[i], "o")) then error("Please specify whether the stressed vowels are close-mid (ê ô) or open-mid (è ò); see documentation for details.") end end -- Word-final unstressed "-eo" (sanguíneo, coetáneo) is realized as a hiatus /io/ if #syllables >= 2 and not rfind(syllables[#syllables], "ˈ") and not rfind(syllables[#syllables - 1], "ˈ") and rfind(syllables[#syllables], "^os?#+$") and rfind(syllables[#syllables - 1], "e$") then syllables[#syllables - 1] = rsub(syllables[#syllables - 1], "e$", "i") end --Reduction of word-final vowels if not string.find(syllables[#syllables], "ˈ") then syllables[#syllables] = rsub(syllables[#syllables], "a#", "ɐ#") syllables[#syllables] = rsub(syllables[#syllables], "ɛ#", "ɪ#") syllables[#syllables] = rsub(syllables[#syllables], "e#", "ɪ#") syllables[#syllables] = rsub(syllables[#syllables], "ɔ#", "ʊ#") syllables[#syllables] = rsub(syllables[#syllables], "o#", "ʊ#") end -- Reconstruct the word. words[j] = table.concat(syllables, ".") words[j] = rsub_repeatedly(words[j], "ˈ(.+)ˈ", "ˌ%1ˈ")--make all primary stresses but the last one be secondary words[j] = rsub(words[j], "%.(" .. ipa_stress_c .. ")", "%1") -- suppress syllable mark before IPA stress indicator --determine whether there's an undetermined vowel in the pre-tonic part (exclude monosyllabic unaccented words) if string.find(words[j], "ˈ") then local extracted = string.match(words[j], "(.*)ˈ") -- take everything before the stressed syllable if string.find(extracted, "e") or string.find(extracted, "o") then error("Please specify whether the pre-tonic vowels are close-mid (ė ȯ) or open-mid (ẹ ọ); see documentation for details.") end end end text = table.concat(words, " ") text = rsub(text, "E", "e") --no need for the fake symbols anymore text = rsub(text, "O", "o") text = rsub(text, "U", "u") --diphthongs text = rsub(text, "([aeɛoɔ])i", "%1j") text = rsub(text, "([aeɛo])u", "%1w") text = rsub(text, "ju", "iw") --real sound of seseo Z text = rsub(text, "z", "s") --phonetic transcription if phonetic then --allophones of /a/ text = rsub(text, "al", "ɑl") --syllable ending in /l/ text = rsub(text, "aŋ", "ɑŋ") --preceded or followed by /ŋ/ in the same syllable -- text = rsub(text, "a" .. TILDE .. "ŋ", "ɑ" .. TILDE .. "ŋ") text = rsub(text, "ŋa", "ŋɑ") text = rsub(text, "aw", "ɑw") --in the falling dipthong /aw/ text = rsub(text, "aˈu", "ɑˈu") --hiatus with /aˈu/ text = rsub(text, "a%.([oʊ])", "ɑ.%1") --followed by /o/~/ʊ/ text = rsub(text, "([gk])a", "%1ɑ") --in contact with /k/ or /g/ text = rsub(text, "a([gk])", "ɑ%1") text = rsub(text, "a%.([gk])", "ɑ.%1") text = rsub(text, "aˈ([gk])", "ɑˈ%1") text = rsub(text, "a([ɟʃĉj])", "a̠%1") --before palatal consonants/in a the falling dipthong /aj/ text = rsub(text, "a%.([ɟʃĉj])", "a̠.%1") --nasalization between nasal consonants text = rsub(text, "([ŋmnɲ])(" .. V .. ")%.([ŋmnɲ])", "%1%2" .. TILDE .. ".%3") text = rsub(text, "([ŋmnɲ])(" .. V .. ")ˈ([ŋmnɲ])", "%1%2" .. TILDE .. "ˈ%3") text = rsub(text, "([ŋmnɲ])(" .. V .. ")([ŋmnɲ])", "%1%2" .. TILDE .. "%3") -- θ, s before voiced consonants local voiced = "mnɲbdɟgʎ" local r = "ɾr" local tovoiced = { ["θ"] = "θ̬", ["s"] = "z", } local function voice(sound, following) return tovoiced[sound] .. following end text = rsub(text, "([θs])(" .. separator_c .. "*[" .. voiced .. r .. "])", voice) --allophones of /s/ text = rsub(text, "s([ĉʃ])", "S%1") --fake symbol text = rsub(text, "s%.([ĉʃ])", "S.%1") text = rsub(text, "z([ɲɟ])", "Z%1") --fake symbol text = rsub(text, "z%.([ɲɟ])", "Z.%1") -- fricative vs. stop allophones; first convert stops to fricatives, then back to stops after nasals and sometimes after l local stop_to_fricative = {["b"] = "β", ["d"] = "ð", ["g"] = "ɣ"} local fricative_to_stop = {["β"] = "b", ["ð"] = "d", ["ɣ"] = "g"} text = rsub(text, "[bdg]", stop_to_fricative) text = rsub(text, "([mnɲŋ]" .. separator_c .. "*)([βɣ])", function(nasal, fricative) return nasal .. fricative_to_stop[fricative] end ) text = rsub(text, "([lʎmnɲŋ]" .. separator_c .. "*)ð", function(nasal_l, fricative) return nasal_l .. "d" end ) text = rsub(text, "(##" .. ipa_stress_c .. "*)([βɣð])", function(stress, fricative) return stress .. fricative_to_stop[fricative] end ) --plosives before consonants text = rsub(text, "([βɣð])%.([smtʃ])", function(fricative, consonant) return fricative_to_stop[fricative] .. "." .. consonant end ) --/t,d/ are dental text = rsub(text, "[td]", {["t"] = "t̪", ["d"] = "d̪"}) --/s/ and its voiced allophone [z] are usually apico-alveolar in non-seseo dialects if distincion then text = rsub(text, "[sz]", {["s"] = "s̺", ["z"] = "z̺"}) end -- nasal assimilation before consonants local labiodental, dental, palatalized = "ɱ", "n̪", "nʲ" local nasal_assimilation = { ["f"] = labiodental, ["t"] = dental, ["d"] = dental, ["θ"] = dental, ["ĉ"] = palatalized, ["ʃ"] = palatalized, } text = rsub(text, "n(" .. separator_c .. "*)(.)", function(stress, following) return (nasal_assimilation[following] or "n") .. stress .. following end ) -- lateral assimilation before consonants text = rsub(text, "l(" .. separator_c .. "*)(.)", function(stress, following) local l = "l" if following == "t" or following == "d" or following == "θ" then -- dentialveolar l = "l̪" elseif following == "ĉ" or following == "ʃ" then -- alveolopalatal l = "lʲ" elseif following == "k" or following == "ɣ" then -- velarized l = "ɫ" end return l .. stress .. following end) text = rsub(text, "l#", "ɫ#") end --dialectal gheada text = rsub(text, "g", (gheismo and "ħ" or "g")) text = rsub(text, "ɣ", (gheismo and "ħ" or "ɣ")) if rfind(text, "[gɣħ]") then gheada_different = true end -- convert fake symbols to real ones local final_conversions = { ["ĉ"] = "t͡ʃ", -- fake "ch" to real "ch" ["S"] = "sʲ", ["Z"] = "zʲ", ["g"] = "ɡ", --non-IPA to IPA } text = rsub(text, "[ĉSZg]", final_conversions) text = rsub(text, "([βðɣ])", "%1̞") -- voiced fricatives are actually approximants --don't show vowel reduction in phonemic transcriptions if not phonetic then text = rsub(text, "ʊ", "o") text = rsub(text, "ɪ", "e") text = rsub(text, "ɐ", "a") end -- remove # and * symbols at word and text boundaries text = rsub(text, "[#*]", "") text = unfc(text) local differences = nil if dialect == "Standard" then differences = { gheada_different = gheada_different, need_seseo = need_seseo, } end local ret = { text = text, differences = differences, } return ret end function export.IPA_string(frame) local iparams = { [1] = {}, ["style"] = {required = true}, ["phonetic"] = {type = "boolean"}, } local iargs = require("Module:parameters").process(frame.args, iparams) local retval = export.IPA(iargs[1], iargs.style, iargs.phonetic) return retval.text end -- Generate all relevant dialect pronunciations and group into styles. See [[Module:es-pronunc]] for details. local function express_all_styles(style_spec, dodialect) local ret = { pronun = {}, expressed_styles = {}, } local function express_style(hidden_tag, tag, representative_dialect, matching_styles) matching_styles = matching_styles or representative_dialect -- If style specified, make sure it matches the requested style. local style_matches if not style_spec then style_matches = true else local style_parts = rsplit(matching_styles, "%-") local or_styles = rsplit(style_spec, "%s*,%s*") for _, or_style in ipairs(or_styles) do local and_styles = rsplit(or_style, "%s*%+%s*") local and_matches = true for _, and_style in ipairs(and_styles) do local negate if and_style:find("^%-") then and_style = and_style:gsub("^%-", "") negate = true end local this_style_matches = false for _, part in ipairs(style_parts) do if part == and_style then this_style_matches = true break end end if negate then this_style_matches = not this_style_matches end if not this_style_matches then and_matches = false end end if and_matches then style_matches = true break end end end if not style_matches then return end -- Fetch the representative dialect's pronunciation if not already present. if not ret.pronun[representative_dialect] then dodialect(ret, representative_dialect) end -- Insert the new style into the style group, creating the group if necessary. local new_style = { tag = tag, pronun = ret.pronun[representative_dialect], } for _, hidden_tag_style in ipairs(ret.expressed_styles) do if hidden_tag_style.tag == hidden_tag then table.insert(hidden_tag_style.styles, new_style) return end end table.insert(ret.expressed_styles, { tag = hidden_tag, styles = {new_style}, }) end -- For each type of difference, figure out if the difference exists in any of the given respellings. dodialect(ret, "Standard") local differences = {} for _, difftype in ipairs { "need_seseo", "gheada_different" } do for _, pronun in ipairs(ret.pronun["Standard"]) do if pronun.differences[difftype] then differences[difftype] = true end end end local need_seseo = differences.need_seseo local gheada_different = differences.gheada_different -- Now, based on the observed differences, figure out how to combine the individual dialects into styles and -- style groups. if not gheada_different then if not need_seseo then express_style(false, false, "Standard") else express_style(false, "standard", "Standard") express_style(false, "seseo", "Seseo") end else if not need_seseo then express_style(false, "standard", "Standard") express_style(false, "gheada", "Gheada") else express_style(false, "standard", "Standard") express_style(false, "gheada", "Gheada") express_style(false, "gheada and seseo", "Gheada-seseo") end end return ret end local function format_all_styles(expressed_styles, format_style, width) for i, style_group in ipairs(expressed_styles) do if #style_group.styles == 1 then style_group.formatted, style_group.formatted_len = format_style(style_group.styles[1].tag, style_group.styles[1], i == 1) else style_group.formatted, style_group.formatted_len = format_style(style_group.tag, style_group.styles[1], i == 1) for j, style in ipairs(style_group.styles) do style.formatted, style.formatted_len = format_style(style.tag, style, i == 1 and j == 1) end end end local maxlen = 0 for i, style_group in ipairs(expressed_styles) do local this_len = style_group.formatted_len if #style_group.styles > 1 then for _, style in ipairs(style_group.styles) do this_len = math.max(this_len, style.formatted_len) end end maxlen = math.max(maxlen, this_len) end local lines = {} local need_major_hack = false for i, style_group in ipairs(expressed_styles) do if #style_group.styles == 1 then table.insert(lines, style_group.formatted) need_major_hack = false else local inline = '\n<div class="vsShow" style="display:none">\n' .. style_group.formatted .. "</div>" local full_prons = {} for _, style in ipairs(style_group.styles) do table.insert(full_prons, style.formatted) end local full = '\n<div class="vsHide">\n' .. table.concat(full_prons, "\n") .. "</div>" local em_length = math.floor(maxlen * width) --this allows us to have a different coefficient in IPA transcriptions and rhymes table.insert(lines, '<div class="vsSwitcher" data-toggle-category="pronunciations" style="width: ' .. em_length .. 'em; max-width:100%;"><span class="vsToggleElement" style="float: right;">&nbsp;</span>' .. inline .. full .. "</div>") need_major_hack = true end end -- major hack to get bullets working on the next line after a div box return table.concat(lines, "\n") .. (need_major_hack and "\n<span></span>" or "") end local function dodialect_pronun(args, ret, dialect) ret.pronun[dialect] = {} for i, term in ipairs(args.terms) do local phonemic, phonetic, differences if term.raw then phonemic = term.raw_phonemic phonetic = term.raw_phonetic differences = construct_default_differences(dialect) else phonemic = export.IPA(term.term, dialect, false) phonetic = export.IPA(term.term, dialect, true) differences = phonemic.differences phonemic = phonemic.text phonetic = phonetic.text end local refs if not term.ref then refs = nil else refs = {} for _, refspec in ipairs(term.ref) do local this_refs = require("Module:references").parse_references(refspec) for _, this_ref in ipairs(this_refs) do table.insert(refs, this_ref) end end end ret.pronun[dialect][i] = { raw = term.raw, phonemic = phonemic, phonetic = phonetic, refs = refs, q = term.q, qq = term.qq, a = term.a, aa = term.aa, differences = differences, } end end local function generate_pronun(args) local function this_dodialect_pronun(ret, dialect) dodialect_pronun(args, ret, dialect) end local ret = express_all_styles(args.style, this_dodialect_pronun) local function format_style(tag, expressed_style, is_first) local pronunciations = {} local formatted_pronuns = {} local function ins(formatted_part) table.insert(formatted_pronuns, formatted_part) end -- Loop through each pronunciation. For each one, add the phonemic and phonetic versions to `pronunciations`, -- for formatting by [[Module:IPA]], and also create an approximation of the formatted version so that we can -- compute the appropriate width of the HTML switcher div box that holds the different per-dialect variants. for j, pronun in ipairs(expressed_style.pronun) do -- Add tag to left qualifiers if first one -- FIXME: Consider using accent qualifier for the tag instead. local qs = pronun.q if j == 1 and tag then if qs then qs = m_table.deepcopy(qs) table.insert(qs, tag) else qs = {tag} end end local first_pronun = #pronunciations + 1 if not pronun.phonemic and not pronun.phonetic then error("Internal error: Saw neither phonemic nor phonetic pronunciation") end if pronun.phonemic then -- missing if 'raw:[...]' given -- don't display syllable division markers in phonemic local slash_pron = "/" .. pronun.phonemic:gsub("%.", "") .. "/" table.insert(pronunciations, { pron = slash_pron, }) ins(slash_pron) end if pronun.phonetic then -- missing if 'raw:/.../' given local bracket_pron = "[" .. pronun.phonetic .. "]" table.insert(pronunciations, { pron = bracket_pron, }) ins(bracket_pron) end local last_pronun = #pronunciations if qs then pronunciations[first_pronun].q = qs end if pronun.a then pronunciations[first_pronun].a = pronun.a end if j > 1 then pronunciations[first_pronun].separator = ", " ins(", ") end if pronun.qq then pronunciations[last_pronun].qq = pronun.qq end if pronun.aa then pronunciations[last_pronun].aa = pronun.aa end if qs or pronun.qq or pronun.a or pronun.aa then -- Note: This inserts the actual formatted decoration text, including HTML and such, but the later call -- to textual_len() removes all HTML and reduces links. ins(require(decorations_module).format_decorations { lang = lang, text = "", q = qs, qq = pronun.qq, a = pronun.a, aa = pronun.aa, }) end if pronun.refs then pronunciations[last_pronun].refs = pronun.refs -- Approximate the reference using a footnote notation. This will be slightly inaccurate if there are -- more than nine references but that is rare. ins(string.rep("[1]", #pronun.refs)) end if first_pronun ~= last_pronun then pronunciations[last_pronun].separator = " " ins(" ") end end local bullet = string.rep("*", args.bullets) .. " " -- Here we construct the formatted line in `formatted`, and also try to construct the equivalent without HTML -- and wiki markup in `formatted_for_len`, so we can compute the approximate textual length for use in sizing -- the toggle box with the "more" button on the right. local pre = is_first and args.pre and args.pre .. " " or "" local post = is_first and args.post and " " .. args.post or "" local formatted = bullet .. pre .. m_IPA.format_IPA_full { lang = lang, items = pronunciations, separator = "" } .. post local formatted_for_len = bullet .. pre .. "IPA(susi): " .. table.concat(formatted_pronuns) .. post return formatted, textual_len(formatted_for_len) end ret.text = format_all_styles(ret.expressed_styles, format_style, 0.55) return ret end local function parse_respelling(respelling, pagename, parse_err) local raw_respelling = respelling:match("^raw:(.*)$") if raw_respelling then local raw_phonemic, raw_phonetic = raw_respelling:match("^/(.*)/ %[(.*)%]$") if not raw_phonemic then raw_phonemic = raw_respelling:match("^/(.*)/$") end if not raw_phonemic then raw_phonetic = raw_respelling:match("^%[(.*)%]$") end if not raw_phonemic and not raw_phonetic then parse_err(("Unable to parse raw respelling '%s', should be one of /.../, [...] or /.../ [...]") :format(raw_respelling)) end return { raw = true, raw_phonemic = raw_phonemic, raw_phonetic = raw_phonetic, } end if respelling == "+" then respelling = pagename end return {term = respelling} end -- Return the number of syllables of a phonemic representation, which should have syllable dividers in it but no hyphens. local function get_num_syl_from_phonemic(phonemic) -- Maybe we should just count vowels instead of the below code. phonemic = rsub(phonemic, "|", " ") -- remove IPA foot boundaries local words = rsplit(phonemic, " +") for i, word in ipairs(words) do -- IPA stress marks are syllable divisions if between characters; otherwise just remove. word = rsub(word, "(.)[ˌˈ](.)", "%1.%2") word = rsub(word, "[ˌˈ]", "") words[i] = word end -- There should be a syllable boundary between words. phonemic = table.concat(words, ".") return ulen(rsub(phonemic, "[^.]", "")) + 1 end -- Get the rhyme by truncating everything up through the last stress mark + any following consonants, and remove -- syllable boundary markers. local function convert_phonemic_to_rhyme(phonemic) return rsub(rsub(phonemic, ".*[ˌˈ]", ""), "^[^" .. vowel .. "]*", ""):gsub("%.", ""):gsub("t͡ʃ", "tʃ") end local function split_syllabified_spelling(spelling) return rsplit(spelling, "%.") end -- "Align" syllabification to original spelling by matching character-by-character, allowing for extra syllable and -- accent markers in the syllabification. If we encounter an extra syllable marker (.), we allow and keep it. If we -- encounter an extra accent marker in the syllabification, we drop it. In any other case, we return nil indicating -- the alignment failed. local function align_syllabification_to_spelling(syllab, spelling) local result = {} local syll_chars = rsplit(decompose(syllab), "") local spelling_chars = rsplit(decompose(spelling), "") local i = 1 local j = 1 while i <= #syll_chars or j <= #spelling_chars do local ci = syll_chars[i] local cj = spelling_chars[j] if ci == cj then table.insert(result, ci) i = i + 1 j = j + 1 elseif ci == "." then table.insert(result, ci) i = i + 1 elseif ci == AC or ci == GR or ci == CARO then -- skip character i = i + 1 else -- non-matching character return nil end end if i <= #syll_chars or j <= #spelling_chars then -- left-over characters on one side or the other return nil end return unfc(table.concat(result)) end -- Word should already be decomposed. local function word_has_vowels(word) return rfind(word, V) end local function all_words_have_vowels(term) local words = rsplit(decompose(term), "[ %-]") for i, word in ipairs(words) do -- Allow empty word; this occurs with prefixes and suffixes. if word ~= "" and not word_has_vowels(word) then return false end end return true end local function should_generate_rhyme_from_respelling(term) local words = rsplit(decompose(term), " +") return #words == 1 and -- no if multiple words not words[1]:find(".%-.") and -- no if word is composed of hyphenated parts (e.g. [[Austria-Hungría]]) not words[1]:find("%-$") and -- no if word is a prefix not (words[1]:find("^%-") and words[1]:find(CARO)) and -- no if word is an unstressed suffix word_has_vowels(words[1]) -- no if word has no vowels (e.g. a single letter) end local function should_generate_rhyme_from_ipa(ipa) return not ipa:find("%s") and word_has_vowels(decompose(ipa)) end local function dodialect_specified_rhymes(rhymes, parsed_respellings, rhyme_ret, dialect) rhyme_ret.pronun[dialect] = {} for _, rhyme in ipairs(rhymes) do local num_syl = rhyme.num_syl local no_num_syl = false -- If user explicitly gave the rhyme but didn't explicitly specify the number of syllables and term is single-word, try to take the number of syllables from the phonemic. if not no_num_syl and not num_syl then for _, parsed in ipairs(parsed_respellings) do for dialect, pronun in pairs(parsed.pronun.pronun[dialect]) do -- Check that pronun.phonemic exists (it may not if raw phonetic-only pronun is given). if pronun.phonemic then if not should_generate_rhyme_from_ipa(pronun.phonemic) then no_num_syl = true break end -- Count number of syllables by looking at syllable boundaries (including stress marks). local this_num_syl = get_num_syl_from_phonemic(pronun.phonemic) m_table.insertIfNot(num_syl, this_num_syl) end end if no_num_syl then break end end if no_num_syl or #num_syl == 0 then num_syl = nil end end table.insert(rhyme_ret.pronun[dialect], { rhyme = rhyme.rhyme, num_syl = num_syl, q = rhyme.q, differences = construct_default_differences(dialect), }) end end local function parse_pron_modifier(arg, parse_err, generate_obj, param_mods, no_split_on_comma) local retval = {} if arg:find("<") then local insert = { store = "insert" } param_mods.q = insert param_mods.qq = insert param_mods.a = insert param_mods.aa = insert return require(put_module).parse_inline_modifiers(arg, { param_mods = param_mods, generate_obj = generate_obj, parse_err = parse_err, splitchar = not no_split_on_comma and "," or nil, }) elseif no_split_on_comma then table.insert(retval, generate_obj(arg)) else for _, term in ipairs(split_on_comma(arg)) do table.insert(retval, generate_obj(term)) end end return retval end local function parse_rhyme(arg, parse_err) local function generate_obj(term) return {rhyme = term} end local param_mods = { s = { item_dest = "num_syl", convert = function(arg, parse_err) local nsyls = rsplit(arg, ",") for i, nsyl in ipairs(nsyls) do if not nsyl:find("^[0-9]+$") then parse_err("Number of syllables '" .. nsyl .. "' should be numeric") end nsyls[i] = tonumber(nsyl) end return nsyls end, }, } return parse_pron_modifier(arg, parse_err, generate_obj, param_mods) end local function parse_homophone(arg, parse_err) local function generate_obj(term) return {term = term} end local param_mods = { t = { -- We need to store the <t:...> inline modifier into the "gloss" key of the parsed term, -- because that is what [[Module:links]] (called from [[Module:homophones]]) expects. item_dest = "gloss", }, gloss = {}, pos = {}, alt = {}, lit = {}, id = {}, g = { -- We need to store the <g:...> inline modifier into the "genders" key of the parsed term, -- because that is what [[Module:links]] (called from [[Module:homophones]]) expects. item_dest = "genders", convert = function(arg) return rsplit(arg, ",") end, }, } return parse_pron_modifier(arg, parse_err, generate_obj, param_mods) end local function generate_audio_obj(arg) local file, gloss if arg:find("#") then file, gloss = arg:match("^(.-)%s*#%s*(.*)$") else file, gloss = arg:match("^(.-)%s*;%s*(.*)$") end if not file then file = arg gloss = "Audio" end return {file = file, gloss = gloss} end local function parse_audio(arg, parse_err) -- None other than decorations local param_mods = {} -- Don't split on comma because some filenames have embedded commas not followed by a space -- (typically followed by an underscore). return parse_pron_modifier(arg, parse_err, generate_audio_obj, param_mods, "no split on comma") end -- External entry point for {{es-pr}}. function export.show_pr(frame) local params = { [1] = {list = true}, ["rhyme"] = {}, ["hmp"] = {}, ["audio"] = {list = true}, ["pagename"] = {}, } local parargs = frame:getParent().args local args = require("Module:parameters").process(parargs, params) local pagename = args.pagename or mw.loadData("Module:headword/data").pagename -- Parse the arguments. local respellings = #args[1] > 0 and args[1] or {"+"} local parsed_respellings = {} local function overall_parse_err(msg, arg, val) error(msg .. ": " .. arg .. "=" .. val) end local overall_rhyme = args.rhyme and parse_rhyme(args.rhyme, function(msg) overall_parse_err(msg, "rhyme", args.rhyme) end) or nil local overall_hmp = args.hmp and parse_homophone(args.hmp, function(msg) overall_parse_err(msg, "hmp", args.hmp) end) or nil local overall_audio if args.audio then overall_audio = {} for _, audio in ipairs(args.audio) do local parsed_audio = parse_audio(audio, function(msg) overall_parse_err(msg, "audio", audio) end) if #parsed_audio > 1 then error("Internal error: Saw more than one object returned from parse_audio") end table.insert(overall_audio, parsed_audio[1]) end end for i, respelling in ipairs(respellings) do if respelling:find("<") then local param_mods = { pre = { overall = true }, post = { overall = true }, style = { overall = true }, bullets = { overall = true, convert = function(arg, parse_err) if not arg:find("^[0-9]+$") then parse_err("Modifier 'bullets' should have a number as argument, but saw '" .. arg .. "'") end return tonumber(arg) end, }, rhyme = { overall = true, store = "insert-flattened", convert = parse_rhyme, }, hmp = { overall = true, store = "insert-flattened", convert = parse_homophone, }, audio = { overall = true, store = "insert-flattened", convert = parse_audio, }, ref = { store = "insert" }, q = { store = "insert" }, qq = { store = "insert" }, a = { store = "insert" }, aa = { store = "insert" }, } local parsed = require(put_module).parse_inline_modifiers(respelling, { paramname = i, param_mods = param_mods, generate_obj = function(term, parse_err) return parse_respelling(term, pagename, parse_err) end, splitchar = ",", outer_container = { audio = {}, rhyme = {}, hmp = {} } }) if not parsed.bullets then parsed.bullets = 1 end table.insert(parsed_respellings, parsed) else local termobjs = {} local function parse_err(msg) error(msg .. ": " .. i .. "=" .. respelling) end for _, term in ipairs(split_on_comma(respelling)) do table.insert(termobjs, parse_respelling(term, pagename, parse_err)) end table.insert(parsed_respellings, { terms = termobjs, audio = {}, rhyme = {}, hmp = {}, bullets = 1, }) end end -- Loop over individual respellings, processing each. for _, parsed in ipairs(parsed_respellings) do parsed.pronun = generate_pronun(parsed) local no_auto_rhyme = false for _, term in ipairs(parsed.terms) do if term.raw then if not should_generate_rhyme_from_ipa(term.raw_phonemic or term.raw_phonetic) then no_auto_rhyme = true break end elseif not should_generate_rhyme_from_respelling(term.term) then no_auto_rhyme = true break end end -- Generate the rhymes. local function dodialect_rhymes_from_pronun(rhyme_ret, dialect) rhyme_ret.pronun[dialect] = {} if not parsed.pronun.pronun[dialect] then dodialect_pronun(parsed, parsed.pronun, dialect) end for _, pronun in ipairs(parsed.pronun.pronun[dialect]) do -- We should have already excluded multiword terms and terms without vowels from rhyme generation (see -- `no_auto_rhyme` below). But make sure to check that pronun.phonemic exists (it may not if raw -- phonetic-only pronun is given). if pronun.phonemic then -- Count number of syllables by looking at syllable boundaries (including stress marks). local num_syl = get_num_syl_from_phonemic(pronun.phonemic) -- Get the rhyme by truncating everything up through the last stress mark + any following -- consonants, and remove syllable boundary markers. local rhyme = convert_phonemic_to_rhyme(pronun.phonemic) local saw_already = false for _, existing in ipairs(rhyme_ret.pronun[dialect]) do if existing.rhyme == rhyme then saw_already = true -- We already saw this rhyme but possibly with a different number of syllables, -- e.g. if the user specified two pronunciations 'biología' (4 syllables) and -- 'bi.ología' (5 syllables), both of which have the same rhyme /ia/. m_table.insertIfNot(existing.num_syl, num_syl) break end end if not saw_already then local rhyme_diffs = nil if dialect == "Standard" then rhyme_diffs = {} if rhyme:find("θ") then rhyme_diffs.need_seseo = true end if rhyme:find("ɡ") then rhyme_diffs.gheada_different = true end end table.insert(rhyme_ret.pronun[dialect], { rhyme = rhyme, num_syl = {num_syl}, differences = rhyme_diffs, }) end end end end if #parsed.rhyme == 0 then if overall_rhyme or no_auto_rhyme then parsed.rhyme = nil else parsed.rhyme = express_all_styles(parsed.style, dodialect_rhymes_from_pronun) end else local no_rhyme = false for _, rhyme in ipairs(parsed.rhyme) do if rhyme.rhyme == "-" then no_rhyme = true break end end if no_rhyme then parsed.rhyme = nil else local function this_dodialect(rhyme_ret, dialect) return dodialect_specified_rhymes(parsed.rhyme, {parsed}, rhyme_ret, dialect) end parsed.rhyme = express_all_styles(parsed.style, this_dodialect) end end end if overall_rhyme then local no_overall_rhyme = false for _, orhyme in ipairs(overall_rhyme) do if orhyme.rhyme == "-" then no_overall_rhyme = true break end end if no_overall_rhyme then overall_rhyme = nil else local function dodialect_overall_rhyme(rhyme_ret, dialect) return dodialect_specified_rhymes(overall_rhyme, parsed_respellings, rhyme_ret, dialect) end overall_rhyme = express_all_styles(parsed.style, dodialect_overall_rhyme) end end -- If all sets of pronunciations have the same rhymes, display them only once at the bottom. -- Otherwise, display rhymes beneath each set, indented. local first_rhyme_ret local all_rhyme_sets_eq = true for j, parsed in ipairs(parsed_respellings) do if j == 1 then first_rhyme_ret = parsed.rhyme elseif not m_table.deepEquals(first_rhyme_ret, parsed.rhyme) then all_rhyme_sets_eq = false break end end local function format_rhyme(rhyme_ret, num_bullets) local function format_rhyme_style(tag, expressed_style, is_first) local pronunciations = {} local rhymes = {} for _, pronun in ipairs(expressed_style.pronun) do table.insert(rhymes, pronun) end local data = { lang = lang, rhymes = rhymes, q = tag and {tag} or nil, force_cat = force_cat, } local bullet = string.rep("*", num_bullets) .. " " local formatted = bullet .. require("Module:rhymes").format_rhymes(data) local formatted_for_len_parts = {} table.insert(formatted_for_len_parts, bullet .. "Tugma: " .. (tag and "(" .. tag .. ") " or "")) for j, pronun in ipairs(expressed_style.pronun) do if j > 1 then table.insert(formatted_for_len_parts, ", ") end if pronun.q then table.insert(formatted_for_len_parts, "(" .. table.concat(pronun.q, ", ") .. ") ") end table.insert(formatted_for_len_parts, "-" .. pronun.rhyme) end return formatted, textual_len(table.concat(formatted_for_len_parts)) end return format_all_styles(rhyme_ret.expressed_styles, format_rhyme_style, 0.75) end -- If all sets of pronunciations have the same homophones, display them only once at the bottom. -- Otherwise, display homophones beneath each set, indented. local first_hmps local all_hmp_sets_eq = true for j, parsed in ipairs(parsed_respellings) do if j == 1 then first_hmps = parsed.hmp elseif not m_table.deepEquals(first_hmps, parsed.hmp) then all_hmp_sets_eq = false break end end local function format_homophones(hmps, num_bullets) local hmptext = require("Module:homophones").format_homophones { lang = lang, homophones = hmps } return string.rep("*", num_bullets) .. " " .. hmptext end local function format_audio(audios, num_bullets) local ret = {} for i, audio in ipairs(audios) do local text = require(audio_module).format_audio { lang = lang, file = audio.file, caption = audio.gloss, q = audio.q, qq = audio.qq, a = audio.a, aa = audio.aa, } table.insert(ret, string.rep("*", num_bullets) .. " " .. text) end return table.concat(ret, "\n") end local textparts = {} local min_num_bullets = math.huge for j, parsed in ipairs(parsed_respellings) do if parsed.bullets < min_num_bullets then min_num_bullets = parsed.bullets end if j > 1 then table.insert(textparts, "\n") end table.insert(textparts, parsed.pronun.text) if #parsed.audio > 0 then table.insert(textparts, "\n") -- If only one pronunciation set, add the audio with the same number of bullets, otherwise -- indent audio by one more bullet. table.insert(textparts, format_audio(parsed.audio, #parsed_respellings == 1 and parsed.bullets or parsed.bullets + 1)) end if not all_rhyme_sets_eq and parsed.rhyme then table.insert(textparts, "\n") table.insert(textparts, format_rhyme(parsed.rhyme, parsed.bullets + 1)) end if not all_hmp_sets_eq and #parsed.hmp > 0 then table.insert(textparts, "\n") table.insert(textparts, format_homophones(parsed.hmp, parsed.bullets + 1)) end end if overall_audio and #overall_audio > 0 then table.insert(textparts, "\n") table.insert(textparts, format_audio(overall_audio, min_num_bullets)) end if all_rhyme_sets_eq and first_rhyme_ret then table.insert(textparts, "\n") table.insert(textparts, format_rhyme(first_rhyme_ret, min_num_bullets)) end if overall_rhyme then table.insert(textparts, "\n") table.insert(textparts, format_rhyme(overall_rhyme, min_num_bullets)) end if all_hmp_sets_eq and #first_hmps > 0 then table.insert(textparts, "\n") table.insert(textparts, format_homophones(first_hmps, min_num_bullets)) end if overall_hmp and #overall_hmp > 0 then table.insert(textparts, "\n") table.insert(textparts, format_homophones(overall_hmp, min_num_bullets)) end return table.concat(textparts) end return export kw9p6u6wse66k73alme0cdhz1ols679 Padron:R:gl:TILG 10 39014 178583 2026-11-03T06:50:14Z GinawaSaHapon 3989 Nilikha ang pahina na may '{{#invoke:quote|call_template |template=cite-web |gl |editor=w:gl:Antón Santamarina;w:gl:Ernesto X. González Seoane;w:gl:María Álvarez de la Granja |entry={{{1|{{pagename}}}}} |entryurl=https://ilg.usc.gal/TILG/en/search/?utf8=%E2%9C%93&result_type=kwic&search_type=units&text={{urlencode:{{{1|{{pagename}}}}}}} |start_year=2003 |year=2018 |work=Tesouro informatizado da lingua galega |location=Santiago de Compostela |publisher=w:gl:Instituto da Lingua Galega |a...' 178583 wikitext text/x-wiki {{#invoke:quote|call_template |template=cite-web |gl |editor=w:gl:Antón Santamarina;w:gl:Ernesto X. González Seoane;w:gl:María Álvarez de la Granja |entry={{{1|{{pagename}}}}} |entryurl=https://ilg.usc.gal/TILG/en/search/?utf8=%E2%9C%93&result_type=kwic&search_type=units&text={{urlencode:{{{1|{{pagename}}}}}}} |start_year=2003 |year=2018 |work=Tesouro informatizado da lingua galega |location=Santiago de Compostela |publisher=w:gl:Instituto da Lingua Galega |allowparams=1 }}<noinclude>{{refcat}}</noinclude> 2ffden9c5np9f1ez72z5vsaare9sn84 Padron:R:TLPGP 10 39015 178584 2026-11-03T06:50:50Z GinawaSaHapon 3989 Nilikha ang pahina na may '{{#invoke:quote|call_template |template=cite-web |gl |titleurl=http://ilg.usc.gal/tesouro/en/search#search=normal&mode=lema&q={{urlencode:{{{1|{{pagename}}}}}}} |title={{{1|{{pagename}}}}} |editor=w:gl:Rosario Álvarez Blanco |work=Tesouro do léxico patrimonial galego e portugués |location=Santiago de Compostela |publisher=w:gl:Instituto da Lingua Galega |start_year=2014 |year=2024 |issn=2659-3173 |allowparams=1 }}<noinclude>{{refcat|gl|pt}}</noinclude>' 178584 wikitext text/x-wiki {{#invoke:quote|call_template |template=cite-web |gl |titleurl=http://ilg.usc.gal/tesouro/en/search#search=normal&mode=lema&q={{urlencode:{{{1|{{pagename}}}}}}} |title={{{1|{{pagename}}}}} |editor=w:gl:Rosario Álvarez Blanco |work=Tesouro do léxico patrimonial galego e portugués |location=Santiago de Compostela |publisher=w:gl:Instituto da Lingua Galega |start_year=2014 |year=2024 |issn=2659-3173 |allowparams=1 }}<noinclude>{{refcat|gl|pt}}</noinclude> gtixupvlh6bajux875m2xcntbotsg7n Padron:R:gl:DDGM 10 39016 178585 2026-11-03T06:51:29Z GinawaSaHapon 3989 Nilikha ang pahina na may '{{#invoke:quote|call_template |template=cite-web |gl |first=Ernesto Xosé González |last=Seoane |authorlink=gl:Ernesto Xosé González Seoane |first2=María Álvarez de la |last2=Granja |authorlink2=gl:María Álvarez de la Granja |first3=Ana Isabel Boullón |last3=Agrelo |authorlink3=gl:Ana Isabel Boullón Agrelo |work=Dicionario de Dicionarios do galego medieval |start_year=2006 |year=2022 |entryurl=https://ilg.usc.gal/ddgm/ddd_pescuda.php?pescuda={{urlencode:...' 178585 wikitext text/x-wiki {{#invoke:quote|call_template |template=cite-web |gl |first=Ernesto Xosé González |last=Seoane |authorlink=gl:Ernesto Xosé González Seoane |first2=María Álvarez de la |last2=Granja |authorlink2=gl:María Álvarez de la Granja |first3=Ana Isabel Boullón |last3=Agrelo |authorlink3=gl:Ana Isabel Boullón Agrelo |work=Dicionario de Dicionarios do galego medieval |start_year=2006 |year=2022 |entryurl=https://ilg.usc.gal/ddgm/ddd_pescuda.php?pescuda={{urlencode:{{{1|{{pagename}}}}}}}&tipo_busca={{{tipo|{{#if:{{{eq|}}}|equivalencia|lema}}{{#if:{{{u|}}}|&acentos=n}}}}}&comodins=s |entry={{{1|{{pagename}}}}} |location=Santiago de Compostela |publisher=w:gl:Instituto da Lingua Galega |allowparams=1,eq,u,tipo }}<noinclude>{{documentation}}</noinclude> ff9o325qmk38h8xo133jf1bh0lsyhnz Padron:R:gl:CX 10 39017 178586 2026-11-03T06:52:05Z GinawaSaHapon 3989 Nilikha ang pahina na may '{{#invoke:quote|call_template |template=cite-web |gl |entryurl=https://ilg.usc.gal/xelmirez/xelmirez.php?pescuda={{#if:{{{nourlencode|}}}|{{{alt|{{pagename}}}}}|{{urlencode:{{{1|{{pagename}}}}}}}}}&corpus=xelmirez |entry={{{alt|{{pagename}}}}} |first=Xavier Varela |last=Barreiro |first2=Xavier Gómez |last2=Guinovart |work=Corpus Xelmírez: corpus lingüístico da Galicia medieval |start_year=2006 |year=2018 |publisher=w:gl:Instituto da Lingua Galega |location=Sa...' 178586 wikitext text/x-wiki {{#invoke:quote|call_template |template=cite-web |gl |entryurl=https://ilg.usc.gal/xelmirez/xelmirez.php?pescuda={{#if:{{{nourlencode|}}}|{{{alt|{{pagename}}}}}|{{urlencode:{{{1|{{pagename}}}}}}}}}&corpus=xelmirez |entry={{{alt|{{pagename}}}}} |first=Xavier Varela |last=Barreiro |first2=Xavier Gómez |last2=Guinovart |work=Corpus Xelmírez: corpus lingüístico da Galicia medieval |start_year=2006 |year=2018 |publisher=w:gl:Instituto da Lingua Galega |location=Santiago de Compostela |allowparams=nourlencode,alt,1 }}<noinclude>{{documentation}}</noinclude> tus5ynl2kxyl9kgkteccjby0tf5knqf Padron:gl-verb form of 10 39018 178588 2026-11-03T06:59:57Z GinawaSaHapon 3989 Nilikha ang pahina na may '{{#invoke:romance inflections|verb_form_of|norm=gl}}<!-- --><noinclude>{{documentation}}</noinclude>' 178588 wikitext text/x-wiki {{#invoke:romance inflections|verb_form_of|norm=gl}}<!-- --><noinclude>{{documentation}}</noinclude> 85lfawibg8b7ra0eqbk8uwh30pkyz2x Module:gl-verb 828 39019 178589 2026-11-03T07:03:27Z GinawaSaHapon 3989 mula enwikt. isasalin sa susunod 178589 Scribunto text/plain --[=[ This module implements {{gl-conj}} and provides the underlying conjugation functions for {{gl-verb}} (whose actual formatting is done in [[Module:gl-headword]]). This module uses the standard norm for Galician spelling. See also [[Module:gl-reinteg-verb]], which implements the reintegrationist norm. Authorship: Ben Wing <benwing2> ]=] local export = {} --[=[ TERMINOLOGY: -- "slot" = A particular combination of tense/mood/person/number/etc. Example slot names for verbs are "pres_1s" (present indicative first-person singular), "pres_sub_2s" (present subjunctive second-person singular) "impf_sub_3p" (imperfect subjunctive third-person plural). Each slot is filled with zero or more forms. -- "form" = The conjugated Galician form representing the value of a given slot. -- "lemma" = The dictionary form of a given Galician term. For Galician, always the infinitive. ]=] --[=[ FIXME: --]=] local lang = require("Module:languages").getByCode("gl") local m_string_utilities = require("Module:string utilities") local m_links = require("Module:links") local m_table = require("Module:table") local iut = require("Module:inflection utilities") local put = require("Module:parse utilities") local com = require("Module:gl-common") local force_cat = false -- set to true for debugging local check_for_red_links = false -- set to false for debugging local rfind = mw.ustring.find local rmatch = mw.ustring.match local rsplit = mw.text.split local rsub = com.rsub local u = mw.ustring.char local unpack = unpack or table.unpack -- Lua 5.2 compatibility local function link_term(term, display) return m_links.full_link({ lang = lang, term = term, alt = display }, "term") end local V = com.V -- vowel regex class local AV = com.AV -- accented vowel regex class local C = com.C -- consonant regex class local TEMPC1 = u(0xFFF1) -- temporary character used for consonant substitutions local short_pp_footnote = "[usually used with auxiliary verbs " .. link_term("ser") .. " and " .. link_term("estar") .. "]" local long_pp_footnote = "[usually used with auxiliary verbs " .. link_term("haber") .. " and " .. link_term("ter") .. "]" --[=[ Vowel alternations: <i-e>: 'i' in pres1s, imp2s and the whole present subjunctive; 'e' elsewhere when stressed. Generally 'e' otherwise when unstressed. E.g. [[sentir]], [[conseguir]] (the latter additionally with 'gu-g' alternation). <u-o>: 'u' in pres1s, imp2s and the whole present subjunctive; 'o' elsewhere when stressed. Generally 'u' otherwise when unstressed. E.g. [[durmir]], [[subir]]. <i>: 'i' whenever stressed (in the present singular and third plural) and throughout the whole present subjunctive. Otherwise 'e'. E.g. [[vestir]], [[pedir]]. <u>: 'u' whenever stressed (in the present singular and third plural) and throughout the whole present subjunctive. Otherwise 'o'. There may be no such verbs in standard Galician. <í>: The last 'i' of the stem) becomes 'í' when stressed. E.g.: * [[faiscar]] (only3sp; faísca, faíscan, faísque, faísquen' also with 'c-qu' alternation), [[acainzar]], [[avaiñar]], [[cainzar]], [[caiñar]], [[desenvaiñar]], [[envaiñar]], [[arremuiñar]], [[arrepuiñar]], [[arruinar]], [[cuincar]], [[cuiñar]], [[muiñar]] * verbs in -eizar and -aizar, e.g. [[europeizar]] ('europeízo, europeíce', etc. also with 'z-c' alternation) * [[desenraizar]], [[enraizar]], [[hebraizar]], [[xudaizar]] * [[europeizar]], [[homoxeneizar]] * some verbs in -uizar: * [[enxuizar]] (enxuízo, enxuíza, enxuíce, enxuícen, also with 'z-c' alternation), [[axuizar]] * but not any in -guizar ([[arreguizar]], [[desgaleguizar]], [[empreguizar]], [[esguizar]], [[espreguizar]], [[galeguizar]]) or -quizar ([[catequizar]], [[esnaquizar]], [[xerarquizar]]) * none in -aiar? * not [[abraiar]], [[achaiar]], [[alfaiar]], [[amaiar]], [[arraiar]], [[atalaiar]], [[desmaiar]], [[encaiar]], [[engraiar]], [[ensaiar]], [[espraiar]], [[faiar]], [[laiar]], [[maiar]], [[raiar]], [[salaiar]] * unknown: [[craiar]] * some verbs in -biar: * [[adobiar]], [[asubiar]], [[espabiar]] * but not [[arrubiar]], [[asoberbiar]] /e/?, [[cambiar]], [[descambiar]], [[enrabiar]], [[ensoberbiar]] /e/?, [[entibiar]], [[gabiar]], [[gobiar]] /ɔ/, [[intercambiar]], [[rabiar]], [[recambiar]], [[sarabiar]] (only3s), [[turbiar]] * none in -ciar: * not [[acariciar]], [[agraciar]], [[anunciar]], [[apreciar]] /e/?, [[asociar]] /ɔ/, [[auspiciar]], [[autofinanciar]], [[aviciar]], [[axenciar]] /ɛ/, [[beneficiar]], [[comerciar]] /ɛ/, [[concienciar]] /ɛ/, [[conferenciar]] /e/?, [[congraciar]], [[denunciar]], [[depreciar]] /e/?, [[desasociar]] /ɔ/, [[desenviciar]], [[desgraciar]], [[desperdiciar]], [[diferenciar]] /e/?, [[dilixenciar]] /e/?, [[disociar]] /ɔ/, [[distanciar]], [[divorciar]] /ɔ/, [[enranciar]], [[ensuciar]], [[enunciar]], [[enviciar]], [[escanciar]], [[especiar]] /?/, [[evidenciar]] /e/?, [[financiar]], [[graciar]], [[influenciar]] /e/?, [[iniciar]], [[licenciar]] /ɛ/, [[maliciar]], [[negociar]] /ɔ/, [[oficiar]], [[potenciar]] /e/?, [[prenunciar]], [[presenciar]] /e/?, [[pronunciar]], [[propiciar]], [[quintaesenciar]] /e/?, [[reiniciar]], [[renunciar]], [[reverenciar]] /e/?, [[saciar]], [[sentenciar]] /e/?, [[silenciar]] /e/?, [[viciar]] * some verbs in -diar: * [[adiar]], [[vadiar]] * but not [[asediar]] /ɛ/, [[compendiar]] /ɛ/, [[custodiar]] /ɔ/, [[deslendiar]] /e/?, [[entremediar]] /e/?, [[estipendiar]] /e/?, [[fastidiar]], [[incendiar]] /e/?, [[insidiar]], [[irradiar]], [[mediar]] /e/?, [[odiar]] /ɔ/, [[parodiar]] /ɔ/, [[preludiar]], [[radiar]], [[remediar]] /ɛ/, [[repudiar]], [[salmodiar]] /ɔ/, [[subsidiar]], [[vilipendiar]] /ɛ/ * some verbs in -fiar: * [[afiar]], [[confiar]], [[desafiar]], [[desconfiar]], [[desenfiar]], [[enfiar]], [[esfiar]], [[esgrafiar]], [[fiar]], [[porfiar]], probably [[sobrefiar]] (not indicated) * but not [[atrofiar]] /ɔ/, [[hipertrofiar]] /ɔ/ * verbs in -guiar: * [[guiar]], [[radioguiar]], [[teleguiar]] * verbs in -hiar: * [[chiar]], [[rechiar]], [[rechouchiar]] * some verbs in -liar: * [[aliar]] (alío, alía, alíe, alíen), [[ampliar]], [[avaliar]], [[desliar]], [[liar]] * but not [[afiliar]] (afilio, afilia, afilie, afilien), [[auxiliar]], [[conciliar]], [[defoliar]], [[domiciliar]], [[escoliar]], [[espoliar]], [[exfoliar]], [[exiliar]], [[interfoliar]], [[reconciliar]] * [[paliar]] goes both ways: 'palio/palío', 'palia/palía', 'palie/palíe', 'palien/palíen' * unknown: [[represaliar]] * some verbs in -miar: * [[gurrumiar]], [[miar]] * but not [[agremiar]], [[amomiar]], [[encomiar]], [[premiar]], [[rumiar]] * some verbs in -niar: * [[agoniar]], [[desagoniar]] * but not [[calumniar]], [[conxeniar]], [[herniar]], [[miniar]] * none in -oiar? * not [[aboiar]] /ɔ/, [[acoiar]] /ɔ/, [[apoiar]] /o/, [[arroiar]] /o/ (only3s), [[choiar]]/[[enchoiar]] /ɔ/, [[enxoiar]] /ɔ/, [[loiar]] /o/ * some verbs in -piar: * [[arrepiar]], [[espiar]], [[expiar]], [[piar]] * but not [[apropiar]], [[copiar]], [[expropiar]], [[fotocopiar]], [[lurpiar]], [[principiar]], [[recopiar]], [[tapiar]], [[xerocopiar]] * some verbs in -quiar: * [[esquiar]], [[maquiar]], [[remaquiar]], [[tosquiar]] * but not [[obsequiar]] * unknown: [[franquiar]] * some verbs in -riar: * [[arrefriar]], [[arriar]], [[avariar]], [[criar]], [[desvariar]], [[enriar]], [[escagarriar]], [[estriar]], [[malcriar]], [[recriar]], [[variar]] * but not [[anguriar]], [[asalariar]], [[cariar]] (only3sp), [[contrariar]], [[desmemoriar]], [[expatriar]], [[gloriar]], [[historiar]], [[inventariar]], [[inxuriar]], [[leriar]], [[repatriar]], [[seriar]], [[vangloriar]] * some verbs in -siar: * [[fantasiar]] * but not [[anestesiar]], [[extasiar]] * [[ansiar]] goes both ways: 'ansio/ansío', 'ansia/ansía', 'ansie/ansíe', 'ansien/ansíen' * some verbs in -tiar: * [[amnistiar]], [[desenfastiar]], [[enfastiar]] * but not [[angustiar]], [[sitiar]] * some verbs in -viar: * [[ataviar]], [[aviar]], [[desataviar]], [[desviar]], [[enviar]], [[extraviar]], [[reenviar]] * but not [[abreviar]], [[agraviar]], [[aliviar]], [[desagraviar]], [[diluviar]] (only3s), [[obviar]] * some verbs in -xiar: * [[vixiar]] * but not [[asfixiar]], [[colexiar]] /e/, [[contaxiar]], [[desprestixiar]], [[eloxiar]], [[plaxiar]], [[presaxiar]], [[prestixiar]], [[privilexiar]] /e/, [[refuxiar]] <ú>: The last 'u' of the stem becomes 'ú' when stressed. E.g.: * [[reunir]] ('reúno, reúne(s), reúnem, reúna(s), reúnan') * [[esmiuzar]] ('esmiúzo, esmiúza(s), esmiúza, esmiúce(s), esmiúcen' also with 'z-c' alternation) * [[saudar]] ('saúdo, saúda(s), saúda, saúde(s), saúden') * [[auñar]], [[desembaular]], [[embaular]] * [[afiuzar]], [[desafiuzar]], [[desmiudar]], [[desmiuzar]], [[enviuvar]], [[esmiuzar]] but not [[triunfar]] * NOTE: It seems most or all verbs in -uar other than in -guar, -quar have stressed ú, so we make it the default. ]=] local vowel_alternants = m_table.listToSet({"i-e", "i", "í", "u-o", "u", "ú", "+"}) local vowel_alternant_to_desc = { ["i-e"] = "''i-e'' alternation in present singular", ["i"] = "''e'' becomes ''i'' when stressed", ["í"] = "''i'' becomes ''í'' when stressed", ["u-o"] = "''u-o'' alternation in present singular", ["u"] = "''o'' becomes ''u'' when stressed", ["ú"] = "''u'' becomes ''ú'' when stressed", } local vowel_alternant_to_cat = { ["i-e"] = "i-e alternation in present singular", ["i"] = "e becoming i when stressed", ["í"] = "i becoming í when stressed", ["u-o"] = "u-o alternation in present singular", ["u"] = "o becoming u when stressed", ["ú"] = "u becoming ú when stressed", } local all_persons_numbers = { ["1s"] = "1|s", ["2s"] = "2|s", ["3s"] = "3|s", ["1p"] = "1|p", ["2p"] = "2|p", ["3p"] = "3|p", } local person_number_list = {"1s", "2s", "3s", "1p", "2p", "3p"} local imp_person_number_list = {"2s", "3s", "1p", "2p", "3p"} local neg_imp_person_number_list = {"2s", "3s", "1p", "2p", "3p"} person_number_to_reflexive_pronoun = { ["1s"] = "me", ["2s"] = "te", ["3s"] = "se", ["1p"] = "nos", ["2p"] = "vos", ["3p"] = "se", } local indicator_flags = m_table.listToSet { "no_pres_stressed", "no_pres1_and_sub", "only3s", "only3sp", "only3p", "noimp", "pp_inv", "irreg", "no_built_in", } -- Initialize all the slots for which we generate forms. local function add_slots(alternant_multiword_spec) -- "Basic" slots: All slots that go into the regular table (not the reflexive form-of table). alternant_multiword_spec.verb_slots_basic = { {"infinitive", "inf"}, {"infinitive_linked", "inf"}, {"gerund", "ger"}, {"short_pp_ms", "short|m|s|past|part"}, {"short_pp_fs", "short|f|s|past|part"}, {"short_pp_mp", "short|m|p|past|part"}, {"short_pp_fp", "short|f|p|past|part"}, {"pp_ms", "m|s|past|part"}, {"pp_fs", "f|s|past|part"}, {"pp_mp", "m|p|past|part"}, {"pp_fp", "f|p|past|part"}, } -- Special slots used to handle non-reflexive parts of reflexive verbs in {{gl-verb form of}}. For example, for a -- reflexive-only verb like [[arrepentirse]], we want to be able to use {{gl-verb form of}} on [[arrepinta]] (which -- should mention that it is a part of 'me arrepinta', first-person singular present subjunctive, and -- 'se arrepinta', third-person singular present subjunctive) or on [[arrepentimos]] (which should mention that it -- is a part of 'arrepentímonos', first-person plural present indicative or preterite). Similarly, we want to use -- {{gl-verb form of}} on [[arrepentindo]] (which should mention that it is a part of 'se ... arrepentindo', -- syntactic variant of [[arrepentíndose]], which is the gerund of [[arrepentirse]]). To do this, we need to be -- able to map non-reflexive parts like [[arrepinta]], [[arrepentimos]], [[arrepentindo]], etc. to their reflexive -- equivalent(s), to the tag(s) of the equivalent(s), and, in the case of forms like [[arrepentindo]], -- [[arrepentir]] and imperatives, to the separated syntactic variant of the verb+clitic combination. We do this by -- creating slots for the non-reflexive part equivalent of each basic reflexive slot, and for the separated -- syntactic-variant equivalent of each basic reflexive slot that is formed of verb+clitic. We use slots in this -- way to deal with multiword lemmas. Note that we run into difficulties mapping between reflexive verbs, -- non-reflexive part equivalents, and separated syntactic variants if a slot contains more than one form. To -- handle this, if there are the same number of forms in two slots we're trying to match up, we assume the forms -- match one-to-one; otherwise we don't match up the two slots (which means {{gl-verb form of}} won't work in this -- case, but such a case is extremely rare and not worth worrying about). Alternatives that handle this "properly" -- are significantly more complicated and require non-trivial modifications to [[Module:inflection utilities]]. local need_special_verb_form_of_slots = alternant_multiword_spec.source_template == "gl-verb form of" and alternant_multiword_spec.refl if need_special_verb_form_of_slots then alternant_multiword_spec.verb_slots_reflexive_verb_form_of = { {"infinitive_non_reflexive", "-"}, {"infinitive_variant", "-"}, {"gerund_non_reflexive", "-"}, {"gerund_variant", "-"}, } else alternant_multiword_spec.verb_slots_reflexive_verb_form_of = {} end -- Add entries for a slot with person/number variants. -- `verb_slots` is the table to add to. -- `slot_prefix` is the prefix of the slot, typically specifying the tense/aspect. -- `tag_suffix` is a string listing the set of inflection tags to add after the person/number tags. -- `person_number_list` is a list of the person/number slot suffixes to add to `slot_prefix`. local function add_personal_slot(verb_slots, slot_prefix, tag_suffix, person_number_list) for _, persnum in ipairs(person_number_list) do local persnum_tag = all_persons_numbers[persnum] local slot = slot_prefix .. "_" .. persnum local accel = persnum_tag .. "|" .. tag_suffix table.insert(verb_slots, {slot, accel}) end end -- Add a personal slot (i.e. a slot with person/number variants) to `verb_slots_basic`. local function add_basic_personal_slot(slot_prefix, tag_suffix, person_number_list, no_special_verb_form_of_slot) add_personal_slot(alternant_multiword_spec.verb_slots_basic, slot_prefix, tag_suffix, person_number_list) -- Add special slots for handling non-reflexive parts of reflexive verbs in {{gl-verb form of}}. -- See comment above in `need_special_verb_form_of_slots`. if need_special_verb_form_of_slots and not no_special_verb_form_of_slot then for _, persnum in ipairs(person_number_list) do local persnum_tag = all_persons_numbers[persnum] local basic_slot = slot_prefix .. "_" .. persnum local accel = persnum_tag .. "|" .. tag_suffix table.insert(alternant_multiword_spec.verb_slots_reflexive_verb_form_of, {basic_slot .. "_non_reflexive", "-"}) end end end add_basic_personal_slot("pres", "pres|ind", person_number_list) add_basic_personal_slot("impf", "impf|ind", person_number_list) add_basic_personal_slot("pret", "pret|ind", person_number_list) add_basic_personal_slot("plup", "plup|ind", person_number_list) add_basic_personal_slot("fut", "fut|ind", person_number_list) add_basic_personal_slot("cond", "cond", person_number_list) add_basic_personal_slot("pres_sub", "pres|sub", person_number_list) add_basic_personal_slot("impf_sub", "impf|sub", person_number_list) add_basic_personal_slot("fut_sub", "fut|sub", person_number_list) add_basic_personal_slot("imp", "imp", imp_person_number_list) add_basic_personal_slot("pers_inf", "pers|inf", person_number_list) -- Don't need special non-reflexive-part slots because the negative imperative is multiword, of which the -- individual words are 'non' + subjunctive. add_basic_personal_slot("neg_imp", "neg|imp", neg_imp_person_number_list, "no special verb form of") -- Don't need special non-reflexive-part slots because we don't want [[arrependendo]] mapping to [[arrependendo-me]] -- (only [[arrependendo-se]]) or [[arrepender]] mapping to [[arrepender-me]] (only [[arrepender-se]]). add_basic_personal_slot("infinitive", "inf", person_number_list, "no special verb form of") add_basic_personal_slot("gerund", "ger", person_number_list, "no special verb form of") -- Generate the list of all slots. alternant_multiword_spec.all_verb_slots = {} for _, slot_and_accel in ipairs(alternant_multiword_spec.verb_slots_basic) do table.insert(alternant_multiword_spec.all_verb_slots, slot_and_accel) end for _, slot_and_accel in ipairs(alternant_multiword_spec.verb_slots_reflexive_verb_form_of) do table.insert(alternant_multiword_spec.all_verb_slots, slot_and_accel) end alternant_multiword_spec.verb_slots_basic_map = {} for _, slotaccel in ipairs(alternant_multiword_spec.verb_slots_basic) do local slot, accel = unpack(slotaccel) alternant_multiword_spec.verb_slots_basic_map[slot] = accel end end local overridable_stems = {} local function allow_multiple_values(separated_groups, data) local retvals = {} for _, separated_group in ipairs(separated_groups) do local footnotes = data.fetch_footnotes(separated_group) local retval = {form = separated_group[1], footnotes = footnotes} table.insert(retvals, retval) end return retvals end local function simple_choice(choices) return function(separated_groups, data) if #separated_groups > 1 then data.parse_err("For spec '" .. data.prefix .. ":', only one value currently allowed") end if #separated_groups[1] > 1 then data.parse_err("For spec '" .. data.prefix .. ":', no footnotes currently allowed") end local choice = separated_groups[1][1] if not m_table.contains(choices, choice) then data.parse_err("For spec '" .. data.prefix .. ":', saw value '" .. choice .. "' but expected one of '" .. table.concat(choices, ",") .. "'") end return choice end end for _, overridable_stem in ipairs { "pres_unstressed", "pres_stressed", "pres1_and_sub", -- Don't include pres1; use pres_1s if you need to override just that form "impf", "full_impf", {"pret_conj", simple_choice({"irreg", "ar", "er", "ir"}) }, "pret_base", "pret", "short_pret", "fut", "cond", "pres_sub_stressed", "pres_sub_unstressed", {"sub_conj", simple_choice({"ar", "er"}) }, "plup", "impf_sub", "fut_sub", "pers_inf", "pp", "short_pp", } do if type(overridable_stem) == "string" then overridable_stems[overridable_stem] = allow_multiple_values else local stem, validator = unpack(overridable_stem) overridable_stems[stem] = validator end end -- Useful as the value of the `match` property of a built-in verb. `main_verb_spec` is a Lua pattern that should match -- the non-prefixed part of a verb, and `prefix_specs` is a list of Lua patterns that should match the prefixed part of -- a verb. If a prefix spec is preceded by ^, it must match exactly at the beginning of the verb; otherwise, additional -- prefixes (e.g. re-, des-) may precede. Return the prefix and main verb. local function match_against_verbs(main_verb_spec, prefix_specs) return function(verb) for _, prefix_spec in ipairs(prefix_specs) do if prefix_spec:find("^%^") then -- must match exactly prefix_spec = prefix_spec:gsub("^%^", "") if prefix_spec == "" then -- We can't use the second branch of the if-else statement because an empty () returns the current position -- in rmatch(). local main_verb = rmatch(verb, "^(" .. main_verb_spec .. ")$") if main_verb then return "", main_verb end else local prefix, main_verb = rmatch(verb, "^(" .. prefix_spec .. ")(" .. main_verb_spec .. ")$") if prefix then return prefix, main_verb end end else local prefix, main_verb = rmatch(verb, "^(.*" .. prefix_spec .. ")(" .. main_verb_spec .. ")$") if prefix then return prefix, main_verb end end end return nil end end --[=[ Built-in (usually irregular) conjugations. Each entry is processed in turn and consists of an object with two fields: 1. match=: Specifies the built-in verbs that match this object. 2. forms=: Specifies the built-in stems and forms for these verbs. The value of match= is either a string beginning with "^" (match only the specified verb), a string not beginning with "^" (match any verb ending in that string), or a function that is passed in the verb and should return the prefix of the verb if it matches, otherwise nil. The function match_against_verbs() is provided to facilitate matching a set of verbs with a common ending and specific prefixes (e.g. [[ter]] and [[ater]] but not [[abater]], etc.). The value of forms= is a table specifying stems and individual override forms. Each key of the table names either a stem (e.g. `pres_stressed`), a stem property (e.g. `vowel_alt`) or an individual override form (e.g. `pres_1s`). Each value of a stem can either be a string (a single stem), a list of strings, or a list of objects of the form {form = STEM, footnotes = {FOONOTES}}. Each value of an individual override should be of exactly the same form except that the strings specify full forms rather than stems. The values of a stem property depend on the specific property but are generally strings or booleans. In order to understand how the stem specifications work, it's important to understand the phonetic modifications done by combine_stem_ending(). In general, the complexities of predictable prefix, stem and ending modifications are all handled in this function. In particular: 1. Spelling-based modifications (c/z, g/gu, gu/gü, g/j) occur automatically as appropriate for the ending. 2. If the stem begins with an acute accent, the accent is moved onto the last vowel of the prefix (for handling verbs in -uar such as [[minguar]], pres_3s 'míngua'). 3. If the ending begins with a double asterisk, this is a signal to conditionally delete the accent on the last letter of the stem. "Conditionally" means we don't do it if the last two letters would form a diphthong without the accent on the second one (e.g. in [[sair]], with stem 'saí'); but as an exception, we do delete the accent in stems ending in -guí, -quí (e.g. in [[conseguir]]) because in this case the ui isn't a diphthong. 4. If the ending begins with an asterisk, this is a signal to delete the accent on the last letter of the stem, e.g. fizé -> fizermos. Unlike for **, this removal is unconditional, so we get e.g. 'sairmos' not #'saírmos'. 5. If ending begins with i, it must get an accent after an unstressed vowel (in some but not all cases) to prevent the two merging into a diphthong. See combine_stem_ending() for specifics. The following stems are recognized: -- pres_unstressed: The present indicative unstressed stem (1p, 2p). Also controls the imperative 2p and gerund. Defaults to the infinitive stem (minus the ending -ar/-er/-ir/-or). -- pres_stressed: The present indicative stressed stem (1s, 2s, 3s, 3p). Also controls the imperative 2s. Default is empty if indicator `no_pres_stressed`, else a vowel alternation if such an indicator is given (e.g. `ue`, `ì`), else the infinitive stem. -- pres1_and_sub: Overriding stem for 1s present indicative and the entire subjunctive. Only set by irregular verbs and by the indicators `no_pres_stressed` (e.g. [[precaver]]) and `no_pres1_and_sub` (since verbs of this sort, e.g. [[puir]], are missing the entire subjunctive as well as the 1s present indicative). Used by many irregular verbs, e.g. [[caber]], verbs in '-air', [[dizer]], [[ter]], [[valer]], etc. Some verbs set this and then supply an override for the pres_1s if it's irregular, e.g. [[saber]], with irregular subjunctive stem "saib-" and special 1s present indicative "sei". -- pres1: Special stem for 1s present indicative. Normally, do not set this explicitly. If you need to specify an irregular 1s present indicative, use the form override pres_1s= to specify the entire form. Defaults to pres1_and_sub if given, else pres_stressed. -- pres_sub_unstressed: The present subjunctive unstressed stem (1p, 2p). Defaults to pres1_and_sub if given, else the infinitive stem. -- pres_sub_stressed: The present subjunctive stressed stem (1s, 2s, 3s, 1p). Defaults to pres1. -- sub_conj: Determines the set of endings used in the subjunctive. Should be one of "ar" or "er". -- impf: The imperfect stem (not including the -av-/-i- stem suffix, which is determined by the conjugation). Defaults to the infinitive stem. -- full_impf: The full imperfect stem missing only the endings (-a, -as, -am, etc.). Used for verbs with irregular imperfects such as [[ser]], [[ter]], [[vir]] and [[pór]]. -- pret_conj: Determines the set of endings used in the preterite. Should be one of "ar", "er", "ir" or "irreg". Defaults to the conjugation as determined from the infinitive. When pret_conj == "irreg", `pret` is used, otherwise `pret_base`. -- pret_base: The preterite stem (not including the -a-/-e-/-i- stem suffix). Defaults to the infinitive stem. Only used when pret_conj ~= "irreg". -- pret: The full preterite stem missing only the endings (-ste, -mos, etc.), e.g. 'fige', 'fo'. Only used for verbs with irregular preterites (pret_conj == "irreg") such as [[facer]], [[poder]], [[traer]], etc. The pret_1s and pret_3s are handled using the short_pret stem instead (pret_1s '-en', pret_3s '-o'). Defaults to `pret_base` + the conjugation vowel. -- short_pret: The short preterite stem, used with 1s and 3s endings (pret_1s '-en', pret_3s '-o'). Only used with irregular preterites (pret_conj == "irreg"). Normally derived from pret by deleting the final vowel, and doesn't need to be given explicitly. -- fut: The future stem. Defaults to the infinitive stem + the conjugation vowel. -- cond: The conditional stem. Defaults to `fut`. -- impf_sub: The imperfect subjunctive stem. Defaults to `pret`. -- fut_sub: The future subjunctive stem. Defaults to `pret`. -- plup: The pluperfect stem. Defaults to `pret`. -- pers_inf: The personal infinitive stem. Defaults to the infinitive stem + the conjugation vowel. -- pp: The masculine singular past participle. Default is based on the verb conjugation: infinitive stem + '-ado' for -ar verbs, otherwise infinitive stem + '-ido'. -- short_pp: The short masculine singular past participle, for verbs with such a form. No default. -- pp_inv: `true` if the past participle exists only in the masculine singular. ]=] local built_in_conjugations = { -------------------------------------------------------------------------------------------- -- -ar -- -------------------------------------------------------------------------------------------- -- Verbs not needing entries here: -- -- (1) Verbs with short past participles: need to specify the short pp explicitly. -- -- aceitar: use <short_pp:aceite> -- anexar, completar, expressar, expulsar, findar, fritar, ganhar, gastar, limpar, pagar, pasmar, pegar, soltar: -- use <short_pp:anexo> etc. -- assentar: use <short_pp:assente> -- entregar: use <short_pp:entregue> -- enxugar: use <short_pp:enxuto> -- matar: use <short_pp:morto> -- -- (2) Verbs with orthographic consonant alternations: handled automatically. -- -- -car (brincar, buscar, pecar, trancar, etc.): automatically handled in combine_stem_ending() -- -zar (alcanzar, comezar, lazar): automatically handled in combine_stem_ending() -- -gar (apagar, cegar, esmagar, largar, navegar, resmungar, sugar, etc.): automatically handled in combine_stem_ending() -- -guar (iguar, minguar): automatically handled in combine_stem_ending() -- -- (3) Verbs with vowel alternations: need to specify the alternation explicitly unless it always happens, in -- which case it's handled automatically through an entry below. -- -- esmiuzar changing to esmiúzo: use <ú> -- faiscar changing to faísco: use <í> -- -izar changing to -ízo (ajuizar, enraizar, homogeneizar, plebeizar, etc.): use <í> -- reusar changing to reúso: use <ú> -- saudar changing to saúdo: use <ú> -- tuitar/retuitar changing to (re)tuíto: use <í> { -- dar match = "^dar", -- [[desdar]] doesn't seem to exist; [[redar]] is regular and unrelated to [[dar]] forms = { pres_1s = "dou", pres_2s = "dás", pres_3s = "dá", pres_3p = "dán#", pres1_and_sub = "de", -- only for subjunctive as we override pres_1s sub_conj = "er", pret_conj = "irreg", pret = "de", pret_1s = "dei", pret_3s = "deu", -- /dɛw/ irreg = true, } }, { -- estar match = "^estar", -- [[sobestar]] and [[sobrestar]] seem not to exist forms = { pres_1s = "estou", pres_2s = "estás", pres_3s = "está", pres_3p = "están", pres1_and_sub = "este", -- only for subjunctive as we override pres_1s sub_conj = "er", pret_conj = "irreg", pret = "estive", pp_inv = true, -- no [[sobestar]] or [[sobrestar]], which would be transitive irreg = true, } }, { -- verbs in -uar but not -guar match = function(verb) if verb:find("guar$") then return nil else return match_against_verbs("uar", {""})(verb) end end, forms = { vowel_alt = "ú", } }, -------------------------------------------------------------------------------------------- -- -er -- -------------------------------------------------------------------------------------------- -- Verbs not needing entries here: -- -- -cer (verbs in -ecer, vencer, etc.): automatically handled in combine_stem_ending() -- -guer (erguer/soerguer): automatically handled in combine_stem_ending() { -- must be listed before -aer match = "^traer", forms = { -- all occurrences of accented í and ï in endings handled in combine_stem_ending() pres1_and_sub = "trai", pret_conj = "irreg", pret = "trouxe", irreg = true, } }, { -- verbs in -aer (caer, raer, debaer, degraer, esvaer and derivatives of traer, but not traer itself: -- acaer/decaer/recaer, -- abstraer/atraer/contraer/descontraer/detraer/distraer/extraer/maltraer/retraer/retrotraer/subtraer) match = "aer", forms = { -- all occurrences of accented í and ï in endings handled in combine_stem_ending() pres1_and_sub = "ai", irreg = true, } }, { -- caber match = "caber", forms = { pres1_and_sub = "caib", pret_conj = "irreg", pret = "coube", irreg = true, } }, { -- crer, descrer match = "crer", forms = { pres1_and_sub = "cre", pres_2s = "crés#", pres_3s = "cré#", pres_3p = "crén#", -- regular except the lack of accent in base verb pret_1p = "crín#", irreg = true, } }, { -- acender, prender/aprender; not comprender/desprender/reprender, etc. match = match_against_verbs("ender", {"^ac", "^pr", "^apr"}), forms = {short_pp = "eso"}, }, { -- erguer; but not soerguer match = "^erguer", forms = {short_pp = "ergueito"}, }, { -- facer, afacer, contrafacer, desafacer, desfacer, perfacer, rarefacer, refacer, satisfacer, tumefacer match = "facer", forms = { -- use 'fagu' because we're in a front environment; if we use 'fag', we'll get '#faxo' pres1_and_sub = "fagu", pres_2s = "fás#", pres_3s = "fai", pres_3p = "fán#", pret_conj = "irreg", pret = "fixe", pp = "feito", fut = "far", irreg = true, cons_alt = false, -- avoid claiming we have a c-z alternation } }, { match = "^haber", forms = { pres_1s = "hei", pres_2s = "has", pres_3s = {"ha", "hai"}, pres_3p = "han", pres1_and_sub = "hax", -- only for subjunctive as we override pres_1s pret_conj = "irreg", pret = "hoube", noimp = true, irreg = true, } }, { -- ler, reler, trasler; not escoller, expeler, valer, etc. match = match_against_verbs("ler", {"^", "^re", "tras"}), forms = { pres1_and_sub = "le", pres_2s = "lés#", pres_3s = "lé#", pres_3p = "lén#", -- regular except the lack of accent in base verb pret_1p = "lín#", irreg = true, } }, { -- morrer, premorrer match = "morrer", forms = {pp = "morto"}, }, { -- nacer; but not renacer match = "^nacer", forms = {short_pp = "nado"}, }, { -- moer, but not remoer match = "^moer", forms = { -- all occurrences of accented í and ï in endings handled in combine_stem_ending() pres1_and_sub = "moi", short_pp = "mudo", -- the main table says 'mundo' but the page for [[mundo]] says 'mudo' is "máis recomendable" irreg = true, } }, { -- choer/deschoer, doer/condoer, remoer, proer, roer/corroer match = "oer", forms = { -- all occurrences of accented í and ï in endings handled in combine_stem_ending() pres1_and_sub = "oi", irreg = true, } }, { -- coller, toller and derivatives (acoller, desacoller, desencoller, encoller, entrecoller, escoller, recoller; -- destoller, entretoller) match = "oller", forms = {short_pp = "olleito"}, }, { -- poder match = "poder", forms = { pres1_and_sub = "poid", -- only for subjunctive as we override pres_1s pres_1s = "podo", -- /ɔ/ pret_conj = "irreg", pret = "puide", irreg = true, } }, { -- poñer, antepoñer, apoñer/desapoñer, arrepoñer, compoñer/descompoñer/recompoñer, contrapoñer, depoñer, -- dispoñer/indispoñer/predispoñer, empoñer, expoñer/sobreexpoñer/subexpoñer, impoñer/reimpoñer, interpoñer, -- opoñer, pospoñer, propoñer, repoñer, sobrepoñer, superpoñer, supoñer/presupoñer, traspoñer, xustapoñer match = "poñer", forms = { pres_2s = "pós#", pres_3s = "pón#", pret_conj = "irreg", pret = "puxe", pp = "posto", irreg = true, } }, { -- pracer, but not apracer, compracer, descompracer, despracer match = "^pracer", forms = { pret_conj = "irreg", pret = "prougue", irreg = true, } }, -- prover below, just below ver { -- querer match = "querer", forms = { pres1_and_sub = "queir", -- only for subjunctive as we override pres_1s pres_1s = "quero", -- /ɛ/ pret_conj = "irreg", pret = "quixe", irreg = true, } }, { -- romper; but not corromper, interromper, irromper or prorromper match = "^romper", forms = {short_pp = "roto"}, }, { -- saber, ressaber match = "saber", forms = { pres_1s = "sei", pres1_and_sub = "saib", -- only for subjunctive as we override pres_1s pret_conj = "irreg", pret = "soube", irreg = true, } }, { -- absolver, disolver, resolver match = "solver", forms = {short_pp = "solto"}, }, { -- suspender; but not others in -pender match = "suspender", forms = {short_pp = "suspenso"}, }, { match = "^ser", forms = { pres_1s = "son", pres_2s = "es", pres_3s = "é", pres_1p = "somos", pres_2p = "sodes", pres_3p = "son", pres1_and_sub = "sex", -- only for subjunctive as we override pres_1s full_impf = "er", pret_conj = "irreg", pret = "fo", pret_1s = "fun", pret_2s = "fuches", pret_3s = "foi", imp_2s = "sé", imp_2p = "sede", irreg = true, } }, { -- We want to match abster, conter, deter, etc. but not abater, cometer, etc. No way to avoid listing each verb. match = match_against_verbs("ter", {"abs", "^a", "con", "de", "entre", "man", "ob", "^re", "sos", "^"}), forms = { pres_2s = "tés#", pres_3s = "tén#", pres_2p = {"tendes", "tedes"}, pres_3p = "teñen", pres1_and_sub = "teñ", full_impf = "tiñ", pret_conj = "irreg", pret = "tive", irreg = true, } }, -- traer listed above at the beginning of the -er verbs { -- valer, equivaler match = "valer", forms = { pres1_and_sub = "vall", irreg = true, } }, { -- We want to match antever etc. but not absolver, atrever etc. No way to avoid listing each verb. -- NOTE: [[rever]] has two meanings, one with regular conjugation. Use <no_built_in> for this one. match = match_against_verbs("ver", {"entre", "pre", "^re", "^"}), forms = { pres_2s = "vés#", pres_3s = "vé#", pres_3p = "vén#", pres1_and_sub = "vex", pret_conj = "irreg", pret = "vi", pret_1s = "vín#", pret_3s = "viu", pp = "visto", irreg = true, } }, { -- [[prover]] has regular preterite and past participle match = "^prover", forms = { pres_2s = "provés", pres_3s = "prové", pres_3p = "provén", pres1_and_sub = "provex", short_pp = "provisto", irreg = true, } }, { -- [[desprover]] has its own conjugation match = "^desprover", forms = { pres_2s = "desprovés", pres_3s = "desprové", pres_3p = "desprovén", pres1_and_sub = "desprove", short_pp = "desprovisto", irreg = true, } }, { -- volver, avolver/desenvolver/devolver/envolver/revolver match = "volver", forms = {short_pp = "volto"}, }, -------------------------------------------------------------------------------------------- -- -ir -- -------------------------------------------------------------------------------------------- -- Verbs not needing entries here: -- -- subir (NOT rubir), acudir/sacudir (NOT escudir, aludir/eludir), urdir/desurdir, xurdir/rexurdir, -- engulir, pulir, bulir/rebulir, ulir, mulir (NOT escapulir), durmir, sumir/consumir/ensumir (NOT -- asumir/reasumir/presumir/resumir/subsumir), cuspir/chuspir, sufrir, tusir, xunguir/conxunguir/desxunguir, -- munguir, fuxir/muxir/ruxir: use <u-o> -- [NOTE: imp_2s durme, consume/sume] -- sosubir/susubir: use <u-o>? (archaic, not in RAG dictionary) -- abolir: use <no_pres_stressed> -- descolorir: use <no_pres_stressed> -- empedernir: use <no_pres_stressed> -- espir/despir, refletir, adherir, pedir/desapedir/despedir/expedir/impedir/reexpedir, medir/comedir/descomedir, -- aferir/conferir/deferir/diferir/inferir/interferir/preferir/proferir/referir/transferir, -- dixerir/enxerir/suxerir, preterir, competir/repetir, advertir/divertir, vestir/investir/revestir/travestir, -- agredir/transgredir, espelir: use <i> -- mentir/desmentir, sentir/asentir/consentir/disentir/presentir/resentir, ferir (but no derivatives), servir, -- seguir/conseguir/perseguir/proseguir: use <i-e> -- [NOTE: imp_2s minte] -- denegrir: use <i.only3sp> -- prohibir/coibir: regular -- cumprir: use <no_built_in> in the meaning "fulfill" -- reunir: use <ú> -- argüír/redargüír: use <ú>? -- -- -cir alternations (aducir, resarcir): automatically handled in combine_stem_ending() -- -guir alternations (e.g. conseguir, cinguir, xunguir, tinguir): automatically handled in combine_stem_ending() -- -quir alternations (e.g. delinquir): automatically handled in combine_stem_ending() -- -güír alternations (e.g. argüír): automatically handled in combine_stem_ending() { -- saír/sobresaír match = "aír", forms = { pres1_and_sub = "ai", -- all occurrences of accented í and ï in endings handled in combine_stem_ending() irreg = true, } }, { -- abrir/desabrir/reabrir match = "abrir", forms = {pp = "aberto"}, }, { -- aflixir match = "aflixir", -- FIXME: should this be {pp = {"aflicto", "aflixido"}}? forms = {short_pp = "aflicto"}, }, { -- cubrir/descubrir/encubrir/recubrir/redescubrir match = "cubrir", forms = {vowel_alt = "u-o", pp = "coberto"}, }, { -- cumprir (only in the meaning "to be necessary"; otherwise use <no_built_in>) match = "^cumprir", forms = { -- We could create a <u-ó> just for this verb but that seems overkill unless another such verb appears pres_stressed = "cómpr", pres1_and_sub = "cumpr", }, }, { -- dicir, bendicir, contradicir, desdicir, maldicir, predicir -- FIXME: bendicir and maldicir can also be entirely regular. This could be handled like this: -- ((bendicir<>,bendicir<no_built_in>)) match = "dicir", forms = { -- use 'digu' because we're in a front environment; if we use 'dig', we'll get '#dijo' pres1_and_sub = "digu", pres_2s = "dís#", pres_3s = "dí#", pres_3p = "dín#", pret_conj = "irreg", pret = "dixe", pp = function(base, prefix) return (prefix == "" or prefix == "des" or prefix == "pre") and "dito" or {"dito", "dicido"} end, pp = "dito", fut = "dir", irreg = true, cons_alt = false, -- avoid claiming we have a c-z alternation } }, { -- elixir, reelixir match = "elixir", -- FIXME: should this be {pp = {"electo", "elixido"}}? forms = {short_pp = "electo"}, }, { -- frixir/sofrixir, fritir/sofritir match = "fri[xt]ir", forms = {short_pp = "frito"}, }, { -- inserir, reinserir match = "inserir", forms = { vowel_alt = "i", short_pp = "inserto", }, }, { -- ir match = "^ir", forms = { pres_1s = "vou", pres_2s = "vas", pres_3s = "vai", pres_1p = "imos", pres_2p = "ides", pres_3p = "van", pres1_and_sub = "vai", -- only for subjunctive as we override pres_1s pret_conj = "irreg", pret = "fo", pret_1s = "fun", pret_2s = "fuches", pret_3s = "foi", imp_1p = "vamos", irreg = true, } }, { -- oír, desoír, entreoír match = "oír", forms = { -- all occurrences of accented í and ï in endings handled in combine_stem_ending() pres1_and_sub = "oi", -- /ɔ/ irreg = true, } }, { match = "ouvir", forms = { pres1_and_sub = "ouz", irreg = true, } }, { -- parir, malparir match = "parir", forms = { pres1_and_sub = "pair", irreg = true, } }, { -- imprimir/reimprimir/sobreimprimir, but not comprimir/descomprimir, deprimir, oprimir, reprimir, suprimir match = "imprimir", forms = {short_pp = "impreso"} }, { -- rir, sorrir match = match_against_verbs("rir", {"^", "sor"}), forms = { pres_2s = "ris#", pres_3s = "ri#", pres_3p = "rin#", pret_1s = "rin#", -- regular except the lack of accent in base verb pres1_and_sub = "rí", irreg = true, } }, { -- adscribir, circunscribir, describir, escribir/reescribir, inscribir, prescribir, proscribir, sobrescribir, -- subscribir, transcribir match = "scribir", forms = { pp = "scrito", irreg = true, } }, { -- concluír/recluír; not excluír/incluír/ocluír match = match_against_verbs("cluír", {"con", "re"}), forms = { -- all occurrences of accented í and ï in endings handled in combine_stem_ending() vowel_alt = "ú", short_pp = "cluso", } }, { -- posuír; not desposuír match = "^posuír", forms = { -- all occurrences of accented í and ï in endings handled in combine_stem_ending() vowel_alt = "ú", short_pp = "poseso", } }, { -- remaining verbs in -uír (excluír/incluír/ocluír, diluír, -- afluír/confluír/difluír/fluír/efluír/influír/refluír, atuír/desatuír, -- atribuír/contribuír/distribuír/redistribuír/retribuír/substituír, -- constituír/destituír/instituír/prostituír/reconstituír/restituír, -- construír/desobstruír/destruír/instruír/obstruír/reconstruír, derruír, -- desposuír, diminuír, luír/esluír, estatuír, imbuír, inmiscuír, intuír, puír, pruír) match = "[uü]ír", -- this won't match -guir verbs (e.g. [[conseguir]]) or -quir verbs (e.g. [[delinquir]]) forms = { -- all occurrences of accented í and ï in endings handled in combine_stem_ending() vowel_alt = "ú", } }, { -- We want to match advir, convir, devir, etc. but not ouvir, servir, etc. No way to avoid listing each verb. match = match_against_verbs("vir", {"ad", "^a", "con", "contra", "de", "^desa", "inter", "pre", "pro", "sobre", "^"}), forms = { pres_2s = "vés", pres_3s = "vén", pres_2p = {"vindes", "vides"}, pres_3p = "veñen", pres1_and_sub = "veñ", full_impf = "viñ", pret_conj = "irreg", pret = "viñe", pret_1s = "vín#", pret_3s = "veu", pp = {"vindo", "vido"}, -- FIXME! The following is as in the RAG tables but may be a typo and should be vén for [[vir]] like pres_3s imp_2s = "vén#", irreg = true, } }, -------------------------------------------------------------------------------------------- -- misc -- -------------------------------------------------------------------------------------------- { -- pór, antepor, apor/desapor, arrepor, compor/descompor/recompor, contrapor, depor, dispor/indispor/predispor, -- empor, expor/sobreexpor/subexpor, impor/reimpor, interpor, opor, pospor, propor, repor, sobrepor, -- superpor, supor/presupor, traspor, xustapor match = "p[oó]r", forms = { pres_2s = "pós#", pres_3s = "pón#", pres_1p = "pomos", pres_2p = "pondes", pres_3p = "pón#", pres1_and_sub = "poñ", full_impf = "puñ", pret_conj = "irreg", pret = "puxe", fut = "por", pers_inf = "po", pers_inf_1s = function(base, prefix) return prefix == "" and "pór" or "por" end, pers_inf_3s = function(base, prefix) return prefix == "" and "pór" or "por" end, gerund = "pondo", pp = "posto", irreg = true, } }, } local function skip_slot(base, slot, allow_overrides) if not allow_overrides and (base.basic_overrides[slot] or base.refl and base.basic_reflexive_only_overrides[slot]) then -- Skip any slots for which there are overrides. return true end if base.only3s and (slot:find("^pp_f") or slot:find("^pp_mp")) then -- diluviar, atardecer, neviscar; impersonal verbs have only masc sing pp return true end if not slot:find("[123]") then -- Don't skip non-personal slots. return false end if base.nofinite then return true end if (base.noimp or base.only3s or base.only3sp or base.only3p) and (slot:find("^imp_") or slot:find("^neg_imp_")) then return true end if base.only3s and not slot:find("3s") then -- diluviar, atardecer, neviscar return true end if base.only3sp and not slot:find("3[sp]") then -- atañer, concernir return true end if base.only3p and not slot:find("3p") then -- [[caer cuatro gotas]], [[caer chuzos de punta]], [[entrarle los siete males]] return true end return false end -- Apply vowel alternations to stem. local function apply_vowel_alternations(stem, alternations) local alternation_stems = {} local saw_pres1_and_sub = false local saw_pres_stressed = false local saw_imp2s_override = false local origstem = stem -- Treat final -gu, -qu as a consonant, so the previous vowel can alternate (e.g. conseguir -> consigo). -- This means a verb in -guar can't have a u-ú alternation but I don't think there are any verbs like that. stem = rsub(stem, "([gq])u$", "%1" .. TEMPC1) -- Process alternations other than +. for _, altobj in ipairs(alternations) do local alt = altobj.form local pres1_and_sub, pres_stressed, imp2s_override, err if alt == "+" then -- do nothing yet else local before_last_vowel, last_vowel, after_last_vowel = rmatch(stem, "^(.*)(" .. V .. ")(.-)$") if alt == "i-e" then if last_vowel == "e" or last_vowel == "i" then pres1_and_sub = before_last_vowel .. "i" .. after_last_vowel imp2s_override = pres1_and_sub if last_vowel == "i" then pres_stressed = before_last_vowel .. "e" .. after_last_vowel end else err = "should have -e- or -i- as the last vowel" end elseif alt == "i" then if last_vowel == "e" then pres1_and_sub = before_last_vowel .. "i" .. after_last_vowel pres_stressed = pres1_and_sub else err = "should have -e- as the last vowel" end elseif alt == "u-o" then if last_vowel == "o" or last_vowel == "u" then pres1_and_sub = before_last_vowel .. "u" .. after_last_vowel imp2s_override = pres1_and_sub if last_vowel == "u" then pres_stressed = before_last_vowel .. "o" .. after_last_vowel end else err = "should have -o- or -u- as the last vowel" end elseif alt == "u" then if last_vowel == "o" then pres1_and_sub = before_last_vowel .. "u" .. after_last_vowel pres_stressed = pres1_and_sub else err = "should have -o- as the last vowel" end elseif alt == "í" then if last_vowel == "i" then pres_stressed = before_last_vowel .. "í" .. after_last_vowel else err = "should have -i- as the last vowel" end elseif alt == "ú" then if last_vowel == "u" or last_vowel == "ü" then pres_stressed = before_last_vowel .. "ú" .. after_last_vowel else err = "should have -u- or -ü- as the last vowel" end else error("Internal error: Unrecognized vowel alternation '" .. alt .. "'") end end local function unapply_u_mod(val) if val then return {form = val:gsub(TEMPC1, "u"), footnotes = altobj.footnotes}, true else return nil, false end end pres1_and_sub, saw_pres1_and_sub = unapply_u_mod(pres1_and_sub) pres_stressed, saw_pres_stressed = unapply_u_mod(pres_stressed) imp2s_override, saw_imp2s_override = unapply_u_mod(imp2s_override) table.insert(alternation_stems, { altobj = altobj, pres1_and_sub = pres1_and_sub, pres_stressed = pres_stressed, imp2s_override = imp2s_override, err = err }) end -- Now do +. We check to see which stems are used by other alternations and specify those so any footnotes are -- properly attached. for _, alternation_stem in ipairs(alternation_stems) do if alternation_stem.altobj.form == "+" then local stemobj = {form = origstem, footnotes = alternation_stem.altobj.footnotes} alternation_stem.pres1_and_sub = saw_pres1_and_sub and stemobj or nil alternation_stem.pres_stressed = saw_pres_stressed and stemobj or nil alternation_stem.imp2s_override = saw_imp2s_override and stemobj or nil end end return alternation_stems end -- Add the `stem` to the `ending` for the given `slot` and apply any phonetic modifications. -- WARNING: This function is written very carefully; changes to it can easily have unintended consequences. local function combine_stem_ending(base, slot, prefix, stem, ending, dont_include_prefix) -- If the ending begins with an acute accent, it goes after the last vowel, but we don't have to do anything. -- Use the full stem for checking for -gui ending and such, because 'stem' is just 'u' for [[arguir]], -- [[delinquir]]. local full_stem = prefix .. stem -- Include the prefix in the stem unless dont_include_prefix is given (used for the past participle stem). if not dont_include_prefix then stem = full_stem end -- If ending begins with i, it must get an accent after a/o/u to prevent the two merging into a diphthong: -- caer -> caíches, caído; doer -> doíches, doído; concluír -> concluíches, concluído. if ending:find("^i") and stem:find("[aouü]$") and not stem:find("[gq]u$") then -- Special case for impf_1p/impf_2p, where the i is unstressed and changes into ï. FIXME: Maybe we should be -- checking the slot value instead. if ending == "iamos" or ending == "iades" then ending = ending:gsub("^i", "ï") else ending = ending:gsub("^i", "í") end end -- Spelling changes in the stem; it depends on whether the stem given is the pre-front-vowel or -- pre-back-vowel variant, as indicated by `frontback`. We want these front-back spelling changes to happen -- between stem and ending, not between prefix and stem; the prefix may not have the same "front/backness" -- as the stem. local is_front = rfind(ending, "^[eiéíï]") if base.frontback == "front" and not is_front then stem = stem:gsub("c$", "z") -- coñecer -> coñezo, vencer -> venzo, inmiscir -> inmiszo stem = stem:gsub("gu$", "g") -- distinguir -> distingo, conseguir -> consigo stem = stem:gsub("qu$", "c") -- delinquir -> delinco stem = stem:gsub("gü$", "gu") -- argüír -> arguamos elseif base.frontback == "back" and is_front then stem = stem:gsub("gu$", "gü") -- iguar -> igüei stem = stem:gsub("g$", "gu") -- cargar -> carguei, apagar -> apaguei stem = stem:gsub("c$", "qu") -- marcar -> marquei stem = rsub(stem, "z$", "c") -- aderezar -> aderecei end local retval = stem .. ending if retval:find("#$") then -- remove final accent if no prefix retval = retval:gsub("#$", "") if prefix == "" then retval = com.remove_final_accent(retval) end end return retval end local function add3(base, slot, stems, endings, footnotes, allow_overrides) if skip_slot(base, slot, allow_overrides) then return end local function do_combine_stem_ending(stem, ending) return combine_stem_ending(base, slot, base.prefix, stem, ending) end iut.add_forms(base.forms, slot, stems, endings, do_combine_stem_ending, nil, nil, footnotes) end local function insert_form(base, slot, form) if not skip_slot(base, slot) then iut.insert_form(base.forms, slot, form) end end local function insert_forms(base, slot, forms) if not skip_slot(base, slot) then iut.insert_forms(base.forms, slot, forms) end end local function add_single_stem_tense(base, slot_pref, stems, s1, s2, s3, p1, p2, p3) local function addit(slot, ending) add3(base, slot_pref .. "_" .. slot, stems, ending) end addit("1s", s1) addit("2s", s2) addit("3s", s3) addit("1p", p1) addit("2p", p2) addit("3p", p3) end local function construct_stems(base, vowel_alt, imp_only) local stems = {} if imp_only then stems.imp2s_override = -- If no_pres_stressed given, there should be no imp_2s. not base.no_pres_stressed and ( base.stems.imp2s_override or vowel_alt.imp2s_override or nil) or nil base.this_stems = stems return end local function combine(slot, stem, ending) return combine_stem_ending(base, slot, base.prefix, stem, ending, "dont include prefix") end stems.pres_unstressed = base.stems.pres_unstressed or base.inf_stem stems.pres_stressed = -- If no_pres_stressed given, pres_stressed stem should be empty so no forms are generated. base.no_pres_stressed and {} or base.stems.pres_stressed or vowel_alt.pres_stressed or base.inf_stem stems.pres1_and_sub = -- If no_pres_stressed given, the entire subjunctive is missing. base.no_pres_stressed and {} or -- If no_pres1_and_sub given, pres1 and entire subjunctive are missing. base.no_pres1_and_sub and {} or base.stems.pres1_and_sub or vowel_alt.pres1_and_sub or nil stems.pres1 = base.stems.pres1 or stems.pres1_and_sub or stems.pres_stressed stems.impf = base.stems.impf or base.inf_stem stems.full_impf = base.stems.full_impf stems.pret_base = base.stems.pret_base or base.inf_stem stems.pret_conj = base.stems.pret_conj or base.conj stems.pret = base.stems.pret or iut.map_forms(iut.convert_to_general_list_form(stems.pret_base), -- use combine_stem_ending esp. so we get saíra etc. function(form) return combine("pret", form, base.conj_vowel) end) stems.short_pret = base.stems.gl_short_pret or iut.map_forms(iut.convert_to_general_list_form(stems.pret), function(form) return rsub(form, com.V .. "$", "") end) stems.fut = base.stems.fut or base.inf_stem .. base.conj stems.cond = base.stems.cond or stems.fut stems.pres_sub_stressed = base.stems.pres_sub_stressed or stems.pres1 stems.pres_sub_unstressed = base.stems.pres_sub_unstressed or stems.pres1_and_sub or stems.pres_unstressed stems.sub_conj = base.stems.sub_conj or base.conj stems.plup = base.stems.plup or stems.pret -- Needed for plup_1p and plup_2p if there's an accent in the regular pluperfect stem (as for [[saír]]). stems.plup_unstressed = iut.map_forms(iut.convert_to_general_list_form(stems.plup), com.remove_final_accent) stems.impf_sub = base.stems.impf_sub or stems.pret -- Needed for impf_sub_1p and impf_sub_2p. We can't just add an acute accent because there may already be one -- (as for [[saír]]). stems.impf_sub_antepenult_stressed = iut.map_forms(iut.convert_to_general_list_form(stems.impf_sub), com.add_final_accent) stems.fut_sub = base.stems.fut_sub or stems.pret -- use combine_stem_ending esp. so we get saír, saírmos, etc. stems.pers_inf = base.stems.pers_inf or combine("pers_inf", base.inf_stem, base.conj_vowel) -- use combine_stem_ending esp. so we get roído, caído, etc. stems.pp = base.stems.pp or combine("pp_ms", base.inf_stem, base.conj == "ar" and "ado" or "ido") stems.pp_ms = stems.pp local function masc_to_fem(form) if rfind(form, "o$") then return rsub(form, "o$", "a") else return form end end stems.pp_fs = iut.map_forms(iut.convert_to_general_list_form(stems.pp_ms), masc_to_fem) if base.stems.short_pp then stems.short_pp_ms = base.stems.short_pp stems.short_pp_fs = iut.map_forms(iut.convert_to_general_list_form(stems.short_pp_ms), masc_to_fem) end base.this_stems = stems end local function add_present_indic(base) local stems = base.this_stems local function addit(slot, stems, ending) add3(base, "pres_" .. slot, stems, ending) end local s2, s3, p1, p2, p3 if base.conj == "ar" then s2, s3, p1, p2, p3 = "as", "a", "amos", "ades", "an" elseif base.conj == "er" or base.conj == "or" then -- verbs in -por have the present overridden s2, s3, p1, p2, p3 = "es", "e", "emos", "edes", "en" elseif base.conj == "ir" then s2, s3, p1, p2, p3 = "es", "e", "imos", "ides", "en" else error("Internal error: Unrecognized conjugation " .. base.conj) end addit("1s", stems.pres1, "o") addit("2s", stems.pres_stressed, s2) addit("3s", stems.pres_stressed, s3) addit("1p", stems.pres_unstressed, p1) addit("2p", stems.pres_unstressed, p2) addit("3p", stems.pres_stressed, p3) end local function add_present_subj(base) local stems = base.this_stems local function addit(slot, stems, ending) add3(base, "pres_sub_" .. slot, stems, ending) end local s1, s2, s3, p1, p2, p3 if stems.sub_conj == "ar" then s1, s2, s3, p1, p2, p3 = "e", "es", "e", "emos", "edes", "en" else s1, s2, s3, p1, p2, p3 = "a", "as", "a", "amos", "ades", "an" end addit("1s", stems.pres_sub_stressed, s1) addit("2s", stems.pres_sub_stressed, s2) addit("3s", stems.pres_sub_stressed, s3) addit("1p", stems.pres_sub_unstressed, p1) addit("2p", stems.pres_sub_unstressed, p2) addit("3p", stems.pres_sub_stressed, p3) end local function add_finite_non_present(base) local stems = base.this_stems local function add_tense(slot, stem, s1, s2, s3, p1, p2, p3) add_single_stem_tense(base, slot, stem, s1, s2, s3, p1, p2, p3) end if stems.full_impf then add_tense("impf", stems.full_impf, "a", "as", "a", "amos", "ades", "an") elseif base.conj == "ar" then add_tense("impf", stems.impf, "aba", "abas", "aba", "abamos", "abades", "aban") else add_tense("impf", stems.impf, "ía", "ías", "ía", "iamos", "iades", "ían") end if stems.pret_conj == "irreg" then add_tense("pret", stems.short_pret, "en", nil, "o") add_tense("pret", stems.pret, nil, "ches", nil, "mos", "stes", "ron") elseif stems.pret_conj == "ar" then add_tense("pret", stems.pret_base, "ei", "aches", "ou", "amos", "astes", "aron") elseif stems.pret_conj == "er" then add_tense("pret", stems.pret_base, "ín", "iches", "eu", "emos", "estes", "eron") else add_tense("pret", stems.pret_base, "ín", "iches", "iu", "imos", "istes", "iron") end add_tense("plup", stems.plup, "ra", "ras", "ra", nil, nil, "ran") add_tense("plup", stems.plup_unstressed, nil, nil, nil, "ramos", "rades", nil) add_tense("impf_sub", stems.impf_sub, "se", "ses", "se", nil, nil, "sen") add_tense("impf_sub", stems.impf_sub_antepenult_stressed, nil, nil, nil, "semos", "sedes", nil) add_tense("fut_sub", stems.fut_sub, "r", "res", "r", "rmos", "rdes", "ren") add_tense("fut", stems.fut, "ei", "ás", "á", "emos", "edes", "án") add_tense("cond", stems.cond, "ía", "ías", "ía", "iamos", "iades", "ían") -- [[pór]] needs overrides of the pers_inf_1s and pers_inf_3s. add_tense("pers_inf", stems.pers_inf, "r", "res", "r", "rmos", "rdes", "ren") end local function add_non_finite_forms(base) local stems = base.this_stems local function addit(slot, stems, ending, footnotes) add3(base, slot, stems, ending, footnotes) end insert_form(base, "infinitive", {form = base.verb}) -- Also insert "infinitive + reflexive pronoun" combinations if we're handling a reflexive verb. See comment below -- for "gerund + reflexive pronoun" combinations. if base.refl then for _, persnum in ipairs(person_number_list) do insert_form(base, "infinitive_" .. persnum, {form = base.verb}) end end -- verbs in -por have the gerund overridden local ger_ending = base.conj == "ar" and "ando" or base.conj == "er" and "endo" or "indo" addit("gerund", stems.pres_unstressed, ger_ending) -- Also insert "gerund + reflexive pronoun" combinations if we're handling a reflexive verb. We insert exactly the -- same form as for the bare gerund; later on in add_reflexive_or_fixed_clitic_to_forms(), we add the appropriate -- clitic pronouns. It's important not to do this for non-reflexive verbs, because in that case, the clitic -- pronouns won't be added, and {{gl-verb form of}} will wrongly consider all these combinations as possible -- inflections of the bare gerund. Thanks to [[User:JeffDoozan]] for this bug fix. if base.refl then for _, persnum in ipairs(person_number_list) do addit("gerund_" .. persnum, stems.pres_unstressed, ger_ending) end end -- Skip the long/short past participle footnotes if called from {{gl-verb}} so they don't show in the headword. local long_pp_footnotes = stems.short_pp_ms and base.alternant_multiword_spec.source_template ~= "gl-verb" and {long_pp_footnote} or nil addit("pp_ms", stems.pp_ms, "", long_pp_footnotes) if not base.pp_inv then addit("pp_fs", stems.pp_fs, "", long_pp_footnotes) addit("pp_mp", stems.pp_ms, "s", long_pp_footnotes) addit("pp_fp", stems.pp_fs, "s", long_pp_footnotes) end if stems.short_pp_ms then local short_pp_footnotes = stems.short_pp_ms and base.alternant_multiword_spec.source_template ~= "gl-verb" and {short_pp_footnote} or nil addit("short_pp_ms", stems.short_pp_ms, "", short_pp_footnotes) if not base.pp_inv then addit("short_pp_fs", stems.short_pp_fs, "", short_pp_footnotes) addit("short_pp_mp", stems.short_pp_ms, "s", short_pp_footnotes) addit("short_pp_fp", stems.short_pp_fs, "s", short_pp_footnotes) end end end local function add_imperatives(base) for _, vowel_alt in ipairs(base.vowel_alt_stems) do construct_stems(base, vowel_alt, "imp only") local stems = base.this_stems if stems.imp2s_override then add3(base, "imp_2s", stems.imp2s_override, base.conj == "ar" and "a" or "e") else -- Copy pres3s to imperative since they are almost always the same. insert_forms(base, "imp_2s", iut.map_forms(base.forms.pres_3s, function(form) return form end)) end end if not skip_slot(base, "imp_2p") then -- Copy pres2p to imperative 2p minus -s since they are almost always the same. -- But not if there's an override, to avoid possibly throwing an error. insert_forms(base, "imp_2p", iut.map_forms(base.forms.pres_2p, function(form) local form_no_s = rmatch(form, "^(.*)s$") if not form_no_s then error("Can't derive second-person plural imperative from second-person plural present indicative " .. "because form '" .. form .. "' doesn't end in -s") end return form_no_s end)) end -- Copy subjunctives to imperatives, unless there's an override for the given slot (as with the imp_1p of [[ir]]). for _, persnum in ipairs({"3s", "1p", "3p"}) do local from = "pres_sub_" .. persnum local to = "imp_" .. persnum insert_forms(base, to, iut.map_forms(base.forms[from], function(form) return form end)) end end local function process_slot_overrides(base, filter_slot, reflexive_only) local overrides = reflexive_only and base.basic_reflexive_only_overrides or base.basic_overrides for slot, forms in pairs(overrides) do if not filter_slot or filter_slot(slot) then add3(base, slot, forms, "", nil, "allow overrides") end end end -- Prefix `form` with `clitic`, adding fixed text `between` between them. Add links as appropriate unless the user -- requested no links. Check whether form already has brackets (as will be the case if the form has a fixed clitic). local function prefix_clitic_to_form(base, clitic, between, form) if base.alternant_multiword_spec.args.noautolinkverb then return clitic .. between .. form else local clitic_pref = "[[" .. clitic .. "]]" .. between if form:find("%[%[") then return clitic_pref .. form else return clitic_pref .. "[[" .. form .. "]]" end end end -- Add the appropriate clitic pronouns in `clitics` to the forms in `base_slot`. `store_cliticized_form` is a function -- of three arguments (clitic, formobj, cliticized_form) and should store the cliticized form for the specified clitic -- and form object. local function suffix_clitic_to_forms(base, base_slot, clitics, store_cliticized_form) if not base.forms[base_slot] then -- This can happen, e.g. in only3s/only3sp/only3p verbs. return end for _, formobj in ipairs(base.forms[base_slot]) do -- Figure out the correct accenting of the verb when a clitic pronoun is attached to it. We may need to -- add or remove an accent mark: -- (1) No accent mark currently, none needed: infinitive sentar -> sentarse; imperative singular ten -> tente; -- (2) Accent mark currently, still needed: infinitive concluír -> concluírse; -- (3) No accent mark currently, accent needed: imperative singular sinte -> síntete; -- (4) Accent mark currently, not needed: third singular sentirá -> sentirase, imperative singular dá -> date. local syllables = com.syllabify(formobj.form) local sylno = com.stressed_syllable(syllables) table.insert(syllables, "lo") -- arbitrary stand-in local needs_accent = com.accent_needed(syllables, sylno) if needs_accent then syllables[sylno] = com.add_accent_to_syllable(syllables[sylno]) else syllables[sylno] = com.remove_accent_from_syllable(syllables[sylno]) end table.remove(syllables) -- remove added clitic pronoun local reaccented_form = table.concat(syllables) for _, clitic in ipairs(clitics) do local cliticized_form -- Some further special cases. if base_slot:find("_1p$") and clitic == "nos" then -- Final -s disappears: sintamos + nos -> sintámonos cliticized_form = reaccented_form:gsub("s$", "") .. clitic elseif clitic:find("^[oa]s?$") then if reaccented_form:find("[rs]$") then cliticized_form = reaccented_form:gsub("[rs]$", "l") .. clitic elseif reaccented_form:find(V .. "[iu]$") then cliticized_form = reaccented_form .. "n" .. clitic else cliticized_form = reaccented_form .. clitic end else cliticized_form = reaccented_form .. clitic end store_cliticized_form(clitic, formobj, cliticized_form) end end end -- Add a reflexive pronoun or fixed clitic (FIXME: not working), as appropriate to the base forms that were generated. -- `do_joined` means to do only the forms where the pronoun is joined to the end of the form; otherwise, do only the -- forms where it is not joined and precedes the form. local function add_reflexive_or_fixed_clitic_to_forms(base, do_reflexive, do_joined) for _, slotaccel in ipairs(base.alternant_multiword_spec.verb_slots_basic) do local slot, accel = unpack(slotaccel) local clitic if not do_reflexive then clitic = base.clitic elseif slot:find("[123]") then local persnum = slot:match("^.*_(.-)$") clitic = person_number_to_reflexive_pronoun[persnum] else clitic = "se" end if base.forms[slot] then if do_reflexive and slot:find("^pp_") or slot == "infinitive_linked" then -- do nothing with reflexive past participles or with infinitive linked (handled at the end) elseif slot:find("^neg_imp_") then error("Internal error: Should not have forms set for negative imperative at this stage") else local slot_has_suffixed_clitic = not slot:find("_sub") -- Maybe generate non-reflexive parts and separated syntactic variants for use in -- {{gl-verb form of}}. See comment in add_slots() above `need_special_verb_form_of_slots`. -- Check for do_joined so we only run this code once. if do_reflexive and do_joined and base.alternant_multiword_spec.source_template == "gl-verb form of" and -- Skip personal variants of infinitives and gerunds so we don't think [[arrependendo]] is a -- non-reflexive equivalent of [[arrependendo-me]]. not slot:find("infinitive_") and not slot:find("gerund_") then -- Clone the forms because we will be destructively modifying them just below, adding the reflexive -- pronoun. insert_forms(base, slot .. "_non_reflexive", mw.clone(base.forms[slot])) if slot_has_suffixed_clitic then insert_forms(base, slot .. "_variant", iut.map_forms(base.forms[slot], function(form) return prefix_clitic_to_form(base, clitic, " ... ", form) end)) end end if slot_has_suffixed_clitic then if do_joined then suffix_clitic_to_forms(base, slot, {clitic}, function(clitic, formobj, cliticized_form) formobj.form = cliticized_form end ) end elseif not do_joined then -- Add clitic as separate word before all other forms. for _, form in ipairs(base.forms[slot]) do form.form = prefix_clitic_to_form(base, clitic, " ", form.form) end end end end end end local function handle_infinitive_linked(base) -- Compute linked versions of potential lemma slots, for use in {{gl-verb}}. -- We substitute the original lemma (before removing links) for forms that -- are the same as the lemma, if the original lemma has links. for _, slot in ipairs({"infinitive"}) do insert_forms(base, slot .. "_linked", iut.map_forms(base.forms[slot], function(form) if form == base.lemma and rfind(base.linked_lemma, "%[%[") then return base.linked_lemma else return form end end)) end end local function generate_negative_imperatives(base) -- Copy subjunctives to negative imperatives, preceded by "non". for _, persnum in ipairs(neg_imp_person_number_list) do local from = "pres_sub_" .. persnum local to = "neg_imp_" .. persnum insert_forms(base, to, iut.map_forms(base.forms[from], function(form) if base.alternant_multiword_spec.args.noautolinkverb then return "non " .. form elseif form:find("%[%[") then -- already linked, e.g. when reflexive return "[[non]] " .. form else return "[[non]] [[" .. form .. "]]" end end)) end end -- Process specs given by the user using 'addnote[SLOTSPEC][FOOTNOTE][FOOTNOTE][...]'. local function process_addnote_specs(base) for _, spec in ipairs(base.addnote_specs) do for _, slot_spec in ipairs(spec.slot_specs) do slot_spec = "^" .. slot_spec .. "$" for slot, forms in pairs(base.forms) do if rfind(slot, slot_spec) then -- To save on memory, side-effect the existing forms. for _, form in ipairs(forms) do form.footnotes = iut.combine_footnotes(form.footnotes, spec.footnotes) end end end end end end local function add_missing_links_to_forms(base) -- Any forms without links should get them now. Redundant ones will be stripped later. for slot, forms in pairs(base.forms) do for _, form in ipairs(forms) do if not form.form:find("%[%[") then form.form = "[[" .. form.form .. "]]" end end end end local function conjugate_verb(base) for _, vowel_alt in ipairs(base.vowel_alt_stems) do construct_stems(base, vowel_alt) add_present_indic(base) add_present_subj(base) end add_finite_non_present(base) add_non_finite_forms(base) -- do non-reflexive non-imperative slot overrides process_slot_overrides(base, function(slot) return not slot:find("^imp_") and not slot:find("^neg_imp_") end) -- This should happen after process_slot_overrides() in case a derived slot is based on an override -- (as with the imp_3s of [[dar]], [[estar]]). add_imperatives(base) -- do non-reflexive positive imperative slot overrides process_slot_overrides(base, function(slot) return slot:find("^imp_") end) -- We need to add joined reflexives, then joined and non-joined clitics, then non-joined reflexives, so we get -- [[arrepéndete]] but [[non]] [[te]] [[arrependas]]. if base.refl then add_reflexive_or_fixed_clitic_to_forms(base, "do reflexive", "do joined") process_slot_overrides(base, nil, "do reflexive") -- do reflexive-only slot overrides add_reflexive_or_fixed_clitic_to_forms(base, "do reflexive", false) end -- This should happen after add_reflexive_or_fixed_clitic_to_forms() so negative imperatives get the reflexive pronoun -- and clitic in them. generate_negative_imperatives(base) -- do non-reflexive negative imperative slot overrides -- FIXME: What about reflexive negative imperatives? process_slot_overrides(base, function(slot) return slot:find("^neg_imp_") end) -- This should happen before add_missing_links_to_forms() so that the comparison `form == base.lemma` -- in handle_infinitive_linked() works correctly and compares unlinked forms to unlinked forms. handle_infinitive_linked(base) process_addnote_specs(base) if not base.alternant_multiword_spec.args.noautolinkverb then add_missing_links_to_forms(base) end end local function parse_indicator_spec(angle_bracket_spec) -- Store the original angle bracket spec so we can reconstruct the overall conj spec with the lemma(s) in them. local base = { angle_bracket_spec = angle_bracket_spec, user_basic_overrides = {}, user_stems = {}, addnote_specs = {}, } local function parse_err(msg) error(msg .. ": " .. angle_bracket_spec) end local function fetch_footnotes(separated_group) local footnotes for j = 2, #separated_group - 1, 2 do if separated_group[j + 1] ~= "" then parse_err("Extraneous text after bracketed footnotes: '" .. table.concat(separated_group) .. "'") end if not footnotes then footnotes = {} end table.insert(footnotes, separated_group[j]) end return footnotes end local inside = angle_bracket_spec:match("^<(.*)>$") assert(inside) if inside == "" then return base end local segments = put.parse_balanced_segment_run(inside, "[", "]") local dot_separated_groups = put.split_alternating_runs(segments, "%.") for i, dot_separated_group in ipairs(dot_separated_groups) do local first_element = dot_separated_group[1] if first_element == "addnote" then local spec_and_footnotes = fetch_footnotes(dot_separated_group) if #spec_and_footnotes < 2 then parse_err("Spec with 'addnote' should be of the form 'addnote[SLOTSPEC][FOOTNOTE][FOOTNOTE][...]'") end local slot_spec = table.remove(spec_and_footnotes, 1) local slot_spec_inside = rmatch(slot_spec, "^%[(.*)%]$") if not slot_spec_inside then parse_err("Internal error: slot_spec " .. slot_spec .. " should be surrounded with brackets") end local slot_specs = rsplit(slot_spec_inside, ",") -- FIXME: Here, [[Module:it-verb]] called strip_spaces(). Generally we don't do this. Should we? table.insert(base.addnote_specs, {slot_specs = slot_specs, footnotes = spec_and_footnotes}) elseif indicator_flags[first_element] then if #dot_separated_group > 1 then parse_err("No footnotes allowed with '" .. first_element .. "' spec") end if base[first_element] then parse_err("Spec '" .. first_element .. "' specified twice") end base[first_element] = true elseif rfind(first_element, ":") then local colon_separated_groups = put.split_alternating_runs(dot_separated_group, "%s*:%s*") local first_element = colon_separated_groups[1][1] if #colon_separated_groups[1] > 1 then parse_err("Can't attach footnotes directly to '" .. first_element .. "' spec; attach them to the " .. "colon-separated values following the initial colon") end if overridable_stems[first_element] then if base.user_stems[first_element] then parse_err("Overridable stem '" .. first_element .. "' specified twice") end table.remove(colon_separated_groups, 1) base.user_stems[first_element] = overridable_stems[first_element](colon_separated_groups, {prefix = first_element, base = base, parse_err = parse_err, fetch_footnotes = fetch_footnotes}) else -- assume a basic override; we validate further later when the possible slots are available if base.user_basic_overrides[first_element] then parse_err("Basic override '" .. first_element .. "' specified twice") end table.remove(colon_separated_groups, 1) base.user_basic_overrides[first_element] = allow_multiple_values(colon_separated_groups, {prefix = first_element, base = base, parse_err = parse_err, fetch_footnotes = fetch_footnotes}) end else local comma_separated_groups = put.split_alternating_runs(dot_separated_group, "%s*,%s*") for j = 1, #comma_separated_groups do local alt = comma_separated_groups[j][1] if not vowel_alternants[alt] then if #comma_separated_groups == 1 then parse_err("Unrecognized spec or vowel alternant '" .. alt .. "'") else parse_err("Unrecognized vowel alternant '" .. alt .. "'") end end if base.vowel_alt then for _, existing_alt in ipairs(base.vowel_alt) do if existing_alt.form == alt then parse_err("Vowel alternant '" .. alt .. "' specified twice") end end else base.vowel_alt = {} end table.insert(base.vowel_alt, {form = alt, footnotes = fetch_footnotes(comma_separated_groups[j])}) end end end return base end -- Normalize all lemmas, substituting the pagename for blank lemmas and adding links to multiword lemmas. local function normalize_all_lemmas(alternant_multiword_spec, head) -- (1) Add links to all before and after text. Remember the original text so we can reconstruct the verb spec later. if not alternant_multiword_spec.args.noautolinktext then iut.add_links_to_before_and_after_text(alternant_multiword_spec, "remember original") end -- (2) Remove any links from the lemma, but remember the original form -- so we can use it below in the 'lemma_linked' form. iut.map_word_specs(alternant_multiword_spec, function(base) if base.lemma == "" then base.lemma = head end base.user_specified_lemma = base.lemma base.lemma = m_links.remove_links(base.lemma) local refl_verb = base.lemma local verb, refl = rmatch(refl_verb, "^(.-)(se)$") if not verb then verb, refl = refl_verb, nil end base.user_specified_verb = verb base.refl = refl base.verb = base.user_specified_verb local linked_lemma if alternant_multiword_spec.args.noautolinkverb or base.user_specified_lemma:find("%[%[") then linked_lemma = base.user_specified_lemma elseif base.refl then -- Reconstruct the linked lemma with separate links around base verb, reflexive pronoun and clitic. linked_lemma = base.user_specified_verb == base.verb and "[[" .. base.user_specified_verb .. "]]" or "[[" .. base.verb .. "|" .. base.user_specified_verb .. "]]" linked_lemma = linked_lemma .. (refl and "[[" .. refl .. "]]" or "") else -- Add links to the lemma so the user doesn't specifically need to, since we preserve -- links in multiword lemmas and include links in non-lemma forms rather than allowing -- the entire form to be a link. linked_lemma = iut.add_links(base.user_specified_lemma) end base.linked_lemma = linked_lemma end) end local function detect_indicator_spec(base) if (base.only3s and 1 or 0) + (base.only3sp and 1 or 0) + (base.only3p and 1 or 0) > 1 then error("Only one of 'only3s', 'only3sp' and 'only3p' can be specified") end base.forms = {} base.stems = {} base.basic_overrides = {} base.basic_reflexive_only_overrides = {} if not base.no_built_in then for _, built_in_conj in ipairs(built_in_conjugations) do if type(built_in_conj.match) == "function" then base.prefix, base.non_prefixed_verb = built_in_conj.match(base.verb) elseif built_in_conj.match:find("^%^") and rsub(built_in_conj.match, "^%^", "") == base.verb then -- begins with ^, for exact match, and matches base.prefix, base.non_prefixed_verb = "", base.verb else base.prefix, base.non_prefixed_verb = rmatch(base.verb, "^(.*)(" .. built_in_conj.match .. ")$") end if base.prefix then -- we found a built-in verb for stem, forms in pairs(built_in_conj.forms) do if type(forms) == "function" then forms = forms(base, base.prefix) end if stem:find("^refl_") then stem = stem:gsub("^refl_", "") if not base.alternant_multiword_spec.verb_slots_basic_map[stem] then error("Internal error: setting for 'refl_" .. stem .. "' does not refer to a basic verb slot") end base.basic_reflexive_only_overrides[stem] = forms elseif base.alternant_multiword_spec.verb_slots_basic_map[stem] then -- an individual form override of a basic form base.basic_overrides[stem] = forms else base.stems[stem] = forms end end break end end end -- Override built-in-verb stems and overrides with user-specified ones. for stem, values in pairs(base.user_stems) do base.stems[stem] = values end for override, values in pairs(base.user_basic_overrides) do if not base.alternant_multiword_spec.verb_slots_basic_map[override] then error("Unrecognized override '" .. override .. "': " .. base.angle_bracket_spec) end base.basic_overrides[override] = values end base.prefix = base.prefix or "" base.non_prefixed_verb = base.non_prefixed_verb or base.verb local inf_stem, suffix = rmatch(base.non_prefixed_verb, "^(.*)([aeiíoó]r)$") if not inf_stem then error("Unrecognized infinitive: " .. base.verb) end base.inf_stem = inf_stem suffix = suffix == "ór" and "or" or suffix == "ír" and "ir" or suffix base.conj = suffix base.conj_vowel = suffix == "ar" and "a" or suffix == "ir" and "i" or "e" base.frontback = suffix == "ar" and "back" or "front" if base.stems.vowel_alt then -- built-in verb with specified vowel alternation if base.vowel_alt then error(base.verb .. " is a recognized built-in verb, and should not have vowel alternations specified with it") end base.vowel_alt = iut.convert_to_general_list_form(base.stems.vowel_alt) end -- Propagate built-in-verb indicator flags to `base` and combine with user-specified flags. for indicator_flag, _ in pairs(indicator_flags) do base[indicator_flag] = base[indicator_flag] or base.stems[indicator_flag] end -- Convert vowel alternation indicators into stems. local vowel_alt = base.vowel_alt or {{form = "+"}} base.vowel_alt_stems = apply_vowel_alternations(base.inf_stem, vowel_alt) for _, vowel_alt_stems in ipairs(base.vowel_alt_stems) do if vowel_alt_stems.err then error("To use '" .. vowel_alt_stems.altobj.form .. "', present stem '" .. base.prefix .. base.inf_stem .. "' " .. vowel_alt_stems.err) end end end local function detect_all_indicator_specs(alternant_multiword_spec) -- Propagate some settings up; some are used internally, others by [[Module:gl-headword]]. iut.map_word_specs(alternant_multiword_spec, function(base) -- Internal indicator flags. Do these before calling detect_indicator_spec() because add_slots() uses them. for _, prop in ipairs { "refl", "clitic" } do if base[prop] then alternant_multiword_spec[prop] = true end end base.alternant_multiword_spec = alternant_multiword_spec end) add_slots(alternant_multiword_spec) alternant_multiword_spec.vowel_alt = {} iut.map_word_specs(alternant_multiword_spec, function(base) detect_indicator_spec(base) -- User-specified indicator flags. Do these after calling detect_indicator_spec() because the latter may set these -- indicators for built-in verbs. for prop, _ in pairs(indicator_flags) do if base[prop] then alternant_multiword_spec[prop] = true end end -- Vowel alternants. Do these after calling detect_indicator_spec() because the latter sets base.vowel_alt for -- built-in verbs. if base.vowel_alt then for _, altobj in ipairs(base.vowel_alt) do m_table.insertIfNot(alternant_multiword_spec.vowel_alt, altobj.form) end end end) end local function add_categories_and_annotation(alternant_multiword_spec, base, multiword_lemma) local function insert_ann(anntype, value) m_table.insertIfNot(alternant_multiword_spec.annotation[anntype], value) end local function insert_cat(cat, also_when_multiword) -- Don't place multiword terms in categories like 'Galician verbs ending in -ar' to avoid spamming the -- categories with such terms. if also_when_multiword or not multiword_lemma then m_table.insertIfNot(alternant_multiword_spec.categories, "Galician " .. cat) end end if check_for_red_links and alternant_multiword_spec.source_template == "gl-conj" and multiword_lemma then for _, slot_and_accel in ipairs(alternant_multiword_spec.all_verb_slots) do local slot = slot_and_accel[1] local forms = base.forms[slot] local must_break = false if forms then for _, form in ipairs(forms) do if not form.form:find("%[%[") then local title = mw.title.new(form.form) if title and not title.exists then insert_cat("verbs with red links in their inflection tables") must_break = true break end end end end if must_break then break end end end if(base.conj == "or") then insert_cat("verbs ending in -er") else insert_cat("verbs ending in -" .. base.conj) end if base.irreg then insert_ann("irreg", "irregular") insert_cat("irregular verbs") else insert_ann("irreg", "regular") end if base.only3s then insert_ann("defective", "impersonal") insert_cat("impersonal verbs") elseif base.only3sp then insert_ann("defective", "third-person only") insert_cat("third-person-only verbs") elseif base.only3p then insert_ann("defective", "third-person plural only") insert_cat("third-person-plural-only verbs") elseif base.no_pres_stressed or base.no_pres1_and_sub then insert_ann("defective", "defective") insert_cat("defective verbs") else insert_ann("defective", "regular") end if base.stems.short_pp then insert_ann("short_pp", "irregular short past participle") insert_cat("verbs with irregular short past participle") else insert_ann("short_pp", "regular") end if base.clitic then insert_cat("verbs with lexical clitics") end if base.refl then insert_cat("reflexive verbs") end if not base.vowel_alt then insert_ann("vowel_alt", "non-alternating") else for _, alt in ipairs(base.vowel_alt) do if alt.form == "+" then insert_ann("vowel_alt", "non-alternating") else insert_ann("vowel_alt", vowel_alternant_to_desc[alt.form]) insert_cat("verbs with " .. vowel_alternant_to_cat[alt.form]) end end end local cons_alt = base.stems.cons_alt if cons_alt == nil then if base.conj == "ar" then if base.inf_stem:find("z$") then cons_alt = "c-z" elseif base.inf_stem:find("c$") then cons_alt = "c-qu" elseif base.inf_stem:find("g$") then cons_alt = "g-gu" elseif base.inf_stem:find("gu$") then cons_alt = "gu-gü" end else if base.no_pres_stressed or base.no_pres1_and_sub then cons_alt = nil -- no e.g. c-z alternation in this case elseif base.inf_stem:find("c$") then cons_alt = "c-z" elseif base.inf_stem:find("qu$") then cons_alt = "c-qu" elseif base.inf_stem:find("gu$") then cons_alt = "g-gu" elseif base.inf_stem:find("gü$") then cons_alt = "gu-gü" end end end if cons_alt then local desc = cons_alt .. " alternation" insert_ann("cons_alt", desc) insert_cat("verbs with " .. desc) else insert_ann("cons_alt", "non-alternating") end end -- Compute the categories to add the verb to, as well as the annotation to display in the -- conjugation title bar. We combine the code to do these functions as both categories and -- title bar contain similar information. local function compute_categories_and_annotation(alternant_multiword_spec) alternant_multiword_spec.categories = {} local ann = {} alternant_multiword_spec.annotation = ann ann.irreg = {} ann.short_pp = {} ann.defective = {} ann.vowel_alt = {} ann.cons_alt = {} local multiword_lemma = false for _, form in ipairs(alternant_multiword_spec.forms.infinitive) do if form.form:find(" ") then multiword_lemma = true break end end iut.map_word_specs(alternant_multiword_spec, function(base) add_categories_and_annotation(alternant_multiword_spec, base, multiword_lemma) end) local ann_parts = {} local irreg = table.concat(ann.irreg, " or ") if irreg ~= "" and irreg ~= "regular" then table.insert(ann_parts, irreg) end local short_pp = table.concat(ann.short_pp, " or ") if short_pp ~= "" and short_pp ~= "regular" then table.insert(ann_parts, short_pp) end local defective = table.concat(ann.defective, " or ") if defective ~= "" and defective ~= "regular" then table.insert(ann_parts, defective) end local vowel_alt = table.concat(ann.vowel_alt, " or ") if vowel_alt ~= "" and vowel_alt ~= "non-alternating" then table.insert(ann_parts, vowel_alt) end local cons_alt = table.concat(ann.cons_alt, " or ") if cons_alt ~= "" and cons_alt ~= "non-alternating" then table.insert(ann_parts, cons_alt) end alternant_multiword_spec.annotation = table.concat(ann_parts, "; ") end local function show_forms(alternant_multiword_spec) local lemmas = alternant_multiword_spec.forms.infinitive alternant_multiword_spec.lemmas = lemmas -- save for later use in make_table() if alternant_multiword_spec.forms.short_pp_ms then alternant_multiword_spec.has_short_pp = true end local reconstructed_verb_spec = iut.reconstruct_original_spec(alternant_multiword_spec) local function transform_accel_obj(slot, formobj, accel_obj) -- No accelerators for negative imperatives, which are always multiword and derived directly from the -- present subjunctive. if slot:find("^neg_imp") then return nil end if accel_obj then if slot:find("^pp_") then accel_obj.form = slot elseif slot == "gerund" then accel_obj.form = "gerund-" .. reconstructed_verb_spec else accel_obj.form = "verb-form-" .. reconstructed_verb_spec end end return accel_obj end local props = { lang = lang, lemmas = lemmas, transform_accel_obj = transform_accel_obj, slot_list = alternant_multiword_spec.verb_slots_basic, } iut.show_forms(alternant_multiword_spec.forms, props) alternant_multiword_spec.footnote_basic = alternant_multiword_spec.forms.footnote end local notes_template = [=[ <div class="roa-footnote-outer-div" style="width:100%;"> <div class="roa-footnote-inner-div"> {footnote} </div></div> ]=] local basic_table = [=[ {description}<div class="NavFrame"> <div class="NavHead" align=center>&nbsp; &nbsp; Conjugation of {title}</div> <div class="NavContent" align="left"> {\op}| class="roa-inflection-table" data-toggle-category="inflection" |- ! class="roa-person-number-header" rowspan="2" | ! class="roa-person-number-header" colspan="3" | Singular ! class="roa-person-number-header" colspan="3" | Plural |- ! class="roa-person-number-header" style="width:12.5%" | First-person<br />(<<eu>>) ! class="roa-person-number-header" style="width:12.5%" | Second-person<br />(<<ti>>) ! class="roa-person-number-header" style="width:12.5%" | Third-person<br />(<<el>> / <<ela>> / <<vostede|Vde.>>) ! class="roa-person-number-header" style="width:12.5%" | First-person<br />(<<nós>>) ! class="roa-person-number-header" style="width:12.5%" | Second-person<br />(<<vós>>) ! class="roa-person-number-header" style="width:12.5%" | Third-person<br />(<<eles>> / <<elas>> / <<vostedes|Vdes.>>) |- ! class="roa-nonfinite-header" colspan="7" | ''<span title="infinitivo">Infinitive</span>'' |- ! class="roa-nonfinite-header" | '''<span title="infinitivo impersoal">Impersonal</span>''' | colspan="6" | {infinitive} |- ! class="roa-nonfinite-header" | '''<span title="infinitivo conxugado">Personal</span>''' | {pers_inf_1s} | {pers_inf_2s} | {pers_inf_3s} | {pers_inf_1p} | {pers_inf_2p} | {pers_inf_3p} |- ! class="roa-nonfinite-header" colspan="7" | ''<span title="xerundio">Gerund</span>'' |- | class="roa-nonfinite-header" | | colspan="6" | {gerund} |-{pp_clause} ! class="roa-indicative-left-rail" colspan="7" | ''<span title="indicativo">Indicative</span>'' |- ! class="roa-indicative-left-rail" | <span title="presente">Present</span> | {pres_1s} | {pres_2s} | {pres_3s} | {pres_1p} | {pres_2p} | {pres_3p} |- ! class="roa-indicative-left-rail" | <span title="pretérito imperfecto">Imperfect</span> | {impf_1s} | {impf_2s} | {impf_3s} | {impf_1p} | {impf_2p} | {impf_3p} |- ! class="roa-indicative-left-rail" | <span title="pretérito perfecto">Preterite</span> | {pret_1s} | {pret_2s} | {pret_3s} | {pret_1p} | {pret_2p} | {pret_3p} |- ! class="roa-indicative-left-rail" | <span title="pretérito pluscuamperfecto">Pluperfect</span> | {plup_1s} | {plup_2s} | {plup_3s} | {plup_1p} | {plup_2p} | {plup_3p} |- ! class="roa-indicative-left-rail" | <span title="futuro do presente">Future</span> | {fut_1s} | {fut_2s} | {fut_3s} | {fut_1p} | {fut_2p} | {fut_3p} |- ! class="roa-indicative-left-rail" | <span title="condicional">Conditional</span> | {cond_1s} | {cond_2s} | {cond_3s} | {cond_1p} | {cond_2p} | {cond_3p} |- ! class="roa-subjunctive-left-rail" colspan="7" | ''<span title="subxuntivo">Subjunctive</span>'' |- ! class="roa-subjunctive-left-rail" | <span title=" presente do subxuntivo">Present</span> | {pres_sub_1s} | {pres_sub_2s} | {pres_sub_3s} | {pres_sub_1p} | {pres_sub_2p} | {pres_sub_3p} |- ! class="roa-subjunctive-left-rail" | <span title="pretérito imperfecto do subxuntivo">Imperfect</span> | {impf_sub_1s} | {impf_sub_2s} | {impf_sub_3s} | {impf_sub_1p} | {impf_sub_2p} | {impf_sub_3p} |- ! class="roa-subjunctive-left-rail" | <span title="futuro do subxuntivo">Future</span> | {fut_sub_1s} | {fut_sub_2s} | {fut_sub_3s} | {fut_sub_1p} | {fut_sub_2p} | {fut_sub_3p} |- ! class="roa-imperative-left-rail" colspan="7" | ''<span title="imperativo">Imperative</span>'' |- ! class="roa-imperative-left-rail" | <span title="imperativo afirmativo">Affirmative</span> | rowspan="2" | | {imp_2s} | {imp_3s} | {imp_1p} | {imp_2p} | {imp_3p} |- ! class="roa-imperative-left-rail" | <span title="imperativo negativo">Negative</span> (<<non>>) | {neg_imp_2s} | {neg_imp_3s} | {neg_imp_1p} | {neg_imp_2p} | {neg_imp_3p} |{\cl}{notes_clause}</div></div> ]=] local double_pp_template = [=[ ! class="roa-nonfinite-header" colspan="7" | ''<span title="participio irregular">Short past participle</span>'' |- ! class="roa-nonfinite-header" | Masculine | colspan="3" | {short_pp_ms} | colspan="3" | {short_pp_mp} |- ! class="roa-nonfinite-header" | Feminine | colspan="3" | {short_pp_fs} | colspan="3" | {short_pp_fp} |- ! class="roa-nonfinite-header" colspan="7" | ''<span title="participio regular">Long past participle</span>'' |- ! class="roa-nonfinite-header" | Masculine | colspan="3" | {pp_ms} | colspan="3" | {pp_mp} |- ! class="roa-nonfinite-header" | Feminine | colspan="3" | {pp_fs} | colspan="3" | {pp_fp} |-]=] local single_pp_template = [=[ ! class="roa-nonfinite-header" colspan="7" | ''<span title="participio pasado">Past participle</span>'' |- ! class="roa-nonfinite-header" | Masculine | colspan="3" | {pp_ms} | colspan="3" | {pp_mp} |- ! class="roa-nonfinite-header" | Feminine | colspan="3" | {pp_fs} | colspan="3" | {pp_fp} |-]=] local function make_table(alternant_multiword_spec) local forms = alternant_multiword_spec.forms forms.title = link_term(alternant_multiword_spec.lemmas[1].form) if alternant_multiword_spec.annotation ~= "" then forms.title = forms.title .. " (" .. alternant_multiword_spec.annotation .. ")" end forms.description = "" -- Format the table. forms.footnote = alternant_multiword_spec.footnote_basic forms.notes_clause = forms.footnote ~= "" and m_string_utilities.format(notes_template, forms) or "" -- has_short_pp is computed in show_forms(). local pp_template = alternant_multiword_spec.has_short_pp and double_pp_template or single_pp_template forms.pp_clause = m_string_utilities.format(pp_template, forms) local table_with_pronouns = rsub(basic_table, "<<([^<>|]-)|([^<>|]-)>>", link_term) local table_with_pronouns = rsub(table_with_pronouns, "<<(.-)>>", link_term) return require("Module:TemplateStyles")("Module:roa-verb/style.css") .. m_string_utilities.format(table_with_pronouns, forms) end -- Externally callable function to parse and conjugate a verb given user-specified arguments. -- Return value is WORD_SPEC, an object where the conjugated forms are in `WORD_SPEC.forms` -- for each slot. If there are no values for a slot, the slot key will be missing. The value -- for a given slot is a list of objects {form=FORM, footnotes=FOOTNOTES}. function export.do_generate_forms(args, source_template, headword_head) local PAGENAME = mw.loadData("Module:headword/data").pagename local function in_template_space() return mw.title.getCurrentTitle().nsText == "Template" end -- Determine the verb spec we're being asked to generate the conjugation of. This may be taken from the -- current page title or the value of |pagename=; but not when called from {{gl-verb form of}}, where the -- page title is a non-lemma form. Note that the verb spec may omit the infinitive; e.g. it may be "<i-e>". -- For this reason, we use the value of `pagename` computed here down below, when calling normalize_all_lemmas(). local pagename = source_template ~= "gl-verb form of" and args.pagename or PAGENAME local head = headword_head or pagename local arg1 = args[1] if not arg1 then if (pagename == "gl-conj" or pagename == "gl-verb") and in_template_space() then arg1 = "paliar<í,+>" elseif pagename == "gl-verb form of" and in_template_space() then arg1 = "amar" else arg1 = "<>" end end -- When called from {{gl-verb form of}}, determine the non-lemma form whose inflections we're being asked to -- determine. This normally comes from the page title or the value of |pagename=. local verb_form_of_form if source_template == "gl-verb form of" then verb_form_of_form = args.pagename if not verb_form_of_form then if PAGENAME == "gl-verb form of" and in_template_space() then verb_form_of_form = "ame" else verb_form_of_form = PAGENAME end end end local incorporated_headword_head_into_lemma = false if arg1:find("^<.*>$") then -- missing lemma if head:find(" ") then -- If multiword lemma, try to add arg spec after the first word. -- Try to preserve the brackets in the part after the verb, but don't do it -- if there aren't the same number of left and right brackets in the verb -- (which means the verb was linked as part of a larger expression). local refl_clitic_verb, post = rmatch(head, "^(.-)( .*)$") local left_brackets = rsub(refl_clitic_verb, "[^%[]", "") local right_brackets = rsub(refl_clitic_verb, "[^%]]", "") if #left_brackets == #right_brackets then arg1 = iut.remove_redundant_links(refl_clitic_verb) .. arg1 .. post incorporated_headword_head_into_lemma = true else -- Try again using the form without links. local linkless_head = m_links.remove_links(head) if linkless_head:find(" ") then refl_clitic_verb, post = rmatch(linkless_head, "^(.-)( .*)$") arg1 = refl_clitic_verb .. arg1 .. post else error("Unable to incorporate <...> spec into explicit head due to a multiword linked verb or " .. "unbalanced brackets; please include <> explicitly: " .. arg1) end end else -- Will be incorporated through `head` below in the call to normalize_all_lemmas(). incorporated_headword_head_into_lemma = true end end local function split_bracketed_runs_into_words(bracketed_runs) return put.split_alternating_runs(bracketed_runs, " ", "preserve splitchar") end local parse_props = { parse_indicator_spec = parse_indicator_spec, -- Split words only on spaces, not on hyphens, because that messes up reflexive verb parsing. split_bracketed_runs_into_words = split_bracketed_runs_into_words, allow_default_indicator = true, allow_blank_lemma = true, } local alternant_multiword_spec = iut.parse_inflected_text(arg1, parse_props) alternant_multiword_spec.pos = pos or "verbs" alternant_multiword_spec.args = args alternant_multiword_spec.source_template = source_template alternant_multiword_spec.verb_form_of_form = verb_form_of_form alternant_multiword_spec.incorporated_headword_head_into_lemma = incorporated_headword_head_into_lemma normalize_all_lemmas(alternant_multiword_spec, head) detect_all_indicator_specs(alternant_multiword_spec) local inflect_props = { slot_list = alternant_multiword_spec.all_verb_slots, inflect_word_spec = conjugate_verb, -- We add links around the generated verbal forms rather than allow the entire multiword -- expression to be a link, so ensure that user-specified links get included as well. include_user_specified_links = true, } iut.inflect_multiword_or_alternant_multiword_spec(alternant_multiword_spec, inflect_props) -- Remove redundant brackets around entire forms. for slot, forms in pairs(alternant_multiword_spec.forms) do for _, form in ipairs(forms) do form.form = iut.remove_redundant_links(form.form) end end compute_categories_and_annotation(alternant_multiword_spec) if args.json and source_template == "gl-conj" then return require("Module:JSON").toJSON(alternant_multiword_spec.forms) end return alternant_multiword_spec end -- Entry point for {{gl-conj}}. Template-callable function to parse and conjugate a verb given -- user-specified arguments and generate a displayable table of the conjugated forms. function export.show(frame) local parent_args = frame:getParent().args local params = { [1] = {}, ["noautolinktext"] = {type = "boolean"}, ["noautolinkverb"] = {type = "boolean"}, ["pagename"] = {}, -- for testing/documentation pages ["json"] = {type = "boolean"}, -- for bot use } local args = require("Module:parameters").process(parent_args, params) local alternant_multiword_spec = export.do_generate_forms(args, "gl-conj") if type(alternant_multiword_spec) == "string" then -- JSON return value return alternant_multiword_spec end show_forms(alternant_multiword_spec) return make_table(alternant_multiword_spec) .. require("Module:utilities").format_categories(alternant_multiword_spec.categories, lang, nil, nil, force_cat) end return export 1okua0q3nnz7rbevgynqltt8ehbr5k0