resultset - StackExchange API 标签同义词返回 Stack Overflow 上不存在的标签
问题描述
我正在尝试为 Stack Overflow 标签构建一个类似于分类的关系图。我提取了所有标签和近 37000 个这些 wiki。在根据 wiki 确定关系之前,我决定先看看 Stack Overflow/tags/{tag}/synonyms
提供的内容。结果中的一些from_tag
s 不是 Stack Overflow 中的实际标签。我想我可能错过了我的数据集中的那些。因此尝试使用 搜索那些,/tags/{tag}/info
但它返回了 的信息to_tag
。
例如:
{
"creation_date": 1377674210,
"last_applied_date": 1602368899,
"applied_count": 1172,
"to_tag": "java",
"from_tag": "jre"
}
是tags/java/synonyms
端点的结果之一。但是,没有标签jre。如果搜索/tag/jre/info
我会得到 Java 的信息。
我对这种行为感到困惑。如何tags/java/synonyms
获取不是 Stack Overflow 标签的标签?
解决方案
The API results are correct. As you can see here, jre exists and was synonymised and merged with Java. In addition, https://stackoverflow.com/questions/tagged/jre redirects to https://stackoverflow.com/questions/tagged/java (the page doesn't return a 404!). Apparently, you can only find tags that have been synonymised via the /tags/{tag}/synonyms
. Thus, this route is not that useful for your task.
For more information, see: What are tag synonyms and merged tags? How do they work?
推荐阅读
- python - 如何解决 CMake 错误:找不到“boost_python3”提供的包配置文件
- java - 在 Hazelcast jet 中,我们如何将 IList 存储到普通列表中,因为我必须在响应中发送它?
- c# - 连接到 HPC 调度程序时如何以编程方式设置用户密码凭据
- android - 在 Surface TextureView 上叠加动态 FPS
- regex - 为具有两个给定姓氏的人过滤 Airtable 数据库
- java - 我是否需要在同一台服务器上加密 Front 和 Back 之间的数据和连接?
- reactjs - 单选网格
- php - Twitter Premium API - webhook 没有收到活动
- c# - WPF 大型 uniformGrid 性能问题
- vue.js - 无法解析@fontawesome all / fontawesome-free