Esempio n. 1
0
 private static int GetNumberOfConsonantsFollowing(Sound[] sounds, int index)
 {
     int counter = 0;
     while (index+1 < sounds.Length && sounds[index + 1].IsConsonant())
     {
         counter++;
         index++;
     }
     return counter;
 }
Esempio n. 2
0
 private static bool IsShortSyllable(Sound[] sounds, int index)
 {
     return sounds[index].IsShortVowel() && GetNumberOfConsonantsFollowing(sounds, index) <2;
 }