ついでに指定形容詞係り先検索にも。

ダウンロード

yahooapi

使い方

python code
  1. from yahooapi import *
  2. client = DAServiceAPI("your_appid")
  3. result = client.parse(sentence=u"うちの庭には二羽鶏がいます。")
  4. for morph in result.Result.ChunkList.Chunk[0].MorphemList.Morphem:
  5.   print morph.Reading
  6. # => うち
  7. # の
  8.  
  9. client = DAServiceSearchAPI("your_appid")
  10. result = client.search(mode=MODE_URESHII)
  11. for word in result.Result.WordList.Word:
  12.   print word.Surface, word.Frequency
  13.  
  14. #クリック 35
  15. #応援 30
  16. #気持ち 26
  17. #金メダル 24
  18. #ホームラン 22
  19. #ニュース 17
  20. #デス 16
  21. # .
  22. # .
  23. # .
  24.  

うむ。