Wikikamus
mswiktionary
https://ms.wiktionary.org/wiki/Wikikamus:Laman_Utama
MediaWiki 1.47.0-wmf.4
case-sensitive
Media
Khas
Perbincangan
Pengguna
Perbincangan pengguna
Wikikamus
Perbincangan Wikikamus
Fail
Perbincangan fail
MediaWiki
Perbincangan MediaWiki
Templat
Perbincangan templat
Bantuan
Perbincangan bantuan
Kategori
Perbincangan kategori
Lampiran
Perbincangan lampiran
Rima
Perbincangan rima
Tesaurus
Perbincangan tesaurus
Indeks
Perbincangan indeks
Petikan
Perbincangan petikan
Rekonstruksi
Perbincangan rekonstruksi
Padanan isyarat
Perbincangan padanan isyarat
Konkordans
Perbincangan konkordans
TimedText
TimedText talk
Modul
Perbincangan modul
Acara
Perbincangan acara
hidung
0
5158
344455
333100
2026-05-26T13:05:08Z
Hakimi97
2668
/* Terjemahan */
344455
wikitext
text/x-wiki
{{wikipedia}}
==Bahasa Melayu==
[[Fail:Neus1.jpg|thumb|upright|Hidung manusia]]
===Kata nama===
{{ms-kn}}
# Suatu [[organ]] di muka untuk [[cium|mencium]] atau [[sedut|menyedut]] [[udara]].
#: ''Kita bernafas melalui hidung siang dan malam.''
# {{lb|ms|kiasan}} bahagian depan sesuatu benda, [[muncung]].
#: ''Lihat hidung kapal terbang itu.''
====Kata majmuk====
*'''batang hidung'''
# tulang yang membina hidung.
# {{konteks|ms|kiasan}} kelibat (imbasan) seseorang atau sesuatu.
*'''kena batang hidung''': {{konteks|ms|kiasan}} (berkenaan kecaman, sindiran) tepat mengenai seseorang.
*'''lubang hidung''': bahagian yang berlubang pada hidung untuk membolehkan kita mencium dan menyedut udara.
*'''sekat hidung''': bahagian antara kedua-dua lubang hidung.
*'''tidak nampak batang hidung''', '''tidak nampak muka hidung''': {{konteks|ms|kiasan}} tidak kelihatan langsung rupa seseorang kerana tidak hadir, tidak pernah muncul.
====Kata terbitan====
* berhidung: mempunyai hidung.
* menghidung: mengucapkan sesuatu melalui hidung (dengan sengau).
===Etimologi===
Daripada {{inh|ms|poz-mly-pro|*hiduŋ}}, daripada {{inh|ms|poz-pro|*ijuŋ}}, {{m|poz-pro|*ujuŋ}}, dari[ada {{inh|ms|map-pro|*mujiŋ}}.
===Sebutan===
* {{dewan|hi|dung}}
* {{a|Johor-Selangor}} {{IPA|ms|/hidoŋ/}}
* {{a|Riau-Lingga}} {{IPA|ms|/hidʊŋ/}}
* {{rhymes|ms|idoŋ|doŋ|oŋ}}
* {{audio|ms|Ms-MY-hidung.ogg|Audio (MY)}}
===Tulisan Jawi===
{{ARchar|هيدوڠ}}
===Terjemahan===
{{ter-atas|organ hidu}}
* Ainu: エツ゜ (’etu)
* Arab: {{ARchar|أنفٌ}} {{IPAchar|(’anf)}}
* Belanda: {{t+|nl|neus|m}}
* Catalonia: nas
* Cina: [[鼻子]] (bízi)
* Czech: {{t-|cs|nos|m}}
* Denamrk: næse {{c}} (''manusia''), snude {{c}} (''haiwan'')
* Esperanto: {{t-|eo|nazo|xs=Esperanto}}
* Farsi: {{FAchar|بینی}} (bini), {{FAchar|دماغ}} (damâgh)
* Finland: {{t+|fi|nenä}}
* Galicia: nariz
* Georgia: {{t-|ka|ცხვირი}}
* Greek, Kuno: ῥίς (rhis)
* Greek, Moden: {{t+|el|μύτη|f|s|sc=Grek}} (míti)
* Hungary: {{t+|hu|orr}}
* Ibrani: {{t+|he|אף|tr=af}} , {{t+|he|חוטם|tr=khótem}}
* Inggeris: {{t+|en|nose}}
* Itali: {{t+|it|naso|m}}
* Jepun: [[鼻]] (はな, haná)
* Jerman: {{t+|de|Nase|f}}
* Korea: [[코]] (ko)
* Kurdi: {{KUchar|لووت}}
* Latin: {{t+|la|nasus}}
* Latvia: {{t-|lv|deguns|m}}
* Malayalam: മൂക്ക് (mookku)
* Malta: {{t-|mt|mnieħer|m|xs=Malta}}
* Occitan: {{t-|oc|nas|m}}
* Perancis: {{t+|fr|nez|m}}
* Poland: {{t+|pl|nos|m}}
* Portugis: {{t+|pt|nariz|m}}
* Rusia: нос (nos)
* Sepanyol: {{t+|es|nariz|f}}
* Slovenia: {{t+|sl|nos|m}}
* Sorbia Tinggi: nós
* Sorbia Rendah: nos
* Swahili: pua ''(kata nama 9/10)''
* Sweden: näsa (''manusia'') {{c}}
* Tagalog: ilong
* Telugu: ముక్కు (mukku)
{{ter-bawah}}
===Tesaurus===
====Sinonim====
{{sinonim dialek|ms}}
===Rujukan===
* {{R:KD4}}
===Pautan luar===
* {{R:PRPM}}
{{C|ms|Muka}}
==Bahasa Indonesia==
{{wikipedia|lang=id}}
===Kata nama===
{{id-noun}}
# hidung
===Etimologi===
Daripada {{der|id|ms|hidung}}, daripada {{inh|id|poz-mly-pro|*hiduŋ}}, daripada {{inh|id|poz-pro|*ijuŋ}}, {{m|poz-pro|*ujuŋ}}, daripada {{inh|id|map-pro|*mujiŋ}}.
===Pautan luar===
* {{R:KBBI Daring}}
{{C|id|Muka}}
an9e0r0nocly269i4saomr47mgbr3ie
api
0
5294
344456
333073
2026-05-26T13:06:04Z
Hakimi97
2668
344456
wikitext
text/x-wiki
{{wikipedia}}
==Bahasa Melayu==
[[Fail:Large bonfire.jpg|thumb|Nyalaan api]]
[[Fail:Aardgasfornuisvlam.jpg|thumb|Api dapur]]
[[Fail:Building 7 fire.jpg|thumb|Kebakaran]]
===Kata nama===
{{ms-kn}}
# [[nyala]]an daripada sesuatu yang dibakar atau yang terbakar.
#: ''Api kebakaran itu kelihatan menjulang-julang.''
# kepanasan ([[haba]]) yang digunakan untuk memasak terutama daripada penunu dapur yang dinyalakan.
#: ''Letakkan kuali di atas api.''
# [[kebakaran]] (biasanya diucapkan dalam keadaan cemas).
#: ''"Api! Api!" Hamid berteriak.''
# {{konteks|ms|basahan}} [[elektrik]].
#: ''Bil '''api''' bulan ini sudah sampai.''
# {{konteks|ms|basahan}} mancis api atau pemetik api (untuk menyalakan susuatu).
# {{konteks|ms|kiasan}} sesuatu perasaan (seperti marah, suka, rindu, cinta, dsb), semangat atau harapan yang meluap-luap di dalam hati (fikiran).
#: ''Api percintaan sedang membakar seluruh jantung hatinya.''
====Bentuk alternatif====
=====Bahasa isyarat=====
<gallery>
BIM api.webm|Bahasa Isyarat Malaysia
</gallery>
====Kata terbitan ====
* berapi: mengandungi api.
* berapi-api:
*# merah menyala, terlalu marah;
*# berkobar-kobar, bersemangat.
* mengapi: menjadi seperti atau menyerupai api.
* mengapikan: menghasut.
* memperapikan: memanggang.
* perapian: tempat api, keran.
===Etimologi===
Dari keluarga Melayu-Polinesia.
===Sebutan===
{{dewan|a|pi}}
* {{a|Sebutan baku (Kamus Dewan Perdana)}} {{IPA|ms|/a.pi/}}
* {{audio|ms|LL-Q9237 (msa)-Hakimi97-api.wav|Audio (MY-zsm)}}
===Tulisan Jawi===
{{ARchar|اڤي}}
===Terjemahan===
{{ter-atas|nyalaan sesuatu yang dibakar}}
* Afrikaan: vuur
* Ainu: アペ (ape)
* Albania: {{t-|sq|zjarr|m}}
* Aleut: ca-nak
* Arab: {{ARchar|نَارٌ}} (nar) {{f}}, {{ARchar|نِيرَان}} {{IPAchar|(niráːn)}} {{p}}
* Arami:
*: Syriak: ܢܘܪܐ (nūrā, nūro) {{f}}
*: Ibrani: נורא (nūrā, nūro) {{f}}
* Armenia: կրակ (krak), հրդեհ (hrdéh)
* Basque: su
* Belanda: {{t+|nl|vuur|n}}
* Bosnia: {{t-|bs|vatra|f}}, {{t-|bs|oganj|m}}
* Bulgaria: огън (ogən)
* Catalonia: {{t+|ca|foc|m}}
* Cina: {{Hani|[[火]]}}
*: Mandarin: (huǒ)
* Croatia: {{t+|hr|vatra|f}}
* Czech: {{t-|cs|oheň|m}}
* Denmark: {{t|da|ild|c}}
* Esperanto: {{t-|eo|fajro|xs=Esperanto}}
* Farsi: {{FAchar|آتش}} (âtaš), {{FAchar|آذر}} (âzar)
* Finland: {{t+|fi|tuli}}
* Frisia: fjoer {{n}}
* Galicia: lume
* Gaelik Scot: teine
* Greek: {{t+|el|φωτιά|f|tr=fotiá|sc=Grek}}
* Guaraní: rata, tata
* Hawaii: ahi
* Hindi: आग (āg) {{f}}
* Hittite: {{t+|hit|𒉺𒀪𒄯|tr=paḫḫur|n}}
* Hungary: {{t+|hu|tűz}}
* Ibrani: {{t+|he|אש|eš|wv=אֵשׁ}} {{f}}
* Iceland: {{t+|is|eldur|m}}, {{t+|is|bál|n}}
* Igbo: ọku
* Inggeris: {{t+|en|fire}}
* Ireland: {{t-|ga|tine|m}}
* Itali: {{t+|it|fuoco|m}}
* Jepun: [[火]] (ひ, hi)
* Jerman: {{t+|de|Feuer|n}}
* Korea: [[불]] (bul)
* Kurdi:
*: Kurmanji: {{t+|ku|agir}} {{g|Kurdi}}, {{t+|ku|nar|f}}
*: Sorani: {{t+|ku|ئاگر|tr=Agir|sc=KUchar}}
* Lao: ໄຟ (fai)
* Latin: {{t+|la|ignis|m}}, {{t-|la|focus|m}}
* Latvia: degšana {{f}}, uguns {{f}}
* Mapudungun: kütral
* Malayalam: തീ (thee), അഗ്നി (agni)
* Maléku Jaíka: kúe
* Malta: {{t-|mt|nar|f}}
* Manx: aile
* Maori: {{t+|mi|ahi}}
* Miskito: pata
* Norway: {{t-|no|ild|m}}
* Novial: faire
* Occitan: fuòc
* Perancis: {{t+|fr|feu|m}}
* Poland: {{t+|pl|ogień|m}}
* Portugis: {{t+|pt|fogo|m}}
* Prusia Lama: pannu
* Rohingya: ooin
* Romani: jag
* Romania: {{t-|ro|foc|n}}
* Romansch: fieu
* Rusia: горение (gorjénije) {{n}} ''(pembakaran)'', огонь (ogón’) , пламя (plámja) {{n}} ''(marak)''
* Sepanyol: {{t+|es|fuego|m}}
* Serbia:
*: Cyril: {{t-|sr|ватра|f|sc=Cyrl}}, {{t-|sr|огањ|m|sc=Cyrl}}
*: Rumi: {{t-|sr|vatra|f}}, {{t-|sr|oganj|m}}
* Slovakia: {{t-|sk|oheň|m}}
* Slovenia: {{t+|sl|ogenj|m}}
* Sumeria: {{t+|sux|sc=Xsux|𒉈|tr=NE}}
* Swahili: {{t-|sw|moto}}
* Sweden: {{t+|sv|eld|c}}, {{t+|sv|brand|c}}
* Tamazight: afa , timess(i) {{f}}
*Tamil:நெருப்பு(neruppu)
* Telugu: మంట (maMTa)
* Thai: {{THchar|ไฟ}} (fai)
* Tokharia A: {{t+|xto|por}}
* Tokharia B: {{t+|txb|puwar}}
* Turki: {{t+|tr|ateş}}
* Ukraine: вогонь (vogón’)
* Vietnam: lửa, hoả ''(jarang)''
* Wales: {{t-|cy|tân|m}}
* Xhosa: umlilo
* Yunani Kuno: {{polytonic|πῦρ}} (pyr) {{n}}
* Zhuang: feiz
{{ter-bawah}}
{{ter-atas|kebakaran}}
* Afrikaan: vuur
* Arab: {{ARchar|حَرِيق}} {{IPAchar|(ħaríːq)}}
* Catalonia: incendi
* Cina:
*: Mandarin: {{zh-ts|[[火災]]|[[火灾]]}} (huǒzāi)
* Croatia: {{t-|hr|požar|m}}
* Czech: {{t-|cs|požár|m}}
* Denmark: {{t-|da|brand|c}}
* Belanda: {{t+|nl|brand|m}}
* Esperanto: {{t-|eo|brulego|xs=Bahasa Esperanto}}, {{t-|eo|incendio|xs=Bahasa Esperanto}}
* Finland: {{t-|fi|tulipalo}}, {{t+|fi|palo}}
* Frisia: brân {{g|Frisia}}
* Gaelik Scot: teine
* Greek: {{t+|el|φωτιά|f|tr=fotiá|sc=Grek}}, {{t+|el|πυρκαγιά|f|tr=pirkaɣiá|sc=Grek}}
* Ibrani: {{t+|he|שריפה|srefá}} {{f}}
* Iceland: {{t+|is|eldur|m}}
* Inggeris: {{t+|en|fire}}
* Ireland: {{t-|ga|tine|m|xs=Ireland}}
* Itali: {{t+|it|incendio|m}}, {{t+|it|rogo|m}}
* Jepun: [[火事]] (かじ, káji), [[火災]] (かさい, kasái)
* Jerman: {{t+|de|Feuer|n}}, {{t+|de|Brand|m}}
* Korea: [[큰불]] (keunbul), [[화재]] (hwajae)
* Kurdi:
*: Kurmanji: {{t+|ku|agir}} {{g|Kurdi}}
*: Sorani: {{t+|ku|ئاگر|tr=Agir|sc=KUchar}}
* Latin: {{t-|la|incendium|n}}
* Norway: {{t-|no|brann|m}}
* Perancis: {{t+|fr|incendie|f}}
* Poland: {{t-|pl|pożar|m}}
* Portugis: {{t-|pt|incêndio|m}}
* Rusia: [[пожар]] (požár)
* Sepanyol: {{t-|es|incendio|m}}
* Slovenia: {{t-|sl|požar|m}}
* Sweden: {{t-|sv|brasa|c}}, {{t+|sv|brand|c}}
* Thai: {{THchar|เพลิง}} (phleerng)
* Vietnam: vụ [[cháy]]
* Xhosa: umlilo
* Wales: {{t-|cy|tân|xs=Bahasa Wales}}
{{ter-bawah}}
===Tesaurus===
====Sinonim====
{{sinonim dialek|ms}}
==Bahasa Iban==
===Kata nama===
{{inti|iba|kata nama}}
# api
===Sebutan===
* {{audio|iba|LL-Q33424 (iba)-Song GK-api.wav}}
===Rujukan===
{{R:KIMD2}}
==Bahasa Indonesia==
* Lihat takrifan bahasa Melayu.
jgw43heuy7aco0h3d2zh7u3ailmncru
ekor
0
5456
344457
333062
2026-05-26T13:06:26Z
Hakimi97
2668
344457
wikitext
text/x-wiki
==Bahasa Melayu==
[[Imej:Ring tailed lemurs.jpg|thumb|Kandau berekor panjang]]
[[Imej:Cerf-volant 2667 2.jpg|thumb|Wau berekor panjang]]
===Kata nama===
{{ms-kn}}
# bahagian yang di [[belakang]] sekali pada tubuh [[binatang]] (biasanya seperti menganjur keluar dari tulang punggung dan boleh digerak-gerakkan).
#: ''Ekor ikan pari panjang dan tirus ke hujung.''
# sesuatu yang menyerupai ekor.
#: ''Ekor layang-layang itu gunanya ialah supaya layang-layang itu tidak terjal.''
# bahagian yang paling belakang.
#: ''Ekor perarakan itu baru saja lalu di sini.''
# {{lb|ms|kasar}} pengikut, penganut.
{{ms-pb}}
# [[penjodoh bilangan]] untuk binatang.
#: ''Aku ada empat ekor lembu.''
# {{lb|ms|kasar}} penjodoh bilangan untuk anak.
#: ''Anak empat ekor tu, siapa yang menjaganya?''
===Terbitan===
* berekor: mempunyai ekor.
* berekor-ekor: berikut-ikut, berlarut-larut.
* berekoran: perkembangan, lanjutan daripada.
* ekoran: akibat, lanjutan.
* mengekor:
*# bergayut seperti ekor;
*# mengikut.
* mengekori: mengikuti.
* pengekor: pengikut, penganut.
* pengekoran: perbuatan mengekori.
===Sebutan===
{{dewan|é|kor}}
===Terjemahan===
{{ter-atas|ekor haiwan}}
* Arab: {{ARchar|ذنب}} {{Unicode|(ðánab)}}
* Aragon: coda {{f}}
* Belanda: staart
* Bosnia: rep
* Catalonia: cua {{f}}
* Cina: [[尾巴]] (wěibā)
* Croatia: rep
* Czech: ocas
* Denmark: hale {{c}}
* Finland: häntä (''kucing, anjing dsb.''), pyrstö (''burung dan ikan'')
* Frisia: sturt
* Gaelik Scot: earball
* Hungary: farok
* Ibrani: {{t+|he|זנב|tr=zanáv}}
* Iceland: hali (''lembu, reptilia, amfibia, semua haiwan yang tidak tergolong dalam kategori lain; juga digunakan untuk benda bukan hidup dan secara kiasan''), skott {{n}} atau rófa {{f}} (''kucing, anjing, monyet, dsb.''), tagl (''kuda''), dindill (''ekor gebu pada biri-biri, arnab, dsb.''), stél {{n}} (''burung''), sporður (''ikan'')
* Inggeris: {{t+|en|tail}}
* Itali: coda {{f}}
* Jepun: [[尻尾]] (しっぽ, shippo)
* Jerman: Schwanz
* Korea: [[꼬리]] (kkori)
* Kuna: bunnu
* Kurdi: {{KUchar|کلک}}
* Latin: cauda
* Latvia: aste {{f}}
* Malayalam: വാല് (vaal)
* Norway: hale
* Perancis: queue {{f}}
* Portugis: rabo , cauda {{f}}
* Poland: ogon
* Rusia: хвост (xvost)
* Sepanyol: cola {{f}}
* Serbia:
*: Cyril: реп
*: Rumi: rep
* Slovak: chvost
* Swahili: mkia ''(nc 3/4)''
* Sweden: svans {{c}}
* Tagalog: buntot {{n}}
* Telugu: తోక (tOka)
{{ter-bawah}}
{{ter-atas|penjodoh bilangan untuk haiwan}}
* Cina: {{zh-ts|[[隻]]|[[只]]}} (zhī, ''untuk kebanyakan haiwan''), {{Hani|[[匹]]}} (pǐ, ''untuk kuda dan haiwan tunggangan''), {{zh-ts|[[頭]]|[[头]]}} (tóu, ''untuk lembu, khinzir''), {{zh-ts|[[條]]|[[条]]}} (tiáo, ''untuk ikan, ular, haiwan yang panjang, tipis dan melentur'')
* Jepun: {{JAchar|[[匹]]}} (hiki, piki, ''untuk haiwan kecil''), {{JAchar|[[頭]]}} (tō, ''untuk haiwan besar'')
{{ter-bawah}}
===Tulisan Jawi===
{{ARchar|ايكور}}
==Bahasa Indonesia==
# Lihat takrifan bahasa Melayu.
===Tesaurus===
* (sinonim) [[buntut]].
gvjtijt4gkdv5gdpgt6ro02u4r21lyp
zat
0
7005
344458
333260
2026-05-26T13:07:33Z
Hakimi97
2668
344458
wikitext
text/x-wiki
==Bahasa Melayu==
===Kata nama===
{{ms-kn}}
# sesuatu yang menyebabkan [[wujud]]nya sesuatu benda atau yang menjadi [[bahagian]] daripada sesuatu yang lain; [[unsur]].
# [[pati]] atau [[inti]] daripada sesuatu.
{{ms-ks}}
* berzat: mempunyai atau ada zat.
===Etimologi===
Daripada {{etyl|ar|ms}}.
===Sebutan===
{{dewan|zat}}
* {{IPA|ms|/zat̚/}}
===Tulisan Jawi===
{{ARchar|ذات}}
===Terjemahan===
{{ter-atas|unsur}}
* Belanda: substantie {{f}}
* Czech: látka {{f}}
* Denmark: substans, masse
* Finland: aine, materia
* Greek: ουσία (usía) {{f}}
* Hungary: anyag, tartalom
* Ibrani: {{t+|he|חומר|tr=khómer}}
* Indonesia: substansi, zat
* Inggeris: substance, matter
* Jepun: {{Jpan|物質}} (busshitsu)
* Jerman: Substanz {{f}}, Stoff
* Latvia: viela {{f}}
* Norway: substans , masse
* Perancis: substance {{f}}
* Poland: substancja {{f}}
* Portugis: substância {{f}}
* Rusia: {{Cyrl|вещество}} (veščestvó) {{n}}
* Sepanyol: sustancia {{f}}
* Sweden: ämne {{n}}, substans {{c}}
* Telugu: పదార్థము (padaarthamu)
* Turki: madde
{{ter-bawah}}
{{ter-atas|inti}}
* Denmark: substans, hovedindhold
* Finland: ydin, substanssi
* Greek: ουσία (usía) {{f}}
* Hungary: lényeg
* Ibrani: {{t+|he|תוכן|tókhen}}
* Indonesia: zat
* Inggeris: substance, essence
* Jepun: {{Jpan|骨子}} (kosshi)
* Jerman: Substanz {{f}}
* Norway: substans
* Perancis: substance {{f}}
* Poland: istota {{f}}
* Portugis: substância {{f}}
* Sepanyol: sustancia {{f}}
* Sweden: substans {{c}}
{{ter-bawah}}
==Bahasa Indonesia==
* Lihat takrifan bahasa Melayu.
==Bahasa Inggeris==
===Kata nama===
{{inti|en|kata nama}}
# nutrient
#: {{cp|en|This food contains many '''nutrients'''.|Makanan ini mengandungi banyak '''zat'''.}}
==Bahasa Iban==
===Kata nama===
{{inti|iba|kata nama}}
# zat
#: {{cp|iba|Kitai mesti makai pemakai ti ngudan mayuh '''zat'''.|Kita mesti makan makanan yang mengandungi banyak '''zat'''.}}
exk9deifkwgqwk4ptp9j6akjapyetgw
logam
0
7329
344459
333080
2026-05-26T13:07:39Z
Hakimi97
2668
344459
wikitext
text/x-wiki
{{wikipedia}}
==Bahasa Melayu==
[[Fail:Heap metal.jpg|thumb|Logam sekerap]]
===Kata nama===
{{ms-kn}}
# [[unsur]] kimia yang membentuk ikatan logam seperti besi, emas, perak, tembaga, dll yang biasanya [[kilau|berkilau]], [[mulur]], membentuk [[ion]] positif, dan menjadi [[pengalir]] haba dan elektrik yang baik.
# bahan dengan sifat fizik serupa seperti logam, contohnya [[pancalogam]].
====Kata terbitan====
* berlogam:
# mengandungi (terdapat) logam.
#: bahan berlogam; kawasan berlogam.
* perlogaman:
# hal yang berkaitan dengan logam.
#: industri perlogaman.
===Etimologi===
Daripada {{der|ms|ta|உலோகம்|tr=ulōkam}}, daripada {{der|ms|sa|लोह|sc=Deva|tr=loha}}.
===Sebutan===
* {{dewan|lo|gam}}
* {{audio|ms|ms-MY-logam.ogg|Audio (MY)}}
===Tulisan Jawi===
{{ARchar|لوڬم}}
===Terjemahan===
{{ter-atas|unsur atom atau bahan buatan atom sedemikia}}
* Afrikaans: [[metaal]]
* Arab: {{t+|ar|معدن|m|tr=máʕdan|sc=Arab}}
* Armenia: [[մետաղ]] (metaġ)
* Azeri: {{t-|az|metal|xs=Azeri}}
* Basque: [[metal]]
* Belanda: {{t+|nl|metaal|n}}
* Breton: metal , -où {{p}}
* Catalonia: [[metall]]
* Cina: [[金]] (jīn), [[金屬]] (jīnshǔ)
* Croatia: {{t-|hr|metal|m}}, {{t+|hr|kovina|f}}
* Czech: {{t-|cs|kov|m}}
* Denmark: {{t-|da|metal}}
* Esperanto: {{t-|eo|metalo|xs=Bahasa_Esperanto}}
* Estonia: {{t-|et|metall}}
* Ewe: [[ga]]
* Finland: {{t+|fi|metalli}}
* Georgia: {{t-|ka|ლითონი|tr=lit’oni|sc=Geor|xs=Bahasa_Georgia}}
* Greek:
*: Kuno: {{tø|grc|μέταλλον|n|sc=polytonic|xs=Ancient Greek}}
*: Moden: {{t+|el|μέταλλο|n|sc=Grek}}
* Guaraní: [[kuarepoti]]
* Hungary: {{t+|hu|fém}}, {{t+|hu|érc}}
* Ibrani: {{t+|he|מתכת|tr=matékhet}} {{f}}
* Iceland: {{t+|is|tr=málmur}}
* Ido: {{t+|io|metalo|xs=Bahasa_Ido}}
* Indonesia: {{t|id|logam|xs=Bahasa_Indonesia}}
* Inggeris: {{t|en|metal|xs=Bahasa_Inggeris}}
* Interlingua: [[metallo]]
* Itali: {{t+|it|metallo}}
* Jepun: [[金属]] ([[きんぞく]], kinzoku) (1), [[金属製]]の[[もの]] (kinzokusei no mono) (2)
* Jerman: {{t+|de|Metall|n}}
* Korea: [[쇠]] (soe), [[금속]] (geumsok)
* Latin: {{t+|la|metallum|n}}
* Latvia: [[metāls]] (1,2,5)
* Lithuania: {{t|lt|metalas|m|xs=Bahasa_Lithuania}}
* Norway: {{t+|no|metall|n}}
* Pashto: {{ps-Arab|[[زر]]}} (zar, ''logam, emas'')
* Perancis: {{t+|fr|métal|m}}, {{t+|fr|métaux|p}}
* Poland: {{t+|pl|metal|m}}
* Portugis: {{t+|pt|metal|m}}
* Romania: {{t+|ro|metal|n}}
* Rusia: {{t+|ru|металл|m|tr=metáll|sc=Cyrl}}
* Sepanyol: {{t+|es|metal|m}}
* Slovak: {{t-|sk|kov|m}}
* Slovene: [[kovina]] {{f}} (1, 2)
* Sweden: {{t+|sv|metall|c}}
* Telugu: [[లోహము]] (lohamu) (1, 2)
* Tupinambá: [[itá]]
{{ter-bawah}}
==Bahasa Indonesia==
* Lihat takrifan bahasa Melayu.
[[Kategori:ms:Kimia]]
[[Kategori:ms:Logam| ]]
dcazgcwm8683uzyvgjflfjl3ics6pg7
karya
0
7365
344460
333185
2026-05-26T13:07:46Z
Hakimi97
2668
344460
wikitext
text/x-wiki
==Bahasa Melayu==
===Kata nama===
{{ms-kn}}
# [[hasil]] kesenian; [[buatan]]; [[ciptaan]].
#: ''karya seni lukis.''
#: ''karya sastera.''
# [[kerja]].
====Kata terbitan====
* berkarya:
# menghasilkan karya (tulisan, ciptaan, gubahan, dsb).
#: ''Beliau berkarya untuk mengisi masa lapangnya.''
* pengkaryaan:
# perihal atau perbuatan menghasilkan karya; penciptaan (sesuatu karya)
#: ''Kumpulan penulis itu agak kurang cergas dalam soal pengkaryaan.''
* pengkarya:
# orang yang berkarya.
* karyawan:
# orang yang banyak menghasilkan karya.
===Etimologi===
Daripada {{etyl|sa}} {{term|कार्य||sc=Deva|tr=kārya|tindakan, perbuatan, tugas}}
===Sebutan===
{{dewan|kar|ya}}
===Tulisan Jawi===
{{ARchar|كاريا}}
===Terjemahan===
{{ter-atas|hasil sastera, seni atau intelek}}
* Armenia: {{t-|hy|աշխատանք|tr=ašxatank’}}, {{t-|hy|գործ|tr=gorç}}
* Belanda: {{t+|nl|werk|n}}, {{t|nl|werkstuk|n}}
* Croatia: {{t+|hr|rad|m}}, {{t-|hr|djelo|n}}
* Czech: [[dílo]] {{n}}, (mahakarya) mistrovská [[práce]] {{f}}
* Denmark: [[værk]] {{n}}
* Estonia: {{t-|et|teos}}
* Finland: {{t+|fi|teos}}
* Ibrani: {{t+|he|עבודה|tr=avodá}} {{f}}, {{t+|he|מלאכה|tr=melakhá}} {{f}}
* Inggeris: {{t+|en|work}}
* Itali: {{t+|it|lavoro}}, {{t+|it|opera}}
* Jepun: [[作品]] (さくひん, sakuhin), [[著作]] (ちょさく, chosaku)
* Korea: [[작품]] (jakpum)
* Latin: {{t+|la|opus}}
* Perancis: {{t+|fr|travail|m}}
* Poland: {{t+|pl|dzieło|n}}
* Rusia: {{t+|ru|работа|f|tr=rabóta}}, {{t+|ru|труд|m|tr=trud}}, {{t+|ru|произведение|n|tr=proizvedénije}}
* Scots: [[wark]]
* Sepanyol: {{t+|es|obra|f}}
* Slovenia: {{t+|sl|delo|n}}
* Swahili: {{t+|sw|kazi|xs=Swahili}}
* Swedien: {{t+|sv|verk|n}}
* Telugu: {{t|te|మేధాశక్తి}}(mEdhASakti)
* Turki: {{t|tr|eser}}, {{t|tr|yapıt}}
{{ter-bawah}}
===Tesaurus===
; Sinonim:
# [[ciptaan]], gubahan, karangan, [[rekaan]], reka cipta, [[buatan]], nukilan, lukisan.
# [[kerja]], [[tugas]].
==Bahasa Indonesia==
* Lihat takrifan bahasa Melayu.
[[Kategori:ms:Kesusasteraan]]
[[Kategori:ms:Seni]]
dlmxtpv46ulsen5lu0e4lz7p8x5zei2
Templat:info askara Hiragana
10
9828
344452
96341
2026-05-26T12:54:08Z
Hakimi97
2668
344452
wikitext
text/x-wiki
{{delete|digantikan menggunakan [[Templat:character info]] secara langsung}}
gsaeitaiq24xj96th3qxnzjdeetlg4q
Templat:Hira-small
10
9853
344453
94461
2026-05-26T12:55:00Z
Hakimi97
2668
344453
wikitext
text/x-wiki
<includeonly>Bentuk kecil huruf [[Lampiran:Skrip hiragana|hiragana]] {{m|ja|{{{1}}}|tr={{{2}}}}}.</includeonly><noinclude>{{documentation}}</noinclude>
j62lpk22f8zt9e1uy6c1z5fv4s28sa7
Templat:Info askara Penggabungan Ideograf CJK
10
10224
344454
264966
2026-05-26T13:02:13Z
Hakimi97
2668
344454
wikitext
text/x-wiki
{{delete|templat usang yang tidak lagi digunakan}}
krs8mgelbsm73inl31v7dgycx22a2xn
Modul:affix
828
10384
344469
281461
2026-05-26T15:17:53Z
Hakimi97
2668
344469
Scribunto
text/plain
local export = {}
local debug_force_cat = false -- if set to true, always display categories even on userspace pages
local m_links = require("Module:links")
local m_str_utils = require("Module:string utilities")
local m_table = require("Module:table")
local en_utilities_module = "Module:en-utilities"
local etymology_module = "Module:etymology"
local pron_qualifier_module = "Module:pron qualifier"
local scripts_module = "Module:scripts"
local utilities_module = "Module:utilities"
-- Export this so the category code in [[Module:category tree/etymology]] can access it.
export.affix_lang_data_module_prefix = "Module:affix/lang-data/"
local rsub = m_str_utils.gsub
local usub = m_str_utils.sub
local ulen = m_str_utils.len
local rfind = m_str_utils.find
local rmatch = m_str_utils.match
local pluralize = require(en_utilities_module).pluralize
local u = m_str_utils.char
local ucfirst = m_str_utils.ucfirst
local unpack = unpack or table.unpack -- Lua 5.2 compatibility
function export.affix_variants(canonical, variants)
local mappings = {}
for _, variant in ipairs(variants) do
mappings[variant] = canonical
end
return mappings
end
function export.id_mapping(default, ids)
local mapping = { default = default }
if ids then
for id, target in pairs(ids) do
mapping[id] = target
end
end
return mapping
end
function export.id_mapping_with_affix_variants(base, id_variants)
local mappings = {}
for id, variants in pairs(id_variants) do
for _, variant in ipairs(variants) do
mappings[variant] = export.id_mapping(base, {[id] = base})
end
end
return mappings
end
function export.merge_tables(...)
local result = {}
for i = 1, select('#', ...) do
local t = select(i, ...)
if t then
for k, v in pairs(t) do
result[k] = v
end
end
end
return result
end
-- Export this so the category code in [[Module:category tree/etymology]] can access it.
export.langs_with_lang_specific_data = {
["az"] = true,
["fi"] = true,
["fr"] = true,
["izh"] = true,
["la"] = true,
["sah"] = true,
["tr"] = true,
["trk-pro"] = true,
}
local default_pos = "Perkataan"
--[==[ intro:
===About different types of hyphens ("template", "display" and "lookup"):===
* The "template hyphen" is the per-script hyphen character that is used in template calls to indicate that a term is an
affix. This is always a single Unicode char, but there may be multiple possible hyphens for a given script. Normally
this is just the regular hyphen character "-", but for some non-Latin-script languages (currently only right-to-left
languages), it is different.
* The "display hyphen" is the string (which might be an empty string) that is added onto a term as displayed and linked,
to indicate that a term is an affix. Currently this is always either the same as the template hyphen or an empty
string, but the code below is written generally enough to handle arbitrary display hyphens. Specifically:
*# For East Asian languages, the display hyphen is always blank.
*# For Arabic-script languages, either tatweel (ـ) or ZWNJ (zero-width non-joiner) are allowed as template hyphens,
where ZWNJ is supported primarily for Farsi, because some suffixes have non-joining behavior. The display hyphen
corresponding to tatweel is also tatweel, but the display hyphen corresponding to ZWNJ is blank (tatweel is also
the default display hyphen, for calls to {{tl|prefix}}/{{tl|suffix}}/etc. that don't include an explicit hyphen).
* The "lookup hyphen" is the hyphen that is used when looking up language-specific affix mappings. (These mappings are
discussed in more detail below when discussing link affixes.) It depends only on the script of the affix in question.
Most scripts (including East Asian scripts) use a regular hyphen "-" as the lookup hyphen, but Hebrew and Arabic
have their own lookup hyphens (respectively maqqef and tatweel). Note that for Arabic in particular, there are
three possible template hyphens that are recognized (tatweel, ZWNJ and regular hyphen), but mappings must use tatweel.
===About different types of affixes ("template", "display", "link", "lookup" and "category"):===
* A "template affix" is an affix in its source form as it appears in a template call. Generally, a template affix has an
attached template hyphen (see above) to indicate that it is an affix and indicate what type of affix it is (prefix,
suffix, interfix or circumfix), but some of the older-style templates such as {{tl|suffix}}, {{tl|prefix}},
{{tl|confix}}, etc. have "positional" affixes where the presence of the affix in a certain position (e.g. the second
or third parameter) indicates that it is a certain type of affix, whether or not it has an attached template hyphen.
* A "display affix" is the corresponding affix as it is actually displayed to the user. The display affix may differ
from the template affix for various reasons:
*# The display affix may be specified explicitly using the {{para|alt<var>N</var>}} parameter, the `<alt:...>` inline
modifier or a piped link of the form e.g. `<nowiki>[[-kas|-käs]]</nowiki>` (here indicating that the affix should
display as `-käs` but be linked as `-kas`). Here, the template affix is arguably the entire piped link, while the
display affix is `-käs`.
*# Even in the absence of {{para|alt<var>N</var>}} parameters, `<alt:...>` inline modifiers and piped links, certain
languages have differences between the "template hyphen" specified in the template (which always needs to be
specified somehow or other in templates like {{tl|affix}}, to indicate that the term is an affix and what type of
affix it is) and the display hyphen (see above), with corresponding differences between template and display
affixes.
* A (regular) "link affix" is the affix that is linked to when the affix is shown to the user. The link affix is usually
the same as the display affix, but will differ in one of three circumstances:
*# The display and link affixes are explicitly made different using {{para|alt<var>N</var>}} parameters, `<alt:...>`
inline modifiers or piped links, as described above under "display affix".
*# For certain languages, certain affixes are mapped to canonical form using language-specific mappings. For example,
in Finnish, the adjective-forming suffix {{m|fi|-kas}} appears as {{m|fi|-käs}} after front vowels, but logically
both forms are the same suffix and should be linked and categorized the same. Similarly, in Latin, the negative and
intensive prefixes spelled {{m|la|in-}} (etymologically two distinct prefixes) appear variously as {{m|la|il-}},
{{m|la|im-}} or {{m|la|ir-}} before certain consonants. Mappings are supplied in [[Module:affix/lang-data/LANGCODE]]
to convert Finnish {{m|fi|-käs}} to {{m|fi|-kas}} for linking and categorization purposes. Note that the affixes in
the mappings use "lookup hyphens" to indicate the different types of affixes, which is usually the same as the
template hyphen but differs for Arabic scripts, because there are multiple possible template hyphens recognized but
only one lookup hyphen (tatweel). The form of the affix as used to look up in the mapping tables is called the
"lookup affix"; see below.
* A "stripped link affix" is a link affix that has been passed through the language's `stripDiacritics()` function, which
may strip certain diacritics: e.g. macrons in Latin and Old English (indicating length); acute and grave accents in
Russian and various other Slavic languages (indicating stress); vowel diacritics in most Arabic-script languages; and
also tatweel in some Arabic-script languages (currently, for example, Persian, Arabic and Urdu strip tatweel, but
Ottoman Turkish does not). Stripped link affixes are currently what are used in category names.
* A "lookup affix" is the form of the affix as it is looked up in the language-specific lookup mappings described above
under link affixes. There are actually two lookup stages:
*# First, the affix is looked up in a modified display form (specifically, the same as the display affix but using
lookup hyphens). Note that this lookup does not occur if an explicit display form is given using
{{para|alt<var>N</var>}} or an `<alt:...>` inline modifier, or if the template affix contains a piped or embedded
link.
*# If no entry is found, the affix is then looked up in a modified link form (specifically, the modified display
form passed through the language's `stripDiacritics()` function, which strips out certain diacritics, but with the
lookup hyphen re-added if it was stripped out, as in the case of tatweel in many Arabic-script languages).
The reason for this double lookup procedure is to allow for mappings that are sensitive to the extra diacritics, but
also allow for mappings that are not sensitive in this fashion (e.g. Russian {{m|ru|-ливый}} occurs both stressed and
unstressed, but is the same prefix either way).
* A "category affix" is the affix as it appears in categories such as [[:Category:Finnish terms suffixed with -kas|
Category:Finnish terms suffixed with ''-kas'']]. The category affix is currently always the same as the stripped link
affix. This means that for Arabic-script languages, it may or may not have a tatweel, even if the correponding display
affix and regular link affix have a tatweel. As mentioned above, stripDiacritics() strips tatweel for Arabic, Persian
and Urdu, but not for Ottoman Turkish. Hence affix categories for Arabic, Persian and Urdu will be missing the
tatweel, but affix categories for Ottoman Turkish will have it. An additional complication is that if the template
affix contains a ZWNJ, the display (and hence the link and category affixes) will have no hyphen attached in any case.
]==]
-----------------------------------------------------------------------------------------
-- Template and display hyphens --
-----------------------------------------------------------------------------------------
--[=[
Per-script template hyphens. The template hyphen is what appears in the {{affix}}/{{prefix}}/{{suffix}}/etc. template
(in the wikicode). See above.
They key below is a script code, after removing a hyphen and anything preceding. Hence, script codes like 'fa-Arab'
and 'ur-Arab' will match 'Arab'.
The value below is a string consisting of one or more hyphen characters. If there is more than one character, the
default hyphen must come last and a non-default function must be specified for the script in display_hyphens[] so
the correct display hyphen will be specified when no template hyphen is given (in {{suffix}}/{{prefix}}/etc.).
Script detection is normally done when linking, but we need to do it earlier. However, under most circumstances we
don't need to do script detection. Specifically, we only need to do script detection for a given language if
(a) the language has multiple scripts; and
(b) at least one of those scripts is listed below or in display_hyphens.
]=]
local ZWNJ = u(0x200C) -- zero-width non-joiner
local template_hyphens = {
-- This covers all Arabic scripts. See above.
["Arab"] = "ـ" .. ZWNJ .. "-", -- tatweel + zero-width non-joiner + regular hyphen
["Hebr"] = "־", -- Hebrew-specific hyphen termed "maqqef"
["Mong"] = "᠊",
-- FIXME! What about the following right-to-left scripts?
-- Adlm (Adlam)
-- Armi (Imperial Aramaic)
-- Avst (Avestan)
-- Cprt (Cypriot)
-- Khar (Kharoshthi)
-- Mand (Mandaic/Mandaean)
-- Mani (Manichaean)
-- Mend (Mende/Mende Kikakui)
-- Narb (Old North Arabian)
-- Nbat (Nabataean/Nabatean)
-- Nkoo (N'Ko)
-- Orkh (Orkhon runes)
-- Phli (Inscriptional Pahlavi)
-- Phlp (Psalter Pahlavi)
-- Phlv (Book Pahlavi)
-- Phnx (Phoenician)
-- Prti (Inscriptional Parthian)
-- Rohg (Hanifi Rohingya)
-- Samr (Samaritan)
-- Sarb (Old South Arabian)
-- Sogd (Sogdian)
-- Sogo (Old Sogdian)
-- Syrc (Syriac)
-- Thaa (Thaana)
}
-- Hyphens used when looking up an affix in a lang-specific affix mapping. Defaults to regular hyphen (-). The keys
-- are script codes, after removing a hyphen and anything preceding. Hence, script codes like 'fa-Arab' and 'ur-Arab'
-- will match 'Arab'. The value should be a single character.
local lookup_hyphens = {
["Hebr"] = "־",
-- This covers all Arabic scripts. See above.
["Arab"] = "ـ",
}
-- Default display-hyphen function.
local function default_display_hyphen(script, hyph)
if not hyph then
return template_hyphens[script] or "-"
end
return hyph
end
local function arab_get_display_hyphen(script, hyph)
if not hyph then
return "ـ" -- tatweel
elseif hyph == ZWNJ then
return ""
else
return hyph
end
end
local function no_display_hyphen(script, hyph)
return ""
end
-- Per-script function to return the correct display hyphen given the script and template hyphen. The function should
-- also handle the case where the passed-in template hyphen is nil, corresponding to the situation in
-- {{prefix}}/{{suffix}}/etc. where no template hyphen is specified. The key is the script code after removing a hyphen
-- and anything preceding, so 'fa-Arab', 'ur-Arab' etc. will match 'Arab'.
local display_hyphens = {
-- This covers all Arabic scripts. See above.
["Arab"] = arab_get_display_hyphen,
["Bopo"] = no_display_hyphen,
["Hani"] = no_display_hyphen,
["Hans"] = no_display_hyphen,
["Hant"] = no_display_hyphen,
-- The following is a mixture of several scripts. Hopefully the specs here are correct!
["Jpan"] = no_display_hyphen,
["Jurc"] = no_display_hyphen,
["Kitl"] = no_display_hyphen,
["Kits"] = no_display_hyphen,
["Laoo"] = no_display_hyphen,
["Nshu"] = no_display_hyphen,
["Shui"] = no_display_hyphen,
["Tang"] = no_display_hyphen,
["Thaa"] = no_display_hyphen,
["Thai"] = no_display_hyphen,
["Tibt"] = no_display_hyphen,
}
-----------------------------------------------------------------------------------------
-- Basic Utility functions --
-----------------------------------------------------------------------------------------
local function glossary_link(entry, text)
text = text or entry
return "[[Lampiran:Glosari#" .. entry .. "|" .. text .. "]]"
end
local function track(page)
if type(page) == "table" then
for i, pg in ipairs(page) do
page[i] = "affix/" .. pg
end
else
page = "affix/" .. page
end
require("Module:debug/track")(page)
end
local function ine(val)
return val ~= "" and val or nil
end
-----------------------------------------------------------------------------------------
-- Compound types --
-----------------------------------------------------------------------------------------
local function make_compound_type(typ, alttext)
return {
text = glossary_link(typ, alttext) .. " majmuk",
cat = typ .. " majmuk",
}
end
-- Make a compound type entry with a simple rather than glossary link.
-- These should be replaced with a glossary link when the entry in the glossary
-- is created.
local function make_non_glossary_compound_type(typ, alttext)
local link = alttext and "[[" .. typ .. "|" .. alttext .. "]]" or "[[" .. typ .. "]]"
return {
text = link .. " majmuk",
cat = typ .. " majmuk",
}
end
local function make_raw_compound_type(typ, alttext)
return {
text = glossary_link(typ, alttext),
cat = pluralize(typ),
}
end
local function make_borrowing_type(typ, alttext)
return {
text = glossary_link(typ, alttext),
borrowing_type = pluralize(typ),
}
end
export.etymology_types = {
["adapted borrowing"] = make_borrowing_type("adapted borrowing"),
["adap"] = "adapted borrowing",
["abor"] = "adapted borrowing",
["alliterative"] = make_non_glossary_compound_type("alliterative"),
["allit"] = "alliterative",
["antonymous"] = make_non_glossary_compound_type("antonymous"),
["ant"] = "antonymous",
["bahuvrihi"] = make_compound_type("bahuvrihi", "bahuvrīhi"),
["bahu"] = "bahuvrihi",
["bv"] = "bahuvrihi",
["coordinative"] = make_compound_type("coordinative"),
["coord"] = "coordinative",
["descriptive"] = make_compound_type("descriptive"),
["desc"] = "descriptive",
["determinative"] = make_compound_type("determinative"),
["det"] = "determinative",
["dvandva"] = make_compound_type("dvandva"),
["dva"] = "dvandva",
["dvigu"] = make_compound_type("dvigu"),
["dvi"] = "dvigu",
["endocentric"] = make_compound_type("endocentric"),
["endo"] = "endocentric",
["exocentric"] = make_compound_type("exocentric"),
["exo"] = "exocentric",
["izafet I"] = make_compound_type("izafet I"),
["iz1"] = "izafet I",
["izafet II"] = make_compound_type("izafet II"),
["iz2"] = "izafet II",
["izafet III"] = make_compound_type("izafet III"),
["iz3"] = "izafet III",
["karmadharaya"] = make_compound_type("karmadharaya", "karmadhāraya"),
["karma"] = "karmadharaya",
["kd"] = "karmadharaya",
["kenning"] = make_raw_compound_type("kenning"),
["ken"] = "kenning",
["rhyming"] = make_non_glossary_compound_type("rhyming"),
["rhy"] = "rhyming",
["synonymous"] = make_non_glossary_compound_type("synonymous"),
["syn"] = "synonymous",
["tatpurusa"] = make_compound_type("tatpurusa", "tatpuruṣa"),
["tat"] = "tatpurusa",
["tp"] = "tatpurusa",
}
local function process_etymology_type(typ, nocap, notext, has_parts)
local text_sections = {}
local categories = {}
local borrowing_type
if typ then
local typdata = export.etymology_types[typ]
if type(typdata) == "string" then
typdata = export.etymology_types[typdata]
end
if not typdata then
error("Internal error: Unrecognized type '" .. typ .. "'")
end
local text = typdata.text
if not nocap then
text = ucfirst(text)
end
local cat = typdata.cat
borrowing_type = typdata.borrowing_type
local oftext = typdata.oftext or " of"
if not notext then
table.insert(text_sections, text)
if has_parts then
table.insert(text_sections, oftext)
table.insert(text_sections, " ")
end
end
if cat then
table.insert(categories, cat)
end
end
return text_sections, categories, borrowing_type
end
-----------------------------------------------------------------------------------------
-- Utility functions --
-----------------------------------------------------------------------------------------
-- Iterate an array up to the greatest integer index found.
local function ipairs_with_gaps(t)
local indices = m_table.numKeys(t)
local max_index = #indices > 0 and math.max(unpack(indices)) or 0
local i = 0
return function()
while i < max_index do
i = i + 1
return i, t[i]
end
end
end
export.ipairs_with_gaps = ipairs_with_gaps
--[==[
Join formatted parts (in `parts_formatted`) together with any overall {{para|lit}} spec (in `lit`) plus categories,
which are formatted by prepending the language name as found in `lang`. The value of an entry in `categories` can be
either a string (which is formatted using `sort_key`) or a table of the form `{ {cat=<var>category</var>,
sort_key=<var>sort_key</var>, sort_base=<var>sort_base</var>}`, specifying the sort key and sort base to use when
formatting the category. If `nocat` is given, no categories are added; otherwise, `force_cat` causes categories to be
added even on userspace pages.
]==]
function export.join_formatted_parts(data)
local cattext
local lang = data.data.lang
local force_cat = data.data.force_cat or debug_force_cat
if data.data.nocat then
cattext = ""
else
for i, cat in ipairs(data.categories) do
if type(cat) == "table" then
data.categories[i] = require(utilities_module).format_categories(cat.cat .. " bahasa " .. lang:getFullName(),
lang, cat.sort_key, cat.sort_base, force_cat)
else
data.categories[i] = require(utilities_module).format_categories(cat .. " bahasa " .. lang:getFullName(), lang,
data.data.sort_key, nil, force_cat)
end
end
cattext = table.concat(data.categories)
end
local result = table.concat(data.parts_formatted, not data.separator_already_added and " +‎ " or nil) ..
(data.data.lit and ", secara harfiah " .. m_links.mark(data.data.lit, "gloss") or "")
local q = data.data.q
local qq = data.data.qq
local l = data.data.l
local ll = data.data.ll
local infl = data.data.infl
if q and q[1] or qq and qq[1] or l and l[1] or ll and ll[1] or infl and infl[1] then
result = require(pron_qualifier_module).format_qualifiers {
lang = lang,
text = result,
q = q,
qq = qq,
l = l,
ll = ll,
infl = infl,
}
end
return result .. cattext
end
local function pluralize(pos)
return pos
end
-- Remove links and call lang:stripDiacritics(term).
local function strip_diacritics_no_links(lang, term)
return lang:stripDiacritics(m_links.remove_links(term))
end
--[=[
Convert a raw part as passed into an entry point into a part ready for linking. `lang` and `sc` are the overall
language and script objects. This uses the overall language and script objects as defaults for the part and parses off
any fragment from the term. We need to do the latter so that fragments don't end up in categories and so that we
correctly do affix mapping even in the presence of fragments.
]=]
local function canonicalize_part(part, lang, sc)
if not part then
return
end
-- Save the original (user-specified, part-specific) value of `lang`. If such a value is specified, we don't insert
-- a '*fixed with' category, and we format the part using format_derived() in [[Module:etymology]] rather than
-- full_link() in [[Module:links]].
part.part_lang = part.lang
part.lang = part.lang or lang
part.sc = part.sc or sc
local term = part.term
if not term then
return
elseif not part.fragment then
part.term, part.fragment = m_links.get_fragment(term)
else
part.term = m_links.get_fragment(term)
end
end
--[==[
Construct a single linked part based on the information in `part`, for use by `show_affix()` and other entry points.
This should be called after `canonicalize_part()` is called on the part. This is a thin wrapper around `full_link()` in
[[Module:links]] unless `part.part_lang` is specified (indicating that a part-specific language was given), in which
case `format_derived()` in [[Module:etymology]] is called to display a term in a language other than the language of
the overall term (specified in `data.lang`). `data` contains the entire object passed into the entry point and is used
to access information for constructing the categories added by `format_derived()`.
]==]
function export.link_term(part, data, include_separator)
local result
if part.part_lang then
result = require(etymology_module).format_derived {
lang = data.lang,
terms = {part},
sources = {part.lang},
sort_key = data.sort_key,
nocat = data.nocat,
template_name = "affix",
qualifiers_labels_on_outside = true,
borrowing_type = data.borrowing_type,
force_cat = data.force_cat or debug_force_cat,
}
else
result = m_links.full_link(part, "term", nil, "show qualifiers")
end
if include_separator and part.separator then
return part.separator .. result
else
return result
end
end
local function canonicalize_script_code(scode)
-- Convert fa-Arab, ur-Arab etc. to Arab.
return (scode:gsub("^.*%-", ""))
end
-----------------------------------------------------------------------------------------
-- Affix-handling functions --
-----------------------------------------------------------------------------------------
-- Figure out the appropriate script for the given affix and language (unless the script is explicitly passed in), and
-- return the values of template_hyphens[], display_hyphens[] and lookup_hyphens[] for that script, substituting
-- default values as appropriate. Four values are returned:
-- DETECTED_SCRIPT, TEMPLATE_HYPHEN, DISPLAY_HYPHEN, LOOKUP_HYPHEN
local function detect_script_and_hyphens(text, lang, sc)
local scode
-- 1. If the script is explicitly passed in, use it.
if sc then
scode = sc:getCode()
else
local possible_script_codes = lang:getScriptCodes()
-- YUCK! `possible_script_codes` comes from loadData() so #possible_scripts doesn't work (always returns 0).
local num_possible_script_codes = m_table.length(possible_script_codes)
if num_possible_script_codes == 0 then
-- This shouldn't happen; if the language has no script codes,
-- the list {"None"} should be returned.
error("Something is majorly wrong! Language " .. lang:getCanonicalName() .. " has no script codes.")
end
if num_possible_script_codes == 1 then
-- 2. If the language has only one possible script, use it.
scode = possible_script_codes[1]
else
-- 3. Check if any of the possible scripts for the language have non-default values for template_hyphens[]
-- or display_hyphens[]. If so, we need to do script detection on the text. If not, just use "Latn",
-- which may not be technically correct but produces the right results because Latn has all default
-- values for template_hyphens[] and display_hyphens[].
local may_have_nondefault_hyphen = false
for _, script_code in ipairs(possible_script_codes) do
script_code = canonicalize_script_code(script_code)
if template_hyphens[script_code] or display_hyphens[script_code] then
may_have_nondefault_hyphen = true
break
end
end
if not may_have_nondefault_hyphen then
scode = "Latn"
else
scode = lang:findBestScript(text):getCode()
end
end
end
scode = canonicalize_script_code(scode)
local template_hyphen = template_hyphens[scode] or "-"
local lookup_hyphen = lookup_hyphens[scode] or "-"
local display_hyphen = display_hyphens[scode] or default_display_hyphen
return scode, template_hyphen, display_hyphen, lookup_hyphen
end
--[=[
Given a template affix `term` and an affix type `affix_type`, change the relevant template hyphen(s) in the affix to
the display or lookup hyphen specified in `new_hyphen`, or add them if they are missing. `new_hyphen` can be a string,
specifying a fixed hyphen, or a function of two arguments (the script code `scode` and the discovered template hyphen,
or nil of no relevant template hyphen is present). `thyph_re` is a Lua pattern (which must be enclosed in parens) that
matches the possible template hyphens. Note that not all template hyphens present in the affix are changed, but only
the "relevant" ones (e.g. for a prefix, a relevant template hyphen is one coming at the end of the affix).
]=]
local function reconstruct_term_per_hyphens(term, affix_type, scode, thyph_re, new_hyphen)
local function get_hyphen(hyph)
if type(new_hyphen) == "string" then
return new_hyphen
end
return new_hyphen(scode, hyph)
end
if affix_type == "non-affix" then
return term
elseif affix_type == "apitan" then
local before, before_hyphen, after_hyphen, after = rmatch(term, "^(.*)" .. thyph_re .. " " .. thyph_re
.. "(.*)$")
if not before or ulen(term) <= 3 then
-- Unlike with other types of affixes, don't try to add hyphens in the middle of the term to convert it to
-- a circumfix. Also, if the term is just hyphen + space + hyphen, return it.
return term
end
return before .. get_hyphen(before_hyphen) .. " " .. get_hyphen(after_hyphen) .. after
elseif affix_type == "sisipan" or affix_type == "jalinan" then
local before_hyphen, middle, after_hyphen = rmatch(term, "^" .. thyph_re .. "(.*)" .. thyph_re .. "$")
if before_hyphen and ulen(term) <= 1 then
-- If the term is just a hyphen, return it.
return term
end
return get_hyphen(before_hyphen) .. (middle or term) .. get_hyphen(after_hyphen)
elseif affix_type == "awalan" then
local middle, after_hyphen = rmatch(term, "^(.*)" .. thyph_re .. "$")
if middle and ulen(term) <= 1 then
-- If the term is just a hyphen, return it.
return term
end
return (middle or term) .. get_hyphen(after_hyphen)
elseif affix_type == "akhiran" then
local before_hyphen, middle = rmatch(term, "^" .. thyph_re .. "(.*)$")
if before_hyphen and ulen(term) <= 1 then
-- If the term is just a hyphen, return it.
return term
end
return get_hyphen(before_hyphen) .. (middle or term)
else
error(("Internal error: Unrecognized affix type '%s'"):format(affix_type))
end
end
--[=[
Look up a mapping from a given affix variant to the canonical form used in categories and links. The lookup tables are
language-specific according to `lang`, and may be ID-specific according to `affix_id`. The affixes as they appear in the
lookup tables (both the variant and the canonical form) are in "lookup affix" format (approximately speaking, they use a
regular hyphen for most scripts, but a tatweel for Arabic-script entries and a maqqef for Hebrew-script entries), but
the passed-in `affix` param is in "template affix" format (which differs from the lookup affix for Arabic-script
entries, because more types of hyphens are allowed in template affixes; see the comments at the top of the file). The
remaining parameters to this function are used to convert from template affixes to lookup affixes; see the
reconstruct_term_per_hyphens() function above.
If the affix contains brackets, no lookup is done. Otherwise, a two-stage process is used, first looking up the affix
directly and then stripping diacritics and looking it up again. The reason for this is documented above in the comments
at the top of the file (specifically, the comments describing lookup affixes).
The value of a mapping can either be a string (do the mapping regardless of affix ID) or a table indexed by affix ID
(where the special value `false` indicates no affix ID). The values of entries in this table can also be strings, or
tables with keys `affix` and `id` (again, use `false` to indicate no ID). This allows an affix mapping to map from one
ID to another (for example, this is used in English to map the [[an-]] prefix with no ID to the [[a-]] prefix with the
ID 'not').
The Given a template affix `term` and an affix type `affix_type`, change the relevant template hyphen(s) in the affix to
the display or lookup hyphen specified in `new_hyphen`, or add them if they are missing. `new_hyphen` can be a string,
specifying a fixed hyphen, or a function of two arguments (the script code `scode` and the discovered template hyphen,
or nil of no relevant template hyphen is present). `thyph_re` is a Lua pattern (which must be enclosed in parens) that
matches the possible template hyphens. Note that not all template hyphens present in the affix are changed, but only
the "relevant" ones (e.g. for a prefix, a relevant template hyphen is one coming at the end of the affix).
]=]
local function lookup_affix_mapping(affix, affix_type, lang, scode, thyph_re, lookup_hyph, affix_id)
local function do_lookup(affix)
-- Ensure that the affix uses lookup hyphens regardless of whether it used a different type of hyphens before
-- or no hyphens.
local lookup_affix = reconstruct_term_per_hyphens(affix, affix_type, scode, thyph_re, lookup_hyph)
local function do_lookup_for_langcode(langcode)
if export.langs_with_lang_specific_data[langcode] then
local langdata = mw.loadData(export.affix_lang_data_module_prefix .. langcode)
if langdata.affix_mappings then
local mapping = langdata.affix_mappings[lookup_affix]
if mapping then
if type(mapping) == "table" then
mapping = mapping[affix_id] or mapping.default or mapping[affix_id or false]
if mapping then
return mapping
end
else
return mapping
end
end
end
end
end
-- If `lang` is an etymology-only language, look for a mapping both for it and its full parent.
local langcode = lang:getCode()
local mapping = do_lookup_for_langcode(langcode)
if mapping then
return mapping
end
local full_langcode = lang:getFullCode()
if full_langcode ~= langcode then
mapping = do_lookup_for_langcode(full_langcode)
if mapping then
return mapping
end
end
return nil
end
if affix:find("%[%[") then
return nil
end
return do_lookup(affix) or do_lookup(lang:stripDiacritics(affix)) or nil
end
--[==[
For a given template term in a given language (see the definition of "template affix" near the top of the file),
possibly in an explicitly specified script `sc` (but usually nil), return the term's affix type ({"awalan"},
{"jalinan"}, {"akhiran"}, {"apitan"} or {"non-affix"}) along with the corresponding link and display affixes
(see definitions near the top of the file); also the corresponding lookup affix (if `return_lookup_affix` is specified).
The term passed in should already have any fragment (after the # sign) parsed off of it. Four values are returned:
`affix_type`, `link_term`, `display_term` and `lookup_term`. The affix type can be passed in instead of autodetected; in
this case, the template term need not have any attached hyphens, and the appropriate hyphens will be added in the
appropriate places. If `do_affix_mapping` is specified, look up the affix in the lang-specific affix mappings, as
described in the comment at the top of the file; otherwise, the link and display terms will always be the same. (They
will be the same in any case if the template term has a bracketed link in it or is not an affix.) If
`return_lookup_affix` is given, the fourth return value contains the term with appropriate lookup hyphens in the
appropriate places; otherwise, it is the same as the display term. (This functionality is used in
[[Module:category tree/affixes and compounds]] to convert link affixes into lookup affixes so that they can be looked up
in the affix mapping tables.)
]==]
local function parse_term_for_affixes(term, lang, sc, affix_type, do_affix_mapping, return_lookup_affix, affix_id)
if not term then
return "non-affix", nil, nil, nil
end
if term == "^" then
-- Indicates a null term to emulate the behavior of {{suffix|foo||bar}}.
term = ""
return "non-affix", term, term, term
end
if term:find("^%^") then
-- HACK! ^ at the beginning of Korean languages has a special meaning, triggering capitalization of the
-- transliteration. Don't interpret it as "force non-affix" for those languages.
local langcode = lang:getCode()
if langcode ~= "ko" and langcode ~= "okm" and langcode ~= "jje" then
-- Formerly we allowed ^ to force non-affix type; this is now handled using an inline modifier
-- <naf>, <root>, etc. Throw an error for the moment when the old way is encountered.
error("Use of ^ to force non-affix status is no longer supported; use an inline modifier <naf> or <root> " ..
"after the component")
end
end
-- Remove an asterisk if the morpheme is reconstructed and add it back at the end.
local reconstructed = ""
if term:find("^%*") then
reconstructed = "*"
term = term:gsub("^%*", "")
end
local scode, thyph, dhyph, lhyph = detect_script_and_hyphens(term, lang, sc)
thyph = "([" .. thyph .. "])"
if not affix_type then
if rfind(term, thyph .. " " .. thyph) then
affix_type = "apitan"
else
local has_beginning_hyphen = rfind(term, "^" .. thyph)
local has_ending_hyphen = rfind(term, thyph .. "$")
if has_beginning_hyphen and has_ending_hyphen then
affix_type = "jalinan"
elseif has_ending_hyphen then
affix_type = "awalan"
elseif has_beginning_hyphen then
affix_type = "akhiran"
else
affix_type = "non-affix"
end
end
end
local link_term, display_term, lookup_term
if affix_type == "non-affix" then
link_term = term
display_term = term
lookup_term = term
else
display_term = reconstruct_term_per_hyphens(term, affix_type, scode, thyph, dhyph)
if do_affix_mapping then
link_term = lookup_affix_mapping(term, affix_type, lang, scode, thyph, lhyph, affix_id)
-- The return value of lookup_affix_mapping() may be an affix mapping with lookup hyphens if a mapping
-- was found, otherwise nil if a mapping was not found. We need to convert to display hyphens in
-- either case, but in the latter case we can reuse the display term, which has already been converted.
if link_term then
link_term = reconstruct_term_per_hyphens(link_term, affix_type, scode, thyph, dhyph)
else
link_term = display_term
end
else
link_term = display_term
end
if return_lookup_affix then
lookup_term = reconstruct_term_per_hyphens(term, affix_type, scode, thyph, lhyph)
else
lookup_term = display_term
end
end
link_term = reconstructed .. link_term
display_term = reconstructed .. display_term
lookup_term = reconstructed .. lookup_term
return affix_type, link_term, display_term, lookup_term
end
--[==[
Add a hyphen to a term in the appropriate place, based on the specified affix type, stripping off any existing hyphens
in that place. For example, if `affix_type` == {"awalan"}, we'll add a hyphen onto the end if it's not already there (or
is of the wrong type). Three values are returned: the link term, display term and lookup term. This function is a thin
wrapper around `parse_term_for_affixes`; see the comments above that function for more information. Note that this
function is exposed externally because it is called by [[Module:category tree/affixes and compounds]]; see the comment
in `parse_term_for_affixes` for more information.
]==]
function export.make_affix(term, lang, sc, affix_type, do_affix_mapping, return_lookup_affix, affix_id)
if not (affix_type == "awalan" or affix_type == "akhiran" or affix_type == "apitan" or affix_type == "sisipan" or
affix_type == "jalinan" or affix_type == "non-affix") then
error("Internal error: Invalid affix type " .. (affix_type or "(nil)"))
end
local _, link_term, display_term, lookup_term = parse_term_for_affixes(term, lang, sc, affix_type,
do_affix_mapping, return_lookup_affix, affix_id)
return link_term, display_term, lookup_term
end
-----------------------------------------------------------------------------------------
-- Main entry points --
-----------------------------------------------------------------------------------------
--[==[
Core categorization logic for affixes. This is shared between show_affix(), show_compound_like() and
get_affix_categories_only(). Returns the categories array and other metadata needed for formatting.
]==]
local function generate_affix_categories(data)
data.pos = data.pos or default_pos
data.pos = pluralize(data.pos)
local text_sections, categories, borrowing_type =
process_etymology_type(data.type, data.surface_analysis or data.nocap, data.notext, #data.parts > 0)
data.borrowing_type = borrowing_type
-- Process each part
local whole_words = 0
local is_affix_or_compound = false
-- Canonicalize and generate links for all the parts first; then do categorization in a separate step, because when
-- processing the first part for categorization, we may access the second part and need it already canonicalized.
for i, part in ipairs_with_gaps(data.parts) do
part = part or {}
data.parts[i] = part
canonicalize_part(part, data.lang, data.sc)
-- Determine affix type and get link and display terms (see text at top of file). Store them in the part
-- (in fields that won't clash with fields used by full_link() in [[Module:links]] or link_term()), so they
-- can be used in the loop below when categorizing.
part.affix_type, part.affix_link_term, part.affix_display_term = parse_term_for_affixes(part.term,
part.lang, part.sc, part.type, not part.alt, nil, part.id)
-- If link_term is an empty string, either a bare ^ was specified or an empty term was used along with inline
-- modifiers. The intention in either case is not to link the term.
part.term = ine(part.affix_link_term)
-- If part.alt would be the same as part.term, make it nil, so that it isn't erroneously tracked as being
-- redundant alt text.
part.alt = part.alt or (part.affix_display_term ~= part.affix_link_term and part.affix_display_term) or nil
end
if not data.noaffixcat then
-- Now do categorization.
for i, part in ipairs_with_gaps(data.parts) do
local affix_type = part.affix_type
if affix_type ~= "non-affix" then
is_affix_or_compound = true
-- Make a sort key. For the first part, use the second part as the sort key; the intention is that if the
-- term has a prefix, sorting by the prefix won't be very useful so we sort by what follows, which is
-- presumably the root.
local part_sort_base = nil
local part_sort = part.sort or data.sort_key
if i == 1 and data.parts[2] and data.parts[2].term then
local part2 = data.parts[2]
-- If the second-part link term is empty, the user requested an unlinked term; avoid a wikitext error
-- by using the alt value if available.
part_sort_base = ine(part2.affix_link_term) or ine(part2.alt)
if part_sort_base then
part_sort_base = strip_diacritics_no_links(part2.lang, part_sort_base)
end
end
if part.pos and rfind(part.pos, "patronym") then
table.insert(categories, {cat = "patronim", sort_key = part_sort, sort_base = part_sort_base})
end
if data.pos ~= "terms" and part.pos and rfind(part.pos, "diminutive") then
table.insert(categories, {cat = data.pos .. " diminutif", sort_key = part_sort,
sort_base = part_sort_base})
end
-- Don't add a '*fixed with' category if the link term is empty or is in a different language.
if ine(part.affix_link_term) and not part.part_lang then
table.insert(categories, {cat = data.pos .. " dengan " .. affix_type .. " " ..
strip_diacritics_no_links(part.lang, part.affix_link_term) ..
(part.id and " (" .. part.id .. ")" or ""),
sort_key = part_sort, sort_base = part_sort_base})
end
else
whole_words = whole_words + 1
if whole_words == 2 then
is_affix_or_compound = true
local pos_for_category = (data.pos == "Perkataan") and "Kata" or data.pos
table.insert(categories, pos_for_category .. " majmuk")
end
end
end
-- Make sure there was either an affix or a compound (two or more non-affix terms).
if not is_affix_or_compound and not data.allow_no_affixes_or_compounds then
error("The parameters did not include any affixes, and the term is not a compound. Please provide at least one affix.")
end
end
return text_sections, categories, borrowing_type
end
--[==[
Implementation of {{tl|affix}} and {{tl|surface analysis}}. `data` contains all the information describing the affixes to
be displayed, and contains the following:
* `.lang` ('''required'''): Overall language object. Different from term-specific language objects (see `.parts` below).
* `.sc`: Overall script object (usually omitted). Different from term-specific script objects.
* `.parts` ('''required'''): List of objects describing the affixes to show. The general format of each object is as would
be passed to `full_link()`, except that the `.lang` field should be missing unless the term is of a language
different from the overall `.lang` value (in such a case, the language name is shown along with the term and
an additional "derived from" category is added). '''WARNING''': The data in `.parts` will be destructively
modified.
* `.pos`: Overall part of speech (used in categories, defaults to {"terms"}). Different from term-specific part of speech.
* `.sort_key`: Overall sort key. Normally omitted except e.g. in Japanese.
* `.type`: Type of compound, if the parts in `.parts` describe a compound. Strictly optional, and if supplied, the
compound type is displayed before the parts (normally capitalized, unless `.nocap` is given).
* `.nocap`: Don't capitalize the first letter of text displayed before the parts (relevant only if `.type` or
`.surface_analysis` is given).
* `.notext`: Don't display any text before the parts (relevant only if `.type` or `.surface_analysis` is given).
* `.nocat`: Disable all categorization.
* `.noaffixcat`: Disable affix (and compound) categorization. Relevant for e.g. blends, which may otherwise
be incorrectly categorized as compound terms.
* `.lit`: Overall literal definition. Different from term-specific literal definitions.
* `.force_cat`: Always display categories, even on userspace pages.
* `.surface_analysis`: Implement {{surface analysis}}; adds `By surface analysis, ` before the parts.
'''WARNING''': This destructively modifies both `data` and the individual structures within `.parts`.
]==]
function export.show_affix(data)
local text_sections, categories, borrowing_type = generate_affix_categories(data)
-- Process each part for display
local parts_formatted = {}
for i, part in ipairs_with_gaps(data.parts) do
-- Make a link for the part
table.insert(parts_formatted, export.link_term(part, data, "include_separator"))
end
if data.surface_analysis then
local text = "dengan " .. glossary_link("surface analysis") .. ", "
if not data.nocap then
text = ucfirst(text)
end
table.insert(text_sections, 1, text)
end
table.insert(text_sections, export.join_formatted_parts { data = data, parts_formatted = parts_formatted,
categories = categories, separator_already_added = true })
return table.concat(text_sections)
end
--[==[
Get only the categories that would be generated by show_affix(), without any text output or formatting.
This is used by Module:etymon to get affix categorization.
Returns an array of category objects, where
each entry is either a string (simple category name) or a table with keys `cat`, `sort_key`,
and `sort_base` for more complex categorization.
`data` should have the same structure as passed to show_affix():
* `.lang` (required): Overall language object
* `.parts` (required): Array of affix part objects with `.term`, `.lang`, `.id`, etc.
* `.pos`: Part of speech (defaults to "terms")
* `.sort_key`: Overall sort key for categories
'''WARNING''': This destructively modifies both `data` and the individual structures within `.parts`.
]==]
function export.get_affix_categories_only(data)
local text_sections, categories, borrowing_type = generate_affix_categories(data)
return categories
end
function export.show_surface_analysis(data)
data.surface_analysis = true
data.allow_no_affixes_or_compounds = true
return export.show_affix(data)
end
--[==[
Implementation of {{tl|compound}}.
'''WARNING''': This destructively modifies both `data` and the individual structures within `.parts`.
]==]
function export.show_compound(data)
data.pos = data.pos or default_pos
data.pos = pluralize(data.pos)
local text_sections, categories, borrowing_type =
process_etymology_type(data.type, data.nocap, data.notext, #data.parts > 0)
data.borrowing_type = borrowing_type
local parts_formatted = {}
local pos_for_category = (data.pos == "Perkataan") and "Kata" or data.pos
table.insert(categories, pos_for_category .. " majmuk")
-- Make links out of all the parts
local whole_words = 0
for i, part in ipairs(data.parts) do
canonicalize_part(part, data.lang, data.sc)
-- Determine affix type and get link and display terms (see text at top of file).
local affix_type, link_term, display_term = parse_term_for_affixes(part.term, part.lang, part.sc,
part.type, not part.alt, nil, part.id)
-- If the term is an interfix or the type was explicitly given, recognize it as such (which means e.g. that we
-- will display the term without hyphens for East Asian languages). Otherwise, ignore the fact that it looks
-- like an affix and display as specified in the template (but pay attention to the detected affix type for
-- certain tracking purposes).
if affix_type == "jalinan" or (part.type and part.type ~= "non-affix") then
-- If link_term is an empty string, either a bare ^ was specified or an empty term was used along with
-- inline modifiers. The intention in either case is not to link the term. Don't add a '*fixed with'
-- category in this case, or if the term is in a different language.
-- If part.alt would be the same as part.term, make it nil, so that it isn't erroneously tracked as being
-- redundant alt text.
if link_term and link_term ~= "" and not part.part_lang then
table.insert(categories, {cat = data.pos .. " dengan " .. affix_type .. " " ..
strip_diacritics_no_links(part.lang, link_term), sort_key = part.sort or data.sort_key})
end
part.term = link_term ~= "" and link_term or nil
part.alt = part.alt or (display_term ~= link_term and display_term) or nil
else
if affix_type ~= "non-affix" then
local langcode = data.lang:getCode()
-- If `data.lang` is an etymology-only language, track both using its code and its full parent's code.
track { affix_type, affix_type .. "/lang/" .. langcode }
local full_langcode = data.lang:getFullCode()
if langcode ~= full_langcode then
track(affix_type .. "/lang/" .. full_langcode)
end
else
whole_words = whole_words + 1
end
end
table.insert(parts_formatted, export.link_term(part, data, "include_separator"))
end
if whole_words == 1 then
track("one whole word")
elseif whole_words == 0 then
track("looks like confix")
end
table.insert(text_sections, export.join_formatted_parts { data = data, parts_formatted = parts_formatted,
categories = categories, separator_already_added = true })
return table.concat(text_sections)
end
--[==[
Implementation of {{tl|blend}}, {{tl|univerbation}} and similar "compound-like" templates.
'''WARNING''': This destructively modifies both `data` and the individual structures within `.parts`.
]==]
function export.show_compound_like(data)
data.allow_no_affixes_or_compounds = true
local text_sections, categories, borrowing_type = generate_affix_categories(data)
if data.cat then
table.insert(categories, data.cat)
end
-- Process each part for display
local parts_formatted = {}
for i, part in ipairs_with_gaps(data.parts) do
-- Make a link for the part
table.insert(parts_formatted, export.link_term(part, data, "include_separator"))
end
if #data.parts > 0 and data.oftext then
table.insert(text_sections, 1, " " .. data.oftext .. " ")
end
if data.text then
table.insert(text_sections, 1, data.text)
end
table.insert(text_sections, export.join_formatted_parts { data = data, parts_formatted = parts_formatted,
categories = categories, separator_already_added = true })
return table.concat(text_sections)
end
--[==[
Make `part` (a structure holding information on an affix part) into an affix of type `affix_type`, and apply any
relevant affix mappings. For example, if the desired affix type is "akhiran", this will (in general) add a hyphen onto
the beginning of the term, alt, tr and ts components of the part if not already present. The hyphen that's added is the
"display hyphen" (see above) and may be script-specific. (In the case of East Asian scripts, the display hyphen is an
empty string whereas the template hyphen is the regular hyphen, meaning that any regular hyphen at the beginning of the
part will be effectively removed.) `lang` and `sc` hold overall language and script objects.
Note that this also applies any language-specific affix mappings, so that e.g. if the language is Finnish and the user
specified [[-käs]] in the affix and didn't specify an `.alt` value, `part.term` will contain [[-kas]] and `part.alt` will
contain [[-käs]].
This function is used by the "legacy" templates ({{tl|prefix}}, {{tl|suffix}}, {{tl|confix}}, etc.) where the nature of
the affix is specified by the template itself rather than auto-determined from the affix, as is the case with
{{tl|affix}}.
'''WARNING''': This destructively modifies `part`.
]==]
local function make_part_into_affix(part, lang, sc, affix_type)
canonicalize_part(part, lang, sc)
local link_term, display_term = export.make_affix(part.term, part.lang, part.sc, affix_type, not part.alt, nil, part.id)
part.term = link_term
-- When we don't specify `do_affix_mapping` to make_affix(), link and display terms (first and second retvals of
-- make_affix()) are the same.
-- If part.alt would be the same as part.term, make it nil, so that it isn't erroneously tracked as being
-- redundant alt text.
part.alt = part.alt and export.make_affix(part.alt, part.lang, part.sc, affix_type) or (display_term ~= link_term and display_term) or nil
local Latn = require(scripts_module).getByCode("Latn")
part.tr = export.make_affix(part.tr, part.lang, Latn, affix_type)
part.ts = export.make_affix(part.ts, part.lang, Latn, affix_type)
end
local function track_wrong_affix_type(template, part, expected_affix_type)
if part and not part.type then
local affix_type = parse_term_for_affixes(part.term, part.lang, part.sc)
if affix_type ~= expected_affix_type then
local part_name = expected_affix_type or "base"
local langcode = part.lang:getCode()
local full_langcode = part.lang:getFullCode()
require("Module:debug/track") {
template,
template .. "/" .. part_name,
template .. "/" .. part_name .. "/" .. (affix_type or "none"),
template .. "/" .. part_name .. "/" .. (affix_type or "none") .. "/lang/" .. langcode
}
-- If `part.lang` is an etymology-only language, track both using its code and its full parent's code.
if full_langcode ~= langcode then
require("Module:debug/track")(
template .. "/" .. part_name .. "/" .. (affix_type or "none") .. "/lang/" .. full_langcode
)
end
end
end
end
local function insert_affix_category(categories, pos, affix_type, part, sort_key, sort_base)
-- Don't add a '*fixed with' category if the link term is empty or is in a different language.
if part.term and not part.part_lang then
local cat = pos .. " dengan " .. affix_type .. " " .. strip_diacritics_no_links(part.lang, part.term) ..
(part.id and " (" .. part.id .. ")" or "")
if sort_key or sort_base then
table.insert(categories, {cat = cat, sort_key = sort_key, sort_base = sort_base})
else
table.insert(categories, cat)
end
end
end
--[==[
Implementation of {{tl|circumfix}}.
'''WARNING''': This destructively modifies both `data` and `.prefix`, `.base` and `.suffix`.
]==]
function export.show_circumfix(data)
data.pos = data.pos or default_pos
data.pos = pluralize(data.pos)
canonicalize_part(data.base, data.lang, data.sc)
-- Hyphenate the affixes and apply any affix mappings.
make_part_into_affix(data.prefix, data.lang, data.sc, "awalan")
make_part_into_affix(data.suffix, data.lang, data.sc, "akhiran")
track_wrong_affix_type("apitan", data.prefix, "awalan")
track_wrong_affix_type("apitan", data.base, nil)
track_wrong_affix_type("apitan", data.suffix, "akhiran")
-- Create circumfix term.
local circumfix = nil
if data.prefix.term and data.suffix.term then
circumfix = data.prefix.term .. " " .. data.suffix.term
data.prefix.alt = data.prefix.alt or data.prefix.term
data.suffix.alt = data.suffix.alt or data.suffix.term
data.prefix.term = circumfix
data.suffix.term = circumfix
end
-- Make links out of all the parts.
local parts_formatted = {}
local categories = {}
local sort_base
if data.base.term then
sort_base = strip_diacritics_no_links(data.base.lang, data.base.term)
end
table.insert(parts_formatted, export.link_term(data.prefix, data))
table.insert(parts_formatted, export.link_term(data.base, data))
table.insert(parts_formatted, export.link_term(data.suffix, data))
-- Insert the categories, but don't add a '*fixed with' category if the link term is in a different language.
if not data.prefix.part_lang then
table.insert(categories, {cat=data.pos .. " dengan apitan " .. strip_diacritics_no_links(data.prefix.lang,
circumfix), sort_key=data.sort_key, sort_base=sort_base})
end
return export.join_formatted_parts { data = data, parts_formatted = parts_formatted, categories = categories }
end
--[==[
Implementation of {{tl|confix}}.
'''WARNING''': This destructively modifies both `data` and `.prefix`, `.base` and `.suffix`.
]==]
function export.show_confix(data)
data.pos = data.pos or default_pos
data.pos = pluralize(data.pos)
canonicalize_part(data.base, data.lang, data.sc)
-- Hyphenate the affixes and apply any affix mappings.
make_part_into_affix(data.prefix, data.lang, data.sc, "awalan")
make_part_into_affix(data.suffix, data.lang, data.sc, "akhiran")
track_wrong_affix_type("confix", data.prefix, "awalan")
track_wrong_affix_type("confix", data.base, nil)
track_wrong_affix_type("confix", data.suffix, "akhiran")
-- Make links out of all the parts.
local parts_formatted = {}
local prefix_sort_base
if data.base and data.base.term then
prefix_sort_base = strip_diacritics_no_links(data.base.lang, data.base.term)
elseif data.suffix.term then
prefix_sort_base = strip_diacritics_no_links(data.suffix.lang, data.suffix.term)
end
-- Insert the categories and parts.
local categories = {}
table.insert(parts_formatted, export.link_term(data.prefix, data))
insert_affix_category(categories, data.pos, "awalan", data.prefix, data.sort_key, prefix_sort_base)
if data.base then
table.insert(parts_formatted, export.link_term(data.base, data))
end
table.insert(parts_formatted, export.link_term(data.suffix, data))
-- FIXME, should we be specifying a sort base here?
insert_affix_category(categories, data.pos, "akhiran", data.suffix)
return export.join_formatted_parts { data = data, parts_formatted = parts_formatted, categories = categories }
end
--[==[
Implementation of {{tl|infix}}.
'''WARNING''': This destructively modifies both `data` and `.base` and `.infix`.
]==]
function export.show_infix(data)
data.pos = data.pos or default_pos
data.pos = pluralize(data.pos)
canonicalize_part(data.base, data.lang, data.sc)
-- Hyphenate the affixes and apply any affix mappings.
make_part_into_affix(data.infix, data.lang, data.sc, "sisipan")
track_wrong_affix_type("sisipan", data.base, nil)
track_wrong_affix_type("sisipan", data.infix, "sisipan")
-- Make links out of all the parts.
local parts_formatted = {}
local categories = {}
table.insert(parts_formatted, export.link_term(data.base, data))
table.insert(parts_formatted, export.link_term(data.infix, data))
-- Insert the categories.
-- FIXME, should we be specifying a sort base here?
insert_affix_category(categories, data.pos, "sisipan", data.infix)
return export.join_formatted_parts { data = data, parts_formatted = parts_formatted, categories = categories }
end
--[==[
Implementation of {{tl|prefix}}.
'''WARNING''': This destructively modifies both `data` and the structures within `.prefixes`, as well as `.base`.
]==]
function export.show_prefix(data)
data.pos = data.pos or default_pos
data.pos = pluralize(data.pos)
canonicalize_part(data.base, data.lang, data.sc)
-- Hyphenate the affixes and apply any affix mappings.
for i, prefix in ipairs(data.prefixes) do
make_part_into_affix(prefix, data.lang, data.sc, "awalan")
end
for i, prefix in ipairs(data.prefixes) do
track_wrong_affix_type("awalan", prefix, "awalan")
end
track_wrong_affix_type("awalan", data.base, nil)
-- Make links out of all the parts.
local parts_formatted = {}
local first_sort_base = nil
local categories = {}
if data.prefixes[2] then
first_sort_base = ine(data.prefixes[2].term) or ine(data.prefixes[2].alt)
if first_sort_base then
first_sort_base = strip_diacritics_no_links(data.prefixes[2].lang, first_sort_base)
end
elseif data.base then
first_sort_base = ine(data.base.term) or ine(data.base.alt)
if first_sort_base then
first_sort_base = strip_diacritics_no_links(data.base.lang, first_sort_base)
end
end
for i, prefix in ipairs(data.prefixes) do
table.insert(parts_formatted, export.link_term(prefix, data))
insert_affix_category(categories, data.pos, "awalan", prefix, data.sort_key, i == 1 and first_sort_base or nil)
end
if data.base then
table.insert(parts_formatted, export.link_term(data.base, data))
else
table.insert(parts_formatted, "")
end
return export.join_formatted_parts { data = data, parts_formatted = parts_formatted, categories = categories }
end
--[==[
Implementation of {{tl|suffix}}.
'''WARNING''': This destructively modifies both `data` and the structures within `.suffixes`, as well as `.base`.
]==]
function export.show_suffix(data)
local categories = {}
data.pos = data.pos or default_pos
data.pos = pluralize(data.pos)
canonicalize_part(data.base, data.lang, data.sc)
-- Hyphenate the affixes and apply any affix mappings.
for i, suffix in ipairs(data.suffixes) do
make_part_into_affix(suffix, data.lang, data.sc, "akhiran")
end
track_wrong_affix_type("akhiran", data.base, nil)
for i, suffix in ipairs(data.suffixes) do
track_wrong_affix_type("akhiran", suffix, "akhiran")
end
-- Make links out of all the parts.
local parts_formatted = {}
if data.base then
table.insert(parts_formatted, export.link_term(data.base, data))
else
table.insert(parts_formatted, "")
end
for i, suffix in ipairs(data.suffixes) do
table.insert(parts_formatted, export.link_term(suffix, data))
end
-- Insert the categories.
for i, suffix in ipairs(data.suffixes) do
-- FIXME, should we be specifying a sort base here?
insert_affix_category(categories, data.pos, "akhiran", suffix)
if suffix.pos and rfind(suffix.pos, "patronym") then
table.insert(categories, "patronim")
end
end
return export.join_formatted_parts { data = data, parts_formatted = parts_formatted, categories = categories }
end
return export
slamb5x6tkpue2giabenj2y4codffhb
Modul:fi-nominals
828
10523
344479
235316
2026-05-27T09:34:22Z
Hakimi97
2668
Mengemas kini mengikut padanan Wikikamus bahasa Inggeris (semakan [[en:Special:Diff/90292885|90292885]])
344479
Scribunto
text/plain
local export = {}
local m_str_utils = require("Module:string utilities")
local find = m_str_utils.find
local gsub = m_str_utils.gsub
local match = m_str_utils.match
local sub = m_str_utils.sub
local unpack = unpack or table.unpack -- Lua 5.2 compatibility
local lang = require("Module:languages").getByCode("fi")
-- Functions that do the actual inflecting by creating the forms of a basic term.
local inflections = {}
local kotus_grad_type = {
["kk-k"] = "A",
["pp-p"] = "B",
["tt-t"] = "C",
["k-"] = "D",
["p-v"] = "E",
["t-d"] = "F",
["nk-ng"] = "G",
["mp-mm"] = "H",
["lt-ll"] = "I",
["nt-nn"] = "J",
["rt-rr"] = "K",
["k-j"] = "L",
["k-v"] = "M"
}
local m_bit32 -- loaded later if needed
local RARE = '<span class="narrow-space"> </span><sup>rare</sup>'
local function normalize_apostrophes(term, link_target)
if link_target then
if term and find(term, "’") then
term = gsub(term, "’", "'")
end
else
if term and find(term, "'") then
term = gsub(term, "'", "’")
end
end
return term
end
local function full_link(...)
full_link = require("Module:links").full_link
return full_link(...)
end
local function tag_text(...)
tag_text = require("Module:script utilities").tag_text
return tag_text(...)
end
-- Creates a link to a form.
local function make_link(term, accel_form)
-- do not link inflected forms of suffixes
if match(term, "^-") then
if term == mw.title.getCurrentTitle().fullText then
return '<span class="Latn" lang="fi"><strong class="selflink">' .. term .. '</strong></span>'
end
return '<span class="Latn" lang="fi">' .. term .. '</span>'
end
if find(term, ":") then term = gsub(term, ":", "\\:") end
return full_link({
lang = lang,
term = term,
accel = accel_form and ({ form = accel_form }) or nil
})
end
local function tag_term(term)
return tag_text(term, lang, nil, "term")
end
local function do_inflection_internal(data, argobj)
local args = argobj.args
argobj.pos = 1
data.words = {}
data.num = 1
data.forms = nil
data.categories = {}
for num, infl_type in ipairs(data.infl_types) do
-- initialize data for single word
local word_data = {forms = {}, title = nil, categories = {}}
-- word index
word_data.num = num
data.num = num
-- Generate the forms
inflections[infl_type](argobj, word_data)
postprocess_word(argobj, word_data, data, num == #data.infl_types)
word_data.class = infl_type
data.words[num] = word_data
end
if #data.words > 1 then
-- join the inflected word components
export.join_words(data, function (n) return args["space" .. tostring(n)] or args["space"] or " " end)
else
data.vh = data.words[1].vh
data.forms = data.words[1].forms
data.title = data.words[1].title
data.categories = data.words[1].categories
end
-- Postprocess
postprocess(args, data)
end
-- The main entry point.
-- This is the only function that can be invoked from a template.
function export.show(frame)
local infl_type = frame.args[1] or error("Inflection type has not been specified. Please pass parameter 1 to the module invocation")
local args = frame:getParent().args
local infl_types = {infl_type}
infl_types = mw.text.split(infl_type, "%-")
for _, type in ipairs(infl_types) do
if not inflections[type] then
error("Unknown inflection type '" .. infl_type .. "'")
end
end
local pos = args["pos"]; if not pos or pos == "" then pos = "kata nama" end
local allow_possessive = (pos == "kata nama" or pos == "adj") and not args["poss"]
-- initialize data for full inflection process
local data = {
pagename = mw.loadData("Module:headword/data").pagename,
infl_types = infl_types,
poss = args["poss"]
}
local argobj = {args = args}
if args["title"] and mw.title.getCurrentTitle().namespace > 0 then
data.pagename = args.title
elseif find(data.pagename, "^Tajuk tidak disokong/") then
data.pagename = gsub(data.pagename, "^Tajuk tidak disokong/", "")
end
data.pagename = normalize_apostrophes(data.pagename)
do_inflection_internal(data, argobj)
--if args["type"] then table.insert(data.categories, "fi-decl with type") end
--if args["nocheck"] then table.insert(data.categories, "fi-decl with nocheck") end
--if args["nosg"] then table.insert(data.categories, "fi-decl with nosg") end
--if args["nopl"] then table.insert(data.categories, "fi-decl with nopl") end
local function get_poss_forms(poss)
data.poss = poss
do_inflection_internal(data, argobj)
return data
end
local categories
if args["appendix"] then
categories = ""
else
categories = require("Module:utilities").format_categories(data.categories, lang)
end
return make_table(data, true)
.. (allow_possessive and make_possessive_table(data.pagename, args, pos, data.title, get_poss_forms) or "")
.. categories
.. require("Module:TemplateStyles")("Module:fi-nominals/style.css")
end
local function args_get_required(args, i, purpose)
local v = args[i]
if not v then
error(purpose .. " (parameter " .. i .. ") may not be omitted.")
end
return v
end
local function args_get_vowel_harmony(args, i)
local v = args[i]
if not v or not match(v, "^[aä]$") then
error("Vowel harmony (parameter " .. i .. ") must be \"a\" or \"ä\".")
end
return v
end
function get_params(argobj, num, invert_grades)
local params = {}
local args = argobj.args
local pos = argobj.pos
params.base = normalize_apostrophes(args[pos])
if num >= 2 then
if num >= 4 then
params.strong = normalize_apostrophes(args_get_required(args, pos + 1, "Nominative grade"))
params.weak = normalize_apostrophes(args_get_required(args, pos + 2, "Genitive grade"))
-- Swap the grades
if invert_grades then
params.strong, params.weak = params.weak, params.strong
end
end
if num >= 5 then
params.final = args_get_required(args, pos + 3, "Final letter(s)")
end
params.a = args_get_vowel_harmony(args, pos + num - 1)
else
params.base = params.base or ""
end
if params.a then
params.o = params.a == "ä" and "ö" or "o"
params.u = params.a == "ä" and "y" or "u"
end
argobj.pos = argobj.pos + num
return params
end
function get_extra_arg(argobj, wdata, name, fallback)
return argobj.args[name .. wdata.num] or argobj.args[name]
end
--[=[
Inflection functions
]=]--
local stem_endings = {}
stem_endings["nom_sg"] = {
["nom_sg"] = "",
}
stem_endings["sg"] = {
["ess_sg"] = "na",
}
stem_endings["sg_weak"] = {
["gen_sg"] = "n",
["ine_sg"] = "ssa",
["ela_sg"] = "sta",
["ade_sg"] = "lla",
["abl_sg"] = "lta",
["all_sg"] = "lle",
["tra_sg"] = "ksi",
["ins_sg"] = "n",
["abe_sg"] = "tta",
["nom_pl"] = "t",
}
stem_endings["par_sg"] = {
["par_sg"] = "a",
}
stem_endings["ill_sg"] = {
["ill_sg"] = "Vn",
}
stem_endings["pl"] = {
["ess_pl"] = "na",
["com_pl"] = "ne",
}
stem_endings["pl_weak"] = {
["ine_pl"] = "ssa",
["ela_pl"] = "sta",
["ade_pl"] = "lla",
["abl_pl"] = "lta",
["all_pl"] = "lle",
["tra_pl"] = "ksi",
["ins_pl"] = "n",
["abe_pl"] = "tta",
}
stem_endings["par_pl"] = {
["par_pl"] = "a",
}
stem_endings["gen_pl"] = {
["gen_pl"] = "en",
}
stem_endings["ill_pl"] = {
["ill_pl"] = "Vn",
}
-- Make a copy of the endings, with front vowels
stem_endings = {["a"] = stem_endings, ["ä"] = mw.clone(stem_endings)}
for stem_key, endings in pairs(stem_endings["ä"]) do
for key, ending in pairs(endings) do
endings[key] = gsub(endings[key], "([aou])", {["a"] = "ä", ["o"] = "ö", ["u"] = "y"})
end
end
-- data for generating possessive forms
-- suffixes per person
local poss_forms = {["1s"] = "ni", ["2s"] = "si", ["3s"] = "nsa", ["1p"] = "mme", ["2p"] = "nne"}
local poss_alt = {--["00"] = false, ["1s"] = false, ["2s"] = false, ["1p"] = false, ["2p"] = false,
["3s"] = true, -- shorter form -Vn
}
-- which forms allow -nsa > -Vn?
local forms_alt_ok = {
["gen_sg"] = false, ["gen_pl"] = false,
["par_sg"] = false, ["par_pl"] = true,
["ine_sg"] = true, ["ine_pl"] = true,
["ela_sg"] = true, ["ela_pl"] = true,
["ill_sg"] = false, ["ill_pl"] = false,
["ade_sg"] = true, ["ade_pl"] = true,
["abl_sg"] = true, ["abl_pl"] = true,
["all_sg"] = true, ["all_pl"] = true,
["ess_sg"] = true, ["ess_pl"] = true,
["tra_sg"] = true, ["tra_pl"] = true,
["ins_sg"] = false, ["ins_pl"] = false,
["abe_sg"] = true, ["abe_pl"] = true,
["com_sg"] = true, ["com_pl"] = true,
}
-- which forms end in -n?
-- (in which case it is dropped before the possessive suffix)
local forms_gen_ok = {
["gen_sg"] = true, ["gen_pl"] = true,
["ill_sg"] = true, ["ill_pl"] = true,
["ins_sg"] = true, ["ins_pl"] = true,
}
local function feed_list(outputs, inputs)
for key, values in pairs(inputs) do
outputs[key] = outputs[key] or {}
for _, value in ipairs(values) do
table.insert(outputs[key], value)
end
end
end
local function process_stems(data, stems, vh)
-- Create any stems that were not given
stems["nom_sg"] = stems["nom_sg"] or mw.clone(stems["sg"])
stems["par_sg"] = stems["par_sg"] or mw.clone(stems["sg"])
stems["par_pl"] = stems["par_pl"] or mw.clone(stems["pl"])
stems["ill_pl"] = stems["ill_pl"] or mw.clone(stems["pl"])
if not stems["ill_sg"] and stems["sg"] then
stems["ill_sg"] = {}
for _, stem in ipairs(stems["sg"]) do
-- If the stem ends in a long vowel or diphthong, then add -h
if find(stem, "([aeiouyäö])%1$") or find(stem, "[aeiouyäö][iuyü]$") then
table.insert(stems["ill_sg"], stem .. "h")
else
table.insert(stems["ill_sg"], stem)
end
end
end
if not stems["gen_pl"] and stems["par_pl"] then
stems["gen_pl"] = {}
for _, stem in ipairs(stems["par_pl"]) do
-- If the partitive plural stem ends in -it, then replace the t with d or tt
if find(stem, "it$") then
table.insert(stems["gen_pl"], (gsub(stem, "t$", "d")))
table.insert(stems["gen_pl"], stem .. "t")
else
table.insert(stems["gen_pl"], stem)
end
end
end
-- Create forms based on each stem, by adding endings to it
stems["sg_weak"] = stems["sg_weak"] or mw.clone(stems["sg"])
stems["pl_weak"] = stems["pl_weak"] or mw.clone(stems["pl"])
-- Go through each of the stems given
for stem_key, substems in pairs(stems) do
for _, stem in ipairs(substems) do
-- Attach the endings to the stem
for form_key, ending in pairs(stem_endings[vh][stem_key]) do
if not data.forms[form_key] then
data.forms[form_key] = {}
end
-- "V" is a copy of the last vowel in the stem
if find(ending, "V") then
local vowel = match(stem, "([aeiouyäö])[^aeiouyäö]*$")
ending = gsub(ending, "V", vowel or "?")
end
table.insert(data.forms[form_key], stem .. ending)
end
end
end
data["stems"] = stems
data["vh"] = vh
end
local function make_kotus_title_number(type_number)
return "[[Kotus]] jenis " .. type_number
end
local function make_kotus_title_word(reference_word)
return '/<span lang="fi" class="Latn">[[Lampiran:Deklensi bahasa Finland/' .. reference_word .. '|' .. reference_word .. ']]</span>'
end
local function make_kotus_title(number, reference_word)
return make_kotus_title_number(number) .. make_kotus_title_word(reference_word)
end
local function inflection_type_is(data, number, reference_word, strong, weak)
local title = make_kotus_title_number(number)
local has_gradation = strong and strong ~= weak
if has_gradation then
local letter = kotus_grad_type[strong .. "-" .. weak]
if letter then
title = title .. "*" .. letter
else
title = title .. "*"
end
end
title = title .. make_kotus_title_word(reference_word)
if has_gradation then
local EMPTY = "<small>∅</small>"
local function format(grade)
if grade == "" then
return EMPTY
else
return "''" .. grade .. "''"
end
end
title = title .. ", pemeringkatan " .. format(strong) .. "-" .. format(weak)
else
title = title .. ", tiada pemeringkatan"
end
data.title = title
table.insert(data.categories, "Kata bilangan jenis " .. reference_word .. " bahasa Finland")
end
--[=[
Inflection types
]=]--
inflections["valo"] = function(args, data)
local params = get_params(args, 5)
local wk_sg = params.weak
local wk_pl = params.weak
if sub(params.base, -1) == params.final then
if wk_sg == "" and (find(params.base, "[aeiouyäö][iuy]$") or find(params.base, "[iuy][eoö]$")) then
wk_sg = "’"
end
if wk_pl == "" then
wk_pl = "’"
end
end
local stems = {}
stems["sg"] = {params.base .. params.strong .. params.final}
stems["sg_weak"] = {params.base .. wk_sg .. params.final}
stems["pl"] = {params.base .. params.strong .. params.final .. "i"}
stems["pl_weak"] = {params.base .. wk_pl .. params.final .. "i"}
stems["par_pl"] = {params.base .. params.strong .. params.final .. "j"}
stems["ill_pl"] = {params.base .. params.strong .. params.final .. "ih"}
inflection_type_is(data, 1, "valo", params.strong, params.weak)
process_stems(data, stems, params.a)
end
inflections["palvelu"] = function(args, data)
local params = get_params(args, 2)
local stems = {}
stems["sg"] = {params.base}
stems["pl"] = {params.base .. "i"}
stems["par_pl"] = {params.base .. "j", params.base .. "it"}
stems["ill_pl"] = {params.base .. "ih"}
inflection_type_is(data, 2, "palvelu")
process_stems(data, stems, params.a)
end
inflections["valtio"] = function(args, data)
local params = get_params(args, 2)
local final = sub(params.base, -1)
local stems = {}
stems["sg"] = {params.base}
stems["par_sg"] = {params.base .. "t"}
stems["pl"] = {params.base .. "i"}
stems["par_pl"] = {params.base .. "it"}
stems["ill_pl"] = {params.base .. "ih"}
inflection_type_is(data, 3, "valtio")
process_stems(data, stems, params.a)
end
inflections["laatikko"] = function(args, data)
local params = get_params(args, 5, false, "kk", "k", "o")
local stems = {}
stems["sg"] = {params.base .. params.strong .. params.final}
stems["sg_weak"] = {params.base .. params.weak .. params.final}
stems["pl"] = {params.base .. params.strong .. params.final .. "i"}
stems["pl_weak"] = {params.base .. params.weak .. params.final .. "i"}
stems["par_pl"] = {params.base .. params.strong .. params.final .. "j", params.base .. params.weak .. params.final .. "it"}
stems["ill_pl"] = {params.base .. params.strong .. params.final .. "ih", params.base .. params.weak .. params.final .. "ih"}
inflection_type_is(data, 4, "laatikko", params.strong, params.weak)
process_stems(data, stems, params.a)
end
inflections["risti"] = function(args, data)
local params = get_params(args, 4)
local i = get_extra_arg(args, data, "i"); if i == "0" then i = "" else i = "i" end
local stems = {}
stems["nom_sg"] = {params.base .. params.strong .. i}
stems["sg"] = {params.base .. params.strong .. "i"}
stems["sg_weak"] = {params.base .. params.weak .. "i"}
stems["pl"] = {params.base .. params.strong .. "ei"}
stems["pl_weak"] = {params.base .. params.weak .. "ei"}
stems["gen_pl"] = {params.base .. params.strong .. "i"}
stems["par_pl"] = {params.base .. params.strong .. "ej"}
stems["ill_pl"] = {params.base .. params.strong .. "eih"}
inflection_type_is(data, 5, "risti", params.strong, params.weak)
process_stems(data, stems, params.a)
end
inflections["paperi"] = function(args, data)
local params = get_params(args, 2)
local i = get_extra_arg(args, data, "i"); if i == "0" then i = "" else i = "i" end
local stems = {}
stems["nom_sg"] = {params.base .. i}
stems["sg"] = {params.base .. "i"}
stems["pl"] = {params.base .. "ei"}
stems["par_pl"] = {params.base .. "eit", params.base .. "ej"}
stems["gen_pl"] = {params.base .. "i", params.base .. "eid", params.base .. "eitt"}
stems["ill_pl"] = {params.base .. "eih"}
inflection_type_is(data, 6, "paperi")
process_stems(data, stems, params.a)
end
inflections["ovi"] = function(args, data)
local params = get_params(args, 4)
local nom_sg = get_extra_arg(args, data, "nom_sg"); if nom_sg == "" then nom_sg = nil end
local wk_pl = params.weak
if sub(params.base, -1) == "i" and params.strong == "k" and params.weak == "" then
wk_pl = "’"
end
local stems = {}
stems["nom_sg"] = {nom_sg or params.base .. params.strong .. "i"}
stems["sg"] = {params.base .. params.strong .. "e"}
stems["sg_weak"] = {params.base .. params.weak .. "e"}
stems["pl"] = {params.base .. params.strong .. "i"}
stems["pl_weak"] = {params.base .. wk_pl .. "i"}
inflection_type_is(data, 7, "ovi", params.strong, params.weak)
process_stems(data, stems, params.a)
end
inflections["nalle"] = function(args, data)
local params = get_params(args, 4)
local stems = {}
stems["sg"] = {params.base .. params.strong .. "e"}
stems["sg_weak"] = {params.base .. params.weak .. "e"}
stems["pl"] = {params.base .. params.strong .. "ei"}
stems["pl_weak"] = {params.base .. params.weak .. "ei"}
stems["par_pl"] = {params.base .. params.strong .. "ej"}
stems["ill_pl"] = {params.base .. params.strong .. "eih"}
inflection_type_is(data, 8, "nalle", params.strong, params.weak)
process_stems(data, stems, params.a)
data.forms["gen_pl"].rare = {params.base .. params.strong .. "ein"}
end
inflections["kala"] = function(args, data)
local params = get_params(args, 4)
local ain = get_extra_arg(args, data, "ain"); if ain == "" then ain = nil end
local wk_sg = params.weak
if wk_sg == "" and sub(params.base, -2) == params.a .. params.a then
wk_sg = "’"
end
local stems = {}
stems["sg"] = {params.base .. params.strong .. params.a}
stems["sg_weak"] = {params.base .. wk_sg .. params.a}
stems["pl"] = {params.base .. params.strong .. params.o .. "i"}
stems["pl_weak"] = {params.base .. params.weak .. params.o .. "i"}
stems["par_pl"] = {params.base .. params.strong .. params.o .. "j"}
stems["ill_pl"] = {params.base .. params.strong .. params.o .. "ih"}
inflection_type_is(data, 9, "kala", params.strong, params.weak)
process_stems(data, stems, params.a)
local ain_form = params.base .. params.strong .. params.a .. "in"
if ain == "2" then
table.insert(data.forms["gen_pl"], 1, ain_form)
elseif ain == "1" then
table.insert(data.forms["gen_pl"], ain_form)
else
data.forms["gen_pl"].rare = {ain_form}
end
end
inflections["koira"] = function(args, data)
local params = get_params(args, 4)
local nom_sg = get_extra_arg(args, data, "nom_sg"); if nom_sg == "" then nom_sg = nil end
local apo_pl = get_extra_arg(args, data, "apo_pl"); if apo_pl == "" then apo_pl = nil end
local ain = get_extra_arg(args, data, "ain"); if ain == "" then ain = nil end
local wk_sg = params.weak
local wk_pl = params.weak
if wk_sg == "" and sub(params.base, -2) == params.a .. params.a then
wk_sg = "’"
end
if wk_pl == "" and sub(params.base, -1) == "i" then
wk_pl = "’"
end
local stems = {}
stems["nom_sg"] = {nom_sg or params.base .. params.strong .. params.a}
stems["sg"] = {params.base .. params.strong .. params.a}
stems["sg_weak"] = {params.base .. wk_sg .. params.a}
stems["pl"] = {params.base .. params.strong .. (apo_pl and "'" or "") .. "i"}
stems["pl_weak"] = {params.base .. wk_pl .. (apo_pl and "'" or "") .. "i"}
inflection_type_is(data, 10, "koira", params.strong, params.weak)
process_stems(data, stems, params.a)
local ain_form = params.base .. params.strong .. params.a .. "in"
if ain == "2" then
table.insert(data.forms["gen_pl"], 1, ain_form)
elseif ain == "1" then
table.insert(data.forms["gen_pl"], ain_form)
else
data.forms["gen_pl"].rare = {ain_form}
end
end
inflections["omena"] = function(args, data)
local params = get_params(args, 2)
local stems = {}
stems["sg"] = {params.base .. params.a}
stems["pl"] = {params.base .. params.o .. "i", params.base .. "i"}
stems["par_pl"] = {params.base .. "i", params.base .. params.o .. "it"}
stems["ill_pl"] = {params.base .. "i", params.base .. params.o .. "ih"}
inflection_type_is(data, 11, "omena")
process_stems(data, stems, params.a)
data.forms["gen_pl"].rare = {params.base .. params.o .. "jen", params.base .. params.a .. "in"}
data.forms["par_pl"].rare = {params.base .. params.o .. "j" .. params.a}
end
inflections["kulkija"] = function(args, data)
local params = get_params(args, 2)
local stems = {}
stems["sg"] = {params.base .. params.a}
stems["pl"] = {params.base .. params.o .. "i"}
stems["par_pl"] = {params.base .. params.o .. "it"}
stems["ill_pl"] = {params.base .. params.o .. "ih"}
inflection_type_is(data, 12, "kulkija")
process_stems(data, stems, params.a)
data.forms["gen_pl"].rare = {params.base .. params.a .. "in"}
end
inflections["katiska"] = function(args, data)
local params = get_params(args, 2)
local stems = {}
stems["sg"] = {params.base .. params.a}
stems["pl"] = {params.base .. params.o .. "i"}
stems["par_pl"] = {params.base .. params.o .. "it", params.base .. params.o .. "j"}
stems["ill_pl"] = {params.base .. params.o .. "ih"}
inflection_type_is(data, 13, "katiska")
process_stems(data, stems, params.a)
data.forms["gen_pl"].rare = {params.base .. params.a .. "in"}
end
inflections["solakka"] = function(args, data)
local params = get_params(args, 4)
local stems = {}
stems["sg"] = {params.base .. params.strong .. params.a}
stems["sg_weak"] = {params.base .. params.weak .. params.a}
stems["pl"] = {params.base .. params.strong .. params.o .. "i"}
stems["pl_weak"] = {params.base .. params.weak .. params.o .. "i"}
stems["par_pl"] = {params.base .. params.weak .. params.o .. "it", params.base .. params.strong .. params.o .. "j"}
stems["ill_pl"] = {params.base .. params.weak .. params.o .. "ih", params.base .. params.strong .. params.o .. "ih"}
inflection_type_is(data, 14, "solakka", params.strong, params.weak)
process_stems(data, stems, params.a)
data.forms["gen_pl"].rare = {params.base .. params.strong .. params.a .. "in"}
end
inflections["korkea"] = function(args, data)
local params = get_params(args, 2)
local final = sub(params.base, -1)
local stems = {}
stems["sg"] = {params.base .. params.a}
stems["par_sg"] = {params.base .. params.a, params.base .. params.a .. "t"}
stems["pl"] = {params.base .. "i"}
stems["par_pl"] = {params.base .. "it"}
stems["ill_pl"] = {params.base .. "isi", params.base .. "ih"}
inflection_type_is(data, 15, "korkea")
process_stems(data, stems, params.a)
data.forms["gen_pl"].rare = {params.base .. params.a .. "in"}
end
inflections["vanhempi"] = function(args, data)
local params = get_params(args, 2)
local stems = {}
stems["nom_sg"] = {params.base .. "mpi"}
stems["sg"] = {params.base .. "mp" .. params.a}
stems["sg_weak"] = {params.base .. "mm" .. params.a}
stems["pl"] = {params.base .. "mpi"}
stems["pl_weak"] = {params.base .. "mmi"}
inflection_type_is(data, 16, "vanhempi", "mp", "mm")
process_stems(data, stems, params.a)
data.forms["gen_pl"].rare = {params.base .. "mp" .. params.a .. "in"}
end
inflections["vapaa"] = function(args, data)
local params = get_params(args, 2)
local final = sub(params.base, -1)
local stems = {}
stems["sg"] = {params.base .. final}
stems["par_sg"] = {params.base .. final .. "t"}
stems["ill_sg"] = {params.base .. final .. "se"}
stems["pl"] = {params.base .. "i"}
stems["par_pl"] = {params.base .. "it"}
stems["ill_pl"] = {params.base .. "isi"}
inflection_type_is(data, 17, "vapaa")
process_stems(data, stems, params.a)
data.forms["ill_pl"].rare = {params.base .. "ihin"}
end
inflections["maa"] = function(args, data)
local params = get_params(args, 2)
local pl_stem = sub(params.base, 1, -2)
local stems = {}
stems["sg"] = {params.base}
stems["par_sg"] = {params.base .. "t"}
stems["pl"] = {pl_stem .. "i"}
stems["par_pl"] = {pl_stem .. "it"}
stems["ill_pl"] = {pl_stem .. "ih"}
inflection_type_is(data, 18, "maa")
process_stems(data, stems, params.a)
end
inflections["suo"] = function(args, data)
local params = get_params(args, 2)
local hyphen = get_extra_arg(args, data, "hyphen") == "1"
local final = sub(params.base, -1)
local stem = sub(params.base, 1, -3)
local plural
if sub(stem, -1) == final then
plural = stem .. "-" .. final
elseif find(stem, "-$") and sub(stem, -1) ~= final and not hyphen then
plural = sub(stem, 1, -2) .. final
else
plural = stem .. final
end
local stems = {}
stems["sg"] = {params.base}
stems["par_sg"] = {params.base .. "t"}
stems["ill_sg"] = {params.base .. "h"}
stems["pl"] = {plural .. "i"}
stems["par_pl"] = {plural .. "it"}
stems["ill_pl"] = {plural .. "ih"}
inflection_type_is(data, 19, "suo")
process_stems(data, stems, params.a)
end
inflections["filee"] = function(args, data)
local params = get_params(args, 2)
local nom_sg = get_extra_arg(args, data, "nom_sg"); if nom_sg == "" then nom_sg = nil end
local pl_stem = sub(params.base, 1, -2)
local stems = {}
stems["nom_sg"] = {nom_sg or params.base}
stems["sg"] = {params.base}
stems["par_sg"] = {params.base .. "t"}
stems["ill_sg"] = {params.base .. "h", params.base .. "se"}
stems["pl"] = {pl_stem .. "i"}
stems["par_pl"] = {pl_stem .. "it"}
stems["ill_pl"] = {pl_stem .. "ih", pl_stem .. "isi"}
inflection_type_is(data, 20, "filee")
process_stems(data, stems, params.a)
end
inflections["rosé"] = function(args, data)
local params = get_params(args, 2)
local ill_sg_vowel = get_extra_arg(args, data, "ill_sg_vowel"); if ill_sg_vowel == "" then error("Parameter \"ill_sg_vowel=\" cannot be empty.") end
local ill_sg_vowel2 = get_extra_arg(args, data, "ill_sg_vowel2"); if ill_sg_vowel2 == "" then error("Parameter \"ill_sg_vowel2=\" cannot be empty.") end
local nom_sg = get_extra_arg(args, data, "nom_sg"); if nom_sg == "" then nom_sg = nil end
local stems = {}
stems["nom_sg"] = {nom_sg or params.base}
stems["sg"] = {params.base}
stems["par_sg"] = {params.base .. "t"}
stems["ill_sg"] = {params.base .. "h"}
stems["pl"] = {params.base .. "i"}
stems["par_pl"] = {params.base .. "it"}
stems["ill_pl"] = {params.base .. "ih"}
inflection_type_is(data, 21, "rosé")
process_stems(data, stems, params.a)
if ill_sg_vowel then
data.forms["ill_sg"] = {params.base .. "h" .. ill_sg_vowel .. "n"}
end
if ill_sg_vowel2 then
table.insert(data.forms["ill_sg"], params.base .. "h" .. ill_sg_vowel2 .. "n")
end
end
inflections["parfait"] = function(args, data)
local params = get_params(args, 2)
local ill_sg_vowel = get_extra_arg(args, data, "ill_sg_vowel"); if ill_sg_vowel == "" then error("Parameter \"ill_sg_vowel=\" is missing.") end
local ill_sg_vowel2 = get_extra_arg(args, data, "ill_sg_vowel2"); if ill_sg_vowel2 == "" then error("Parameter \"ill_sg_vowel2=\" cannot be empty.") end
local stems = {}
stems["nom_sg"] = {params.base}
stems["sg"] = {params.base .. "’"}
stems["par_sg"] = {params.base .. "’t"}
stems["pl"] = {params.base .. "’i"}
stems["par_pl"] = {params.base .. "’it"}
stems["ill_pl"] = {params.base .. "’ih"}
inflection_type_is(data, 22, "parfait")
process_stems(data, stems, params.a)
data.forms["ill_sg"] = {params.base .. "’h" .. ill_sg_vowel .. "n"}
if ill_sg_vowel2 then
table.insert(data.forms["ill_sg"], params.base .. "h" .. ill_sg_vowel2 .. "n")
end
end
inflections["tiili"] = function(args, data)
local params = get_params(args, 2)
local stems = {}
stems["nom_sg"] = {params.base .. "i"}
stems["sg"] = {params.base .. "e"}
stems["par_sg"] = {params.base .. "t"}
stems["pl"] = {params.base .. "i"}
inflection_type_is(data, 23, "tiili")
process_stems(data, stems, params.a)
end
inflections["uni"] = function(args, data)
local params = get_params(args, 2)
local par_sg_a = get_extra_arg(args, data, "par_sg_a"); if par_sg_a and par_sg_a ~= "a" and par_sg_a ~= "ä" then error("Parameter \"par_sg_a=\" must be \"a\" or \"ä\".") end
local stems = {}
stems["nom_sg"] = {params.base .. "i"}
stems["sg"] = {params.base .. "e"}
stems["par_sg"] = {params.base .. "t"}
stems["pl"] = {params.base .. "i"}
stems["gen_pl"] = {params.base .. "i", params.base .. "t"}
inflection_type_is(data, 24, "uni")
process_stems(data, stems, params.a)
if par_sg_a then
data.forms["par_sg"] = {}
for _, stem in ipairs(stems["par_sg"]) do
table.insert(data.forms["par_sg"], stem .. par_sg_a)
end
end
end
inflections["toimi"] = function(args, data)
local params = get_params(args, 2)
local stems = {}
stems["nom_sg"] = {params.base .. "mi"}
stems["sg"] = {params.base .. "me"}
stems["par_sg"] = {params.base .. "nt", params.base .. "me"}
stems["pl"] = {params.base .. "mi"}
stems["gen_pl"] = {params.base .. "mi", params.base .. "nt"}
inflection_type_is(data, 25, "toimi")
process_stems(data, stems, params.a)
end
inflections["pieni"] = function(args, data)
local params = get_params(args, 2)
local par_sg_a = get_extra_arg(args, data, "par_sg_a"); if par_sg_a and par_sg_a ~= "a" and par_sg_a ~= "ä" then error("Parameter \"par_sg_a=\" must be \"a\" or \"ä\".") end
local stems = {}
stems["nom_sg"] = {params.base .. "i"}
stems["sg"] = {params.base .. "e"}
stems["par_sg"] = {params.base .. "t"}
stems["pl"] = {params.base .. "i"}
stems["gen_pl"] = {params.base .. "t", params.base .. "i"}
inflection_type_is(data, 26, "pieni")
process_stems(data, stems, params.a)
if par_sg_a then
data.forms["par_sg"] = {}
for _, stem in ipairs(stems["par_sg"]) do
table.insert(data.forms["par_sg"], stem .. par_sg_a)
end
end
end
inflections["käsi"] = function(args, data)
local params = get_params(args, 2)
local stems = {}
stems["nom_sg"] = {params.base .. "si"}
stems["sg"] = {params.base .. "te"}
stems["sg_weak"] = {params.base .. "de"}
stems["par_sg"] = {params.base .. "tt"}
stems["pl"] = {params.base .. "si"}
inflection_type_is(data, 27, "käsi", "t", "d")
process_stems(data, stems, params.a)
data.forms["gen_pl"].rare = {params.base .. "tten"}
end
inflections["kynsi"] = function(args, data)
local params = get_params(args, 2, false, "n")
local cons = match(params.base, "[lnr]$")
if not cons then error("Stem must end in \"l\", \"n\" or \"r\".") end
local stems = {}
stems["nom_sg"] = {params.base .. "si"}
stems["sg"] = {params.base .. "te"}
stems["sg_weak"] = {params.base .. cons .. "e"}
stems["par_sg"] = {params.base .. "tt"}
stems["pl"] = {params.base .. "si"}
inflection_type_is(data, 28, "kynsi", cons .. "t", cons .. cons)
process_stems(data, stems, params.a)
data.forms["gen_pl"].rare = {params.base .. "tten"}
end
inflections["lapsi"] = function(args, data)
local params = get_params(args, 2, false, "p")
if not match(params.base, "[kp]$") then error("Stem must end in \"k\" or \"p\".") end
local syncopated_stem = sub(params.base, 1, -2)
local stems = {}
stems["nom_sg"] = {params.base .. "si"}
stems["sg"] = {params.base .. "se"}
stems["par_sg"] = {syncopated_stem .. "st"}
stems["pl"] = {params.base .. "si"}
stems["gen_pl"] = {params.base .. "si", syncopated_stem .. "st"}
inflection_type_is(data, 29, "lapsi")
process_stems(data, stems, params.a)
end
inflections["veitsi"] = function(args, data)
local params = get_params(args, 2)
local stems = {}
stems["nom_sg"] = {params.base .. "tsi"}
stems["sg"] = {params.base .. "tse"}
stems["par_sg"] = {params.base .. "st"}
stems["pl"] = {params.base .. "tsi"}
inflection_type_is(data, 30, "veitsi")
process_stems(data, stems, params.a)
data.forms["gen_pl"].rare = {params.base .. "sten"}
end
inflections["kaksi"] = function(args, data)
local params = get_params(args, 2)
local stems = {}
stems["nom_sg"] = {params.base .. "ksi"}
stems["sg"] = {params.base .. "hte"}
stems["sg_weak"] = {params.base .. "hde"}
stems["par_sg"] = {params.base .. "ht"}
stems["pl"] = {params.base .. "ksi"}
inflection_type_is(data, 31, "kaksi", "t", "d")
process_stems(data, stems, params.a)
end
inflections["sisar"] = function(args, data)
local params = get_params(args, 5, true)
local nom_sg = get_extra_arg(args, data, "nom_sg"); if nom_sg == "" then nom_sg = nil end
local stems = {}
stems["nom_sg"] = {nom_sg or params.base .. params.weak .. params.final}
stems["sg"] = {params.base .. params.strong .. params.final .. "e"}
stems["par_sg"] = {params.base .. params.weak .. params.final .. "t"}
stems["pl"] = {params.base .. params.strong .. params.final .. "i"}
stems["gen_pl"] = {params.base .. params.strong .. params.final .. "i", params.base .. params.weak .. params.final .. "t"}
inflection_type_is(data, 32, "sisar", params.strong, params.weak)
process_stems(data, stems, params.a)
end
inflections["kytkin"] = function(args, data)
local params = get_params(args, 5, true)
local stems = {}
stems["nom_sg"] = {params.base .. params.weak .. params.final .. "n"}
stems["sg"] = {params.base .. params.strong .. params.final .. "me"}
stems["par_sg"] = {params.base .. params.weak .. params.final .. "nt"}
stems["pl"] = {params.base .. params.strong .. params.final .. "mi"}
stems["gen_pl"] = {params.base .. params.strong .. params.final .. "mi", params.base .. params.weak .. params.final .. "nt"}
inflection_type_is(data, 33, "kytkin", params.strong, params.weak)
process_stems(data, stems, params.a)
end
inflections["onneton"] = function(args, data)
local no_gradation = get_extra_arg(args, data, "no_tt") == "1"
local strong
if no_gradation then
strong = "t"
else
strong = "tt"
end
local params = get_params(args, 2)
local stems = {}
stems["nom_sg"] = {params.base .. "t" .. params.o .. "n"}
stems["sg"] = {params.base .. strong .. params.o .. "m" .. params.a}
stems["par_sg"] = {params.base .. "t" .. params.o .. "nt"}
stems["pl"] = {params.base .. strong .. params.o .. "mi"}
inflection_type_is(data, 34, "onneton", strong, "t")
process_stems(data, stems, params.a)
data.forms["gen_pl"].rare = {params.base .. "t" .. params.o .. "nten"}
end
inflections["lämmin"] = function(args, data)
local params = get_params(args, 5, true)
local stems = {}
stems["nom_sg"] = {params.base .. params.weak .. params.final .. "n"}
stems["sg"] = {params.base .. params.strong .. params.final .. "m" .. params.a}
stems["par_sg"] = {params.base .. params.weak .. params.final .. "nt"}
stems["pl"] = {params.base .. params.strong .. params.final .. "mi"}
inflection_type_is(data, 35, "lämmin", params.strong, params.weak)
process_stems(data, stems, params.a)
data.forms["gen_pl"].rare = {params.base .. params.strong .. params.final .. "m" .. params.a .. "in"}
end
inflections["sisin"] = function(args, data)
local params = get_params(args, 2)
local stems = {}
stems["nom_sg"] = {params.base .. "in"}
stems["sg"] = {params.base .. "imp" .. params.a}
stems["sg_weak"] = {params.base .. "imm" .. params.a}
stems["par_sg"] = {params.base .. "int"}
stems["pl"] = {params.base .. "impi"}
stems["pl_weak"] = {params.base .. "immi"}
stems["gen_pl"] = {params.base .. "impi", params.base .. "int"}
inflection_type_is(data, 36, "sisin", "mp", "mm")
process_stems(data, stems, params.a)
data.forms["gen_pl"].rare = {params.base .. "imp" .. params.a .. "in"}
end
inflections["vasen"] = function(args, data)
local params = get_params(args, 1)
params.base = params.base .. "vase"
params.a = "a"
local stems = {}
stems["nom_sg"] = {params.base .. "n"}
stems["sg"] = {params.base .. "mp" .. params.a}
stems["sg_weak"] = {params.base .. "mm" .. params.a}
stems["par_sg"] = {params.base .. "nt", params.base .. "mp" .. params.a}
stems["pl"] = {params.base .. "mpi"}
stems["pl_weak"] = {params.base .. "mmi"}
stems["gen_pl"] = {params.base .. "mpi", params.base .. "nt"}
inflection_type_is(data, 37, "vasen", "mp", "mm")
process_stems(data, stems, params.a)
data.forms["gen_pl"].rare = {params.base .. "mp" .. params.a .. "in"}
end
inflections["nainen"] = function(args, data)
local params = get_params(args, 2)
local stems = {}
stems["nom_sg"] = {params.base .. "nen"}
stems["sg"] = {params.base .. "se"}
stems["par_sg"] = {params.base .. "st"}
stems["pl"] = {params.base .. "si"}
stems["gen_pl"] = {params.base .. "st", params.base .. "si"}
inflection_type_is(data, 38, "nainen")
process_stems(data, stems, params.a)
end
inflections["vastaus"] = function(args, data)
local params = get_params(args, 2)
local nom_sg = get_extra_arg(args, data, "nom_sg"); if nom_sg == "" then nom_sg = nil end
local stems = {}
stems["nom_sg"] = {nom_sg or params.base .. "s"}
stems["sg"] = {params.base .. "kse"}
stems["par_sg"] = {params.base .. "st"}
stems["pl"] = {params.base .. "ksi"}
stems["gen_pl"] = {params.base .. "st", params.base .. "ksi"}
inflection_type_is(data, 39, "vastaus")
process_stems(data, stems, params.a)
end
inflections["kalleus"] = function(args, data)
local params = get_params(args, 2)
local stems = {}
stems["nom_sg"] = {params.base .. "s"}
stems["sg"] = {params.base .. "te"}
stems["sg_weak"] = {params.base .. "de"}
stems["par_sg"] = {params.base .. "tt"}
stems["pl"] = {params.base .. "ksi"}
inflection_type_is(data, 40, "kalleus", "t", "d")
process_stems(data, stems, params.a)
end
inflections["vieras"] = function(args, data)
local params = get_params(args, 5, true)
local nom_sg = get_extra_arg(args, data, "nom_sg"); if nom_sg == "" then nom_sg = nil end
local stems = {}
stems["nom_sg"] = {nom_sg or (params.base .. params.weak .. params.final .. "s")}
stems["sg"] = {params.base .. params.strong .. params.final .. params.final}
stems["par_sg"] = {params.base .. params.weak .. params.final .. "st"}
stems["ill_sg"] = {params.base .. params.strong .. params.final .. params.final .. "se"}
stems["pl"] = {params.base .. params.strong .. params.final .. "i"}
stems["par_pl"] = {params.base .. params.strong .. params.final .. "it"}
stems["ill_pl"] = {params.base .. params.strong .. params.final .. "isi"}
inflection_type_is(data, 41, "vieras", params.strong, params.weak)
process_stems(data, stems, params.a)
data.forms["gen_pl"].rare = {params.base .. params.weak .. params.final .. "sten"}
data.forms["ill_pl"].rare = {params.base .. params.strong .. params.final .. "ihin"}
end
inflections["mies"] = function(args, data)
local params = get_params(args, 1)
local cap = get_extra_arg(args, data, "cap"); if cap == "" then nom_sg = nil end
params.base = params.base .. (cap and "Mie" or "mie")
params.a = "ä"
local stems = {}
stems["nom_sg"] = {params.base .. "s"}
stems["sg"] = {params.base .. "he"}
stems["par_sg"] = {params.base .. "st"}
stems["pl"] = {params.base .. "hi"}
stems["gen_pl"] = {params.base .. "st", params.base .. "hi"}
inflection_type_is(data, 42, "mies")
process_stems(data, stems, params.a)
end
inflections["ohut"] = function(args, data)
local params = get_params(args, 5, true)
local stems = {}
stems["nom_sg"] = {params.base .. params.weak .. params.final .. "t"}
stems["sg"] = {params.base .. params.strong .. params.final .. "e"}
stems["par_sg"] = {params.base .. params.weak .. params.final .. "tt"}
stems["pl"] = {params.base .. params.strong .. params.final .. "i"}
stems["par_pl"] = {params.base .. params.strong .. params.final .. "it"}
stems["ill_pl"] = {params.base .. params.strong .. params.final .. "isi", params.base .. params.strong .. params.final .. "ih"}
inflection_type_is(data, 43, "ohut", params.strong, params.weak)
process_stems(data, stems, params.a)
end
inflections["kevät"] = function(args, data)
local params = get_params(args, 4, true)
local vowel = params.a
local stems = {}
stems["nom_sg"] = {params.base .. params.weak .. vowel .. "t"}
stems["sg"] = {params.base .. params.strong .. vowel .. vowel}
stems["par_sg"] = {params.base .. params.weak .. vowel .. "tt"}
stems["ill_sg"] = {params.base .. params.strong .. vowel .. vowel .. "se"}
stems["pl"] = {params.base .. params.strong .. vowel .. "i"}
stems["par_pl"] = {params.base .. params.strong .. vowel .. "it"}
stems["ill_pl"] = {params.base .. params.strong .. vowel .. "isi"}
inflection_type_is(data, 44, "kevät", params.strong, params.weak)
process_stems(data, stems, params.a)
data.forms["ill_pl"].rare = {params.base .. params.strong .. vowel .. "ihin"}
end
inflections["kahdeksas"] = function(args, data)
local params = get_params(args, 2)
local stems = {}
stems["nom_sg"] = {params.base .. "s"}
stems["sg"] = {params.base .. "nte"}
stems["sg_weak"] = {params.base .. "nne"}
stems["par_sg"] = {params.base .. "tt"}
stems["pl"] = {params.base .. "nsi"}
inflection_type_is(data, 45, "kahdeksas", "nt", "nn")
process_stems(data, stems, params.a)
end
inflections["tuhat"] = function(args, data)
local params = get_params(args, 2)
local stems = {}
stems["nom_sg"] = {params.base .. "t"}
stems["sg"] = {params.base .. "nte"}
stems["sg_weak"] = {params.base .. "nne"}
stems["par_sg"] = {params.base .. "tt"}
stems["pl"] = {params.base .. "nsi"}
inflection_type_is(data, 46, "tuhat", "nt", "nn")
process_stems(data, stems, params.a)
data.forms["gen_pl"].rare = {params.base .. "nten"}
end
inflections["kuollut"] = function(args, data)
local params = get_params(args, 2)
local stems = {}
stems["nom_sg"] = {params.base .. params.u .. "t"}
stems["sg"] = {params.base .. "ee"}
stems["par_sg"] = {params.base .. params.u .. "tt"}
stems["ill_sg"] = {params.base .. "eese"}
stems["pl"] = {params.base .. "ei"}
stems["par_pl"] = {params.base .. "eit"}
stems["ill_pl"] = {params.base .. "eisi", params.base .. "eih"}
inflection_type_is(data, 47, "kuollut")
process_stems(data, stems, params.a)
end
inflections["hame"] = function(args, data)
local params = get_params(args, 4, true)
local stem_vowel = get_extra_arg(args, data, "stem_vowel"); if stem_vowel == "" then stem_vowel = nil end
stem_vowel = stem_vowel or "e"
local nom_sg = get_extra_arg(args, data, "nom_sg"); if nom_sg == "" then nom_sg = nil end
local stems = {}
stems["nom_sg"] = {nom_sg or (params.base .. params.weak .. stem_vowel)}
stems["sg"] = {params.base .. params.strong .. stem_vowel .. stem_vowel}
stems["par_sg"] = {params.base .. params.weak .. stem_vowel .. "tt"}
stems["ill_sg"] = {params.base .. params.strong .. stem_vowel .. stem_vowel .. "se"}
stems["pl"] = {params.base .. params.strong .. stem_vowel .. "i"}
stems["par_pl"] = {params.base .. params.strong .. stem_vowel .. "it"}
stems["ill_pl"] = {params.base .. params.strong .. stem_vowel .. "isi", params.base .. params.strong .. stem_vowel .. "ih"}
inflection_type_is(data, 48, "hame", params.strong, params.weak)
process_stems(data, stems, params.a)
end
inflections["askel"] = function(args, data)
local params = get_params(args, 5, true)
local prefer_hame = get_extra_arg(args, data, "e") == "1"
local stems_sisar = {}
stems_sisar["sg"] = {params.base .. params.strong .. params.final .. "e"}
stems_sisar["nom_sg"] = {params.base .. params.weak .. params.final}
stems_sisar["par_sg"] = {params.base .. params.weak .. params.final .. "t"}
-- All sisar-type illatives are rare for this type.
stems_sisar["ill_sg"] = {}
stems_sisar["pl"] = {params.base .. params.strong .. params.final .. "i"}
stems_sisar["gen_pl"] = {params.base .. params.strong .. params.final .. "i", params.base .. params.weak .. params.final .. "t"}
stems_sisar["par_pl"] = {params.base .. params.strong .. params.final .. "i"}
stems_sisar["ill_pl"] = {params.base .. params.strong .. params.final .. "i"}
local stems_hame = {}
stems_hame["sg"] = {params.base .. params.strong .. params.final .. "ee"}
stems_hame["nom_sg"] = {params.base .. params.strong .. params.final .. "e"}
stems_hame["par_sg"] = {params.base .. params.strong .. params.final .. "ett"}
stems_hame["ill_sg"] = {params.base .. params.strong .. params.final .. "eese"}
stems_hame["pl"] = {params.base .. params.strong .. params.final .. "ei"}
stems_hame["gen_pl"] = {params.base .. params.strong .. params.final .. "eid", params.base .. params.strong .. params.final .. "eitt"}
stems_hame["par_pl"] = {params.base .. params.strong .. params.final .. "eit"}
stems_hame["ill_pl"] = {params.base .. params.strong .. params.final .. "eisi", params.base .. params.strong .. params.final .. "eih"}
local stems = {}
if prefer_hame then
feed_list(stems, stems_hame)
feed_list(stems, stems_sisar)
else
feed_list(stems, stems_sisar)
feed_list(stems, stems_hame)
end
inflection_type_is(data, 49, "askel", params.strong, params.weak)
process_stems(data, stems, params.a)
-- All sisar-type illatives are rare for this type.
data.forms["ill_sg"].rare = {params.base .. params.strong .. params.final .. "een"}
end
-- Helper functions
-- joins data.words[...].forms to data.forms
function export.join_words(data, sep_supplier)
local reorganized = {}
local classes = {}
-- reorganize from words[n].forms[case](.rare) to forms[case],words[n](.rare)
for windex, word in ipairs(data.words) do
table.insert(classes, word.class)
for case, forms in pairs(word.forms) do
if reorganized[case] == nil then
reorganized[case] = {}
end
reorganized[case][windex] = {}
for _, form in ipairs(forms) do
table.insert(reorganized[case][windex], form)
end
if word.forms[case].rare then
reorganized[case][windex].rare = {}
for _, form in ipairs(word.forms[case].rare) do
table.insert(reorganized[case][windex].rare, form)
end
end
end
end
-- merge the forms with a Cartesian product to produce all possible combinations
data.forms = {}
for case, words in pairs(reorganized) do
data.forms[case] = forms_cart_product(words, case, sep_supplier, classes)
end
if #data.words <= 1 then
-- use title and categories of the sole word if there is only one
data.title = data.words[1].title
data.categories = data.words[1].categories
else
-- if there are multiple words, force nuoripari type
data.title = make_kotus_title(51, "nuoripari")
data.categories = {"Finnish nuoripari-type nominals"}
end
data.words = nil
end
local function cleanup_suffix(suffix)
if suffix and find(suffix, "_") then
return gsub(suffix, "_", " ")
else
return suffix
end
end
-- computes the Cartesian product of tables
function cart_product(words, depth)
depth = depth or 1
local prod = {}
for _, val in ipairs(words[depth]) do
if depth < #words then
-- go over the next list
for _, res in ipairs(cart_product(words, depth + 1)) do
table.insert(prod, { val, unpack(res) })
end
else
-- end of list, simply return the original
table.insert(prod, { val })
end
end
return prod
end
local function supplied_concat(list, sep_supplier)
local result = ""
local n = #list
if n >= 1 then
for i = 1, n - 1 do
local v = match(list[i], "^[aeiouyäö]")
if v and find(result, v .. "$") then
result = result .. "-"
end
result = result .. list[i] .. sep_supplier(i)
end
local v = match(list[n], "^[aeiouyäö]")
if v and find(result, v .. "$") then
result = result .. "-"
end
result = result .. list[n]
end
return result
end
-- computes the Cartesian product of tables, also concats
function cart_product_concat(words, sep_supplier)
local res = {}
for _, combination in ipairs(cart_product(words)) do
table.insert(res, supplied_concat(combination, sep_supplier))
end
return res
end
-- returns a bit mask (!) or nil
function get_rhyming_pattern(word, case, class)
if class == "askel" then
return nil
end
if case == "gen_pl" then
if match(word, "tten$") then
return 2
elseif match(word, "ten$") then
return 3
else
return 1
end
elseif case == "ill_sg" then
if match(word, "seen$") then
return 1
elseif match(word, "hen$") then
return 2
end
elseif case == "ill_pl" then
if match(word, "siin$") then
return 1
elseif match(word, "hin$") then
return 2
end
end
return nil -- not applicable
end
function is_nonrhyming(form, case, classes)
local expected = m_bit32.bnot(0) -- -1
for i, word in ipairs(form) do
local got = get_rhyming_pattern(word, case, classes[i])
if got then
expected = m_bit32.band(expected, got)
end
if expected == 0 then
return true
end
end
return false
end
-- computes the Cartesian product of tables, also concats
-- returns non-rhyming combinations as rare
function cart_product_concat_nonrhyming_rare(words, case, sep_supplier, classes)
local res = {}
local rare = {}
local multichoice = 0
local allow_pruning = false
for _, position in ipairs(words) do
if #position > 1 then
multichoice = multichoice + 1
end
end
allow_pruning = multichoice > 1
for _, combination in ipairs(cart_product(words)) do
local item = supplied_concat(combination, sep_supplier)
if is_nonrhyming(combination, case, classes) then
table.insert(rare, item)
else
table.insert(res, item)
end
end
if #res < 1 then
rare.rare = {}
return rare
end
res.rare = rare
return res
end
-- converts a list of words to extract the rare forms for ipairs
-- the number is interpreted bit-by-bit to decide which combination
-- to choose
function prepare_rare_tables(words, code)
local result = {}
for _, forms in ipairs(words) do
-- replace with rare if bit is 1
if m_bit32.band(code, 1) == 1 then
table.insert(result, forms.rare or {})
else
table.insert(result, forms)
end
-- shift right to test next bit
code = m_bit32.rshift(code, 1)
end
return result
end
-- copies all entries of source and inserts them to target
function merge_table(target, source)
for _, value in ipairs(source) do
table.insert(target, value)
end
end
function merge_table_rare(target, source)
for _, value in ipairs(source) do
table.insert(target, value)
end
target.rare = source.rare
end
-- the Cartesian product of possible forms
function forms_cart_product(words, case, sep_supplier, classes)
local result = {}
result.rare = {}
m_bit32 = m_bit32 or require("Module:bit32")
-- merge possible non-rare forms
merge_table_rare(result, cart_product_concat_nonrhyming_rare(words, case, sep_supplier, classes))
-- merge possible rare forms
-- for example, with two words:
-- 1 = rare A, common B
-- 2 = common A, rare B
-- 3 = rare A, rare B
-- (2 ^ #words) - 1 == m_bit32.lshift(1,#words)-1
-- (prepare_rare_tables actually takes out the rare forms)
for i = 1,m_bit32.lshift(1,#words)-1 do
merge_table(result.rare, cart_product_concat(prepare_rare_tables(words, i), sep_supplier))
end
-- if no rare forms, remove the table completely
if #result.rare < 1 then
result.rare = nil
end
return result
end
function make_word_possessive(args, data, poss, always_add)
local pos = get_extra_arg(args, data, "pos"); if not pos or pos == "" then pos = "kata nama" end
local par_nom_sg = get_extra_arg(args, data, "par_nom_sg") == "1"
-- "no possessive forms exist" sentinel value
if poss == "-" then
return data.forms
end
if always_add or pos == "kata nama" then
-- add possessive suffix
if poss == "3" or poss == "3p" then
poss = "3s" -- 3rd person forms are identical
end
if not poss_forms[poss] then
error("Invalid poss value: '" .. p .. "'")
end
return make_poss_with_suffix(data.forms, data.stems, poss_forms[poss], "", poss_alt[poss], par_nom_sg)
end
return data.forms
end
-- Experimental: add comparative, superlative forms:
-- Adds the nominative singular/plural of the comparative and superlative as
-- comp_nom_sg/comp_nom_pl and sup_nom_sg/sup_nom_pl.
-- allow_comp_e allows a final vowel a/ä in the comparative stem to turn to
-- e; this happens if the stem ends in short a/ä and is bisyllabic. Since
-- this function cannot detect the syllable count, you have to provide that
-- info yourself. (Warning: in compounds, only the last part should count -
-- [[tyhjä]] -> [[tyhjempi]], so also [[epätyhjä]] -> [[epätyhjempi]]).
-- Note: both singular and plural forms must be present and not fudged,
-- as postprocess_word and postprocess may do.
-- comp/sup outputs should be overridable, since they are sometimes wrong
-- (e.g. [[raaka]] is rare in that its superlative [[raain]] is distinct
-- from the instructive [[raaoin]]).
function make_comp_sup(data, allow_comp_e)
local a = match(data.forms["ine_sg"][1], "[aä]$")
data.forms["sup_nom_sg"] = data.forms["ins_pl"]
data.forms["sup_nom_pl"] = {}
for _, form in ipairs(data.forms["sup_nom_sg"]) do
table.insert(data.forms["sup_nom_pl"], (gsub(form, "n$", "mm" .. a .. "t")))
end
data.forms["comp_nom_sg"] = {}
data.forms["comp_nom_pl"] = {}
for _, gen_sg in ipairs(data.forms["gen_sg"]) do
local comp_stem = gsub(gen_sg, "n$", "")
if (
match(comp_stem, "[aä]$")
and not match(comp_stem, "[aäe][aä]$")
and allow_comp_e
) then
-- Remember to remove apostrophe: raa’a- -> raae-
comp_stem = gsub(comp_stem, "['’]?[aä]$", "e")
end
table.insert(data.forms["comp_nom_sg"], comp_stem .. "mpi")
table.insert(data.forms["comp_nom_pl"], comp_stem .. "mm" .. a .. "t")
end
end
function postprocess_word(args, data, gdata, always_add)
local pos = get_extra_arg(args, data, "pos"); if not pos or pos == "" then pos = "kata nama" end
local alwayspl = get_extra_arg(args, data, "alwayspl"); if alwayspl == "" then alwayspl = nil end
if gdata.poss then
data.forms = make_word_possessive(args, data, gdata.poss, always_add)
elseif pos == "kata nama" and data.forms["com_pl"] then
-- Add the possessive suffix to the comitative plural, if the word is a noun
for key, subform in ipairs(data.forms["com_pl"]) do
data.forms["com_pl"][key] = subform .. "en"
end
gdata.tagged_com_pl = true
end
if get_extra_arg(args, data, "gen_nom_sg") == "1" then
data.forms["nom_sg"] = data.forms["gen_sg"]
elseif get_extra_arg(args, data, "par_nom_sg") == "1" then
data.forms["nom_sg"] = data.forms["par_sg"]
end
if gdata.poss and gdata.poss ~= "-" then
data.forms["ins_pl"] = nil
end
if alwayspl then -- [[Saint Vincent ja Grenadiinit]]
for k, v in pairs(data.forms) do
local k_sg = gsub(k, "_pl", "_sg")
if data.forms[k_sg] then
data.forms[k_sg] = data.forms[k]
end
end
end
end
function postprocess(args, data)
local pos = args["pos"]; if not pos or pos == "" then pos = "kata nama" end
local nosg = args["nosg"]; if nosg == "" then nosg = nil end
local nopl = args["nopl"]; if nopl == "" then nopl = nil end
local n = args["n"]; if n == "" then n = nil end
local suffix = cleanup_suffix(args["suffix"]); if suffix == "" then suffix = nil end
local appendix = args["appendix"]; if appendix == "" then appendix = nil end
local has_ins_sg = args["has_ins_sg"]; if has_ins_sg == "" then has_ins_sg = nil end
local has_no_nom = args["has_no_nom"]; if has_no_nom == "" then has_no_nom = nil end
-- Add the possessive suffix to the comitative plural, if the word is a noun
-- now done per word; see postprocess_word
if nosg or n == "pl" then
table.insert(data.categories, "Finnish pluralia tantum")
end
-- TODO: This says "nouns", but this module is also used for adjectives!
if nopl or n == "sg" then
table.insert(data.categories, "Finnish uncountable nouns")
end
if n == "csg" then -- "chiefly singular"
data.rare_plural = true
end
if not has_ins_sg then
data.forms["ins_sg"] = nil
end
for key, form in pairs(data.forms) do
-- Add suffix to forms
for i, subform in ipairs(form) do
subform = subform .. (suffix or "")
form[i] = subform
end
if form.rare then
for i, subform in ipairs(form.rare) do
subform = subform .. (suffix or "")
form.rare[i] = subform
end
end
-- Do not show singular or plural forms for nominals that don't have them
if ((nosg or n == "pl") and find(key, "_sg$")) or ((nopl or n == "sg") and find(key, "_pl$")) then
form = nil
end
data.forms[key] = form
end
-- Check if the lemma form matches the page name
local lemma = data.forms[(nosg or n == "pl") and "nom_pl" or "nom_sg"][1]
if not appendix and lemma ~= data.pagename and not data.poss then
local link_target = require("Module:links").get_link_page_with_auto_display(lemma, lang)
if link_target ~= data.pagename then
--error("The lemma " .. lemma .. " does not match the page title. Check the parameters!")
mw.addWarning("<i>Please check the fi-decl-... parameters!</i>")
table.insert(data.categories, "Finnish entries with inflection not matching pagename")
end
end
data.is_appendix = appendix
if has_no_nom then
data.forms["nom_sg"] = nil
data.forms["nom_pl"] = nil
end
end
-- Make the table
function make_table(data, preview, title_override, collapse_class_override, accel_class_prefix, extra_classes)
local rare_plural = data.rare_plural
local note = rare_plural and "Plural forms of this word are not commonly used, but might be found in figurative uses, in some set phrases or in colloquial language." or nil
local com_forms
local function show_form(forms, code, no_rare)
local form = forms[code]
if not form then
return "—"
elseif type(form) ~= "table" then
error("a non-table value was given in the list of inflected forms.")
end
local ret = {}
local accel
if rare_plural and find(code, "_pl$") then
-- plural is marginal
for key, subform in ipairs(form) do
table.insert(ret, "(''" .. make_link(subform) .. "'')")
end
if not no_rare and form.rare then
for key, subform in ipairs(form.rare) do
table.insert(ret, "(''" .. make_link(subform) .. "''" .. RARE .. ")")
end
end
return table.concat(ret, "<br/>")
end
-- See [[Module talk:fi-nominals]].
if code == "nom_sg" and not data.poss then
accel = nil
elseif code == "gen_sg" then
accel = "gen//acc|s"
elseif code == "nom_pl" then
accel = "nom//acc|p"
else
accel = gsub(gsub(gsub(gsub(code, "%f[^_](%a%a)$", {sg = "s", pl = "p"}), "ins", "ist"), "par", "ptv"), "_", "|")
end
if accel_class_prefix and accel then
accel = accel_class_prefix .. accel
end
for key, subform in ipairs(form) do
table.insert(ret, make_link(subform, accel))
end
if not no_rare and form.rare then
if accel then
accel = 'rare-' .. accel
end
for key, subform in ipairs(form.rare) do
table.insert(ret, make_link(subform, accel) .. RARE)
end
end
return table.concat(ret, "<br/>")
end
local function repl(param)
if param == "title" then
if title_override then return title_override end
return "[[Lampiran:Bentuk kata bilangan bahasa Finland|Infleksi]] bagi " .. (data.is_appendix and make_link(data.pagename) or tag_term(data.pagename)) .. ( data.title and " (" .. data.title .. ")" or "")
elseif param == "maybenote" then
if note then
return [=[
|- class="vsHide"
| colspan="4" class="fi-decl-maybenote" | ]=] .. note .. "\n"
else
return ""
end
elseif param == "com_forms" then
return com_forms
else
local param2 = match(param, "^(.-):c$")
if param2 then
return show_form(data.forms, param2, true)
else
return show_form(data.forms, param)
end
end
end
if not data.poss and data.tagged_com_pl then
com_forms = 'colspan="2" | \'\'See the possessive forms below.\'\''
else
com_forms = gsub('{{{com_sg}}} || {{{com_pl}}}', "{{{([a-z0-9_:]+)}}}", repl)
end
if preview then
preview = [=[
|- class="vsShow"
! class="case-column" colspan="2" | nominatif
| class="number-column" | {{{nom_sg:c}}}
| class="number-column" | {{{nom_pl:c}}}
|- class="vsShow"
! colspan="2" | genitif
| {{{gen_sg:c}}}
| {{{gen_pl:c}}}
|- class="vsShow"
! colspan="2" | partitif
| {{{par_sg:c}}}
| {{{par_pl:c}}}
|- class="vsShow"
! colspan="2" | ilatif
| {{{ill_sg:c}}}
| {{{ill_pl:c}}}
]=]
else
preview = ""
end
local wikicode = [=[
<div class="noresize">
{| class="inflection-table fi-decl vsSwitcher ]=] .. (extra_classes or "") .. [=[" data-toggle-category="]=] .. (collapse_class_override or "tasrif") .. [=["
|-
! class="vsToggleElement" colspan="4" | {{{title}}}
]=] .. preview .. [=[
|- class="vsHide"
! class="case-column" colspan="2" |
! class="number-column" | mufrad
! class="number-column" | jamak
|- class="vsHide"
! colspan="2" | nominatif
| {{{nom_sg}}}
| {{{nom_pl}}}
|- class="vsHide"
! rowspan="2" | akusatif
! <abbr title="The nominative accusative is used, for example, as the object of certain passives and imperatives. Click the Inflection link and see the section on accusatives for more information.">nom.</abbr>
| {{{nom_sg}}}
| rowspan="2" | {{{nom_pl}}}
|- class="vsHide"
! gen.
| {{{gen_sg}}}
|- class="vsHide"
! colspan="2" | genitif
| {{{gen_sg}}}
| {{{gen_pl}}}
|- class="vsHide"
! colspan="2" | partitif
| {{{par_sg}}}
| {{{par_pl}}}
|- class="vsHide"
! colspan="2" | inesif
| {{{ine_sg}}}
| {{{ine_pl}}}
|- class="vsHide"
! colspan="2" | elatif
| {{{ela_sg}}}
| {{{ela_pl}}}
|- class="vsHide"
! colspan="2" | ilatif
| {{{ill_sg}}}
| {{{ill_pl}}}
|- class="vsHide"
! colspan="2" | adesif
| {{{ade_sg}}}
| {{{ade_pl}}}
|- class="vsHide"
! colspan="2" | ablatif
| {{{abl_sg}}}
| {{{abl_pl}}}
|- class="vsHide"
! colspan="2" | alatif
| {{{all_sg}}}
| {{{all_pl}}}
|- class="vsHide"
! colspan="2" | esif
| {{{ess_sg}}}
| {{{ess_pl}}}
|- class="vsHide"
! colspan="2" | translatif
| {{{tra_sg}}}
| {{{tra_pl}}}
|- class="vsHide"
! colspan="2" | abesif
| {{{abe_sg}}}
| {{{abe_pl}}}
|- class="vsHide"
! colspan="2" | instruktif
| {{{ins_sg}}}
| {{{ins_pl}}}
|- class="vsHide"
! colspan="2" | komitatif
| {{{com_forms}}}
{{{maybenote}}}|}
</div>]=]
return gsub(wikicode, "{{{([a-z0-9_:]+)}}}", repl)
end
------------------------------------------
-- POSSESSIVE FORM GENERATION & DISPLAY --
------------------------------------------
local function prepare_possessive_list(forms)
local res = {}
for _, v in ipairs(forms) do
table.insert(res, v)
end
if forms["rare"] then
for _, v in ipairs(forms["rare"]) do
table.insert(res, v)
res[v] = "rare"
end
end
return res
end
local function wrap_rare_forms(forms)
local newforms = {}
for case, subforms in pairs(forms) do
local common = {}
local rare = {}
for _, v in ipairs(subforms) do
if subforms[v] == "rare" then
table.insert(rare, v)
else
table.insert(common, v)
end
end
common.rare = rare
newforms[case] = common
end
return newforms
end
local function make_possessives_from_stems(stems, suffix, extra_suffix)
local pforms = {}
for _, stem in pairs(stems) do
table.insert(pforms, stem .. suffix .. extra_suffix)
end
return pforms
end
function make_poss_with_suffix(forms, stems, poss_suffix, extra_suffix, allow_alt, par_nom_sg)
local result = {}
local par_sg_a = false
if find(poss_suffix, "a") and sub(forms["ine_sg"][1], -1) == "ä" then
poss_suffix = gsub(poss_suffix, "a", "ä")
end
if sub(forms["ine_sg"][1], -1) ~= sub(forms["par_sg"][1], -1) then
par_sg_a = true
end
for k, v in pairs(forms_alt_ok) do
if forms[k] then
local suffix = poss_suffix
if k == "par_sg" and par_sg_a and find(suffix, "ä$") then
suffix = gsub(poss_suffix, "ä", "a")
end
result[k] = {}
if k == "par_sg" and allow_alt then
-- par_sg is a bit of an exception: it allows
-- alt form if it doesn't end in two "aa"/"ää"
local prepared = prepare_possessive_list(forms[k])
for _, form in ipairs(prepared) do
local modform = form
if sub(modform, -2, -2) ~= sub(modform, -1) then
local final = modform .. sub(modform, -1) .. "n"
table.insert(result[k], final)
result[k][final] = prepared[form]
end
end
elseif forms_alt_ok[k] and allow_alt then
local prepared = prepare_possessive_list(forms[k])
for _, form in ipairs(prepared) do
local modform = form
if k == "tra_sg" or k == "tra_pl" then
modform = sub(form, 1, -2) .. "e"
end
local final = modform .. sub(modform, -1) .. "n"
table.insert(result[k], final)
result[k][final] = prepared[form]
end
end
if k == "gen_sg" or k == "ins_sg" then
result[k] = make_possessives_from_stems(stems["sg"], suffix, extra_suffix)
elseif k == "ins_pl" then
result[k] = make_possessives_from_stems(stems["pl"], suffix, extra_suffix)
elseif forms_gen_ok[k] then
local prepared = prepare_possessive_list(forms[k])
for _, form in ipairs(prepared) do
local tmp = form
tmp = sub(tmp, 1, -2)
local final = tmp .. suffix .. extra_suffix
table.insert(result[k], final)
result[k][final] = prepared[form]
end
else
local prepared = prepare_possessive_list(forms[k])
for _, form in ipairs(prepared) do
local modform = form
if k == "tra_sg" or k == "tra_pl" then
modform = sub(form, 1, -2) .. "e"
end
local final = modform .. suffix .. extra_suffix
table.insert(result[k], final)
result[k][final] = prepared[form]
end
end
end
end
-- nominative forms are (usually) identical to genitive singular
result["nom_sg"] = result[par_nom_sg and "par_sg" or "gen_sg"]
result["nom_pl"] = result["gen_sg"]
return wrap_rare_forms(result)
end
local function serialize_args(args)
local items = {}
local entries = {}
local max_number = 0
for key, value in pairs(args) do
if type(key) == "number" and key > 0 and key == math.floor(key) then
items[key] = value
max_number = math.max(key, max_number)
else
table.insert(entries, key .. "=" .. value)
end
end
for i = 1,max_number,1 do
items[i] = items[i] or ""
end
-- entries before items
for i, v in ipairs(entries) do
table.insert(items, i, v)
end
return table.concat(items, "|")
end
local poss_headings = {
["1s"] = "mufrad diri pertama", ["2s"] = "mufrad diri kedua",
["1p"] = "jamak diri pertama", ["2p"] = "jamak diri kedua",
["3"] = "diri ketiga",
}
local poss_accel = {
["1s"] = "1|s", ["2s"] = "2|s", ["1p"] = "1|p", ["2p"] = "2|p", ["3"] = "3"
}
function make_possessive_table(pagename, args, pos, infl_title, get_forms)
local note = nil
if args["noposs"] then
return ""
elseif pos == "adj" then
note = not (args["adjpossok"] or args["hideadjnote"]) and "'''[[Lampiran:Akhiran punyaan bahasa Finland#Kata sifat|Jarang]]'''. Hanya digunakan dengan [[kata sifat substantif]]." or ""
elseif pos ~= "kata nama" then
return ""
end
return "\n" .. make_possessive_table_internal(pagename, args, infl_title, note, get_forms)
end
function make_possessive_table_internal(pagename, args, infl_title, note, get_forms)
local function show_subtable(code)
return make_table(get_forms(code), false, "Pemilik " .. poss_headings[code], "infleksi milikan", poss_accel[code] .. "|poss|form|of|", "fi-decl-poss-subtable")
end
local function repl(param)
if param == "lemma" then
return tag_term(pagename)
elseif param == "info" then
return " <small>(" .. infl_title .. ")</small>"
elseif param == "maybenote" then
if note then
return [=[
|- class="vsHide"
| colspan="3" | ]=] .. note .. "\n"
else
return ""
end
else
return show_subtable(param)
end
end
local wikicode = [=[
<div class="noresize">
{| class="inflection-table vsSwitcher fi-decl-poss" data-toggle-category="infleksi milikan" cellspacing="1" cellpadding="2"
|- class="fi-decl-poss-header"
! class="vsToggleElement" colspan="3" | [[Lampiran:Akhiran milikan bahasa Findland|Bentuk milikan]] bagi {{{lemma}}}{{{info}}}
{{{maybenote}}}|- class="vsHide"
|
{{{1s}}}
{{{2s}}}
{{{1p}}}
{{{2p}}}
{{{3}}}
|}
</div>]=]
return gsub(wikicode, "{{{([a-z0-9_:]+)}}}", repl)
end
export.inflections = inflections
return export
dljw1jtng13wh8kx9vojlqui91k2ufm
Templat:fi-decl-kala
10
10759
344462
96847
2026-05-26T13:09:39Z
Hakimi97
2668
344462
wikitext
text/x-wiki
<includeonly>{{#invoke:fi-nominals|show|kala}}</includeonly><!--
--><noinclude>{{documentation}}</noinclude>
ouj4c5jw02mze48qri06w9lf6wxmmgk
ぅ
0
11352
344450
245984
2026-05-26T12:53:43Z
Hakimi97
2668
344450
wikitext
text/x-wiki
{{character info}}
==Bahasa Jepun==
===Etimologi===
{{Hira-small|う|u}}
===Bentuk penyambungan===
{{ja-combining form|sc=Hira}}
# Bentuk penyambungan kecil hiragana {{m|ja|う|tr=u}} yang digunakan untuk menetapkan secara jelas vokal bahagian huruf hiragana sebelum ini, atau untuk menunjukkan sebutan atau lanjutan vokal orang yang bercakap.
#: {{lang|ja|[[で]]ぅ}} - berbunyi {{IPAchar|[du]}} bukannya {{IPAchar|[de]}} ({{l|ja|で}}) atau {{IPAchar|[zu]}} ({{l|ja|づ}})
#: {{lang|ja|[[です]]ぅ}} - menyatakan bahawa u terakhir dalam {{m|ja|です|tr=desu}} tidak boleh disenyapkan
#: {{lang|ja|[[です]]ぅぅぅ}} - menyatakan bahawa u terakhir dalam {{m|ja|です|tr=desu}} perlu sangat panjang
====Istilah berkaitan====
* [[ゥ]] (katakana kecil u)
* [[う]] (saiz penuh u)
====Lihat juga====
* {{list:Hiragana/ja}}
lo0x9uh5tkt7co8bugnwmdzbiihlwjz
ゔ
0
11354
344451
245983
2026-05-26T12:53:48Z
Hakimi97
2668
344451
wikitext
text/x-wiki
{{character info}}
==Bahasa Jepun==
{{stroke order|strokes=4}}
===Etimologi===
{{Hira-dakuten|う|u}}
===Sebutan===
* {{IPA|ja|/vu/|[βɯᵝ]}}
===Suku kata===
{{ja-syllable|vu|sc=Hira}}
# {{label|ja|jarang}} {{Hira-def|syllable|ヴ|vu}}
====Nota penggunaan====
Ini adalah tambahan yang agak baru-baru kepada [[kana#Jepun|kana]] penggunaan untuk mewakili bunyi bukan asli '' vu ''. Oleh itu, ini hanya terdapat dalam kata-kata yang dipinjam. orang yang lebih tua mungkin menyebut ini sebagai {{IPAchar|/bu/, [bɯᵝ]}}.
====Istilah berkaitan====
* Untuk senarai perkataan bermula dengan ゔ ('''vu'''), lihat: [[Khas:Semua_laman/ゔ]]
====Lihat juga====
* {{list:Hiragana/ja}}
9z1bpu93adkse48mcck6kk0vnk0oni4
jejari
0
16381
344482
337715
2026-05-27T11:15:47Z
Hakimi97
2668
344482
wikitext
text/x-wiki
==Bahasa Melayu==
{{Wikipedia|jejari}}
[[Fail:Wheel Iran.jpg|150px|thumb|Jejari di sebuah roda.]]
[[Fail:Radie.png|150px|thumb|Jejari sebuah bulatan.]]
===Kata nama===
{{ms-kn}}
# [[batang|Batang-batang]] yang bercabang dari pusat suatu [[roda]] ke sisi roda ([[rim]]) sebagai [[sokongan]] terhadap roda.
# {{lb|ms|matematik}} Jarak terpendek daripada titik pusat [[bulatan]] ke mana-mana titik pada sisi bulatan.
# Banyak [[jari]], jari-jari.
====Kata terbitan====
* [[jejari atom]]: jejari antara [[nukleus]] atom ke [[elektron valens]]
* [[jejari ikan]]: kepingan [[daging ikan]] tak bertulang berbentuk empat segi bujur dan disaluti serbuk roti
* [[jejari ion]]: setengah daripada jarak antara dua [[ion]] serupa yang bercantum
===Etimologi===
Daripada {{sisipan|ms|jari|ej}}.
===Sebutan===
* {{dewan|je|ja|ri}}
===Tulisan Jawi===
<big>[[ججاري]]</big>
===Rujukan===
* {{R:KD4}}
===Pautan luar===
* {{R:PRPM}}
guotibxlgeagjqaudvhbi19f9kmemiw
ijtimak
0
16384
344484
337552
2026-05-27T11:16:05Z
Hakimi97
2668
344484
wikitext
text/x-wiki
==Bahasa Melayu==
{{Wikipedia|Ijtimak (astronomi)}}
===Kata nama===
{{ms-kn}}
# [[perhimpunan]], [[perkumpulan]]
# {{lb|ms|astronomi}} Kejadian astronomi apabila dua [[objek samawi]] berada segaris ke hadapan dari titik pandangan (seperti dari [[Bumi]]); dalam [[jarak hamal]] atau garis bujur ekliptik sama.
====Terbitan kata====
* [[ijtimak besar]]
===Etimologi===
Pinjaman daripada {{bor|ms|ar|اِجْتِمَاع||pertemuan}}.
===Sebutan===
* {{dewan|ij|ti|maʕ}}
* {{AFA|ms|/ʔid͡ʒ.ti.maʕ/}}
* {{rima|ms|aʕ}}
* {{penyempangan|ms|ij|ti|mak}}
===Tulisan Jawi===
<big>[[اجتماع]]</big>
===Tesaurus===
====Antonim====
* [[istiqbal]] (takrifan 2)
====Sinonim====
* Takrifan 2
:* [[kesebarisan]]
:* [[konjugasi]]
===Rujukan===
* {{R:KD4}}
===Pautan luar===
* {{R:PRPM}}
khgvqh5oye2wjr0u8e16iyfbvdyzwji
pembukaan
0
17391
344483
334653
2026-05-27T11:15:56Z
Hakimi97
2668
344483
wikitext
text/x-wiki
==Bahasa Melayu==
{{Wikipedia|Pembukaan catur}}
===Kata nama===
{{ms-kn|j=ڤمبوکاءن}}
# Perbuatan [[membuka]] suatu objek atau suatu perkara.
# Acara [[memulakan]] suatu operasi atau anjuran (seperti perniagaan dan pertandingan).
# {{lb|ms|catur}} Langkah-langkah atau taktik gerakan kepingan catur terawal.
===Etimologi===
Daripada {{apitan|ms|pem|buka|an}}.
===Sebutan===
* {{dewan|pem|bu|ka|an}}
===Tesaurus===
* Sinonim: {{l|ms|penutupan}}
===Rujukan===
* {{R:KD4}}
===Pautan luar===
* {{R:PRPM}}
7uv6cbjaruqh9fdrajncw2fh7tvvvhd
asalan
0
17464
344481
334759
2026-05-27T11:15:15Z
Hakimi97
2668
344481
wikitext
text/x-wiki
==Bahasa Melayu==
{{Wikipedia|Asalan (matematik)}}
===Kata nama===
{{ms-kn|j=اصلن}}
# {{lb|ms|matematik}} Titik persilangan antara [[paksi]] [[mengufuk]] dan [[melintang]] dalam graf [[koordinat]] yang menjadi titik rujukan.
===Etimologi===
{{suffix|ms|asal|an}}.
===Sebutan===
* {{dewan|a|sa|lan}}
===Rujukan===
* {{R:KD4}}
===Pautan luar===
* {{R:PRPM}}
dzvhu3zor9gkxz8fqefzjxfeoeui2uc
Modul:labels/data/regional
828
37847
344471
233459
2026-05-26T15:22:05Z
Hakimi97
2668
344471
Scribunto
text/plain
local labels = {}
------------------------------------------ Generic ------------------------------------------
--not sure where to put this
labels["Klasik"] = {
aliases = {"classical"},
-- "ca", "fa", "id", la", "zh" handled in lang-specific module
langs = {"ar", "az", "ja", "jv", "kum", "ms", "quc", "sa", "tl"},
special_display = "[[Bahasa <canonical_name> Klasik]]",
regional_categories = true,
}
labels["Epigraphic"] = {
langs = {"grc", "pgd", "pra", "sa"},
special_display = "[[w:Epigraphy|Epigraphic <canonical_name>]]",
regional_categories = true,
}
labels["Ragam bahasa"] = {
display = "[[Ragam bahasa#Bahasa Melayu|Ragam bahasa]]",
regional_categories = true,
}
------------------------------------------ Places ------------------------------------------
labels["Anatri"] = {
aliases = {"Lower Chuvash"},
langs = {"cv"}, -- e.g. вот "fire" vs the Upper Chuvash / literary standard вут
Wikipedia = true,
regional_categories = true,
}
labels["Australia"] = {
aliases = {"AU", "Australian"},
-- "de", "en", "mt", "zh" handled in lang-specific modules
langs = {"el", "it", "ko", "ru"},
Wikipedia = true,
regional_categories = "Australian",
}
labels["Black Isle"] = {
langs = {"sco"}, -- conceivably also en, gd, perhaps enm, but -sche could only find sco
Wikipedia = true,
regional_categories = true,
}
-- WARNING: No existing languages or categories associated with label; add to `langs` as needed
labels["Bogor"] = {
langs = {},
Wikipedia = true,
regional_categories = true,
}
labels["Brazil"] = {
aliases = {"Brazilian"},
-- "pt" handled in lang-specific module
langs = {"ja", "mch", "vec", "yi"},
Wikipedia = true,
regional_categories = "Brazilian",
}
-- WARNING: No existing languages or categories associated with label; add to `langs` as needed
labels["Brebes"] = {
aliases = {"Brebian"},
langs = {},
Wikipedia = "Brebes Regency",
regional_categories = true,
}
labels["Britain"] = {
aliases = {"Brit", "British", "Great Britain"},
-- "en", "zh" handled in lang-specific module
langs = {"bn", "ur", "vi"},
Wikipedia = "Great Britain",
regional_categories = "British",
}
labels["Bukovina"] = {
aliases = {"Bucovina", "Bukovinian", "Bukowina"},
langs = {"pl", "ro", "uk"},
Wikipedia = true,
regional_categories = "Bukovinian",
}
-- WARNING: No existing languages or categories associated with label; add to `langs` as needed
labels["Burundi"] = {
aliases = {"Burundian"},
langs = {},
Wikipedia = true,
regional_categories = "Burundian",
}
labels["Canada"] = {
aliases = {"Canadian"},
-- "en", "fr", "zh" handled in lang-specific module
langs = {"gd", "haa", "is", "ko", "ru", "tli", "uk", "vi"},
Wikipedia = true,
regional_categories = "Canadian",
}
labels["China"] = {
-- "en", "ko" handled in lang-specific module
langs = {"ja", "khb", "kk", "mhx", "mn", "ug"},
Wikipedia = true,
regional_categories = "Chinese",
}
labels["Congo"] = {
aliases = {"Democratic Republic of the Congo", "Democratic Republic of Congo", "DR Congo", "Congo-Kinshasa", "Republic of the Congo", "Republic of Congo", "Congo-Brazzaville", "Congolese"}, -- these could be split if need be
-- "fr" handled in lang-specific module
langs = {"avu", "yom"},
Wikipedia = true,
regional_categories = "Congolese",
}
labels["Cyprus"] = {
aliases = {"cypriot", "Cypriot"},
-- "tr" handled in lang-specific module
langs = {"ar", "el"},
Wikipedia = true,
regional_categories = "Cypriot",
}
labels["Dobruja"] = {
aliases = {"Dobrogea", "Dobrujan"},
langs = {"crh", "ro"},
Wikipedia = true,
regional_categories = "Dobrujan",
}
-- WARNING: No existing languages or categories associated with label; add to `langs` as needed
labels["Durban"] = {
langs = {},
Wikipedia = true,
regional_categories = true,
}
labels["Europe"] = {
-- "en", "es", "fr", "pt" handled in lang-specific module
langs = {"ur"},
Wikipedia = true,
regional_categories = "European",
}
labels["France"] = {
aliases = {"French"},
-- "fr", "zh" handled in lang-specific module
langs = {"la", "lad", "nrf", "vi", "yi"},
Wikipedia = true,
regional_categories = "French",
}
labels["India"] = {
aliases = {"Indian"},
-- "en", "pa", "pt" handled in lang-specific module
langs = {"bn", "dv", "fa", "ml", "ta", "ur"},
Wikipedia = true,
regional_categories = "Indian",
}
labels["Indonesia"] = {
aliases = {"Indonesian"},
-- "en", "zh" handled in lang-specific module
langs = {"id", "jv", "ms", "nl"},
Wikipedia = true,
regional_categories = "Indonesia",
}
labels["Israel"] = {
aliases = {"Israeli"},
-- "en" handled in lang-specific module
langs = {"ajp", "ar", "he", "ru", "yi"},
Wikipedia = true,
regional_categories = "Israeli",
}
-- WARNING: No existing languages or categories associated with label; add to `langs` as needed
labels["Kalix"] = {
langs = {},
Wikipedia = true,
regional_categories = true,
}
-- FIXME: Move to Uyghur label data module
labels["Kazakhstan"] = {
aliases = {"Kazakhstani", "Kazakh"},
langs = {"ug"},
Wikipedia = true,
regional_categories = "Kazakhstani",
}
-- WARNING: No existing languages or categories associated with label; add to `langs` as needed
labels["Kemaliye"] = {
langs = {},
Wikipedia = true,
regional_categories = true,
}
-- WARNING: No existing languages or categories associated with label; add to `langs` as needed
labels["Kitti"] = {
langs = {},
Wikipedia = "Kitti, Federated States of Micronesia",
regional_categories = true,
}
-- WARNING: No existing languages or categories associated with label; add to `langs` as needed
labels["Kukkuzi"] = {
langs = {},
Wikipedia = true,
regional_categories = true,
}
-- WARNING: No existing languages or categories associated with label; add to `langs` as needed
labels["Lucknow"] = {
langs = {},
Wikipedia = true,
regional_categories = true,
}
-- WARNING: No existing languages or categories associated with label; add to `langs` as needed
labels["Luleå"] = {
aliases = {"Lulea"},
langs = {},
Wikipedia = true,
regional_categories = true,
}
labels["Lviv"] = {
aliases = {"Lvov", "Lwow", "Lwów"},
langs = {"pl", "uk"},
Wikipedia = true,
regional_categories = true,
}
-- WARNING: No existing languages or categories associated with label; add to `langs` as needed
labels["Muş"] = {
aliases = {"Mush"},
langs = {},
Wikipedia = true,
regional_categories = true,
}
labels["Myanmar"] = {
aliases = {"Myanmarese", "Burma", "Burmese"},
-- "en", "my", "zh" handled in lang-specific module; FIXME: move ksw and mnw to lang-specific modules
langs = {"ksw", "mnw"},
Wikipedia = true,
regional_categories = true,
}
labels["Nigeria"] = {
aliases = {"Nigerian"},
-- "en" handled in lang-specific module
langs = {"ar", "ff", "guw", "ha", "yo"},
Wikipedia = true,
regional_categories = "Nigerian",
}
labels["Palestine"] = {
aliases = {"Palestinian"},
-- "en" handled in lang-specific module
langs = {"ajp", "ar", "arc"},
Wikipedia = true,
regional_categories = "Palestinian",
}
-- WARNING: No existing languages or categories associated with label; add to `langs` as needed
labels["Priangan"] = {
langs = {},
Wikipedia = "Parahyangan",
regional_categories = true,
}
-- WARNING: No existing languages or categories associated with label; add to `langs` as needed
labels["Rome"] = {
aliases = {"Roma", "Romano"},
langs = {},
Wikipedia = true,
regional_categories = "Roman",
}
labels["Scania"] = {
aliases = {"Scanian", "Skanian", "Skåne"},
langs = {"gmq-oda", "sv"},
Wikipedia = true,
regional_categories = "Scanian",
}
-- Silesia German, Silesia Polish; for differentiation between sli "Silesian East Central German"
-- don't add Silesian as alias
labels["Silesia"] = {
langs = {"de", "pl"},
Wikipedia = true,
}
labels["South Africa"] = {
aliases = {"South African"},
-- "de", "en", "pt" handled in lang-specific module
langs = {"af", "nl", "st", "te", "yi", "zu"},
Wikipedia = true,
regional_categories = "South African",
}
labels["Spain"] = {
aliases = {"Spanish", "ES"},
-- "ca", "es" handled in lang-specific module
langs = {"la"},
Wikipedia = true,
regional_categories = "Spanish",
}
-- WARNING: No existing languages or categories associated with label; add to `langs` as needed
labels["Surati"] = {
langs = {},
Wikipedia = "Surat district",
regional_categories = true,
}
-- WARNING: No existing languages or categories associated with label; add to `langs` as needed
labels["Surgut"] = {
langs = {},
Wikipedia = true,
regional_categories = true,
}
labels["Suriname"] = {
aliases = {"Surinamese"},
langs = {"car", "hns", "jv", "nl"},
Wikipedia = true,
regional_categories = "Surinamese",
}
labels["Thailand"] = {
aliases = {"Thai"},
-- "en", "zh" handled in lang-specific module
langs = {"khb", "mnw", "th"},
Wikipedia = true,
regional_categories = "Thai",
}
labels["UK"] = {
aliases = {"United Kingdom"},
-- "en", "zh" handled in lang-specific module
langs = {"bn", "ur", "vi"},
Wikipedia = "United Kingdom",
regional_categories = "British",
}
-- WARNING: No existing languages or categories associated with label; add to `langs` as needed
labels["Old Ukrainian"] = {
langs = {},
Wikipedia = true,
plain_categories = true,
}
labels["US"] = {
aliases = {"U.S.", "United States", "United States of America", "USA", "America", "American"}, -- America/American: should these be aliases of 'North America'?
-- DO NOT include "es" here, otherwise {{lb|es|American}} will categorize in [[:Category:American Spanish]]; see [[:Category:United States Spanish]].
-- "de", "en", "pt", "zh" handled in lang-specific module
langs = {"hi", "is", "it", "ja", "ko", "nl", "ru", "tli", "ur", "vi", "yi"},
Wikipedia = "United States",
regional_categories = "American",
}
-- WARNING: No existing languages or categories associated with label; add to `langs` as needed
labels["Vilhelmina"] = {
langs = {},
Wikipedia = true,
regional_categories = true,
}
labels["Viryal"] = {
aliases = {"Upper Chuvash"},
langs = {"cv"},
Wikipedia = true,
regional_categories = true,
}
-- WARNING: No existing languages or categories associated with label; add to `langs` as needed
labels["Wallonia"] = {
aliases = {"Wallonian"},
langs = {},
Wikipedia = true,
regional_categories = "Wallonian",
}
-- WARNING: No existing languages or categories associated with label; add to `langs` as needed
labels["Special Region of Yogyakarta"] = {
aliases = {"SR Yogyakarta"},
langs = {},
Wikipedia = true,
regional_categories = true,
}
-- WARNING: No existing languages or categories associated with label; add to `langs` as needed
labels["Zakarpattia"] = {
langs = {},
Wikipedia = "Zakarpattia Oblast",
regional_categories = true,
}
-- WARNING: No existing languages or categories associated with label; add to `langs` as needed
labels["Zululand"] = {
langs = {},
Wikipedia = true,
regional_categories = true,
}
------------------------------------------ Chinese romanizations ------------------------------------------
labels["Hanyu Pinyin"] = {
aliases = {"Hanyu pinyin", "Pinyin", "pinyin"},
Wikidata = "Q42222",
plain_categories = true,
}
labels["Postal Romanization"] = {
aliases = {"Postal romanization", "postal romanization", "Postal", "postal"},
Wikidata = "Q151868",
plain_categories = true,
}
labels["Tongyong Pinyin"] = {
aliases = {"Tongyong pinyin"},
Wikidata = "Q700739",
plain_categories = true,
}
labels["Wade–Giles"] = {
aliases = {"Wade-Giles"},
Wikidata = "Q208442",
plain_categories = true,
}
return require("Module:labels").finalize_data(labels)
m4obmf3vkic8njkc33zwmgwehcc57by
asil kokunamaan
0
49148
344485
180153
2026-05-27T11:17:38Z
Hakimi97
2668
/* Sebutan */
344485
wikitext
text/x-wiki
==Bahasa Kadazandusun==
===Takrifan===
====Kata majmuk====
{{inti|dtp|kata majmuk}}
# [[hasil penemuan]]
#: {{ux|dtp|Ogumu '''asil kokunamaan''' mantad ponoriukan diti.
|Banyak '''hasil penemuan''' daripada penyelidikan}}
===Sebutan===
# {{IPA|dtp|/a.sil.kɔ.kʊ.na.maːn/}}
# {{penyempangan|dtp|a|sil|ko|ku|na|ma|an}}
l3b6c6ritwmvi2ygcaq5kxaay3644wc
Modul:labels/data/lang/tet
828
58310
344470
185613
2026-05-26T15:21:24Z
Hakimi97
2668
344470
Scribunto
text/plain
local labels = {}
----Dialects go here---
labels["Indonesia"] = {
aliases = {"West Timor", "Indonesian Tetum"},
Wikipedia = true,
regional_categories = "Indonesia",
}
labels["East Timor"] = {
aliases = {"Timorese", "Timor-Leste", "East Timor Tetum"},
Wikipedia = true,
regional_categories = "Timor",
}
return require("Module:labels").finalize_data(labels)
qpraqqo0ugfzti1wyu87zy2hno5vya4
Modul:category tree/lang/az
828
58687
344468
223262
2026-05-26T15:08:13Z
Hakimi97
2668
344468
Scribunto
text/plain
local labels = {}
local handlers = {}
local lang = require("Module:languages").getByCode("az")
labels["kata kerja majmuk"] = {
description = "Bentuka kata kerja ringan bahasa {{{langname}}} terdiri daripada kata kerja dan unsur bukan kerja seperti kata nama.",
parents = {"kata kerja", "Kategori:Kata kerja frasa mengikut bahasa", "kata majmuk"},
}
table.insert(handlers, function(data)
local auxverb = data.label:match("^compound verbs formed with \"(.+)\"$")
if auxverb then
local link = require("Module:links").full_link({ lang = lang, term = auxverb }, "term")
local altlink = require("Module:links").full_link({ lang = lang, alt = auxverb }, "term")
return {
description = "{{{langname}}} compound verbs formed with the {{w|light verb}} " .. link .. ".",
displaytitle = "{{{langname}}} compound verbs formed with \"" .. altlink .. '"',
breadcrumb = altlink,
parents = {{name = "kata kerja jamak", sort = auxverb}},
}
end
end)
labels["kata nama kehilangan vokal akhir"] = {
description = "Kata nama bahasa Azeri yang hilang vokal akhirnya sebelum kes dan akhiran tatabahasa tertentu.",
parents = {"kata nama mengikut jenis infleksi", "perkataan mengikut sifat tulisan"},
}
labels["bentuk jamak kata nama rosak"] = {
description = "Kata nama bahasa {{{langname}}} dengan bentuk majmuk seperti bahasa Arab.",
breadcrumb = "bentuk jamak rosak",
parents = {"bentuk kata nama"},
}
return {LABELS = labels, HANDLERS = handlers}
17qrp5sb95j8ntxitmi0wk1y9xbae8u
Modul:category tree/lang/fa
828
58844
344467
223280
2026-05-26T15:07:43Z
Hakimi97
2668
344467
Scribunto
text/plain
local labels = {}
local handlers = {}
local lang = require("Module:languages").getByCode("fa")
labels["kata kerja majmuk"] = {
description = "{{{langname}}} {{w|light verb}} constructions consisting of a verb and a non-verbal element, such as a noun.",
parents = {"kata kerja", "Kategori:Kata kerja frasa mengikut bahasa", "kata majmuk"},
}
table.insert(handlers, function(data)
local auxverb = data.label:match("^compound verbs formed with (.+)$")
if auxverb then
local link = require("Module:links").full_link({ lang = lang, term = auxverb }, "term")
local altlink = require("Module:links").full_link({ lang = lang, alt = auxverb }, "term")
return {
description = "{{{langname}}} compound verbs formed with the {{w|light verb}} " .. link .. ".",
displaytitle = "{{{langname}}} compound verbs formed with " .. altlink,
breadcrumb = altlink,
parents = {{name = "kata kerja majmuk", sort = auxverb}},
}
end
end)
labels["perkataan hazaragi dengan konsonan retrofleks"] = {
description = "Hazaragi dialectal terms containing retroflex consonants",
parents = {"Parsi Hazaragi"},
}
return {LABELS = labels, HANDLERS = handlers}
oy29xb3sxcamcqg3nnmixox82ase5da
Wikikamus:tmw/kate
4
116579
344464
342621
2026-05-26T14:30:52Z
Ultron90
4762
344464
wikitext
text/x-wiki
==Bahasa {{bahasa|tmw}}==
===Kata nama===
{{inti|tmw|kata nama}}
# {{label|1=tmw|2=dialek|3=Bukit Lagong}} [[kereta]] {{cp|tmw|Akuk hap '''kate'''.|Saya tiada '''kereta'''.}}
dab7n52lld5uk0k313hcy4wqmwfuyme
Wikikamus:tmw/hap
4
116611
344465
342528
2026-05-26T14:35:58Z
Ultron90
4762
344465
wikitext
text/x-wiki
==Bahasa {{bahasa|tmw}}==
===Kata sendi nama===
{{inti|tmw|kata sendi nama}}
# {{label|tmw|dialek|Bukit Lagong}} [[tiada]]{{cp|tmw|Kampung ituk '''hap''' bendak air.|Kampung itu '''tiada''' air.}}
iyp8n679k9zl75nfh20a6vwhrq3b5to
Wikikamus:tmw/kejak
4
116629
344463
342592
2026-05-26T14:29:33Z
Ultron90
4762
344463
wikitext
text/x-wiki
==Bahasa {{bahasa|tmw}}==
===Kata kerja===
{{inti|tmw|kata kerja}}
# {{label|tmw|dialek|Bukit Lagong}} [[kerja]], [[bekerja]] {{cp|tmw|Akuk tengah '''kejak'''.|Aku sedang '''bekerja'''.}}
90iw6sd16rrldamaxnuf6x2tsupbgyc
Wikikamus:tmw/itik
4
118269
344466
342597
2026-05-26T14:37:18Z
Ultron90
4762
344466
wikitext
text/x-wiki
==Bahasa {{bahasa|tmw}}==
===Kata nama===
{{inti|tmw|kata nama}}
# {{label|1=tmw|2=dialek|3=Bukit lagong}} [[itik]] {{cp|tmw|Akuk nyap penah makan '''itik'''.|Saya tidak pernah makan '''itik'''.}}
gyljta815k4juj2i32z0vevxutmdtzp
Wikikamus:ja/キーボード
4
119899
344472
2026-05-27T06:40:12Z
Ssante10
10156
Mencipta laman baru dengan kandungan '==Bahasa {{bahasa|{{safesubst:ROOTPAGENAME}}}}== ===Kata nama=== {{inti|{{safesubst:ROOTPAGENAME}}|kata nama}} # Papan Kekunci'
344472
wikitext
text/x-wiki
==Bahasa {{bahasa|ja}}==
===Kata nama===
{{inti|ja|kata nama}}
# Papan Kekunci
h21clcjy3i0plps1ljzgo6a027n2q8r
Wikikamus:ja/黒板
4
119900
344473
2026-05-27T06:41:20Z
Ssante10
10156
Mencipta laman baru dengan kandungan '==Bahasa {{bahasa|{{safesubst:ROOTPAGENAME}}}}== ===Kata nama=== {{inti|{{safesubst:ROOTPAGENAME}}|kata nama}} # Papan Tulis'
344473
wikitext
text/x-wiki
==Bahasa {{bahasa|ja}}==
===Kata nama===
{{inti|ja|kata nama}}
# Papan Tulis
fqcu2mkczdvyk90nowxpmzbsh1pmq3u
Wikikamus:ja/ねずみ
4
119901
344474
2026-05-27T06:42:16Z
Ssante10
10156
Mencipta laman baru dengan kandungan '==Bahasa {{bahasa|{{safesubst:ROOTPAGENAME}}}}== ===Kata nama=== {{inti|{{safesubst:ROOTPAGENAME}}|kata nama}} # Tetikus'
344474
wikitext
text/x-wiki
==Bahasa {{bahasa|ja}}==
===Kata nama===
{{inti|ja|kata nama}}
# Tetikus
tv7ewr0thesrdhwhvojmifxfabur1ra
Wikikamus:ja/描画
4
119902
344475
2026-05-27T06:42:58Z
Ssante10
10156
Mencipta laman baru dengan kandungan '==Bahasa {{bahasa|{{safesubst:ROOTPAGENAME}}}}== ===Kata kerja=== {{inti|{{safesubst:ROOTPAGENAME}}|kata kerja}} # Menggambar'
344475
wikitext
text/x-wiki
==Bahasa {{bahasa|ja}}==
===Kata kerja===
{{inti|ja|kata kerja}}
# Menggambar
56uht2j1njgrejo3s0xc9tnatb8523n
Wikikamus:ja/掃き掃除
4
119903
344476
2026-05-27T06:43:40Z
Ssante10
10156
Mencipta laman baru dengan kandungan '==Bahasa {{bahasa|{{safesubst:ROOTPAGENAME}}}}== ===Kata kerja=== {{inti|{{safesubst:ROOTPAGENAME}}|kata kerja}} # Menyapu'
344476
wikitext
text/x-wiki
==Bahasa {{bahasa|ja}}==
===Kata kerja===
{{inti|ja|kata kerja}}
# Menyapu
483nqx9rywkpccyli7ciwnuh7tbm2ua
Wikikamus:ja/空調
4
119904
344477
2026-05-27T06:45:09Z
Ssante10
10156
Mencipta laman baru dengan kandungan '==Bahasa {{bahasa|{{safesubst:ROOTPAGENAME}}}}== ===Kata nama=== {{inti|{{safesubst:ROOTPAGENAME}}|kata nama}} # Penyaman udara'
344477
wikitext
text/x-wiki
==Bahasa {{bahasa|ja}}==
===Kata nama===
{{inti|ja|kata nama}}
# Penyaman udara
iixsmza4uwea3lwm5dphasyj8jemlbu
Pengguna:Aristorkle/sandbox
2
119905
344478
2026-05-27T08:56:30Z
Aristorkle
10771
Mencipta laman kosong
344478
wikitext
text/x-wiki
phoiac9h4m842xq45sp7s6u21eteeq1
Kategori:Perkataan bahasa rentas bahasa dengan kunci isih tidak lewah dan tidak automatik
14
119906
344480
2026-05-27T09:39:45Z
Hakimi97
2668
Mencipta laman baru dengan kandungan '{{auto cat}}'
344480
wikitext
text/x-wiki
{{auto cat}}
eomzlm5v4j7ond1phrju7cnue91g5qx