parse_brat()
Build a document from the contents of a .txt and an .ann file.
Usage
parse_brat(
text,
ann,
*,
id=None,
verify="raise",
offset_unit="codepoint",
)Parameters
text: str-
The
.txtcontent, unchanged (read withnewline=''). ann: str-
The
.anncontent. id: str | None = None-
The document ID, usually the file stem.
verify: Verify = "raise"-
Check every text-bound annotation against its stored text:
"raise"an IntegrityError on mismatch,"warn", or"off". offset_unit: OffsetUnit = "codepoint"- The unit the offsets count in.