What is a Syllable ?
Submissions: 149   Accuracy:

14.76%

  Difficulty: Easy   Marks: 2

Given a text. The task is to count number of syllables in text.

Definition of a syllable :-  A contiguous sequence of vowels, except for an "e" at the end of a word if the word has another set of contiguous vowels, makes up one syllable. y is considered a vowel. For example, the word water is composed of two syllables: wa and ter.

Input: 
The first line contains a single integer T denoting the number of test cases. Then T test cases follow. Each test case consists of a single line which contains a text.

Output:
Corresponding to each test case, print  number of syllables.

Constraints:
1 <=T<= 10
1 <=  |text| <= 250

where |text| denoted the length of text

Example:
Input:
3
many Syyyyyyyyyyyylableeeeeses are
syllable
segue

Output:
7
2
2

** For More Input/Output Examples Use 'Expected Output' option **

Contributor: Gaurav Miglani
Author: gaurav miglani


If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.



Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.

to report an issue on this page.