[ad_1]
Hello @fibbu
Counting syllables is very complex because it depends on the text languages and their grammatical rules. The plugin does not include an operation to calculate syllables, but you can enter your own operations in the equations.
For example, assuming you have the text field fieldname1, you can insert a calculated field in the form and enter the following piece of code as its equation:
(function(){
function new_count(word) {
if (word.length === 0) return 0;
word = word.toLowerCase();
if (word.length <= 3) return 1;
word = word.replace(' ', '
').replace(/(?:[^laeiouy]es|ed|[^laeiouy]e)$/, '').replace(/^y/, '');
return word.match(/[aeiouy]{1,2}/g).length;
};
return new_count(fieldname1|r);
})()We borrowed the new_count operation code from the web page.
Best regards.
