niobures's picture
XPF
4a08ba7 verified
# Maltese Rule Set
# Written by: Bill
# Last Updated: 2019-07-29
type,sfrom,sto,weight,precede,follow,comment
# Class Rules
class,pre-j,[ao],,,,
class,pre-w,[aei],,,,
class,anyh,(għ|h),,,,
class,vowel,(a|e|i|ie|ɪ|o|u),,,,
class,highvowel,[iu],,,,
class,glide,[jw],,,,
class,consonant,[bċdfgġhħjklmnpqrstvwxzż],,,,
class,cons-output,(b|tʃ|d̪|f|ɡ|dʒ|ħ|j|k|l|m|n|p|ʔ|r|s|t̪|v|w|ʃ|z|ts),,,,
class,punctuation,[-'ꞌ‘’],,,,
class,passthrough,[abefħijklmnoprsuvw],,,,
# Individual Letters
sub,à,a,4,,$,"vowels with grave accents appear word-finally"
sub,è,e,4,,$,
sub,ì,i,4,,$,
sub,ò,o,4,,$,
sub,ù,u,4,,$,
sub,ċ,tʃ,2,,,
sub,d,d̪,4,,,
sub,g,ɡ,4,,,
sub,ġ,dʒ,2,,,
sub,q,ʔ,4,,,
sub,t,t̪,4,,,
sub,u,u ː,6,,{consonant}{vowel}$,
sub,x,ʃ,4,,,
sub,z,ts,2,,,
sub,ż,z,1.9,,,
sub,{punctuation},,4,,,
# Digraphs / Trigraphs
sub,a,aj,9,,j,"<aj>"
sub,o,oj,9,,j,"<oj>"
sub,j,,9,{pre-j},,"cleanup of j-final digraphs"
sub,a,aw,9,,w,"<aw>"
sub,e,ew,9,,w,"<ew>"
sub,i,iw,9,,w,"<iw>"
sub,w,,9,{pre-w},,"cleanup of w-final digraphs"
sub,i,ɪ ː,4.1,,e,"<ie>"
sub,e,,4.1,i,,"<ie> cleanup"
sub,ċ,tʃ REALː,2.2,,ċ,"<ċċ>; see line 72 re: REALː"
sub,ċ,,2.2,ċ,,"<ċċ> cleanup"
sub,ġ,dʒ REALː,2.2,,ġ,"<ġġ>; see line 72 re: REALː"
sub,ġ,,2.2,ġ,,"<ġġ> cleanup"
sub,z,ts REALː,2.2,,z,"<zz>; see line 72 re: REALː"
sub,z,,2.2,z,,"<zz> cleanup"
sub,i,ej,9,għ,,"<għi>"
sub,u,ow,9,għ,,"<għu>"
sub,g,,9,,ħ{highvowel},"cleanup of għ-initial trigraphs (1)"
sub,ħ,,9,g,{highvowel},"cleanup of għ-initial trigraphs (2)"
# <-għha> and <-għhom> Suffixes
sub,g,ħ a ː,8,,ħha$,"-ha suffix rules begin here"
sub,ħ,,8,g,ha$,
sub,h,,8,għ,a$,
sub,a,,8,għh,$,
sub,g,ħ o ː m,8,,ħhom$,"-hom suffix rules begin here"
sub,ħ,,8,g,hom$,
sub,h,,8,għ,om$,
sub,o,,8,għh,m$,
sub,m,,8,għho,$,
# Miscellaneous <għ> and <h> Rules
sub,g,ħ,7,,ħ$,
sub,ħ,,7,g,$,
sub,h,ħ,8,,$,
sub,g,ː,7,,ħ.,
sub,ħ,,7,g,.,
sub,h,ː,7,,,
# Ipasub Rules - Collapsing Length Rules
ipasub,({vowel}) {anyh} \1,\1 ː,1.6,,,"collapsing of VhV"
ipasub,({vowel}) ː \1,\1 ː,1.6,,,"collapsing of V ː V"
ipasub,({vowel}) \1,\1 ː,1.6,,,"collapsing of VV"
ipasub,({vowel}) ː \1 ː,\1 ː,0.9,,,"collapsing of multiple consecutive long vowels"
ipasub,(ː |ː)ː+,ː,0.5,,,"collapsing of multi-length"
# Ipasub Rules - Consonant Gemination (and non-gemination)
ipasub,^({cons-output}) \1,\1 REALː,1.6,,,"lengthening of word-initial double consonants"
ipasub, ({cons-output}) \1, \1 REALː,1.6,,,"lengthening of other double consonants (the initial space lets us avoid catching diphthongs)"
ipasub,REALː ː ({vowel}),REALː \1 ː,1.4,,,"should allow for the appropriate establishment of CːVː sequences"
ipasub,REALː,ː,0.9,,,"prevents consonant-lengthening ː from getting inappropriately moved by the rule in line 73"
ipasub,({cons-output}) ː ({vowel}),\1 \3 ː,1.1,,,"fixing length distribution"
# Misc. Rules
ipasub,^ː ({vowel}) ,\1 ː ,1.1,,,"correcting lengthening of word-initial vowels"
ipasub,^ː ({vowel})({cons-output}),\1\3 ː,1.1,,,"correcting lengthening of word-initial diphthongs"
ipasub,ː({glide}),ː \1,0.4,,,"fixes a few odd cases of <ːj> and <ːw>"
sub,({highvowel}),\1 ː,6,,({consonant}|għ)$,"lengthening of high vowel penult"
sub,({passthrough}),\1,0.1,,,