Skip to content
项目

clips/bratreader has 43 GitHub stars and 22 forks. GitHot measured 0 stars in 24 hours, 0 in 7 days, and 0 in 15 days. Last checked 2026-11-21 08:12 UTC. Last push 2026-08-05.

这些数字如何统计

实测星标增长

24小时
0
7天
0
15天
0
1个月
正在收集历史

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

关于

Python code for reading Brat Repositories. Supports saving and reading from XML files for easy acces to annotations.

开发工具

README.md

原文

WARNING: This repository is no longer maintained.

This project is archived and will not receive further updates, bug fixes, or security patches. Issues and pull requests may not be reviewed.

Use this software at your own risk.


bratreader

Python code for reading Brat Repositories.

Version

1.1

License

GPL v3.0

Installation

Currently, there are no particular installation instructions. Because BratReader will be used so locally, we assume users will be able to figure out themselves where they want to use the code in their project.

Usage

To use BratReader, simply import repomodel and point it to the directory containing both your .ann and .txt files.

from bratreader.repomodel import RepoModel

r = RepoModel("path/to/bratfolder") # load repomodel
r.documents            			    # all documents in your brat corpus

doc = r.documents["001"] 			# get document with key 001
print(doc.sentences)    			# a list of sentences in document
print(doc.annotations)  			# the annotation objects in a document

# Save to XML
r.save_xml("my_folder")
# This creates one XML document per original document
# in the specified folder.