How to compute number of syllables in a word in javascript?

前端 未结 4 1470
执念已碎
执念已碎 2020-12-28 18:55

Is there javascript library for counting number of syllables in a word? How to count?

Thanks

Edit

Thank Sydenam and zozo for useful

4条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-28 19:44

    Well... you take a grammatical book and start reading the string letter by letter if one of the rules there is matched then you add a +1 to a counter. Since the rules differ from language to language I can't really tell you how to do it. I did it for Romanian... but I doubt it will help you.

提交回复
热议问题