Example #1
0
        private static string Match(ChineseLexicon lexicon, ChineseType chineseType, string part)
        {
            var isMatch = chineseType == ChineseType.Traditional
                ? lexicon.Words.Any(x => x.Traditional == part)
                : lexicon.Words.Any(x => x.Simplified == part);

            return(isMatch ? part : null);
        }
Example #2
0
 public LexiconScope(ChineseLexicon lexicon)
 {
     Lexicon = lexicon;
 }