Wikidata Constraint Violations - July 2018 - extended
收藏资源简介:
This dataset is a cleaned up and annotated version of an other dataset previously shared: https://figshare.com/articles/dataset/Wikidata_Constraints_Violations_-_July_2017/7712720This dataset contains corrections for Wikidata constraint violations extracted from the July 1st 2018 Wikidata full history dump.It has been created as part of a work named Neural Knowledge Base Repairs by Thomas Pellissier Tanon and Fabian Suchanek.An example of code making use of this dataset is available on GitHub: https://github.com/Tpt/bass-materials/blob/master/corrections_learning.ipynbThe following constraints are considered:* conflicts with: https://www.wikidata.org/wiki/Help:Property_constraints_portal/Conflicts_with* distinct values: https://www.wikidata.org/wiki/Help:Property_constraints_portal/Unique_value* inverse and symmetric: https://www.wikidata.org/wiki/Help:Property_constraints_portal/Inverse https://www.wikidata.org/wiki/Help:Property_constraints_portal/Symmetric* item requires statement: https://www.wikidata.org/wiki/Help:Property_constraints_portal/Item* one of: https://www.wikidata.org/wiki/Help:Property_constraints_portal/One_of* single value: https://www.wikidata.org/wiki/Help:Property_constraints_portal/Single_value* type: https://www.wikidata.org/wiki/Help:Property_constraints_portal/Type* value requires statement: https://www.wikidata.org/wiki/Help:Property_constraints_portal/Target_required_claim* value type: https://www.wikidata.org/wiki/Help:Property_constraints_portal/Value_typeThe constraints.tsv file contains the list of most of the Wikidata constraints considered in this dataset (beware, there could be some discrepancies for type, valueType, itemRequiresClaim and valueRequiresClaim constraints).It is a tabbed-separated file with the following columns:1. constrain id: the URI of the Wikidata statement describing the constraint2. property id: the URI of the property that is constrained3. type id: the URI of the constraint type (type, value type...). It is a Wikidata item.4. 15 columns for the possible attributes of the constraint. If an attribute has multiple values, they are in the same cell but separated by a space. The columns are:* regex: https://www.wikidata.org/wiki/Property:P1793* exceptions: https://www.wikidata.org/wiki/Property:P2303* group by: https://www.wikidata.org/wiki/Property:P2304* items: https://www.wikidata.org/wiki/Property:P2305* property: https://www.wikidata.org/wiki/Property:P2306* namespace: https://www.wikidata.org/wiki/Property:P2307* class: https://www.wikidata.org/wiki/Property:P2308* relation: https://www.wikidata.org/wiki/Property:P2309* minimal date: https://www.wikidata.org/wiki/Property:P2310* maximum date: https://www.wikidata.org/wiki/Property:P2311* maximum value: https://www.wikidata.org/wiki/Property:P2312* minimal value: https://www.wikidata.org/wiki/Property:P2313* status: https://www.wikidata.org/wiki/Property:P2316* separator: https://www.wikidata.org/wiki/Property:P4155* scope: https://www.wikidata.org/wiki/Property:P5314The other files provide for each constraint type the list of all corrections extracted from the edit history. The format of the file is one line per correction with the following tabbed-separated values: 1. constraint id 2. revision that fixed the constraint violation 3. first violation triple subject 4. first violation triple predicate 5. first violation triple object 6. second violation triple subject (blank if no second violation triple) 7. second violation triple predicate (blank if no second violation triple) 8. second violation triple object (blank if no second violation triple) 9. separator (not useful) 10. subject of the first triple in the correction 11. predicate of the first triple in the correction 12. object of the first triple in the correction 13. is the first triple in the correction an addition or a deletion (`` for a deletion and `` for an addition) 14. subject of the second triple in the correction (might not exist) 15. predicate of the econd triple in the correction (might not exist) 16. object of the econd triple in the correction (might not exist) 17. is the second triple in the correction an addition or a deletion (`` for a deletion and `` for an addition) (might not exist) 18. Description of the subject of the first violation triple encoded in JSON 19. Description of the object of the first violation triple encoded in JSON (might be empty for literals) 20. Description of the term of the second triple that has not already be described by the two previous description. (might be empty for literals or if there is no second triple)
本数据集为此前已公开的另一数据集的清理注释版本,原数据集链接为:https://figshare.com/articles/dataset/Wikidata_Constraints_Violations_-_July_2017/7712720。 本数据集包含从2018年7月1日的Wikidata全历史快照中提取的Wikidata约束违规修正内容,由Thomas Pellissier Tanon与Fabian Suchanek在题为《Neural Knowledge Base Repairs》的研究工作中构建。 可在GitHub获取使用本数据集的示例代码:https://github.com/Tpt/bass-materials/blob/master/corrections_learning.ipynb。 本数据集涵盖以下约束类型: * 冲突约束(Conflicts with):https://www.wikidata.org/wiki/Help:Property_constraints_portal/Conflicts_with * 唯一值约束(Unique value):https://www.wikidata.org/wiki/Help:Property_constraints_portal/Unique_value * 逆约束与对称约束(Inverse and symmetric):分别对应https://www.wikidata.org/wiki/Help:Property_constraints_portal/Inverse与https://www.wikidata.org/wiki/Help:Property_constraints_portal/Symmetric * 实体需声明约束(Item requires statement):https://www.wikidata.org/wiki/Help:Property_constraints_portal/Item * 枚举约束(One of):https://www.wikidata.org/wiki/Help:Property_constraints_portal/One_of * 单值约束(Single value):https://www.wikidata.org/wiki/Help:Property_constraints_portal/Single_value * 类型约束(Type):https://www.wikidata.org/wiki/Help:Property_constraints_portal/Type * 值需声明约束(Target required claim):https://www.wikidata.org/wiki/Help:Property_constraints_portal/Target_required_claim * 值类型约束(Value type):https://www.wikidata.org/wiki/Help:Property_constraints_portal/Value_type `constraints.tsv` 文件包含本数据集所涉及的绝大多数Wikidata约束列表,需注意:类型约束、值类型约束、实体需声明约束及值需声明约束可能存在不一致。该文件为制表符分隔格式,包含以下列: 1. 约束标识符(constraint id):描述该约束的Wikidata声明的统一资源标识符(Uniform Resource Identifier, URI) 2. 属性标识符(property id):受约束属性的统一资源标识符(URI) 3. 约束类型标识符(type id):约束类型(如类型、值类型等)的统一资源标识符(URI),对应一个Wikidata实体 4. 15列用于存储约束的可选属性。若某一属性包含多个取值,则取值间以空格分隔于同一单元格内。各列依次为: * 正则表达式(regex):https://www.wikidata.org/wiki/Property:P1793 * 例外项(exceptions):https://www.wikidata.org/wiki/Property:P2303 * 分组依据(group by):https://www.wikidata.org/wiki/Property:P2304 * 实体列表(items):https://www.wikidata.org/wiki/Property:P2305 * 属性(property):https://www.wikidata.org/wiki/Property:P2306 * 命名空间(namespace):https://www.wikidata.org/wiki/Property:P2307 * 类(class):https://www.wikidata.org/wiki/Property:P2308 * 关联关系(relation):https://www.wikidata.org/wiki/Property:P2309 * 最小日期(minimal date):https://www.wikidata.org/wiki/Property:P2310 * 最大日期(maximum date):https://www.wikidata.org/wiki/Property:P2311 * 最大值(maximum value):https://www.wikidata.org/wiki/Property:P2312 * 最小值(minimal value):https://www.wikidata.org/wiki/Property:P2313 * 状态(status):https://www.wikidata.org/wiki/Property:P2316 * 分隔符(separator):https://www.wikidata.org/wiki/Property:P4155 * 作用域(scope):https://www.wikidata.org/wiki/Property:P5314 其余文件针对每种约束类型,提供了从编辑历史中提取的全部修正内容列表。文件格式为每行对应一条修正,各字段以制表符分隔,依次为: 1. 约束标识符 2. 修复该约束违规的修订版本号 3. 首个违规三元组的主体 4. 首个违规三元组的谓词 5. 首个违规三元组的客体 6. 第二个违规三元组的主体(若无第二个违规三元组则留空) 7. 第二个违规三元组的谓词(若无第二个违规三元组则留空) 8. 第二个违规三元组的客体(若无第二个违规三元组则留空) 9. 分隔符(无实际用途) 10. 修正中首个三元组的主体 11. 修正中首个三元组的谓词 12. 修正中首个三元组的客体 13. 修正中首个三元组的操作类型:` `` `代表删除,` `` `代表新增 14. 修正中第二个三元组的主体(可选) 15. 修正中第二个三元组的谓词(可选) 16. 修正中第二个三元组的客体(可选) 17. 修正中第二个三元组的操作类型:` `` `代表删除,` `` `代表新增(可选) 18. 首个违规三元组主体的JSON编码描述 19. 首个违规三元组客体的JSON编码描述(对于字面量该字段可能为空) 20. 未被前两条描述覆盖的第二个三元组相关术语的描述(对于字面量或无第二个三元组的情况该字段可能为空)




