DFKI-SLT/brat
收藏资源简介:
Brat是一个基于Web的文本注释工具,支持多种NLP任务,旨在通过NLP技术提高注释者的生产力。数据集的结构包括文本文件和对应的注释文件,注释文件以standoff格式存储。数据实例展示了注释的具体内容,包括文本、注释的跨度、关系等。数据字段详细描述了每个字段的含义和结构。使用方法部分介绍了如何通过`load_dataset()`方法加载数据集,并提供了示例代码。附加信息部分包括引用信息,但许可证信息缺失。
Brat is a web-based text annotation tool that supports multiple NLP tasks, aiming to improve annotators' productivity via NLP technologies. The dataset structure consists of text files and their corresponding annotation files, which are stored in standoff format. Data instances demonstrate the specific content of annotations, including text, annotation spans, relationships, etc. The data fields elaborate on the meaning and structure of each individual field. The Usage section introduces how to load the dataset through the `load_dataset()` method, and provides sample code. The Additional Information section includes citation information, but the license information is missing.
数据集概述
描述
Brat 是一个直观的基于 Web 的文本标注工具,由自然语言处理(NLP)技术支持。Brat 旨在为多种 NLP 任务提供丰富的结构化标注,支持手动整理工作并利用 NLP 技术提高标注者生产力。Brat 特别设计用于结构化标注,其中标注不是自由形式的文本,而是具有固定形式,可以由计算机自动处理和解释。
数据集结构
使用 Brat 格式标注的数据集通过脚本处理。Brat 创建的标注以 standoff 格式存储在磁盘上:标注与被标注的文档文本分开存储,且文本不会被工具修改。每个文本文档都有一个对应的标注文件,两者通过文件命名约定关联,例如,文件 DOC-1000.ann 包含文件 DOC-1000.txt 的标注。
数据实例
json { "context": "<?xml version="1.0" encoding="UTF-8" standalone="no"?> <Document xmlns:gate="http://www.gat...", "file_name": "A01", "spans": { "id": ["T1", "T2", "T4", "T5", "T6", "T3", "T7", "T8", "T9", "T10", "T11", "T12",...], "type": ["background_claim", "background_claim", "background_claim", "own_claim",...], "locations": [{"start": [2417], "end": [2522]}, {"start": [2524], "end": [2640]},...], "text": ["complicated 3D character models...", "The range of breathtaking realistic...", ...] }, "relations": { "id": ["R1", "R2", "R3", "R4", "R5", "R6", "R7", "R8", "R9", "R10", "R11", "R12",...], "type": ["supports", "supports", "supports", "supports", "contradicts", "contradicts",...], "arguments": [{"type": ["Arg1", "Arg2"], "target": ["T4", "T5"]},...] }, "equivalence_relations": {"type": [], "targets": []}, "events": {"id": [], "type": [], "trigger": [], "arguments": []}, "attributions": {"id": [], "type": [], "target": [], "value": []}, "normalizations": {"id": [], "type": [], "target": [], "resource_id": [], "entity_id": []}, "notes": {"id": [], "type": [], "target": [], "note": []} }
数据字段
context(str): 数据文件的文本内容file_name(str): 数据/标注文件的名称(无扩展名)spans(dict):context字符串的跨度标注id(str): 跨度的 ID,以T开头type(str): 跨度的标签locations(list): 指示跨度位置的索引(由于片段而可能是多个),包含字典start(listofint): 指示跨度片段包含字符起始位置的索引end(listofint): 指示跨度片段独占字符结束位置的索引
text(listofstr): 跨度片段的文本
relations(dict):spans元素之间的关系序列id(str): 关系的 ID,以R开头type(str): 关系的标签arguments(listofdict): 与关系相关的跨度,包含字典type(listofstr): 跨度在关系中的参数角色,为Arg1或Arg2target(listofstr): 作为关系参数的跨度
equivalence_relations(dict): 包含type和target(更多信息需要)events(dict): 包含id,type,trigger, 和arguments(更多信息需要)attributions(dict): 任何其他标注的属性标注id(str): 属性标注的实例 IDtype(str): 属性标注的类型target(str): 属性标注的目标标注 IDvalue(str): 属性标注的值或标记
normalizations(dict): 特定文本表达所指的现实世界实体的唯一标识id(str): 规范化实体的实例 IDtype(str): 规范化实体的类型target(str): 规范化实体的目标标注 IDresource_id(str): 与规范化实体关联的资源entity_id(str): 规范化实体的实例 ID
notes(dict): 添加到标注中的自由形式文本id(str): 笔记的实例 IDtype(str): 笔记的类型target(str): 相关标注的 IDnote(str): 笔记的文本内容
使用
brat 数据集脚本可以通过调用 load_dataset() 方法并传递 BratConfig 接受的任何参数来使用。至少需要 url 参数。完整参数列表如下:
url(str): 指向包含 Brat 数据(*.txt)和标注(*.ann)文件的 zip 文件或目录的 URLdescription(str, 可选): 数据集的描述citation(str, 可选): 数据集的引用homepage(str, 可选): 数据集的主页split_paths(dict, 可选): 将(任意)分割名称映射到子目录或文件列表(无扩展名),例如{"train": "path/to/train_directory", "test": "path/to/test_director"}或{"train": ["path/to/train_file1", "path/to/train_file2"]}。在两种情况下(子目录路径或文件路径),路径相对于 URL。如果未提供split_paths,数据集将从根目录加载,所有直接子文件夹将被视为分割。file_name_blacklist(list, 可选): 应忽略的文件名列表(无扩展名),例如["A28"]。如果数据集包含无效的 Brat 文件,这很有用。
重要提示:使用 load_dataset() 方法的 data_dir 参数会覆盖 BratConfig 的 url 参数。
附加信息
许可信息
需要更多信息
引用信息
@inproceedings{stenetorp-etal-2012-brat, title = "brat: a Web-based Tool for {NLP}-Assisted Text Annotation", author = "Stenetorp, Pontus and Pyysalo, Sampo and Topi{c}, Goran and Ohta, Tomoko and Ananiadou, Sophia and Tsujii, Jun{}ichi", booktitle = "Proceedings of the Demonstrations at the 13th Conference of the {E}uropean Chapter of the Association for Computational Linguistics", month = apr, year = "2012", address = "Avignon, France", publisher = "Association for Computational Linguistics", url = "https://aclanthology.org/E12-2021", pages = "102--107", }




