Beispiel #1
0
        public static WordModel GetWordModelFromAiCiBaC2E2(AiCiBaC2E_Model2 _aimodel)
        {
            WordModel result = new WordModel();

            result.Word = _aimodel.word_name;

            result.Pronounciations.Add(new Pronounciation()
            {
                PronounciationType = "拼音",
                PhoneticSymbol     = _aimodel.symbols[0].word_symbol,
                SoundUri           = _aimodel.symbols[0].symbol_mp3
            });

            foreach (var definition in _aimodel.symbols[0].parts.ToList())
            {
                Definition definition1 = new Definition();
                definition1.PartOfSpeech = definition.part_name;
                foreach (var item in definition.means)
                {
                    definition1.Meanings.Add(item.word_mean);
                }
                result.Definitions.Add(definition1);
            }
            return(result);
        }
Beispiel #2
0
        public static WordModel GetWordModelFromAiCiBaE2C(AiCiBaE2C_Model _aimodel)
        {
            WordModel result = new WordModel();

            result.Word = _aimodel.word_name;

            result.Pronounciations.Add(new Pronounciation()
            {
                PronounciationType = "英",
                PhoneticSymbol     = _aimodel.symbols[0].ph_en,
                SoundUri           = _aimodel.symbols[0].ph_en_mp3
            });
            result.Pronounciations.Add(new Pronounciation()
            {
                PronounciationType = "美",
                PhoneticSymbol     = _aimodel.symbols[0].ph_am,
                SoundUri           = _aimodel.symbols[0].ph_am_mp3
            });
            result.Pronounciations.Add(new Pronounciation()
            {
                PronounciationType = "其他",
                PhoneticSymbol     = _aimodel.symbols[0].ph_other,
                SoundUri           = _aimodel.symbols[0].ph_tts_mp3
            });

            result.InflectionWords.Add(new InflectionWord()
            {
                InflectionType = "复数",
                Words          = ListHelper.GetListFromArray(_aimodel.exchange.word_pl)
            });
            result.InflectionWords.Add(new InflectionWord()
            {
                InflectionType = "过去式",
                Words          = ListHelper.GetListFromArray(_aimodel.exchange.word_past)
            });
            result.InflectionWords.Add(new InflectionWord()
            {
                InflectionType = "过去分词",
                Words          = ListHelper.GetListFromArray(_aimodel.exchange.word_done)
            });
            result.InflectionWords.Add(new InflectionWord()
            {
                InflectionType = "进行时",
                Words          = ListHelper.GetListFromArray(_aimodel.exchange.word_ing)
            });
            result.InflectionWords.Add(new InflectionWord()
            {
                InflectionType = "第三人称",
                Words          = ListHelper.GetListFromArray(_aimodel.exchange.word_third)
            });
            result.InflectionWords.Add(new InflectionWord()
            {
                InflectionType = "比较级",
                Words          = ListHelper.GetListFromArray(_aimodel.exchange.word_er)
            });
            result.InflectionWords.Add(new InflectionWord()
            {
                InflectionType = "最高级",
                Words          = ListHelper.GetListFromArray(_aimodel.exchange.word_est)
            });

            foreach (var definition in _aimodel.symbols[0].parts.ToList())
            {
                result.Definitions.Add(new Definition()
                {
                    PartOfSpeech = definition.part,
                    Meanings     = definition.means.ToList()
                });
            }
            return(result);
        }