[ ] Option to pass a custom loading function for self.type_mapping
[ ] Nice-to-have: Sanity check whether the dictionary contains any spaces in the output (as this would not be in accordance with a 1:1-replacement).
[ ] Nice-to-have: Add optional argument start_idx: int = 0 to update_spans_and_ws_from_tok_and_raw. The function will not update any spans and whitespace previous to the token with the index start_idx.
If we know that our first changed token occurs at position i, we know that no checks and updates prior to i are necessary. Thus, we can pass start_idx=i and make the computation faster.
[ ] If the data contains annotations (e.g. norm_pos) that are supposed to be changed as well, than the replacement dictionary must specify this and we need to support this.
self.type_mapping
start_idx: int = 0
toupdate_spans_and_ws_from_tok_and_raw
. The function will not update any spans and whitespace previous to the token with the indexstart_idx
. If we know that our first changed token occurs at positioni
, we know that no checks and updates prior toi
are necessary. Thus, we can passstart_idx=i
and make the computation faster.norm_pos
) that are supposed to be changed as well, than the replacement dictionary must specify this and we need to support this.