The autocorpus.py module returns data in dictionaries in BioC format, but a lot of that structure is replicating the dataclasses in the ac_bioc package. The code should be adapted to use these dataclasses instead of dictionaries.
This will have the benefit of improved consistency throughout the code as well and strengthening the type-security across the code.
An example:
- The dictionary returned by
get_formatted_bioc_document in bioc_documents.py serves the same purpose as the ac_bioc.BioCDocument dataclass. The function should be changed to return the BioCDocument type.
The
autocorpus.pymodule returns data in dictionaries in BioC format, but a lot of that structure is replicating the dataclasses in theac_biocpackage. The code should be adapted to use these dataclasses instead of dictionaries.This will have the benefit of improved consistency throughout the code as well and strengthening the type-security across the code.
An example:
get_formatted_bioc_documentinbioc_documents.pyserves the same purpose as theac_bioc.BioCDocumentdataclass. The function should be changed to return theBioCDocumenttype.