Is there a Python or PHP library which can Tokenise and Convert Japanese text
<p>Given a string that can contain Japanse and English text, I would like to:</p>

<ol>
<li>Convert the Japanese parts from Hiragana to Katakana and half width to full width.  </li>
<li>Split the string by words (Japanse text does not use spaces to delimit words)</li>
</ol>

<p>I am currently using the excellent iOS / OS X string libraries (which cater for hundreds of complexities and edge cases).</p>

<p><a href="https://developer.apple.com/library/mac/documentation/CoreFOundation/Reference/CFMutableStringRef/Reference/reference.html#//apple_ref/c/func/CFStringTransform" rel="nofollow"><code>CFStringTransform</code></a> with the <code>kCFStringTransformHiraganaKatakana</code> constant.</p>

<p><a href="https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/Reference/NSString.html#//apple_ref/occ/instm/NSString/enumerateSubstringsInRange%3aoptions%3ausingBlock%3a" rel="nofollow"><code>enumerateSubstringsInRange:options:usingBlock:</code></a> with the <code>NSStringEnumerationByWords</code> constant.</p>

<p>The search is moving from client to server so we need a PHP or Python version of these methods.</p>
