Skip to content

Commit

Permalink
[GHA] Nilakkhana transform and sync files from bilara-data repo.
Browse files Browse the repository at this point in the history
  • Loading branch information
ihongda committed Aug 20, 2024
1 parent 0704684 commit 65e9fa7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sc_bilara_data/.nilakkhana/uid_to_acro.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import re

def uid_to_acro(uid):
result = re.sub(r'[a-zA-Z-]+', lambda m: uid_to_acro_map.get(m[0]) or m[0].upper(), uid)
result = re.sub(r'[a-zA-Z]+', lambda m: uid_to_acro_map.get(m[0]) or m[0].upper(), uid)
result = re.sub(r'(\d+)-(\d+)', r'\1–\2', result)
result = re.sub('-', ' ', result)
result = re.sub(r'([a-zA-Z])(\d)', r'\1 \2', result)
Expand Down Expand Up @@ -89,8 +89,10 @@ def uid_to_acro(uid):
"t": "T",
"other-t": "Other T",
"tha-ap": "Tha Ap",
"tha": "Tha",
"thag": "Thag",
"thi-ap": "Thi Ap",
"thi": "Thi",
"thig": "Thig",
"tib": "Tib",
"ud": "Ud",
Expand Down

0 comments on commit 65e9fa7

Please sign in to comment.