Exemplo n.º 1
0
        /// <summary>
        /// 获取字典字符串
        /// 需要查询哪些字典。目前已知
        /// list:以 1,3,4,5,8,9,10,12,13,14,18,21,3003,3005 为字符串进行组合
        /// 1:对应 json 中 baesInfo 字段,基础释义
        /// 3:对应 json 中 collins 字段,柯林斯高阶英汉双解学习词典
        /// 4:对应 json 中 ee_mean 字段,英英词典
        /// 5:对应 json 中 trade_means 字段,行业词典
        /// 8:对应 json 中 sentence 字段,双语例句
        ///  9:对应 json 中 netmean 字段,网络释义
        /// 10:对应 json 中 auth_sentence 字段,权威例句
        /// 12:对应 json 中 synonym 字段,同义词
        /// 13:对应 json 中 antonym 字段,反义词
        /// 14:对应 json 中 phrase 字段,词组搭配
        /// 18:对应 json 中 encyclopedia 字段,百科全书
        /// 21:对应 json 中 cetFour 字段,四级真题
        /// 3003:对应 json 中 bidec 字段,英汉双向大词典
        /// 3005:对应 json 中 jushi 字段,例句
        /// </summary>
        /// <returns></returns>
        private static string GetDictString()
        {
            var dictionaryQueryString = "1,3,4,5,8,9,10,12,13,14,18,21,3003,3005";
            var requestString         = WebRequestTransformHelper.GetRequestString(dictionaryQueryString);

            return(requestString);
        }
        /// <summary>
        /// 获取字典字符串
        /// 需要查询哪些字典。目前已知
        /// {"count":99,"dicts":[["ec","ce","newcj","newjc","kc","ck","fc","cf","multle","jtj",
        /// "pic_dict","tc","ct","typos","special","tcb","baike","lang","simple","wordform",
        /// "exam_dict","ctc","web_search","auth_sents_part","ec21","phrs","input",
        /// "wikipedia_digest","ee","collins","ugc","media_sents_part","syno","rel_word",
        /// "longman","ce_new","le","newcj_sents","blng_sents_part","hh"],["ugc"],["longman"],
        /// ["newjc"],["newcj"],["web_trans"],["fanyi"]]}。可为空,为空则返回全部字段
        /// </summary>
        /// <returns></returns>
        private static string GetDictString()
        {
            var dictionaryQueryModel = new DictionaryQueryModel()
            {
                Dictionaries = new List <List <string> >()
                {
                    new List <string>()
                    {
                        "ec",
                        //"ec21",
                        "phrs",
                        "syno",
                        "rel_word",
                        "collins"
                    },
                },
            };
            var requestString = WebRequestTransformHelper.GetRequestString(dictionaryQueryModel);

            return(requestString);
        }