Closed emmanuelvlad closed 4 years ago
Hello @EmmanuelVlad. Thanks for noticing this. The original line in non-transpiled source is line 484. Your solution does not fix the issue though. Try 'Jesus' for instance. Do you want to try & fix the issue then open a PR or do you want me to fix it?
Sorry I didn't see your reply, I don't have much time to figure out why it doesn't work
Hello,
Thanks for porting the Sonnex algorithm to JavaScript.
However, as of April 2020 the issue with us
syllable still persists. Any news?
In the end I could manage a fix, you can find my pull request above. There is still an issue with words ending with -us, with a non-silent "s". Such as "bus" and its derivatives : "abribus", "autobus". Or words derived from Latin such as "malus". And right now this makes "plus" rhyme with "plu" at all times. Now, all this is outside the scope of this issue.
Yes handling latin name is somewhat difficult as only a dictionary approach would work unfortunately.
Line 266: - while (current.length) { + while (current && current.length) {
Becomes undefined when having
us
at the end of a word TypeError: Cannot read property 'length' of undefined