Exemplo n.º 1
0
        public static bool IsConsonantComb(FrenchCharComb cc)
        {
            var c = cc.Comb;

            return(cc.PronSet && IsConsonantPron(cc) ||
                   c.Length == 1 && ConsonantChars.Contains(c[0]) ||
                   ConsonantMultiCharCombs.Contains(c));
        }
Exemplo n.º 2
0
        public static bool IsVowelComb(FrenchCharComb cc)
        {
            var c = cc.Comb;

            return(cc.PronSet && IsVowelPron(cc) ||
                   c.Length == 1 && VowelChars.Contains(c[0]) ||
                   VowelMultiCharCombs.Contains(c) ||
                   c.Length > 1 && IsNasalizable(c.Substring(0, c.Length - 1)) && (c[c.Length - 1] == 'm' || c[c.Length - 1] == 'n'));
        }
Exemplo n.º 3
0
 public static bool IsVowelPron(FrenchCharComb cc)
 {
     foreach (var p in cc.GetPron())
     {
         if (SingleCharVowelPhenomene.Contains(p))
         {
             return(true);
         }
     }
     return(false);
 }
Exemplo n.º 4
0
        public static LinkedListNode <FrenchCharComb> MergeNext(LinkedListNode <FrenchCharComb> cc)
        {
            var a = cc.Value.Comb + cc.Next.Value.Comb;
            var b = new FrenchCharComb(a, cc.Value.StartPos);
            var l = cc.List;
            var p = cc.Previous;

            l.Remove(cc.Next);
            l.Remove(cc);
            return(p == null?l.AddAfter(p, b) : l.AddFirst(b));
        }
 public UnrecognizedComb(FrenchCharComb comb) : this($"Char comb {comb.Comb} unrecognized")
 {
 }
Exemplo n.º 6
0
 public bool HasTailClosedSyllable_Contains(FrenchCharComb cc) => cc.Syll == SyllableList.Last.Value && cc.Syll.VowelComb == cc.Syll.LastComb;
Exemplo n.º 7
0
 public string GetPreviousChars(FrenchCharComb cc, int n) => Content.Substring(cc.StartPos - n, n);
Exemplo n.º 8
0
 public bool HasPreviousChars(FrenchCharComb cc, int n) => cc.StartPos - n >= 0;
Exemplo n.º 9
0
 public string GetNextChars(FrenchCharComb cc, int n)
 {
     return(Content.Substring(cc.StartPos + cc.Comb.Length, n));
 }
Exemplo n.º 10
0
 public bool HasNextChars(FrenchCharComb cc, int n)
 {
     return(cc.StartPos + cc.Comb.Length + n <= Content.Length);
 }
Exemplo n.º 11
0
 public static bool IsConsonantPron(FrenchCharComb cc)
 {
     return(!IsVowelPron(cc));
 }
Exemplo n.º 12
0
 public static bool IsSemiVowelComb(FrenchCharComb cc) => SemiVowelComb.Contains(cc.Comb);