Example #1
0
            public override TextRunZho Translate(GroupCollection groups, NormalizePinyinDelegate npd)
            {
                string trad = groups[1].Value;
                string simp = groups[1].Value;

                return(new TextRunZho(simp, trad, null));
            }
Example #2
0
            public override TextRunZho Translate(GroupCollection groups, NormalizePinyinDelegate npd)
            {
                string[]         pinyinParts = groups[1].Value.Trim().Split(new char[] { ' ' });
                PinyinSyllable[] pinyin;
                List <int>       pinyinMap;

                npd(pinyinParts, out pinyin, out pinyinMap);
                return(new TextRunZho(pinyin));
            }
 public override TextRunZho Translate(GroupCollection groups, NormalizePinyinDelegate npd)
 {
     string trad = groups[1].Value;
     string simp = groups[2].Value;
     string[] pinyinParts = groups[3].Value.Trim().Split(new char[] { ' ' });
     PinyinSyllable[] pinyin;
     List<int> pinyinMap;
     npd(pinyinParts, out pinyin, out pinyinMap);
     return new TextRunZho(simp, trad, pinyin);
 }
 public override TextRunZho Translate(GroupCollection groups, NormalizePinyinDelegate npd)
 {
     string trad = groups[1].Value;
     string simp = groups[2].Value;
     return new TextRunZho(simp, trad, null);
 }
 /// <summary>
 /// Translates a regex match with groups into a Chinese text run.
 /// </summary>
 /// <param name="groups">The associated regex's groups.</param>
 /// <returns>The resolved Chinese text run.</returns>
 public abstract TextRunZho Translate(GroupCollection groups, NormalizePinyinDelegate npd);
Example #6
0
 /// <summary>
 /// Translates a regex match with groups into a Chinese text run.
 /// </summary>
 /// <param name="groups">The associated regex's groups.</param>
 /// <returns>The resolved Chinese text run.</returns>
 public abstract TextRunZho Translate(GroupCollection groups, NormalizePinyinDelegate npd);