ついでに指定形容詞係り先検索にも。
ダウンロード
使い方
python code
- from yahooapi import *
- client = DAServiceAPI("your_appid")
- result = client.parse(sentence=u"うちの庭には二羽鶏がいます。")
- for morph in result.Result.ChunkList.Chunk[0].MorphemList.Morphem:
- print morph.Reading
- # => うち
- # の
- client = DAServiceSearchAPI("your_appid")
- result = client.search(mode=MODE_URESHII)
- for word in result.Result.WordList.Word:
- print word.Surface, word.Frequency
- #クリック 35
- #応援 30
- #気持ち 26
- #金メダル 24
- #ホームラン 22
- #ニュース 17
- #デス 16
- # .
- # .
- # .
うむ。
No comments yet
trackback uriLeave a Comment