Skip to content

Fix CAPHI rewrite for stem-final i_y / u_w with no suffix - #172

Open
AbdulmalikDS wants to merge 1 commit into
CAMeL-Lab:masterfrom
AbdulmalikDS:fix-caphi-iy-uw
Open

Fix CAPHI rewrite for stem-final i_y / u_w with no suffix#172
AbdulmalikDS wants to merge 1 commit into
CAMeL-Lab:masterfrom
AbdulmalikDS:fix-caphi-iy-uw

Conversation

@AbdulmalikDS

Copy link
Copy Markdown

Fixes #138

rewrite_caphi rules 3 and 4 require a + after the stem marker, so the $
branch never matches. A stem ending in i_y or u_w with no suffix is left
as a short vowel + glide instead of a long vowel:

قاضِي   q_aa_d._i_y-   ->  q_aa_d._i_y    expected q_aa_d._ii
يَدْعُو  y_a_d_3_u_w-   ->  y_a_d_3_u_w    expected y_a_d_3_uu

The rules were right when written (027ec90, 2018): the caphi join always
emitted a +, even for an empty suffix. d99bbbc (2020) made the join skip
empty parts, which removed that trailing + and silently broke the no-suffix
case.

Moved \+ inside the group, as proposed in the issue. Same change was part of
#166, split out here on its own with tests.

Checked against calima-msa-r13: 3,062 stems end in i_y- / u_w-. Running
the analyzer on 400 of them (2,679 analyses), the only differences are
_i_y -> _ii (580) and _u_w -> _uu (104). Vowel-suffix forms like قاضِيَكَ
are unchanged.

The '+' was required before the suffix group, so a bare stem ending
never matched. Move it inside the optional group.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rewrite rule broken

1 participant