go ahead... be a heretic | |
PerlMonks |
Re: Splitting text into syllablesby Bod (Parson) |
on Jan 25, 2022 at 22:43 UTC ( [id://11140867]=note: print w/replies, xml ) | Need Help?? |
I am looking for a good solution to split up German text into its syllables Within my company, we produce a lot of marketing content and aim to constantly improve the quality of this copy. So I insist on a Flesch Kincaid Grade Score of no more than 7.5. But, the problem is getting a reliable and consistent Grade Score. We use The Hemingway App. But I wanted a solution attached to our content creating platforms which are written in Perl. So I started using Lingua::EN::Fathom which uses Lingua::EN::Syllable. The first thing I noticed was that Lingua::EN::Fathom and The Hemingway App disagree on the Grade Score. But, it is helpful to have a browser-side real-time calculation of the Grade Score. Not to have to keep sending AJAX requests back to a Perl script on the server. So I searched and found a Javascript solution. It works...but is even further out on its calculation of the Grade Score. After some investigation, I traced the discrepancies to the way that these three methods calculate the syllable count...they all do it very differently! So I will probably end up writing my own Grade Score calculator that uses the same method of calculation in both Perl and Javascript. It doesn't matter too much how accurately it reflects other tools. What is more important is that the two agree on any given piece of text. Then we can adjust the company rule on Grade Score to reflect what the tools are saying. But this has moved down the priority list as we have bought a subscription to Grammarly which is doing a good job of improving the quality and consistency of our written content.
In Section
Seekers of Perl Wisdom
|
|