clips/bratreader
소개
Python code for reading Brat Repositories. Supports saving and reading from XML files for easy acces to annotations.
개발 도구측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- 0
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalWARNING: 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.
관련 프로젝트 살펴보기
불러오는 중…