<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>The GITS Blog &#187; kanji</title>
	<atom:link href="http://ginstrom.com/scribbles/tag/kanji/feed/" rel="self" type="application/rss+xml" />
	<link>http://ginstrom.com/scribbles</link>
	<description>Random scribbling about programming, translation, and Japan</description>
	<lastBuildDate>Wed, 20 Apr 2011 05:09:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Game to test kanji trivia</title>
		<link>http://ginstrom.com/scribbles/2010/01/19/game-to-test-kanji-trivia/</link>
		<comments>http://ginstrom.com/scribbles/2010/01/19/game-to-test-kanji-trivia/#comments</comments>
		<pubDate>Tue, 19 Jan 2010 02:53:19 +0000</pubDate>
		<dc:creator>Ryan Ginstrom</dc:creator>
				<category><![CDATA[Japanese]]></category>
		<category><![CDATA[game]]></category>
		<category><![CDATA[kanji]]></category>

		<guid isPermaLink="false">http://ginstrom.com/scribbles/?p=1463</guid>
		<description><![CDATA[Here's a cool Flash game called "Verbatim" that tests your ability to read obscure kanji compounds and English words (I did best at that). After the time is up, it creates a mecha-robot for you. The more you got right, the cooler your robo.]]></description>
			<content:encoded><![CDATA[<p>Here's a <a href="http://www.verbatim.jp/senshuken/">cool Flash game called "Verbatim"</a> that tests your ability to read obscure kanji compounds and English words (I did best at that).</p>
<p>After the time is up, it creates a mecha-robot for you. The more you got right, the cooler your robo.</p>
]]></content:encoded>
			<wfw:commentRss>http://ginstrom.com/scribbles/2010/01/19/game-to-test-kanji-trivia/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Can you read kanji?</title>
		<link>http://ginstrom.com/scribbles/2010/01/16/can-you-read-kanji/</link>
		<comments>http://ginstrom.com/scribbles/2010/01/16/can-you-read-kanji/#comments</comments>
		<pubDate>Sat, 16 Jan 2010 08:20:28 +0000</pubDate>
		<dc:creator>Ryan Ginstrom</dc:creator>
				<category><![CDATA[freelancing]]></category>
		<category><![CDATA[translation]]></category>
		<category><![CDATA[kanji]]></category>
		<category><![CDATA[nes]]></category>

		<guid isPermaLink="false">http://ginstrom.com/scribbles/?p=1456</guid>
		<description><![CDATA[Just a month after writing about how agencies should give translators direct access to their clients, an agency asked me to go with them to meet their client for a big new job. The back story The end client had been burned a couple of times by horrible translations. So they contracted with this new [...]]]></description>
			<content:encoded><![CDATA[<p>Just a month after writing about how <a href="/scribbles/2009/12/02/five-practices-of-agencies-that-get-it/">agencies should give translators direct access to their clients</a>, an agency asked me to go with them to meet their client for a big new job.</p>
<h3>The back story</h3>
<p>The end client had been burned a couple of times by horrible translations. So they contracted with this new agency, on the condition that they could meet the translator and verify his/her ability. The agency didn't have anyone suitable, so they found me through an introduction. Dealing with a translator directly was out of the question, because the end client has a strict bidding process that requires huge capitalization and credit rating just to bid.</p>
<h3>The meeting</h3>
<p>I met two nice people from the translation agency, and then we drove down to the client's office together. This was my first time meeting them, so although they had my CV, and we had exchanged emails, they wanted to know some more about me. One of their first questions was, "Do you read kanji?" The end clients would probably want to show us some documents, and if I couldn't read them it might not come off well.</p>
<p>I was flabbergasted. I asked the leader of their team, "Can you be a translator and not be able to read the language you translate?" Apparently, you can: this PM's other native English speaker (NES) is an interpreter who also translates. But she doesn't read Japanese well, and instead has her partner dictate her documents; she then "translates" from the voice recording.</p>
<p>I answered that yes, I could read kanji, and kind of shrugged it off until we got to the meeting. There, when the documentation lead brought out the documents that I was supposed to translate, he asked me the same question: "Can you read kanji?" I bemusedly told him yes, and we went on with our discussion, but it left me thinking. Are native English-speaking translators really so thin on the ground that our very existence is questioned?</p>
<p>The null hypothesis here would be that my spoken Japanese is so bad that they doubted my ability to actually read the language. This can be discarded, however: my spoken Japanese isn't at the native level, but it's good enough for these purposes. </p>
<p>It's possible that these two groups' small sample size allowed skewed results to be magnified. I don't know about the end-client's experience with native English-speaking translators, but as I wrote above, the agency's other NES doesn't read Japanese.</p>
<p>Part of it might also be my looks: I'm a big white guy, and I know that I tend to give off a vibe of being big, strong, and not too bright. People often tell me that they're shocked when I first open my mouth and Japanese comes out. <img src='http://ginstrom.com/scribbles/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  So maybe that helped boost the incredulity factor.</p>
<h3>Happy ending</h3>
<p>Despite the initial doubts of both the agency and the end client as to my kanji-reading abilities, the meeting went well. I'm now working on an interesting project with good feedback from the client. I'm hoping that I can change some minds about NES translators and their abilities. I kind of feel like I'm trying to prove the existence of Big Foot. Which in my case isn't too far from the truth. <img src='http://ginstrom.com/scribbles/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://ginstrom.com/scribbles/2010/01/16/can-you-read-kanji/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>Converting kanji numbers to integers with Python</title>
		<link>http://ginstrom.com/scribbles/2009/04/28/converting-kanji-numbers-to-integers-with-python/</link>
		<comments>http://ginstrom.com/scribbles/2009/04/28/converting-kanji-numbers-to-integers-with-python/#comments</comments>
		<pubDate>Tue, 28 Apr 2009 05:19:25 +0000</pubDate>
		<dc:creator>Ryan Ginstrom</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[conversion]]></category>
		<category><![CDATA[kanji]]></category>

		<guid isPermaLink="false">http://ginstrom.com/scribbles/?p=1008</guid>
		<description><![CDATA[A question on StackOverflow about converting kanji numbers (e.g. "五十五") into integers in C++ got me interested in solving this using Python. The result is my kanjinums module, with a function kanji2num that will convert a string containing a kanji num to a Python integer. Download the source distribution (kanjinums-0.1.zip) Download the Windows installer (kanjinums-0.1.win32.exe) [...]]]></description>
			<content:encoded><![CDATA[<p>A <a href="http://stackoverflow.com/questions/795868/how-to-parse-kanji-numeric-characters-using-icu" rel="nofollow">question on StackOverflow</a> about converting kanji numbers (e.g. "五十五") into integers in C++ got me interested in solving this using Python.</p>
<p>The result is my kanjinums module, with a function kanji2num that will convert a string containing a kanji num to a Python integer.</p>
<p><a href="/code/kanjinums-0.1.zip">Download the source distribution (kanjinums-0.1.zip)</a><br />
<a href="/code/kanjinums-0.1.win32.exe">Download the Windows installer (kanjinums-0.1.win32.exe)</a><br />
<a href="/code/test_kanjinums.zip">Download the unit tests (test_kanjinums.zip)</a></p>
<p>Examples:</p>
<div class="dean_ch" style="white-space: wrap;">
&gt;&gt;&gt; <span class="kw1">import</span> kanjinums<br />
&gt;&gt;&gt; kanjinums.<span class="me1">kanji2num</span><span class="br0">&#40;</span><span class="st0">&quot;五百十一&quot;</span>, <span class="st0">&quot;sjis&quot;</span><span class="br0">&#41;</span><br />
<span class="nu0">511</span><br />
&gt;&gt;&gt; kanjinums.<span class="me1">kanji2num</span><span class="br0">&#40;</span><span class="st0">&quot;三万十五&quot;</span>, <span class="st0">&quot;sjis&quot;</span><span class="br0">&#41;</span><br />
<span class="nu0">30015</span></div>
<p>Here's the full code:</p>
<div class="dean_ch" style="white-space: wrap;"><span class="co1">#coding: UTF8</span><br />
<span class="st0">&quot;&quot;</span><span class="st0">&quot;<br />
Converts kanji numbers into integers</p>
<p>Can covert numbers up to 9,999,999,999,999,999<br />
(九千九百九十九兆九千九百九十九億九千九百九十九万九千九百九十九)</p>
<p>Released under MIT license.<br />
&quot;</span><span class="st0">&quot;&quot;</span><br />
__version__ = <span class="st0">&quot;0.1&quot;</span><br />
__author__ &nbsp;= <span class="st0">&quot;Ryan Ginstrom&quot;</span><br />
__license__ = <span class="st0">&quot;MIT&quot;</span><br />
__description__ = <span class="st0">&quot;A module to convert kanji numbers into Python integers&quot;</span></p>
<p>NUMS = <span class="br0">&#40;</span><span class="br0">&#40;</span><span class="nu0">1</span>, u<span class="st0">&quot;一&quot;</span><span class="br0">&#41;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#40;</span><span class="nu0">2</span>, u<span class="st0">&quot;二&quot;</span><span class="br0">&#41;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#40;</span><span class="nu0">3</span>, u<span class="st0">&quot;三&quot;</span><span class="br0">&#41;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#40;</span><span class="nu0">4</span>, u<span class="st0">&quot;四&quot;</span><span class="br0">&#41;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#40;</span><span class="nu0">5</span>, u<span class="st0">&quot;五&quot;</span><span class="br0">&#41;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#40;</span><span class="nu0">6</span>, u<span class="st0">&quot;六&quot;</span><span class="br0">&#41;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#40;</span><span class="nu0">7</span>, u<span class="st0">&quot;七&quot;</span><span class="br0">&#41;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#40;</span><span class="nu0">8</span>, u<span class="st0">&quot;八&quot;</span><span class="br0">&#41;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#40;</span><span class="nu0">9</span>, u<span class="st0">&quot;九&quot;</span><span class="br0">&#41;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#40;</span><span class="nu0">10</span>, u<span class="st0">&quot;十&quot;</span><span class="br0">&#41;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#40;</span><span class="nu0">100</span>, u<span class="st0">&quot;百&quot;</span><span class="br0">&#41;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#40;</span><span class="nu0">1000</span>, u<span class="st0">&quot;千&quot;</span><span class="br0">&#41;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#40;</span><span class="nu0">10000</span>, u<span class="st0">&quot;万&quot;</span><span class="br0">&#41;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#40;</span><span class="nu0">100000000</span>, u<span class="st0">&quot;億&quot;</span><span class="br0">&#41;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#40;</span><span class="nu0">1000000000000</span>, u<span class="st0">&quot;兆&quot;</span><span class="br0">&#41;</span><span class="br0">&#41;</span></p>
<p>KANJIS = <span class="kw2">dict</span><span class="br0">&#40;</span><span class="br0">&#40;</span>kanji, num<span class="br0">&#41;</span> <span class="kw1">for</span> <span class="br0">&#40;</span>num, kanji<span class="br0">&#41;</span> <span class="kw1">in</span> NUMS<span class="br0">&#41;</span></p>
<p><span class="kw1">def</span> _break_down_nums<span class="br0">&#40;</span>nums<span class="br0">&#41;</span>:<br />
&nbsp; &nbsp; first, second, third, rest = nums<span class="br0">&#91;</span><span class="nu0">0</span><span class="br0">&#93;</span>, nums<span class="br0">&#91;</span><span class="nu0">1</span><span class="br0">&#93;</span>, nums<span class="br0">&#91;</span><span class="nu0">2</span><span class="br0">&#93;</span>, nums<span class="br0">&#91;</span><span class="nu0">3</span>:<span class="br0">&#93;</span><br />
&nbsp; &nbsp; <span class="kw1">if</span> first &lt; third <span class="kw1">or</span> third &lt; second:<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">return</span> <span class="br0">&#91;</span>first+second, third<span class="br0">&#93;</span> + rest<br />
&nbsp; &nbsp; <span class="kw1">else</span>:<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">return</span> <span class="br0">&#91;</span>first, second*third<span class="br0">&#93;</span> + rest</p>
<p><span class="kw1">def</span> kanji2num<span class="br0">&#40;</span>kanji, enc=<span class="st0">&quot;utf-8&quot;</span><span class="br0">&#41;</span>:<br />
&nbsp; &nbsp; <span class="st0">&quot;&quot;</span><span class="st0">&quot;<br />
&nbsp; &nbsp; Convert the kanji number to a Python integer.<br />
&nbsp; &nbsp; Supply `kanji` as a unicode string, or a byte string<br />
&nbsp; &nbsp; with the encoding specified in `enc`.<br />
&nbsp; &nbsp; &quot;</span><span class="st0">&quot;&quot;</span><br />
&nbsp; &nbsp; <span class="kw1">if</span> <span class="kw1">not</span> <span class="kw2">isinstance</span><span class="br0">&#40;</span>kanji, <span class="kw2">unicode</span><span class="br0">&#41;</span>:<br />
&nbsp; &nbsp; &nbsp; &nbsp; kanji = <span class="kw2">unicode</span><span class="br0">&#40;</span>kanji, enc<span class="br0">&#41;</span></p>
<p>&nbsp; &nbsp; <span class="co1"># get the string as list of numbers</span><br />
&nbsp; &nbsp; nums = <span class="br0">&#91;</span>KANJIS<span class="br0">&#91;</span>x<span class="br0">&#93;</span> <span class="kw1">for</span> x <span class="kw1">in</span> kanji<span class="br0">&#93;</span></p>
<p>&nbsp; &nbsp; num = <span class="nu0">0</span><br />
&nbsp; &nbsp; <span class="kw1">while</span> <span class="kw2">len</span><span class="br0">&#40;</span>nums<span class="br0">&#41;</span> &gt; <span class="nu0">1</span>:<br />
&nbsp; &nbsp; &nbsp; &nbsp; first, second, rest = nums<span class="br0">&#91;</span><span class="nu0">0</span><span class="br0">&#93;</span>, nums<span class="br0">&#91;</span><span class="nu0">1</span><span class="br0">&#93;</span>, nums<span class="br0">&#91;</span><span class="nu0">2</span>:<span class="br0">&#93;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span> second &lt; first: <span class="co1"># e.g. [10, 3, ...]</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span> any<span class="br0">&#40;</span>x &gt; first <span class="kw1">for</span> x <span class="kw1">in</span> rest<span class="br0">&#41;</span>: <span class="co1"># e.g. [500, 3, 10000, ...]</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nums = _break_down_nums<span class="br0">&#40;</span>nums<span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">else</span>: <span class="co1"># e.g. [500, 3, 10, ...]</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; num += first<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nums = <span class="br0">&#91;</span>second<span class="br0">&#93;</span> + rest<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">else</span>: <span class="co1"># e.g. [3, 10, ...]</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nums = <span class="br0">&#91;</span>first*second<span class="br0">&#93;</span> + rest</p>
<p>&nbsp; &nbsp; <span class="kw1">return</span> num + <span class="kw2">sum</span><span class="br0">&#40;</span>nums<span class="br0">&#41;</span></div>
]]></content:encoded>
			<wfw:commentRss>http://ginstrom.com/scribbles/2009/04/28/converting-kanji-numbers-to-integers-with-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>wchartype: Python module to get full-width (double-byte) character types</title>
		<link>http://ginstrom.com/scribbles/2008/09/28/wchartype-python-module-to-get-full-width-double-byte-character-types/</link>
		<comments>http://ginstrom.com/scribbles/2008/09/28/wchartype-python-module-to-get-full-width-double-byte-character-types/#comments</comments>
		<pubDate>Sun, 28 Sep 2008 03:22:43 +0000</pubDate>
		<dc:creator>Ryan Ginstrom</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[double-byte]]></category>
		<category><![CDATA[full-width]]></category>
		<category><![CDATA[hangul]]></category>
		<category><![CDATA[hiragana]]></category>
		<category><![CDATA[kanji]]></category>
		<category><![CDATA[katakana]]></category>

		<guid isPermaLink="false">http://ginstrom.com/scribbles/?p=342</guid>
		<description><![CDATA[When dealing with full-width (especially CJK) characters, you'll often want to know the type of a particular character &#8212; Kanji/Hanzi/Hanja, hiragana, katakana, and so on. wchartype is a Python module that will determine the type of a full-width character. The functions all expect Unicode strings of length one. Usage: import wchartype if wchartype.is_asian&#40;u'\u65e5&#8242;&#41;: &#160; &#160; [...]]]></description>
			<content:encoded><![CDATA[<p>When dealing with full-width (especially <a href="http://en.wikipedia.org/wiki/CJK">CJK</a>) characters, you'll often want to know the type of a particular character &#8212; Kanji/Hanzi/Hanja, hiragana, katakana, and so on.</p>
<p>wchartype is a Python module that will determine the type of a full-width character. The functions all expect Unicode strings of length one.</p>
<p>Usage:</p>
<div class="dean_ch" style="white-space: wrap;">
<span class="kw1">import</span> wchartype<br />
<span class="kw1">if</span> wchartype.<span class="me1">is_asian</span><span class="br0">&#40;</span>u<span class="st0">'<span class="es0">\u</span>65e5&#8242;</span><span class="br0">&#41;</span>:<br />
&nbsp; &nbsp; <span class="kw1">print</span> u<span class="st0">&quot;<span class="es0">\u</span>65e5 is an Asian character&quot;</span></p>
<p>sentence = u<span class="st0">&quot;this has ひらがな&quot;</span><br />
<span class="kw1">if</span> any<span class="br0">&#40;</span>wchartype.<span class="me1">is_hiragana</span><span class="br0">&#40;</span>x<span class="br0">&#41;</span> <span class="kw1">for</span> x <span class="kw1">in</span> sentence<span class="br0">&#41;</span>:<br />
&nbsp; &nbsp; <span class="kw1">print</span> <span class="st0">&quot;'%s' has one or more hiragana characters&quot;</span> % sentence<br />
&nbsp;</div>
<p>wchartype has a home on <a href="http://pypi.python.org/pypi/wchartype/">pypi</a> and can be installed via easy_install:</p>
<div class="dean_ch" style="white-space: wrap;">
<p>easy_install wchartype<br />
&nbsp;</div>
<p>Here is the <a href="/code/wchartype.html">permanent page for wchartype</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://ginstrom.com/scribbles/2008/09/28/wchartype-python-module-to-get-full-width-double-byte-character-types/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

