2011-06-20 テキスト中の漢字の数を調べる python import unicodedata def countKanji(text): s = 0 for c in text: if (unicodedata.name(c)[0:3]) == 'CJK': s += 1 return s