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

Is there a way to syllabify a word but not convert it to its phonemes #595

Open
MohammedChe opened this issue Jun 22, 2020 · 2 comments
Open

Comments

@MohammedChe
Copy link

Is there a way to syllabify a word but not convert it to its phonemes? for example, the getSyllables() function would return 'k-aa-n/g-r-ae/ch-ah/l-ey/sh-ah-n-z' when syllabifying 'Congratulations'. Is there a way to return Con-gra-tu-la-tions instead? or convert the phonemes back to graphemes?

@dhowe
Copy link
Owner

dhowe commented Jun 23, 2020

Interesting question -- not in the current implementation. This would require a phoneme-to-letter(or grapheme) mapping, which, in English at least, is not regular. RiTa does do letter-to-phoneme mapping, for analyzing unknown words (and this is a large chunk of the core engine) but not the reverse.

This paper presents an algorithm for this -- if someone wanted to translate it into both Javascript and Java, I'd certainly consider adding it to the library, but the fact that is (I believe) the first request for this feature, it doesn't seem to be a very common use-case...

@MohammedChe
Copy link
Author

Thanks. There are libraries that syllabify words without phonemes but I think RiTa is the most accurate due to the phoneme mapping. I was looking at how RiTa maps the letters to phonemes (need to dive deeper than what I found so far) I'm thinking about remapping them back into letters once the words are syllabified. Do you think that would work? As in, do the opposite of the letter-to-phoneme mapping that exists in RiTa. Thanks for the paper, I'll read it and see which option works best.

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

2 participants