This is a question in PHP found in stackoverflow: http://stackoverflow.com/questions/23003199/building-a-japanese-numeral-reading-system-on-php