ShannonAI / mrc-for-flat-nested-ner

Code for ACL 2020 paper `A Unified MRC Framework for Named Entity Recognition`

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Some details in MRCNERDataset

smiles724 opened this issue · comments

Hi, I am a little confused about why you add one to all ending position indices as end_positions = [x + 1 for x in end_positions]. Can you please give me an explanation?

@Wufang1997 This is a variable used to store char-level end positions in python style: range(start, end) do not contain end. The variable is further used to compute final start/end labels considering query+context inputs and wordpiece tokenizer.

@Wufang1997 This is a variable used to store char-level end positions in python style: range(start, end) do not contain end. The variable is further used to compute final start/end labels considering query+context inputs and wordpiece tokenizer.

Thanks, I also figured it out myself!