I'm looking for an application or script that can count the number of unique hanzi in a given text, the Anki plugin for this doesn't seem to work, atleast not for me.
Anyone know of any?
Anyone know of any?
vorpal Wrote:Do you just want the number? This could be done in Python in one line of code. If you need it done, let me know. (I can also get you the list of characters in one line, if need be.)Well, it could be done in one line of C, but that doesn't mean you should stack up all your code on the same line. Weird formatting was cute the first time someone did it on IOCCC, but not anymore.
print len(set(u'日本語今後コンゴ日本語'))sometext=u"""
一匹馬
兩隻貓
三個人
"""
print ''.join(set(sometext) - set(u'一二三四五六'))