edsnlp.connectors.brat
BratConnector
Bases: object
Deprecated. Use edsnlp.data.read_standoff
and edsnlp.data.write_standoff
instead. Two-way connector with BRAT. Supports entities only.
Parameters
PARAMETER | DESCRIPTION |
---|---|
directory | Directory containing the BRAT files. TYPE: |
n_jobs | Number of jobs for multiprocessing, by default 1 TYPE: |
attributes | Mapping from BRAT attributes to spaCy Span extensions. Extensions / attributes that are not in the mapping are not imported or exported If left to None, the mapping is filled with all BRAT attributes. TYPE: |
span_groups | Additional span groups to look for entities in spaCy documents when exporting. Missing label (resp. span group) names are not imported (resp. exported) If left to None, the sequence is filled with all BRAT entity labels. TYPE: |
docs2brat
Writes a list of spaCy documents to file.