Skip to content

Commit 28f479e

Browse files
committed
Move Gurmukhi nasalization to post normalization.
1 parent 4784bfa commit 28f479e

3 files changed

Lines changed: 7 additions & 3 deletions

File tree

scriptshifter/hooks/gurmukhi/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
nas_config["default"][k] = v
2424

2525

26-
def nasalize_post_config(ctx):
26+
def nasalize_post_normalize(ctx):
2727
"""
2828
Preprocess Roman input to get a uniform nasalization.
2929

scriptshifter/tables/data/panjabi_gurmukhi.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ general:
99

1010
roman_to_script:
1111
hooks:
12-
post_config:
12+
post_normalize:
1313
-
14-
- gurmukhi.nasalize_post_config
14+
- gurmukhi.nasalize_post_normalize
1515

1616
map:
1717
"": ""

scriptshifter/trans.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,10 @@ def transliterate(src, lang, t_dir="s2r", capitalize=False, options={}):
176176
return getattr(ctx, "dest", ""), ctx.warnings
177177

178178
logger.debug(f"Normalized source: {ctx.src}")
179+
logger.debug(
180+
f"Original code points: {[hex(ord(c)) for c in ctx.orig]}")
181+
logger.debug(
182+
f"Normalized code points: {[hex(ord(c)) for c in ctx.src]}")
179183
lang_map = list(get_lang_map(ctx.conn, ctx.lang_id, ctx.t_dir))
180184

181185
# Loop through source characters. The increment of each loop depends on

0 commit comments

Comments
 (0)