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

Space in automatic pronunciation is unidentifiable in regex #1364

Open
Floverale-Hellewen opened this issue Oct 15, 2024 · 0 comments
Open

Comments

@Floverale-Hellewen
Copy link

Hey there,
I know this project has been on hold for some time, but maybe someone can help me out.

Earlier there was a request to add spaces in automatically generated pronunciation (#630). I came to an issue connected to these spaces, specifically, I cannot "catch" these spaces with regex.
More details: using regex in phonology, I'm trying to achieve a change in pronunciation of one of the certain letters at the beginning of a word with the condition that the previous word ends with one of the other certain letters. Simple expressions like (?<=[ei][^\w])([ao]) or (?<=[ei] )([ao]) work everywhere but not in PolyGlot itself. For some reason, the space between input words cannot be found by Unicode space characters, literal space character or \s, \W and ^\w.

I am no programmer and literally just started acknowledging myself with regex, as I am happy to find this lovely program and wish to use all its potential in automatization. So I'm a little at a loss and cannot find a workaround to that. Condition of pronunciation change if a vowel is at the beginning of a word can be achieved with (?<!(\w))([ao]), but then it does not account for a vowel at the end of the previous word :(

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