Skip to content

Commit 32915c4

Browse files
committed
Fix dot part handling
Assumed all "." SAB components where defined under a single letter. Now checks if any base form is defined, and also check non-base component definition.
1 parent 1684b01 commit 32915c4

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

scripts/make_precoordinated_sab_terms.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,11 @@
8383

8484
if part.startswith('.'):
8585
assert first
86-
part = first[0] + part
86+
for i in range(len(first), 0, -1):
87+
controlled_part = first[:i] + part
88+
if controlled_part in sabcodes:
89+
part = controlled_part
90+
break
8791

8892
if part not in sabcodes:
8993
lit_transl_to_sv_code = 'Hce'

0 commit comments

Comments
 (0)