gpt4 book ai didi

雅虎内容分析 API 的 Python 包装器

转载 作者:太空宇宙 更新时间:2023-11-04 06:10:12 25 4
gpt4 key购买 nike

我正在使用 Python 编写关键字提取器。我想使用 Yahoo Content API。问题是,是否有 Yahoo Content API 的 Python2.7(甚至 3.x)包装器?我找不到进行正常搜索的人。

与此同时,我正在尝试 alchemyAPI、OpenCalais、DBPedia Spotlight。我很乐意进行比较,以确定在生产中使用哪一个。

任何指导将不胜感激。

谢谢

最佳答案

我也对答案很感兴趣。这是一个可能的解决方案:

import requests

text = """
Italian sculptors and painters of the renaissance favored the Virgin Mary for inspiration
"""

payload = {'q': "select * from contentanalysis.analyze where text='{text}'".format(text=text)}
r = requests.post("http://query.yahooapis.com/v1/public/yql", data=payload)
print(r.text)

关于雅虎内容分析 API 的 Python 包装器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19284541/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com