Skip to content
Hiroki Nakayama edited this page Jul 31, 2015 · 3 revisions

Welcome to the Brain_Hacker wiki!

class KeyphraseExtraction(object):
    def __init__(self):
        self.__keyid = ''
        self.__url = 'http://jlp.yahooapis.jp/KeyphraseService/V1/extract'

    @tornado.web.asynchronous
    @tornado.gen.engine
    def search(self, text):
        request_url = self.__url + '?{0}'.format(urlencode({'appid': self.__keyid, 'sentence': text, 'output': 'json'}))
        client = tornado.httpclient.AsyncHTTPClient()
        response = yield tornado.gen.Task(client.fetch, request_url)
        body = json.loads(response.body)
        return body
雰囲気 = 良好
while True:
	無い頭からアイデアをひねり出す
	ぼろくそに言われる or 自分たちの納得がいかない
	雰囲気 += 悪化