Skip to content

Make BratReader more forgiving #1443

@alaindesilets

Description

@alaindesilets

BratReader is currently very unforgiving. I propose to make the following improvements to it.

  1. Create a BratRead without having to provide mappings.
  • BratReader would already know mappings for the Annotations defined in the standard dkpro-core type system (ex: Person)
  • If you provide a PARAM_MAPPING, those mappings would be ADDED to the default ones
  • If the .ann file contains a label that is defined in neither of the default or PARAM_MAPPING mappings, it will use a "catch-all" Annotation type (NamedEntity for the moment, but could be something else)
  1. Pass a directory or file to PARAM_SOURCE_LOCATION without having to worry about things like:
  • Adding *.ann at the end of the directory path (the Reader would add it automaticaly)
  • Making sure to pass the .ann file as opposed to the .txt file (the Reader would automatically converts it to .ann path)
  • Making sure that the single file, or all the the .txt files in the directory have a corresponding .ann file (the Reader would automatically creates empty .ann files for orphan .txt files)

If this seems appropriate, I will create a feature request followed by a Pull REquest.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions