pages tagged 文字学 http://meng6net.localhost/tag/%E6%96%87%E5%AD%97%E5%AD%A6/ <p><small>Copyright © 2005-2020 by <code>Meng Lu &lt;lumeng3@gmail.com&gt;</code></small></p> Meng Lu's home page ikiwiki Tue, 16 May 2017 23:59:39 +0000 Removing newline characters http://meng6net.localhost/blog/removing_newline_characters/ http://meng6net.localhost/blog/removing_newline_characters/ blog editing emacs tip 国学 文字学 Tue, 16 May 2017 23:59:39 +0000 2017-05-16T23:59:39Z <p>Meng Lu, 2013-7-6</p> <p>Suppose you want to remove newlines in between the Chinese characters:</p> <pre><code>南海少年遊俠客, 詩成嘯傲凌滄州, 曾因酒醉鞭名馬, 生怕情深累美人。 </code></pre> <p>-- note that the 1st and 2nd Chinese comma <code>,</code> actually have two or more white spaces following them -- and change it to a single line</p> <pre><code>南海少年遊俠客,詩成嘯傲凌滄州,曾因酒醉鞭名馬,生怕情深累美人。 </code></pre> <p>One way to do this is using Emacs.</p> <h2>Use <code>query-replace-regexp</code></h2> <p>Press <kbd>M</kbd>-<kbd>x</kbd>, and type <code>query-replace-regexp</code>, or as a shortcut <kbd>C</kbd>-<kbd>M</kbd>-<code>%</code>;</p> <p>Type regexp to match:</p> <pre><code>\([[:nonascii:\]]\) * *\([[:nonascii:\]]\) </code></pre> <p>Note the line break in the regexp need to be typed into the <a href= "http://www.gnu.org/software/emacs/manual/html_node/emacs/Minibuffer.html"> Emacs minibuffer</a> with <kbd>C</kbd>-<kbd>q</kbd> <kbd>C</kbd>-<kbd>j</kbd>.</p> <p>Type regexp to substitute:</p> <pre><code>\1\2 </code></pre> <p>This means the white space character(s) (if any) and newline character between non-ASCII characters will be removed in the substituted version, so the result is the character on the first line followed by that on the second line.</p> <h2>Use <code>fill-paragraph</code></h2> <ul> <li> <p>Set <code>fill-column</code> variable, which controls how wide a line of text can go before line-wrapping to a very large value for the current buffer: <kbd>C</kbd>-<code>x</code> <code>f</code>, <code>10000000</code></p> </li> <li> <p>Highlight the paragraph you'd like to modify: move cursor to the beginning, hold <kbd>Shift</kbd> down and move up and down arrow to extend and decrease the selection;</p> </li> <li> <p>Press <kbd>M</kbd>-<kbd>x</kbd>, and type <code>fill-paragraph</code>.</p> </li> </ul> <p>This should remove all newline characters in the text. Interestingly, if there are multiple white space characters at the end of lines before the new line character, it will keep one of them:</p> <pre><code>南海少年遊俠客, 詩成嘯傲凌滄州, 曾因酒醉鞭名馬,生怕情深累美人。 </code></pre> <p>Note there is an additional white space after the 1st and the 2nd <code>,</code>.</p> <p>The single white space character is actually still redundant, that can be corrected by</p> <pre><code>M-x query-replace-regexp , * , </code></pre> /blog/removing_newline_characters/#comments 叠字 http://meng6net.localhost/blog/%E5%8F%A0%E5%AD%97/ http://meng6net.localhost/blog/%E5%8F%A0%E5%AD%97/ chinese data linguistics 国学 文字学 Tue, 16 May 2017 23:59:39 +0000 2017-05-16T23:59:39Z <h2>吕形叠字</h2> <h2>品形叠字</h2> <table class="datatable"> <thead> <tr> <th> </th> <th>品行字</th> <th>读音</th> <th colspan="2">查询 zdic.net</th> </tr> </thead> <tbody> <tr> <td>牛</td> <td> <div style= "font-size: 50px; background-color: LightYellow; outline: Red"> 犇</div> </td> <td>bēn</td> <td colspan="2"><a href= "https://www.google.com/search?q=%E7%8A%87+site%3Awww.zdic.net%20zdic.net"> 犇</a></td> </tr> <tr> <td>贝</td> <td> <div style= "font-size: 50px; background-color: LightYellow; outline: Red"> 赑</div> </td> <td>bì</td> <td colspan="2"><a href= "https://www.google.com/search?q=%E8%B5%91+site%3Awww.zdic.net%20zdic.net"> 赑</a></td> </tr> <tr> <td>犬</td> <td> <div style= "font-size: 50px; background-color: LightYellow; outline: Red"> 猋</div> </td> <td>biāo</td> <td colspan="2"><a href= "https://www.google.com/search?q=%E7%8C%8B+site%3Awww.zdic.net%20zdic.net"> 猋</a></td> </tr> <tr> <td>马</td> <td> <div style= "font-size: 50px; background-color: LightYellow; outline: Red"> 骉</div> </td> <td>biāo</td> <td colspan="2"><a href= "https://www.google.com/search?q=%E9%AA%89+site%3Awww.zdic.net%20zdic.net"> 骉</a></td> </tr> <tr> <td>馬</td> <td> <div style= "font-size: 50px; background-color: LightYellow; outline: Red"> 驫</div> </td> <td>biāo</td> <td colspan="2"><a href= "https://www.google.com/search?q=%E9%A9%AB+site%3Awww.zdic.net%20zdic.net"> 驫</a></td> </tr> <tr> <td>雷</td> <td> <div style= "font-size: 50px; background-color: LightYellow; outline: Red"> 靐</div> </td> <td>bìng</td> <td colspan="2"><a href= "https://www.google.com/search?q=%E9%9D%90+site%3Awww.zdic.net%20zdic.net"> 靐</a></td> </tr> <tr> <td>鹿</td> <td> <div style= "font-size: 50px; background-color: LightYellow; outline: Red"> 麤</div> </td> <td>cū</td> <td colspan="2"><a href= "https://www.google.com/search?q=%E9%BA%A4+site%3Awww.zdic.net%20zdic.net"> 麤</a></td> </tr> <tr> <td>直</td> <td> <div style= "font-size: 50px; background-color: LightYellow; outline: Red"> 矗</div> </td> <td>chù</td> <td colspan="2"><a href= "https://www.google.com/search?q=%E7%9F%97+site%3Awww.zdic.net%20zdic.net"> 矗</a></td> </tr> <tr> <td>毛</td> <td> <div style= "font-size: 50px; background-color: LightYellow; outline: Red"> 毳</div> </td> <td>cuì</td> <td colspan="2"><a href= "https://www.google.com/search?q=%E6%AF%B3+site%3Awww.zdic.net%20zdic.net"> 毳</a></td> </tr> <tr> <td>飛</td> <td> <div style= "font-size: 50px; background-color: LightYellow; outline: Red"> 飝</div> </td> <td>fēi</td> <td colspan="2"><a href= "https://www.google.com/search?q=%E9%A3%9D+site%3Awww.zdic.net%20zdic.net"> 飝</a></td> </tr> <tr> <td>车</td> <td> <div style= "font-size: 50px; background-color: LightYellow; outline: Red"> 轟</div> </td> <td>hōng</td> <td colspan="2"><a href= "https://www.google.com/search?q=%E8%BD%9F+site%3Awww.zdic.net%20zdic.net"> 轟</a></td> </tr> <tr> <td>日</td> <td> <div style= "font-size: 50px; background-color: LightYellow; outline: Red"> 晶</div> </td> <td>jīng</td> <td colspan="2"><a href= "https://www.google.com/search?q=%E6%99%B6+site%3Awww.zdic.net%20zdic.net"> 晶</a></td> </tr> <tr> <td>田</td> <td> <div style= "font-size: 50px; background-color: LightYellow; outline: Red"> 畾</div> </td> <td>lěi</td> <td colspan="2"><a href= "https://www.google.com/search?q=%E7%95%BE+site%3Awww.zdic.net%20zdic.net"> 畾</a></td> </tr> <tr> <td>石</td> <td> <div style= "font-size: 50px; background-color: LightYellow; outline: Red"> 磊</div> </td> <td>lěi</td> <td colspan="2"><a href= "https://www.google.com/search?q=%E7%A3%8A+site%3Awww.zdic.net%20zdic.net"> 磊</a></td> </tr> <tr> <td>刀</td> <td> <div style= "font-size: 50px; background-color: LightYellow; outline: Red"> 刕</div> </td> <td>lí</td> <td colspan="2"><a href= "https://www.google.com/search?q=%E5%88%95+site%3Awww.zdic.net%20zdic.net"> 刕</a></td> </tr> <tr> <td>力</td> <td> <div style= "font-size: 50px; background-color: LightYellow; outline: Red"> 劦</div> </td> <td>lie</td> <td colspan="2"><a href= "https://www.google.com/search?q=%E5%8A%A6+site%3Awww.zdic.net%20zdic.net"> 劦</a></td> </tr> <tr> <td>水</td> <td> <div style= "font-size: 50px; background-color: LightYellow; outline: Red"> 淼</div> </td> <td>miǎo</td> <td colspan="2"><a href= "https://www.google.com/search?q=%E6%B7%BC+site%3Awww.zdic.net%20zdic.net"> 淼</a></td> </tr> <tr> <td>小</td> <td> <div style= "font-size: 50px; background-color: LightYellow; outline: Red"> 尛</div> </td> <td>mó</td> <td colspan="2"><a href= "https://www.google.com/search?q=%E5%B0%9B+site%3Awww.zdic.net%20zdic.net"> 尛</a></td> </tr> <tr> <td>目</td> <td> <div style= "font-size: 50px; background-color: LightYellow; outline: Red"> 瞐</div> </td> <td>mò</td> <td colspan="2"><a href= "https://www.google.com/search?q=%E7%9E%90+site%3Awww.zdic.net%20zdic.net"> 瞐</a></td> </tr> <tr> <td>耳</td> <td> <div style= "font-size: 50px; background-color: LightYellow; outline: Red"> 聶</div> </td> <td>niè</td> <td colspan="2"><a href= "https://www.google.com/search?q=%E8%81%B6+site%3Awww.zdic.net%20zdic.net"> 聶</a></td> </tr> <tr> <td>手</td> <td> <div style= "font-size: 50px; background-color: LightYellow; outline: Red"> 掱</div> </td> <td>pá</td> <td colspan="2"><a href= "https://www.google.com/search?q=%E6%8E%B1+site%3Awww.zdic.net%20zdic.net"> 掱</a></td> </tr> <tr> <td>口</td> <td> <div style= "font-size: 50px; background-color: LightYellow; outline: Red"> 品</div> </td> <td>pǐn</td> <td colspan="2"><a href= "https://www.google.com/search?q=%E5%93%81+site%3Awww.zdic.net%20zdic.net"> 品</a></td> </tr> <tr> <td>舌</td> <td> <div style= "font-size: 50px; background-color: LightYellow; outline: Red"> 舙</div> </td> <td>qì</td> <td colspan="2"><a href= "https://www.google.com/search?q=%E8%88%99+site%3Awww.zdic.net%20zdic.net"> 舙</a></td> </tr> <tr> <td>又</td> <td> <div style= "font-size: 50px; background-color: LightYellow; outline: Red"> 叒</div> </td> <td>ruò</td> <td colspan="2"><a href= "https://www.google.com/search?q=%E5%8F%92+site%3Awww.zdic.net%20zdic.net"> 叒</a></td> </tr> <tr> <td>止</td> <td> <div style= "font-size: 50px; background-color: LightYellow; outline: Red"> 歮</div> </td> <td>sè</td> <td colspan="2"><a href= "https://www.google.com/search?q=%E6%AD%AE+site%3Awww.zdic.net%20zdic.net"> 歮</a></td> </tr> <tr> <td>木</td> <td> <div style= "font-size: 50px; background-color: LightYellow; outline: Red"> 森</div> </td> <td>sēn</td> <td colspan="2"><a href= "https://www.google.com/search?q=%E6%A3%AE+site%3Awww.zdic.net%20zdic.net"> 森</a></td> </tr> <tr> <td>羊</td> <td> <div style= "font-size: 50px; background-color: LightYellow; outline: Red"> 羴</div> </td> <td>shān</td> <td colspan="2"><a href= "https://www.google.com/search?q=%E7%BE%B4+site%3Awww.zdic.net%20zdic.net"> 羴</a></td> </tr> <tr> <td>心</td> <td> <div style= "font-size: 50px; background-color: LightYellow; outline: Red"> 惢</div> </td> <td>suǒ</td> <td colspan="2"><a href= "https://www.google.com/search?q=%E6%83%A2+site%3Awww.zdic.net%20zdic.net"> 惢</a></td> </tr> <tr> <td>言</td> <td> <div style= "font-size: 50px; background-color: LightYellow; outline: Red"> 譶</div> </td> <td>tà</td> <td colspan="2"><a href= "https://www.google.com/search?q=%E8%AD%B6+site%3Awww.zdic.net%20zdic.net"> 譶</a></td> </tr> <tr> <td>龍</td> <td> <div style= "font-size: 50px; background-color: LightYellow; outline: Red"> 龘</div> </td> <td>tà、dá</td> <td colspan="2"><a href= "https://www.google.com/search?q=%E9%BE%98+site%3Awww.zdic.net%20zdic.net"> 龘</a></td> </tr> <tr> <td>風</td> <td> <div style= "font-size: 50px; background-color: LightYellow; outline: Red"> 飍</div> </td> <td>xiū</td> <td colspan="2"><a href= "https://www.google.com/search?q=%E9%A3%8D+site%3Awww.zdic.net%20zdic.net"> 飍</a></td> </tr> <tr> <td>魚</td> <td> <div style= "font-size: 50px; background-color: LightYellow; outline: Red"> 鱻</div> </td> <td>xiān</td> <td colspan="2"><a href= "https://www.google.com/search?q=%E9%B1%BB+site%3Awww.zdic.net%20zdic.net"> 鱻</a></td> </tr> <tr> <td>白</td> <td> <div style= "font-size: 50px; background-color: LightYellow; outline: Red"> 皛</div> </td> <td>xiǎo</td> <td colspan="2"><a href= "https://www.google.com/search?q=%E7%9A%9B+site%3Awww.zdic.net%20zdic.net"> 皛</a></td> </tr> <tr> <td>金</td> <td> <div style= "font-size: 50px; background-color: LightYellow; outline: Red"> 鑫</div> </td> <td>xīn</td> <td colspan="2"><a href= "https://www.google.com/search?q=%E9%91%AB+site%3Awww.zdic.net%20zdic.net"> 鑫</a></td> </tr> <tr> <td>香</td> <td> <div style= "font-size: 50px; background-color: LightYellow; outline: Red"> 馫</div> </td> <td>xīn</td> <td colspan="2"><a href= "https://www.google.com/search?q=%E9%A6%AB+site%3Awww.zdic.net%20zdic.net"> 馫</a></td> </tr> <tr> <td>泉</td> <td> <div style= "font-size: 50px; background-color: LightYellow; outline: Red"> 灥</div> </td> <td>xún</td> <td colspan="2"><a href= "https://www.google.com/search?q=%E7%81%A5+site%3Awww.zdic.net%20zdic.net"> 灥</a></td> </tr> <tr> <td>火</td> <td> <div style= "font-size: 50px; background-color: LightYellow; outline: Red"> 焱</div> </td> <td>yàn</td> <td colspan="2"><a href= "https://www.google.com/search?q=%E7%84%B1+site%3Awww.zdic.net%20zdic.net"> 焱</a></td> </tr> <tr> <td>土</td> <td> <div style= "font-size: 50px; background-color: LightYellow; outline: Red"> 垚</div> </td> <td>yáo</td> <td colspan="2"><a href= "https://www.google.com/search?q=%E5%9E%9A+site%3Awww.zdic.net%20zdic.net"> 垚</a></td> </tr> <tr> <td>原</td> <td> <div style= "font-size: 50px; background-color: LightYellow; outline: Red"> 厵</div> </td> <td>yuán</td> <td colspan="2"><a href= "https://www.google.com/search?q=%E5%8E%B5+site%3Awww.zdic.net%20zdic.net"> 厵</a></td> </tr> <tr> <td>隼</td> <td> <div style= "font-size: 50px; background-color: LightYellow; outline: Red"> 雥</div> </td> <td>zá</td> <td colspan="2"><a href= "https://www.google.com/search?q=%E9%9B%A5+site%3Awww.zdic.net%20zdic.net"> 雥</a></td> </tr> <tr> <td>吉</td> <td> <div style= "font-size: 50px; background-color: LightYellow; outline: Red"> 嚞</div> </td> <td>zhé</td> <td colspan="2"><a href= "https://www.google.com/search?q=%E5%9A%9E+site%3Awww.zdic.net%20zdic.net"> 嚞</a></td> </tr> <tr> <td>人</td> <td> <div style= "font-size: 50px; background-color: LightYellow; outline: Red"> 众</div> </td> <td>zhòng</td> <td colspan="2"><a href= "https://www.google.com/search?q=%E4%BC%97+site%3Awww.zdic.net%20zdic.net"> 众</a></td> </tr> <tr> <td>士</td> <td> <div style= "font-size: 50px; background-color: LightYellow; outline: Red"> 壵</div> </td> <td>zhuàng</td> <td colspan="2"><a href= "https://www.google.com/search?q=%E5%A3%B5+site%3Awww.zdic.net%20zdic.net"> 壵</a></td> </tr> <tr> <td>子</td> <td> <div style= "font-size: 50px; background-color: LightYellow; outline: Red"> 孨</div> </td> <td>zhuǎn</td> <td colspan="2"><a href= "https://www.google.com/search?q=%E5%AD%A8+site%3Awww.zdic.net%20zdic.net"> 孨</a></td> </tr> </tbody> </table> <p><a href="http://meng6net.localhost/data/pin3_chinese_characters.dsv">Direct data download</a></p> <h2>jí形叠字</h2> <pre><code>口口 口口 </code></pre> <p>(四个口字,上下各两个)</p> <ol> <li>jí:  1.1 众口也。 1.2 喧哗。</li> <li>léi:  2.1 同雷,古雷字。 2.2 一种有机化合物名,(porphine)。或称卟(bǔ)吩。</li> </ol> <p>参考文献:《汉语大字典》</p> <p>(under construction)</p> <h2>吅形叠字</h2> <p>吅</p> <ol> <li>xuān: 古同“喧”,大声呼叫。</li> <li>sòng: 古同“讼”,诉讼。</li> </ol> <p>例:</p> <p>囍</p> <h2>雦形叠字</h2> /blog/叠字/#comments