Yahoo! の かな漢字変換Webサービス とかを使って、ナベアツできんじゃね?って思ってやってみた。
要は、数字を与えると、それを読みがなとして返してくれればいいなと思った。
で、まず数値を漢字に変換
http://jlp.yahooapis.jp/JIMService/V1/conversion?appid=YahooDemo&sentence=12345
<ResultSet xsi:schemaLocation="urn:yahoo:jp:jlp:JIMService http://jlp.yahooapis.jp/JIMService/V1/conversion.xsd"> <Result> <SegmentList> <Segment> <SegmentText>12345</SegmentText> <CandidateList> <Candidate>12345</Candidate> <Candidate>一万二千三百四十五</Candidate> <Candidate>壱万弐千参百四拾五</Candidate> <Candidate>一二三四五</Candidate> <Candidate>12345</Candidate> <Candidate>12,345</Candidate> <Candidate>12,345</Candidate> </CandidateList> </Segment> </SegmentList> </Result> </ResultSet>
これで「一万二千三百四十五」を取得。
次は形態素解析で読みがなを返してくれるはず!
http://api.jlp.yahoo.co.jp/MAService/V1/parse?appid=YahooDemo&results=ma,uniq&uniq_filter=9|10&sentence=%E4%B8%80%E4%B8%87%E4%BA%8C%E5%8D%83%E4%B8%89%E7%99%BE%E5%9B%9B%E5%8D%81%E4%BA%94
<ResultSet xsi:schemaLocation="urn:yahoo:jp:jlp http://api.jlp.yahoo.co.jp/MAService/V1/parseResponse.xsd"> <ma_result> <total_count>1</total_count> <filtered_count>1</filtered_count> <word_list> <word> <surface>一万二千三百四十五</surface> <reading>12345</reading> <pos>名詞</pos> </word> </word_list> </ma_result> <uniq_result> <total_count>1</total_count> <filtered_count>1</filtered_count> <word_list> <word> <count>1</count> <surface>一万二千三百四十五</surface> <reading/> <pos>名詞</pos> </word> </word_list> </uniq_result> </ResultSet>
がびん。何だよ
引き続き方法模索。