无法连接到 HateBase API

发布于 2025-01-11 08:22:00 字数 908 浏览 0 评论 0原文

我无法连接到 HateBase API。我在这里分解了代码以使调试更容易:

key ='blah blah'
base_url = 'https://api.hatebase.org'
url = "https://api.hatebase.org/4-4/authenticate"
payload = "api_key=" + key
response = requests.post(url, data=payload, headers=headers)
token = response.json()
print(token)

输出:

{'datetime': '2022-03-02 18:32:13',
 'errors': {'8752': 'The version of the API is now retired; please update your queries to resume accessing the API'},
 'important': "Your use of the HateBase API acknowledges your consent with Hatebase's Terms of Use (available online at hatebase.org) and PROHIBITS REDISTRIBUTION of this data for any purpose, including but not limited to republication in any form, such as in PUBLIC CODE REPOSITORIES.",
 'query': {'api_key': 'blah blah'},
 'version': '4.4'}

我不确定 HateBase API 本身是否存在问题...或者,如果有人知道已经收集了所有 HateBase 的来源,我将不胜感激词汇。

I'm failing to connect to HateBase API. I have broken down the code here to make the debugging easier:

key ='blah blah'
base_url = 'https://api.hatebase.org'
url = "https://api.hatebase.org/4-4/authenticate"
payload = "api_key=" + key
response = requests.post(url, data=payload, headers=headers)
token = response.json()
print(token)

output:

{'datetime': '2022-03-02 18:32:13',
 'errors': {'8752': 'The version of the API is now retired; please update your queries to resume accessing the API'},
 'important': "Your use of the HateBase API acknowledges your consent with Hatebase's Terms of Use (available online at hatebase.org) and PROHIBITS REDISTRIBUTION of this data for any purpose, including but not limited to republication in any form, such as in PUBLIC CODE REPOSITORIES.",
 'query': {'api_key': 'blah blah'},
 'version': '4.4'}

I'm not sure if there is a problem with HateBase API itself... Alternatively, I'd be thankful if anyone knows a source that has already collected all HateBase Vocabulary.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

我最亲爱的 2025-01-18 08:22:00

显然 Hatebase 不再得到积极维护,因此他们退役了 Hatebase API。我向他们发送了一封有关此事的电子邮件,他们建议我尝试使用武器化文字。

“一个不错的选择是 The Weaponized Word,这是一个新项目,
与 Hatebase 非常相似:它对符合条件的学术研究人员免费,
并拥有多语言词典、API 和内置自然语言
解析器。目前,The Weaponized Word 的语言覆盖范围为
大约是 Hatebase 词典大小的两倍。”

这对我来说也非常令人沮丧,因为我上次使用 API 是在 2021 年底,所以我不确定发生了什么。我还没有尝试过这个新工具,但我很高兴至少他们提供了另一种选择:)

Apparently Hatebase is no longer being actively maintained, so they retired the Hatebase API. I sent them an email about it and they suggested I try Weaponized Word instead.

"A good alternative is The Weaponized Word, a new project which is
very similar to Hatebase: it's free for eligible academic researchers,
and has a multilingual lexicon, an API and a built-in natural language
parser. At this time, language coverage on The Weaponized Word is
roughly twice the size of Hatebase's lexicon."

That was very frustrating for me as well, because I last used the API end of 2021 so I was not sure what was happening. I haven't tried the new tool yet, but I'm happy that at least they offer an alternative :)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文