Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Indices are not compatible with prevent-feeding #280

Open
joanise opened this issue Aug 30, 2023 · 2 comments
Open

Indices are not compatible with prevent-feeding #280

joanise opened this issue Aug 30, 2023 · 2 comments

Comments

@joanise
Copy link
Collaborator

joanise commented Aug 30, 2023

Given the mapping

a{1}b{2},c{2}d{1}

converting ab correctly outputs cd unless prevent-feeding is true, in which case it outputs c{2}d{1}

To reproduce, make a single-rule mapping in g2p-studio with In=a{1}b{2} and Out=c{2}d{1} and click on the prevent-mapping checkbox for that rule. Set the input to ab at the top.

@joanise
Copy link
Collaborator Author

joanise commented Aug 30, 2023

The problem occurs whether the individual rule has prevent-feeding or the entire mapping has it.

@joanise
Copy link
Collaborator Author

joanise commented Aug 31, 2023

PS: I noticed this problem when I was trying to improve kwk BOAS->Umista for the casing PR #274.

With rule uâ,uʼo and input UÂ we get these elements in tg.substring_alignments() (used in preserve_case()): [('U', 'u'), ('A', 'ʼ'), ('̂', 'o')] and therefore this output: Uʼo because the A is not aligned to the o and therefore does not cause it to get uppercased.

I figured I might be able to fix this with indices, changing uâ,uʼo to u{1}â{2},uʼ{1}o{2}, but this mapping has prevent feeding on so I get Uʼ{1}o{2} instead of the UʼO I'm trying to get.

joanise added a commit that referenced this issue Aug 31, 2023
joanise added a commit that referenced this issue Nov 10, 2023
joanise added a commit that referenced this issue Nov 15, 2023
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

No branches or pull requests

1 participant