CINXE.COM
对仗词汇查询
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head><title> 对仗词汇查询 </title><meta charset="utf-8" /><meta http-equiv="X-UA-Compatible" content="IE=10;IE=11" /><meta name="viewport" content="width=device-width,initial-scale=1.0" /><meta name="keywords" content="对仗,声律启蒙,笠翁对韵" /><link rel="stylesheet" type="text/css" href="pa28.css" /> <script src="js/jquery.min.js" type="text/javascript"></script> <script type="text/javascript" src="scripts/lib.35.js"></script> <style> .expandLine { border-top: 2px solid lightgray; border-right: 2px solid lightgray; height: 0.5em; position: absolute; top: 0.7em; } .expandLine1 { border-top: 2px solid lightgray; height: 0.5em; position: absolute; top: 0.7em; } </style> <script> var rootUrl = "https://api.sou-yun.cn/api/"; var trainWidth = 258; var currentKey = ""; var coupletWords = ["蝶","兔","蟀","虎","鹤","马","魉","鹊","斧","魅","桂","鸭","蚓","雨","豸","萏","雀","鸟","象","蚁","虱","蟹"]; var extendedCoupletWords = []; var suggestedCoupletWords = null; $(document).ready(function () { if (coupletWords.length > 0 || suggestedCoupletWords) { ShowResult(); showAd(); } if ($('#error').text().trim().length == 0) { $('#error').hide(); } }); function QueryByKey(key) { window.location = "QueryCoupletWord.aspx?key=" + key; } function ShowResult() { var key = "蟆"; currentKey = key; ShowCoupletWord(key, coupletWords); if (extendedCoupletWords.length > 0) { ShowInferrenceCoupletWord(key, extendedCoupletWords); } if (suggestedCoupletWords) { $("<p><span>但我们根据你的输入,找到了以下已经建立的对语的词汇,可供你参考:</span></p>").appendTo('#error'); ShowSuggestedCoupletWord(key, suggestedCoupletWords); } var url = rootUrl + "CoupletTrain?id=" + encodeURI(key); $.getJSON(url).done(function (data) { ShowCoupletWordTrain(key, data); }); if (key.length <= 2 && key.length > 0) { ShowChangeWordPanel(key); } } function ShowSuggestedCoupletWord(key, data) { var html = ""; if (data.Words) { $.each(data.Words, function (index, word) { html += GenerateCoupletWordHtml(word.Key, word.Value); }); } if (data.SingleChars) { $.each(data.SingleChars, function (index, singleChar) { html += "<div class='header'><span class='label'>含有“" + singleChar.Character + "”字且已建立的两字对语参考词汇</span></div><div style='margin: 1em 0;'><div>"; html += GenerateSuggestedWordHtml(singleChar.FirstCharAtWords); html += "</div><div>"; html += GenerateSuggestedWordHtml(singleChar.LastCharAtWords); html += "</div></div>"; }); } $('#extension').html(html); $('#extension').fadeIn(300); } function ShowCoupletWord(key, data) { if (data && data.length > 0) { var html = GenerateCoupletWordHtml(key, data); $('#extension').html(html); $('#extension').fadeIn(300); } else { $('#error').html("很抱歉,在历代律诗库中未找到(或罕有)用“" + key + "”做对语的例子。"); $('#error').show(); $('#extension').fadeOut(300); } } function ShowInferrenceCoupletWord(key, data) { if (!data) { return; } var html = GenerateInferrenceCoupletWordHtml(key, data); $('#inferrence').html(html); $('#inferrence').fadeIn(300); } function ShowCoupletWordTrain(key, data) { if (data) { $('#keyWord').text(key); ExpandCoupletWordTrain(key, data); $('#extension1').slideDown(); } } function QueryNextDepthTrain(depth) { url = rootUrl + "CoupletTrain?id=" + encodeURI(currentKey) + "&depth=" + depth; $.getJSON(url).done(function (data) { $('#expandDepth' + depth).hide(); $('#expandLine' + depth).addClass('expandLine1').removeClass('expandLine'); ExpandCoupletWordTrain(currentKey, data); ScrollTo(depth); }); } function ScrollTo(depth) { var width = $('#extension1').width(); var offset = currentKey.length == 2 ? 46 : 62; var expectedWidth = depth * trainWidth + offset; if (expectedWidth > width) { $('#extension1').scrollLeft(expectedWidth - trainWidth - 4); } } function ExpandCoupletWordTrain(key, data) { var lastWord = data.Key; var html = GetTrainHtml(data.Train, lastWord, data.Depth); $(html).appendTo('#trains'); if (data.FirstWordInNextDepth) { var nextDepthHtml = GetExpandNextDepthHtml(data); $(nextDepthHtml).appendTo('#trains'); } else if (data.Depth > 1) { var newWidth = $('#expandLine' + data.Depth).width() - 14; $('#expandLine' + data.Depth).width(newWidth); } } function GetExpandNextDepthHtml(data) { var offset = currentKey.length == 2 ? 46 : 62; var left = offset + trainWidth * (data.Depth - 1); var style = "width: " + trainWidth + "px; left: " + left + "px;"; var html = "<div class='expandLine' id='expandLine" + (data.Depth + 1) + "' style='" + style + "'>" + "</div>"; var linkText = "<span style='padding: 2px; background-color: gray; border-radius: 3px; color: white; opacity: 0.6;'>" + data.FirstWordInNextDepth + "</span>"; html += "<div id='expandDepth" + (data.Depth + 1) + "' style='position: absolute; top: 1.2em; z-index: " + data.Depth + "; left: " + (left - 16 + trainWidth) + "px; width: " + (currentKey.length + 1) + "em;'><a href='javascript: QueryNextDepthTrain(" + (data.Depth + 1) + ")'>" + linkText + "</a></div>"; return html; } function GetTrainHtml(train, lastWord, depth) { var style = ""; if (depth > 1) { style += "padding-left: 16px; position: absolute; top: 1.5em; z-index: " + (depth - 1) + "; min-width: 360px;"; var left = 17 + trainWidth * (depth - 1); style += "left: " + left + "px;"; } var html = "<div class='grey' style='" + style + "'>"; $.each(train, function (index, word) { html += "<div style='margin: 4px 0 4px 1em; border-left: 2px solid #ccc; height: 40px; overflow: hidden; color: gray; padding: 4px 0px 4px 8px; font-size: small;'>"; html += word.Sentence.Sentence + "<br />" + "<span class='charType'>" + word.Sentence.Author + "</span> <a target='_blank' href='/Query.aspx?type=poem&id=" + word.Sentence.PoemID + "'>" + word.Sentence.Title + "</a>"; html += "</div>"; var newWord = word.Word1 == lastWord ? word.Word2 : word.Word1; html += "<a class='expand' target='_blank' href='/Query.aspx?type=CoupletWord&key=" + word.Word1 + "," + word.Word2 + "'>" + newWord + "</a>"; lastWord = newWord; }); html += "</div>"; return html; } function GenerateSuggestedWordHtml(words) { var html = ""; var count = 0; $.each(words, function (index, word) { if (word.length != 2) { // ignore return; } html += "<div class='inline'><a class='expand' href='javascript: QueryByKey(\"" + word + "\");'>" + word + "</a></div>"; count++; }); return html; } function GenerateCoupletWordHtml(key, data) { var html = "<div class='poemTitle'><span class='label'>“" + key + "”对语参考</span><span class='inlineComment2'>(据历代律诗自动整理)</span></div><div style='margin: 1em 0;'>"; $.each(data, function (index, word) { html += "<div class='inline'><a class='expand' target='_blank' href='/Query.aspx?type=CoupletWord&key=" + key + "," + word + "'>" + word + "</a></div>"; }); html += "</div>"; return html; } function GenerateInferrenceCoupletWordHtml(key, data) { var html = "<div class='poemTitle'><span class='label'>“" + key + "”拓展对语参考</span><span class='inlineComment2'>(据对语树智能拓展)</span></div><div style='margin: 1em 0;'>"; $.each(data, function (index, word) { html += "<div class='inline link' style='margin: 0 12px 0 4px;' onclick='ShowInferrenceComment(" + index + ")'>" + word.Key + "</div>"; html += "<div class='inline inlineComment2' style='display: none;' id='inferrenceComment" + index + "'>("; html += key; var begin = key; $.each(word.Value, function (i, next) { html += "<a style='padding: 0 6px;' target='_blank' href='/Query.aspx?type=CoupletWord&key=" + begin + "," + next + "'>→</a>" + next; begin = next; }); var next = word.Key; html += "<a style='padding: 0 6px;' target='_blank' href='/Query.aspx?type=CoupletWord&key=" + begin + "," + next + "'>→</a>" + next; html += ")</div>"; }); html += "</div>"; return html; } function ShowInferrenceComment(index) { $('#inferrenceComment' + index).toggle(); } function ShowChangeWordPanel(key) { var title = key.length == 1 ? "组词" : "换一个词汇试试?"; var html = "<div class='poemTitle'><span class='label'>" + title + "</span></div>"; html += "<ul style='margin-bottom: 1rem;'>"; html += "<li><a href='QR.aspx?fromQCW=1&qtype=2&c=" + encodeURI(key[0]) + "'>查看以“" + key[0] + "”字开始的词汇</a></li>"; var endChar = key.length == 1 ? key[0] : key[1]; html += "<li><a href='QR.aspx?fromQCW=1&qtype=3&c=" + encodeURI(endChar) + "'>查看以“" + endChar + "”字结尾的词汇</a></li>"; html += "</ul>"; $('#changeWord').html(html).show(); } function showAd() { if (!isMobile) { console.log('height', $('#extension').height() + $('#inferrence').height()); if ($('#extension').height() + $('#inferrence').height() > 720) { $('.slideAd').show() } } } </script> </head> <body class='grey'> <div class="bar" style="min-height: 6.2em; padding-top: 0.5em;"> <div id="Menu1_Bar" class="wrapper" style="position: relative; line-height: 1.9em;"> <a href="/index.aspx"> <img src='/images/publish.png' class="sLogoImg" style="border: 0px; float: left; padding: 1.2rem 1rem 1rem 0;" /></a> <span class='mLabel navLink'>阅读</span> <a id="Menu1_HyperLink3" class="navLink" href="/PoemIndex.aspx">综合</a> <a id="Menu1_PoemComment" class="navLink" href="/PoemComment.aspx">诗话</a> <a id="Menu1_CiComment" class="navLink" href="/CiComment.aspx">词话</a> <a id="Menu1_eBookLink" class="navLink" href="https://cnkgraph.com/Book" target="_blank">古籍检索</a> <a id="Menu1_YjlhLink" class="navLink" href="https://cnkgraph.com/Category" target="_blank">类书集成</a> <span class='mLabel navLink' style="margin-left: 1.5rem;">查询</span> <a id="Menu1_PoemLink" class="navLink" href="/QueryPoem.aspx">诗词</a> <a id="Menu1_AllusionLink" class="navLink" href="/AllusionsIndex.aspx?sort=People">典故词汇</a> <a id="Menu1_HyperLink1" class="curNavLink navLink" href="/QueryCoupletWord.aspx">对仗词汇</a> <a id="Menu1_CiTuneLink" class="navLink" href="/QueryCiTune.aspx">词谱</a> <a id="Menu1_QuTuneLink" class="navLink" href="/QueryQuTune.aspx">曲谱</a> <a id="Menu1_PoemGeoLink" class="navLink" href="/PoemGeo.aspx">诗词地图</a> <a id="Menu1_LoginLink" class="navLink" href="/login.aspx" style="color:DarkRed;">登录</a> <br /> <span class='mLabel navLink'>韵典</span> <a id="Menu1_RhymeDictLink" class="navLink" href="/QR.aspx">平水韵</a> <a id="Menu1_CiRhymeLink" class="navLink" href="/QR.aspx?ci=*">词林正韵</a> <a id="Menu1_ZYQRLink" class="navLink" href="/zyqr.aspx">中原音韵</a> <a id="Menu1_TongYunLink" class="navLink" href="/mqr.aspx">中华通韵</a> <span class='mLabel navLink' style="margin-left: 1rem;">校注</span> <a id="Menu1_PoemValidationLink" class="navLink" href="/AnalyzePoem.aspx">律诗校验</a> <a id="Menu1_CiValidationLink" class="navLink" href="/AnalyzeCi.aspx">词格校验</a> <a id="Menu1_QuValidationLink" class="navLink" href="/AnalyzeQu.aspx">曲格校验</a> <a id="Menu1_CoupletValidationLink" class="navLink" href="AnalyzeCouplet.aspx">对联校验</a> <a id="Menu1_LabelingLink" class="navLink" href="/Labeling.aspx">自动笺注</a> <br /> <span class='mLabel navLink'>课堂</span> <a id="Menu1_LuCourse" class="navLink" href="/CourseIndex.aspx?type=律绝">律绝创作</a> <a id="Menu1_CiCourse" class="navLink" href="/CourseIndex.aspx?type=填词">填词入门</a> <a id="Menu1_FocuseCourse" class="navLink" href="/CourseIndex.aspx?type=公开课">公开课</a> <a id="Menu1_HyperLink2" class="navLink" href="/CourseIndex.aspx?type=近体诗">学习指南</a> <span class='mLabel navLink' style="margin-left: 1rem;">其它</span> <a id="Menu1_STConvertLink" class="navLink" href="/STConvert.aspx">简繁转换</a> <a id="Menu1_PoetGroupLink4" class="navLink" href="/PoetGroup.aspx">诗社</a> <a id="Menu1_BookStoreLink" class="navLink" href="https://weidian.com/?userid=332208122" target="_blank">诗词书店</a> </div> </div> <script> function Logout() { document.cookie = "jt=;Max-age=-99999"; localStorage.removeItem('works'); location.href = '/'; } </script> <!-- Global site tag (gtag.js) - Google Analytics --> <script async src="https://www.googletagmanager.com/gtag/js?id=G-THLRK7E3FF"></script> <script> window.dataLayer = window.dataLayer || []; function gtag() { dataLayer.push(arguments); } gtag('js', new Date()); gtag('config', 'G-THLRK7E3FF'); </script> <style> input[type=submit] { color: #000 } </style> <script type="text/javascript" src="/Scripts/hydcd.js?v=7"></script> <script> if (true) { HandleHydcd(false) } </script> <style> .spinner { margin: 5px; width: 12px; height: 12px; border: 3px solid rgba(0, 0, 0, 0.1); border-top-color: #333; border-radius: 50%; animation: spin 1s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } } li.jd_citation{ list-style-type:initial; } div.jd_section{ margin: 1em; } .jd_u, .jd_author { text-decoration: underline; margin: 0 2px; } .jd_entry{ font-weight: bold; } .jd_pinyin{ padding-left: 40px; } </style> <div id="sidePane"> <div style="text-align:center;padding-bottom:20px;"> <img src="/images/ContactUs.png" style="width:120px;height:120px;border:1px solid #E2E2E2;" /><br /> <div>微信扫描二维码</div> <div>添加搜韵客服</div> </div> </div> <script> $(document).ready(function () { function checkAds() { if ($(window).width() < 1024 + 300) { $('#sidePane').hide(); } else { $('#sidePane').show() } } checkAds() $(window).on('resize', checkAds) }) </script> <style> #sidePane { position: fixed; padding: 15px; right: 0; width: 150px; height: 720px; } </style> <div class='' id="headPanel"> <div class='wrapper' style="padding: 1.5em 4px 1.5em 4px;"> <form name="ctl02" method="post" action="./QueryCoupletWord.aspx?fromQR=1&key=%u87c6" id="ctl02"> <div> <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwULLTE3NTUxMjQzNzhkZBfzTk+y6WxHDQtkifzep09q74zJBKiPfEUNWmD/3lpJ" /> </div> <div> <input type="hidden" name="__VIEWSTATEGENERATOR" id="__VIEWSTATEGENERATOR" value="C8B7DF6F" /> </div> 单字或词汇:<input name="KeywordTextBox" type="text" value="蟆" maxlength="20" id="KeywordTextBox" size="9" style="border-color: LightBlue; width: 60px; margin-right: 1em;" /><input type="submit" name="QueryButton" value=" 查询 " id="QueryButton" style="margin-left: 1em; border-color: lightblue; background-color: #F0F0F0; border-radius: 12px; padding: 4px;" /> </form> </div> </div> <div class=''> <div class='wrapper'> <div id="error" class="notify" style="margin-bottom: 1rem;"> </div> <div style="display:flex;justify-content:space-between;"> <div style="max-width:100%;"> <div id="extension" style="max-width: 100%; width: 860px;"></div> <div id="inferrence" style="max-width: 100%; width: 860px;"></div> </div> <div class="slideAd" style="display:none;margin-left:2em;"> <div> <div> <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <!-- 对仗词汇广告位_电脑 --> <ins class="adsbygoogle" style="display:inline-block;width:300px;height:300px" data-ad-client="ca-pub-0414285907866387" data-ad-slot="7470330717"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div> </div> </div> </div> <div id="changeWord"></div> <div id="extension1" style='display: none; overflow: auto; max-height: 800px;'> <div class='poemTitle' style='margin-bottom: 0.5em;'><span class='label'>对语链</span></div> <div style='margin: 1em 0 1em 0.5em; position: relative;'> <div style="z-index: 1;"><span class='squareLabel' id="keyWord"></span></div> <div id="trains"></div> </div> </div> <div id="margin" style='height: 4em; margin-top:1em;'> <span class="label">参阅:</span><br /> <div class="inline"><a href="https://mp.weixin.qq.com/s?__biz=MzA3MjIxMTc5MA==&mid=2651519850&idx=1&sn=b24f503e1559e7f78b0a620275e067b7" class="expand">对仗词汇功能使用说明</a></div> <div class="inline"><a href="https://mp.weixin.qq.com/s?__biz=MzA3MjIxMTc5MA==&mid=2651519752&idx=2&sn=1feedbe26e4e339f06e02385d44b3148" class="expand">高频对仗词汇排行榜</a></div> </div> <div id="ads" style="margin-top: 1em;"> </div> </div> </div> <div> <script> var isPc = true; var isInWechatBrowser = false; var popupad = { lastPopupTimestamp: GetCookie("lpt") || 0, currentAd: null, displayedAds: [], AppendImage: function (ad) { if (ad) { var image = new Image(); image.src = ad.ImageUrl; image.style.maxWidth = '95vw'; image.style.maxHeight = '80vh'; image.style.borderRadius = '12px'; setTimeout(function () { $('#popupImg').append(image); $('#adsPanel').slideDown(500); document.body.style.overflow = 'hidden' SetLongLifeCookie('lpt', Date.now()) }, 1000); } }, ClickAd: function () { this.HideAds() var link = isInWechatBrowser && this.currentAd.LinkUrlInWechat ? this.currentAd.LinkUrlInWechat : this.currentAd.LinkUrl window.location = link; }, HideAds: function () { if (this.currentAd) { this.displayedAds = this.displayedAds.filter(x => x.split('.')[0] != this.currentAd.Id).concat(this.currentAd.Id + '.' + Date.now()) SetLongLifeCookie('displayedPAIDs', this.displayedAds); $('#adsPanel').slideToggle(); document.body.style.overflow = 'auto' } }, fetchAds: function () { var url = apiHome + 'popupAds'; GetJSON(url, data => { //console.log(data) if (data) { var ads = [] for (var ad of data) { if (isPc && !ad.IsPCEnabled) { continue; } if (this.lastPopupTimestamp > 0 && ad.IntervalDays && ad.IntervalDays * 24 * 3600 * 1000 + this.lastPopupTimestamp < Date.now()) { continue; } var item = this.displayedAds.find(x => x.split('.')[0] == ad.Id) if (item && ad.IntervalDays > 0) { var lpt = item.split('.')[1] if (Date.now() - lpt < ad.IntervalDays * 24 * 3600 * 1000) continue; } if (ad.EnablePaths && ad.EnablePaths.length > 0) { for (var i = 0; i < ad.EnablePaths.length; i++) { var regex = new RegExp(ad.EnablePaths[i], "i") if (regex.test(location.pathname)) { ads.push(ad) break; } } } else { ads.push(ad); } } if (ads.length > 0) { this.currentAd = ads[Math.floor(Math.random() * ads.length)]; this.AppendImage(this.currentAd); } } }) }, init: function () { // 一天内最多弹一次 if (Date.now() - this.lastPopupTimestamp < 3600 * 24 * 1000) return; var displayedPAIDsCookie = GetCookie("displayedPAIDs"); if (displayedPAIDsCookie) { this.displayedAds = displayedPAIDsCookie.split(','); } this.fetchAds() } } $().ready(function () { popupad.init() }) </script> <div id="adsPanel" class="lrFS fsComment" style="z-index: 10; display: none;"> <div class="shade"></div> <div style="display: flex; flex: 1; justify-content: center; align-items: center; height: 100vh; padding: 20px;"> <div id="advImgPanel" style="z-index: 1; display: flex; flex-direction: column; align-items: center;"> <a href="javascript: popupad.HideAds()"> <div class="popupad-close"></div> </a> <div style="height: 5vh; border: 3px solid #dfddbf8c; z-index: -1"></div> <a href="javascript: popupad.ClickAd()" id="popupImg"></a> </div> </div> </div> <style> .popupad-close { background: #dfddbf8c; color: white; border-radius: 50%; line-height: 30px; text-align: center; height: 30px; width: 30px; font-size: 24px; } .popupad-close::before { content: "\2716"; } </style> </div> <div style='line-height: 1.3em; padding-top: 6px; border-top: 1px solid #e5e5e5;' id="pageFooter"> <div class='wrapper' style="text-align: left; vertical-align: top;"> <p style='font-size: small;'><a href="https://beian.mps.gov.cn/#/query/webSearch?code=44010402003275" rel="noreferrer" target="_blank" class="expand">粤公网安备44010402003275</a><a href="https://beian.miit.gov.cn" target="_blank" class="expand"><span class="inlineComment2">粤ICP备17077571号</span></a><a href="about.aspx" class="expand">关于本站</a><a href="mailto:cozychen@hotmail.com" class="expand">联系我们</a><span class="inlineComment2">客服:+86 136 0901 3320</span></p> <div style="max-height:120px;"> <div> <div> <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-0414285907866387" crossorigin="anonymous"></script> <!-- 底部广告位(电脑) --> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-0414285907866387" data-ad-slot="2884741531" data-ad-format="auto" data-full-width-responsive="true"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div> </div> </div> </div> </div> </body> </html>