Skip to content

Commit

Permalink
ṛʰ romanisation rdh -> rh (hi NAT) / dh (all other NAT and PSA)
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 673463527
  • Loading branch information
isingoo authored and copybara-github committed Sep 11, 2024
1 parent 8c1de04 commit fdf1e65
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 1 deletion.
4 changes: 3 additions & 1 deletion nisaba/scripts/natural_translit/brahmic/romanizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ def _transliterate_vocalic(

TT_TR = rw.reassign(gr.RR + gr.RR, ph.T + ph.T, tr.T + tr.T + tr.R)
RD_R = rw.reassign(gr.RD, ph.RD, tr.R)
RDH_DH = rw.reassign(gr.RDH, ph.RD + ph.ASP, tr.D + tr.H)
RDH_RH = rw.reassign(gr.RDH, ph.RD + ph.ASP, tr.R + tr.H)

NY_N = rw.rewrite(ph.NY, tr.N, following=ph.CONSONANT)
NY_GN = rw.reassign(gr.NY, ph.NY, tr.G + tr.N, ph.VOWEL, ph.VOWEL)
Expand Down Expand Up @@ -157,7 +159,7 @@ def _transliterate_vocalic(


# Compose common rules for romanization
TXN_TO_PSA_COMMON = (DIPHTHONG_GR @ NON_LABIAL_ANUSVARA)
TXN_TO_PSA_COMMON = (DIPHTHONG_GR @ NON_LABIAL_ANUSVARA @ RDH_DH)

# Convert txn to PSAF and outputs only translit strings.
TXN_TO_PSAF = (
Expand Down
1 change: 1 addition & 0 deletions nisaba/scripts/natural_translit/language_params/hi.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ def iso_to_nat() -> fl.FstList:
_TXN_OPS,
romanizer.SIBV_TO_SIBW,
romanizer.AA_WI,
romanizer.RDH_RH,
romanizer.TXN_TO_PSA_COMMON,
romanizer.IGNORE_LONG,
romanizer.TRANSLIT_BY_PSA,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,8 @@ rewrite {
input: "akailā"
output: "akaila"
}
rewrite {
rule: "ISO_TO_NAT"
input: "bāṛʰa"
output: "barh"
}
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,8 @@ rewrite {
input: "akailā"
output: "akaila"
}
rewrite {
rule: "ISO_TO_PSAC"
input: "bāṛʰa"
output: "badh"
}
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,8 @@ rewrite {
input: "siddʰēgavhāṇa"
output: "siddhegavhan"
}
rewrite {
rule: "ISO_TO_NAT"
input: "māṛʰā"
output: "madha"
}
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,8 @@ rewrite {
input: "siddʰēgavhāṇa"
output: "sidhegavhan"
}
rewrite {
rule: "ISO_TO_PSAC"
input: "māṛʰā"
output: "madha"
}

0 comments on commit fdf1e65

Please sign in to comment.