コード例 #1
0
ファイル: Opers.cs プロジェクト: colincwilson/Gramadan
        //Performs syncope by removing the final vowel cluster,
        //then unduplicates and devoices the consonant cluster at the end.
        public static string Syncope(string bayse)
        {
            string ret = bayse;

            Match match = Regex.Match(bayse, "^(.*[" + Opers.Cosonants + "])?[" + Opers.Vowels + "]+([" + Opers.Cosonants + "]+)$");

            if (match.Success)
            {
                ret = Opers.Devoice(Opers.Unduplicate(match.Groups[1].Value + match.Groups[2].Value));
            }

            return(ret);
        }