转摘CAIL2021-阅读理解任务-top3-数据预处理模块

邹珉骁阅读量 24

代码地址:https://github.com/davidfan1224/CAIL2021_Multi-span_MRC

python 复制代码
class SquadExample(object):
    """
    A single training/test example for the Squad dataset.
    For examples without an answer, the start and end position are -1.
    """

    def __init__(self,
                 qas_id,
                 question_text,
                 doc_tokens,
                 orig_answer_text=None,
                 start_position=None,
                 end_position=None,
                 is_impossible=None,
                 is_yes=None,
                 is_no=None,
                 labels=None):
        self.qas_id = qas_id
        self.question_text = question_text
        self.doc_tokens = doc_tokens
        self.orig_answer_text = orig_answer_text
        self.start_position = start_position
        self.end_position = end_position
        self.is_impossible = is_impossible
        self.is_yes = is_yes
        self.is_no = is_no
        self.labels = labels

    def __str__(self):
        return self.__repr__()

    # def __repr__(self):
    #     s = ""
    #     s += "qas_id: %s" % (self.qas_id) + '\n'
    #     s += ", question_text: %s" % (
    #         self.question_text) + '\n'
    #     s += ", doc_tokens: [%s]" % (" ".join(self.doc_tokens)) + '\n'
    #     if self.start_position:
    #         s += ", start_position: %s" % (str(self.start_position)) + '\n'
    #     if self.end_position:
    #         s += ", end_position: %s" % (str(self.end_position)) + '\n'
    #     if self.is_impossible:
    #         s += ", is_impossible: %r" % (self.is_impossible) + '\n'
    #     return s

    def __repr__(self):
        string = ""
        for key, value in self.__dict__.items():
            string += f"{key}: {value}\n"
        return f"<{string}>"

def read_squad_examples(input_file, is_training, version_2_with_negative):
    """Read a SQuAD json file into a list of SquadExample."""
    with open(input_file, "r", encoding='utf-8') as reader:
        input_data = json.load(reader)["data"]

    def is_whitespace(c):
        if c == " " or c == "\t" or c == "\r" or c == "\n" or ord(c) == 0x202F:
            return True
        return False

    examples = []
    change_ques_num = 0
    for entry in tqdm(input_data, desc='convert examples:'):
        for paragraph in entry["paragraphs"]:
            paragraph_text = paragraph["context"]

            doc_tokens = []
            char_to_word_offset = []

            # 这里直接是按照字符进行划分的
            for c in paragraph_text:
                doc_tokens.append(c)
                char_to_word_offset.append(len(doc_tokens) - 1)

            for qa in paragraph["qas"]:
                qas_id = qa["id"]
                question_text = qa["question"]
                if question_text != qa['question']:
                    change_ques_num += 1
                start_position = None
                end_position = None
                orig_answer_text = None
                # 多答案:
                start_positions = []
                end_positions = []
                orig_answer_texts = []

                is_impossible = False
                is_yes = False
                is_no = False
                labels = ['O'] * len(doc_tokens)
                if is_training:
                    if version_2_with_negative:
                        if qa['is_impossible'] == 'false':
                            is_impossible = False
                        else:
                            is_impossible = True
                    # 下面这一行将不坑回答的问题进行过滤掉了
                    if (len(qa["answers"]) != 1) and (not is_impossible):
                        continue

                    if not is_impossible:
                        all_answers = qa["answers"]
                        if len(all_answers) == 0:
                            answers = []
                        else:
                            answers = all_answers[0]
                        if type(answers) == dict:
                            answers = [answers]

                        for answer in answers:
                            orig_answer_text = answer["text"]
                            answer_offset = answer["answer_start"]
                            answer_length = len(orig_answer_text)
                            start_position = char_to_word_offset[answer_offset]
                            end_position = char_to_word_offset[answer_offset + answer_length - 1]
                            # Only add answers where the text can be exactly recovered from the
                            # document. If this CAN'T happen it's likely due to weird Unicode
                            # stuff so we will just skip the example.
                            #
                            # Note that this means for training mode, every example is NOT
                            # guaranteed to be preserved.
                            actual_text = "".join(doc_tokens[start_position:(end_position + 1)])

                            cleaned_answer_text = " ".join(
                                whitespace_tokenize(orig_answer_text))

                            if actual_text.find(cleaned_answer_text) == -1:

                                if cleaned_answer_text == 'YES':
                                    is_yes = True
                                    orig_answer_text = 'YES'
                                    start_position = -1
                                    end_position = -1

                                    labels = ['O'] * len(doc_tokens)

                                    start_positions.append(start_position)
                                    end_positions.append(end_position)
                                    orig_answer_texts.append(orig_answer_text)
                                elif cleaned_answer_text == 'NO':
                                    is_no = True
                                    start_position = -1
                                    end_position = -1
                                    orig_answer_text = 'NO'

                                    labels = ['O'] * len(doc_tokens)

                                    start_positions.append(start_position)
                                    end_positions.append(end_position)
                                    orig_answer_texts.append(orig_answer_text)
                                else:
                                    logger.warning("Could not find answer: '%s' vs. '%s'",
                                                   actual_text, cleaned_answer_text)
                                    continue
                            else:
                                start_positions.append(start_position)
                                end_positions.append(end_position)
                                orig_answer_texts.append(orig_answer_text)
                                start_index = answer['answer_start']
                                end_index = start_index + len(answer['text'])
                                labels[start_index: end_index] = ['I'] * (len(answer['text']))  # 是答案的用I标记,否则用O标记
                    else:
                        start_position = -1
                        end_position = -1
                        orig_answer_text = ""

                        start_positions.append(start_position)
                        end_positions.append(end_position)
                        orig_answer_texts.append(orig_answer_text)
                        labels = ['O'] * len(doc_tokens)


                example = SquadExample(
                    qas_id=qas_id,
                    question_text=question_text,
                    doc_tokens=doc_tokens,
                    orig_answer_text=orig_answer_texts,
                    start_position=start_positions,
                    end_position=end_positions,
                    is_impossible=is_impossible,
                    is_yes=is_yes,
                    is_no=is_no,
                    labels=labels)
                examples.append(example)

    return examples

if __name__ == '__main__':
    data_file = 'data_sample/cail2021_mrc_small.json'
    examples = read_squad_examples(data_file, is_training=True, version_2_with_negative=True)
    print(examples[0])
复制代码
<qas_id: 3
question_text: 伤者被送往哪些医院?
doc_tokens: ['经', '审', '理', '查', '明', ':', '2', '0', '1', '4', '年', '8', '月', '6', '日', '上', '午', '约', '7', '点', ',', '原', '告', '黄', 'x', '0', '来', '到', '被', '告', '胡', 'x', '3', '经', '营', '的', '水', '泥', '店', '内', '购', '买', '两', '包', '水', '泥', ',', '由', '原', '告', '及', '其', '临', '时', '雇', '来', '的', '三', '轮', '车', '夫', '自', '行', '负', '责', '搬', '运', '水', '泥', '。', '在', '搬', '运', '过', '程', '中', ',', '被', '告', '店', '内', '堆', '放', '的', '水', '泥', '倒', '塌', '下', '来', '将', '原', '告', '砸', '伤', '。', '当', '天', '上', '午', ',', '原', '告', '被', '送', '往', '乐', '清', '市', '第', '三', '人', '民', '医', '院', ',', '经', '门', '诊', '检', '查', '诊', '断', '为', '"', '腰', '2', '、', '3', '椎', '体', '骨', '折', '、', '左', '内', '踝', '骨', '折', '"', ',', '共', '支', '出', '医', '疗', '费', '6', '7', '1', '元', '。', '因', '病', '情', '严', '重', ',', '当', '天', '转', '入', '温', '州', '医', '科', '大', '学', '附', '属', '第', '二', '医', '院', '进', '行', '住', '院', '治', '疗', ',', '于', '2', '0', '1', '4', '年', '8', '月', '1', '1', '日', '在', '全', '麻', '下', '行', '"', '腰', '椎', '骨', '折', '切', '复', '减', '压', '内', '固', '定', '术', '"', '和', '"', '左', '内', '踝', '骨', '折', '内', '固', '定', '术', '"', ',', '于', '2', '0', '1', '4', '年', '8', '月', '2', '1', '日', '出', '院', ',', '共', '计', '支', '出', '住', '院', '费', '用', '5', '4', '5', '0', '5', '.', '5', '7', '元', '。', '经', '本', '院', '委', '托', '温', '州', '天', '正', '司', '法', '鉴', '定', '所', '鉴', '定', ',', '原', '告', '的', '残', '疾', '程', '度', '为', '九', '级', ',', '营', '养', '期', '限', '评', '定', '为', '3', '个', '月', '(', '从', '受', '伤', '之', '日', '起', '计', '算', ')', ',', '二', '期', '手', '术', '(', '拆', '除', '内', '固', '定', ')', '的', '营', '养', '期', '限', '评', '定', '为', '半', '个', '月', ',', '后', '续', '治', '疗', '费', '约', '需', '1', '0', '0', '0', '0', '元', '或', '按', '实', '际', '合', '理', '发', '生', '费', '用', '为', '准', '。', '原', '告', '住', '院', '治', '疗', '及', '出', '院', '后', ',', '被', '告', '胡', 'x', '3', '及', '其', '儿', '子', '曾', '去', '探', '望', '并', '送', '上', '营', '养', '品', '。', '双', '方', '就', '赔', '偿', '事', '宜', '无', '法', '达', '成', '一', '致', '意', '见', ',', '故', '涉', '诉', '。', '以', '上', '事', '实', ',', '有', '原', '告', '身', '份', '证', '、', '两', '被', '告', '户', '籍', '证', '明', '、', '门', '诊', '病', '历', '及', '发', '票', '六', '份', '、', '住', '院', '费', '用', '发', '票', '及', '清', '单', '、', '出', '院', '记', '录', '、', '医', '疗', '证', '明', '书', '、', '司', '法', '鉴', '定', '意', '见', '书', '、', '鉴', '定', '费', '发', '票', '及', '庭', '审', '笔', '录', '在', '案', '佐', '证', ',', '本', '院', '予', '以', '认', '定', '。', '原', '告', '提', '供', '的', '视', '频', '资', '料', ',', '可', '以', '证', '明', '被', '告', '胡', 'x', '3', '确', '认', '原', '告', '在', '其', '经', '营', '的', '水', '泥', '店', '内', '被', '水', '泥', '砸', '伤', '的', '事', '实', ',', '故', '本', '院', '予', '以', '认', '定', ';', '被', '告', '提', '供', '的', '视', '频', '资', '料', ',', '虽', '然', '可', '以', '显', '示', '其', '经', '营', '的', '水', '泥', '店', '内', '有', '两', '处', '位', '置', '张', '贴', '警', '示', '标', '语', ',', '但', '难', '以', '达', '到', '被', '告', '主', '张', '的', '其', '已', '尽', '到', '安', '全', '注', '意', '义', '务', ',', '对', '本', '案', '事', '故', '的', '发', '生', '不', '存', '在', '过', '错', '的', '待', '证', '事', '实', '的', '证', '明', '标', '准', ',', '故', '本', '院', '不', '予', '采', '纳', '。']
orig_answer_text: ['乐清市第三人民医院', '温州医科大学附属第二医院']
start_position: [106, 162]
end_position: [114, 173]
is_impossible: False
is_yes: False
is_no: False
labels: ['O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'I', 'I', 'I', 'I', 'I', 'I', 'I', 'I', 'I', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'I', 'I', 'I', 'I', 'I', 'I', 'I', 'I', 'I', 'I', 'I', 'I', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O']
>

这里需要注意的有两点:

  • 这里最初的切分是以字符进行切分的。
  • 有一个labels,这里和文本的长度是一致的,以序列标注的IO格式进行标注,如果是YES和NO类的,那么labels里面就全部是O。

接着就是将每一个example转换为feature了:

python 复制代码
class InputFeatures(object):
    """A single set of features of data."""

    def __init__(self,
                 unique_id,
                 example_index,
                 doc_span_index,
                 tokens,
                 token_to_orig_map,
                 token_is_max_context,
                 input_ids,
                 input_mask,
                 segment_ids,
                 paragraph_len,
                 label_id=None,
                 start_position=None,
                 end_position=None,
                 is_impossible=None,
                 unk_mask=None,
                 yes_mask=None,
                 no_mask=None,
                 answer_mask=None,
                 answer_num=None
                 ):
        self.unique_id = unique_id
        self.example_index = example_index
        self.doc_span_index = doc_span_index
        self.tokens = tokens
        self.token_to_orig_map = token_to_orig_map
        self.token_is_max_context = token_is_max_context
        self.input_ids = input_ids
        self.input_mask = input_mask
        self.segment_ids = segment_ids
        self.paragraph_len = paragraph_len
        self.label_id = label_id
        self.start_position = start_position
        self.end_position = end_position
        self.is_impossible = is_impossible
        self.unk_mask = unk_mask
        self.yes_mask = yes_mask
        self.no_mask = no_mask
        self.answer_mask = answer_mask
        self.answer_num = answer_num

    def __repr__(self):
        string = ""
        for key, value in self.__dict__.items():
            string += f"{key}: {value}\n"
        return f"<{string}>"

def convert_examples_to_features(examples, tokenizer, max_seq_length,
                                 doc_stride, max_query_length, is_training, max_n_answers=1):
    """Loads a data file into a list of `InputBatch`s."""

    unique_id = 1000000000

    features = []
    unk_tokens = {}

    label_map = {'O': 0, 'I': 1}

    convert_token_list = {
        '"': '"', """: '"', '...': '...', '﹤': '<', '﹥': '>', ''': "'", ''': "'",
        '﹪': '%', 'Ⅹ': 'x', '―': '-', '---': '-', '﹟': '#', '㈠': '一'
    }
    example_index = 0
    for example in tqdm(examples, desc='convert_examples_to_features:'):
        # 对问题进行分词
        query_tokens = tokenizer.tokenize(example.question_text)
        # 如果问题的最大长度超过了设置的则截断
        if len(query_tokens) > max_query_length:
            query_tokens = query_tokens[0:max_query_length]

        labellist = example.labels

        tok_to_orig_index = []
        orig_to_tok_index = []
        all_doc_tokens = []
        for (i, token) in enumerate(example.doc_tokens):
            orig_to_tok_index.append(len(all_doc_tokens))
            sub_tokens = tokenizer.tokenize(token)
            if "[UNK]" in sub_tokens:
                if token in unk_tokens:
                    unk_tokens[token] += 1
                else:
                    unk_tokens[token] = 1

            for sub_token in sub_tokens:
                tok_to_orig_index.append(i)
                all_doc_tokens.append(sub_token)

        tok_start_position = None
        tok_end_position = None
        # multi answers
        tok_start_positions = []
        tok_end_positions = []

        if is_training and example.is_impossible:
            tok_start_position = -1
            tok_end_position = -1

            tok_start_positions.append(-1)
            tok_end_positions.append(-1)

        if is_training and not example.is_impossible:
            for orig_answer_text, start_position, end_position in zip(example.orig_answer_text, example.start_position, example.end_position):

                tok_start_position = orig_to_tok_index[start_position]
                if end_position < len(example.doc_tokens) - 1:
                    tok_end_position = orig_to_tok_index[end_position + 1] - 1
                else:
                    tok_end_position = len(all_doc_tokens) - 1
                (tok_start_position, tok_end_position) = _improve_answer_span(
                    all_doc_tokens, tok_start_position, tok_end_position, tokenizer,
                    orig_answer_text)

                tok_start_positions.append(tok_start_position)
                tok_end_positions.append(tok_end_position)

        # The -3 accounts for [CLS], [SEP] and [SEP]
        max_tokens_for_doc = max_seq_length - len(query_tokens) - 3

        # We can have documents that are longer than the maximum sequence length.
        # To deal with this we do a sliding window approach, where we take chunks
        # of the up to our max length with a stride of `doc_stride`.
        _DocSpan = collections.namedtuple(  # pylint: disable=invalid-name
            "DocSpan", ["start", "length"])
        doc_spans = []
        start_offset = 0
        while start_offset < len(all_doc_tokens):
            length = len(all_doc_tokens) - start_offset
            if length > max_tokens_for_doc:
                length = max_tokens_for_doc
            doc_spans.append(_DocSpan(start=start_offset, length=length))
            if start_offset + length == len(all_doc_tokens):
                break
            start_offset += min(length, doc_stride)

            while start_offset < len(all_doc_tokens) and all_doc_tokens[start_offset - 1] != "," and all_doc_tokens[start_offset - 1] != "。":   # 滑窗 保留完整一句话 此处是英文的,
                start_offset += 1

        for (doc_span_index, doc_span) in enumerate(doc_spans):
            tokens = []
            token_to_orig_map = {}
            token_is_max_context = {}
            segment_ids = []
            doc_span_labels = []
            label_ids = []
            tokens.append("[CLS]")
            segment_ids.append(0)
            label_ids.append(label_map["O"])

            for token in query_tokens:
                tokens.append(token)
                segment_ids.append(0)
                label_ids.append(label_map["O"])
            tokens.append("[SEP]")
            segment_ids.append(0)
            label_ids.append(label_map["O"])

            for i in range(doc_span.length):
                split_token_index = doc_span.start + i
                doc_span_labels.append(labellist[split_token_index])
            for i in range(doc_span.length):
                split_token_index = doc_span.start + i
                token_to_orig_map[len(tokens)] = tok_to_orig_index[split_token_index]

                is_max_context = _check_is_max_context(doc_spans, doc_span_index,
                                                       split_token_index)
                token_is_max_context[len(tokens)] = is_max_context
                tokens.append(all_doc_tokens[split_token_index])
                segment_ids.append(1)
                label_ids.append(label_map[doc_span_labels[i]])
            paragraph_len = doc_span.length

            tokens.append("[SEP]")
            segment_ids.append(1)
            label_ids.append(label_map["O"])

            input_ids = tokenizer.convert_tokens_to_ids(tokens)

            # The mask has 1 for real tokens and 0 for padding tokens. Only real
            # tokens are attended to.
            input_mask = [1] * len(input_ids)

            # Zero-pad up to the sequence length.
            while len(input_ids) < max_seq_length:
                input_ids.append(0)
                input_mask.append(0)
                segment_ids.append(0)
                label_ids.append(label_map["O"])

            assert len(input_ids) == max_seq_length
            assert len(input_mask) == max_seq_length
            assert len(segment_ids) == max_seq_length

            span_is_impossible = example.is_impossible

            start_position = None
            end_position = None
            # multi answers
            start_positions = []
            end_positions = []

            if is_training and not example.is_impossible:
                doc_start = doc_span.start
                doc_end = doc_span.start + doc_span.length - 1

                for tok_start_position, tok_end_position in zip(tok_start_positions, tok_end_positions):  # 多个答案 计算各自起始位置
                    out_of_span = False
                    if not (tok_start_position >= doc_start and
                            tok_end_position <= doc_end):
                        out_of_span = True
                    if out_of_span:
                        start_position = max_seq_length
                        end_position = max_seq_length
                    else:
                        doc_offset = len(query_tokens) + 2
                        start_position = tok_start_position - doc_start + doc_offset
                        end_position = tok_end_position - doc_start + doc_offset

                    start_positions.append(start_position)
                    end_positions.append(end_position)

            unk_mask, yes_mask, no_mask = [0], [0], [0]
            if is_training and example.is_impossible:   # no answer
                start_position = max_seq_length
                end_position = max_seq_length
                unk_mask = [1]

                if start_positions:
                    start_positions.clear()
                    end_positions.clear()

                    start_positions.append(start_position)
                    end_positions.append(end_position)
                else:
                    start_positions.append(start_position)
                    end_positions.append(end_position)

            elif is_training and example.is_yes:   # YES
                start_position = max_seq_length+1
                end_position = max_seq_length+1
                yes_mask = [1]

                if start_positions:
                    start_positions.clear()
                    end_positions.clear()

                    start_positions.append(start_position)
                    end_positions.append(end_position)
                else:
                    start_positions.append(start_position)
                    end_positions.append(end_position)

            elif is_training and example.is_no:   # NO
                start_position = max_seq_length+2
                end_position = max_seq_length+2
                no_mask = [1]

                if start_positions:
                    start_positions.clear()
                    end_positions.clear()

                    start_positions.append(start_position)
                    end_positions.append(end_position)
                else:
                    start_positions.append(start_position)
                    end_positions.append(end_position)

            # 如果答案列表长度 大于设置的阈值最大答案数量 则随机选择
            if len(start_positions) > max_n_answers:
                idxs = np.random.choice(len(start_positions), max_n_answers, replace=False)
                st = []
                en = []
                for idx in idxs:
                    st.append(start_positions[idx])
                    en.append(end_positions[idx])
                start_positions = st
                end_positions = en

            answer_num = len(start_positions) if not example.is_impossible else 0

            answer_mask = [1 for _ in range(len(start_positions))]
            for _ in range(max_n_answers - len(start_positions)):
                start_positions.append(0)
                end_positions.append(0)
                answer_mask.append(0)



            features.append(
                InputFeatures(
                    unique_id=unique_id,
                    example_index=example_index,
                    doc_span_index=doc_span_index,
                    tokens=tokens,
                    token_to_orig_map=token_to_orig_map,
                    token_is_max_context=token_is_max_context,
                    input_ids=input_ids,
                    input_mask=input_mask,
                    segment_ids=segment_ids,
                    paragraph_len=paragraph_len,
                    start_position=start_positions,
                    end_position=end_positions,
                    is_impossible=example.is_impossible,
                    unk_mask=unk_mask,
                    yes_mask=yes_mask,
                    no_mask=no_mask,
                    answer_mask=answer_mask,
                    answer_num=answer_num,
                    label_id=label_ids
                ))
            unique_id += 1
        example_index += 1
    if is_training:
        with open("unk_tokens_clean", "w", encoding="utf-8") as fh:
            for key, value in unk_tokens.items():
                fh.write(key+" " + str(value)+"\n")

    return features

tokenizer = BertTokenizer.from_pretrained('model_hub/chinese-bert-wwm-ext/')
features, output_examples = convert_examples_to_features(examples, tokenizer, 512, 128, 64, True, max_n_answers=3)
for i, (example, feature) in enumerate(zip(output_examples, features)):
    if i < 10:
        print(example)
        print(feature)
        print("="*100)

结果:

复制代码
<qas_id: 3
question_text: 伤者被送往哪些医院?
doc_tokens: ['经', '审', '理', '查', '明', ':', '2', '0', '1', '4', '年', '8', '月', '6', '日', '上', '午', '约', '7', '点', ',', '原', '告', '黄', 'x', '0', '来', '到', '被', '告', '胡', 'x', '3', '经', '营', '的', '水', '泥', '店', '内', '购', '买', '两', '包', '水', '泥', ',', '由', '原', '告', '及', '其', '临', '时', '雇', '来', '的', '三', '轮', '车', '夫', '自', '行', '负', '责', '搬', '运', '水', '泥', '。', '在', '搬', '运', '过', '程', '中', ',', '被', '告', '店', '内', '堆', '放', '的', '水', '泥', '倒', '塌', '下', '来', '将', '原', '告', '砸', '伤', '。', '当', '天', '上', '午', ',', '原', '告', '被', '送', '往', '乐', '清', '市', '第', '三', '人', '民', '医', '院', ',', '经', '门', '诊', '检', '查', '诊', '断', '为', '"', '腰', '2', '、', '3', '椎', '体', '骨', '折', '、', '左', '内', '踝', '骨', '折', '"', ',', '共', '支', '出', '医', '疗', '费', '6', '7', '1', '元', '。', '因', '病', '情', '严', '重', ',', '当', '天', '转', '入', '温', '州', '医', '科', '大', '学', '附', '属', '第', '二', '医', '院', '进', '行', '住', '院', '治', '疗', ',', '于', '2', '0', '1', '4', '年', '8', '月', '1', '1', '日', '在', '全', '麻', '下', '行', '"', '腰', '椎', '骨', '折', '切', '复', '减', '压', '内', '固', '定', '术', '"', '和', '"', '左', '内', '踝', '骨', '折', '内', '固', '定', '术', '"', ',', '于', '2', '0', '1', '4', '年', '8', '月', '2', '1', '日', '出', '院', ',', '共', '计', '支', '出', '住', '院', '费', '用', '5', '4', '5', '0', '5', '.', '5', '7', '元', '。', '经', '本', '院', '委', '托', '温', '州', '天', '正', '司', '法', '鉴', '定', '所', '鉴', '定', ',', '原', '告', '的', '残', '疾', '程', '度', '为', '九', '级', ',', '营', '养', '期', '限', '评', '定', '为', '3', '个', '月', '(', '从', '受', '伤', '之', '日', '起', '计', '算', ')', ',', '二', '期', '手', '术', '(', '拆', '除', '内', '固', '定', ')', '的', '营', '养', '期', '限', '评', '定', '为', '半', '个', '月', ',', '后', '续', '治', '疗', '费', '约', '需', '1', '0', '0', '0', '0', '元', '或', '按', '实', '际', '合', '理', '发', '生', '费', '用', '为', '准', '。', '原', '告', '住', '院', '治', '疗', '及', '出', '院', '后', ',', '被', '告', '胡', 'x', '3', '及', '其', '儿', '子', '曾', '去', '探', '望', '并', '送', '上', '营', '养', '品', '。', '双', '方', '就', '赔', '偿', '事', '宜', '无', '法', '达', '成', '一', '致', '意', '见', ',', '故', '涉', '诉', '。', '以', '上', '事', '实', ',', '有', '原', '告', '身', '份', '证', '、', '两', '被', '告', '户', '籍', '证', '明', '、', '门', '诊', '病', '历', '及', '发', '票', '六', '份', '、', '住', '院', '费', '用', '发', '票', '及', '清', '单', '、', '出', '院', '记', '录', '、', '医', '疗', '证', '明', '书', '、', '司', '法', '鉴', '定', '意', '见', '书', '、', '鉴', '定', '费', '发', '票', '及', '庭', '审', '笔', '录', '在', '案', '佐', '证', ',', '本', '院', '予', '以', '认', '定', '。', '原', '告', '提', '供', '的', '视', '频', '资', '料', ',', '可', '以', '证', '明', '被', '告', '胡', 'x', '3', '确', '认', '原', '告', '在', '其', '经', '营', '的', '水', '泥', '店', '内', '被', '水', '泥', '砸', '伤', '的', '事', '实', ',', '故', '本', '院', '予', '以', '认', '定', ';', '被', '告', '提', '供', '的', '视', '频', '资', '料', ',', '虽', '然', '可', '以', '显', '示', '其', '经', '营', '的', '水', '泥', '店', '内', '有', '两', '处', '位', '置', '张', '贴', '警', '示', '标', '语', ',', '但', '难', '以', '达', '到', '被', '告', '主', '张', '的', '其', '已', '尽', '到', '安', '全', '注', '意', '义', '务', ',', '对', '本', '案', '事', '故', '的', '发', '生', '不', '存', '在', '过', '错', '的', '待', '证', '事', '实', '的', '证', '明', '标', '准', ',', '故', '本', '院', '不', '予', '采', '纳', '。']
orig_answer_text: ['乐清市第三人民医院', '温州医科大学附属第二医院']
start_position: [106, 162]
end_position: [114, 173]
is_impossible: False
is_yes: False
is_no: False
labels: ['O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'I', 'I', 'I', 'I', 'I', 'I', 'I', 'I', 'I', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'I', 'I', 'I', 'I', 'I', 'I', 'I', 'I', 'I', 'I', 'I', 'I', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O']
>
<unique_id: 1000000000
example_index: 0
doc_span_index: 0
tokens: ['[CLS]', '伤', '者', '被', '送', '往', '哪', '些', '医', '院', '?', '[SEP]', '经', '审', '理', '查', '明', ':', '2', '0', '1', '4', '年', '8', '月', '6', '日', '上', '午', '约', '7', '点', ',', '原', '告', '黄', 'x', '0', '来', '到', '被', '告', '胡', 'x', '3', '经', '营', '的', '水', '泥', '店', '内', '购', '买', '两', '包', '水', '泥', ',', '由', '原', '告', '及', '其', '临', '时', '雇', '来', '的', '三', '轮', '车', '夫', '自', '行', '负', '责', '搬', '运', '水', '泥', '。', '在', '搬', '运', '过', '程', '中', ',', '被', '告', '店', '内', '堆', '放', '的', '水', '泥', '倒', '塌', '下', '来', '将', '原', '告', '砸', '伤', '。', '当', '天', '上', '午', ',', '原', '告', '被', '送', '往', '乐', '清', '市', '第', '三', '人', '民', '医', '院', ',', '经', '门', '诊', '检', '查', '诊', '断', '为', '[UNK]', '腰', '2', '、', '3', '椎', '体', '骨', '折', '、', '左', '内', '踝', '骨', '折', '[UNK]', ',', '共', '支', '出', '医', '疗', '费', '6', '7', '1', '元', '。', '因', '病', '情', '严', '重', ',', '当', '天', '转', '入', '温', '州', '医', '科', '大', '学', '附', '属', '第', '二', '医', '院', '进', '行', '住', '院', '治', '疗', ',', '于', '2', '0', '1', '4', '年', '8', '月', '1', '1', '日', '在', '全', '麻', '下', '行', '[UNK]', '腰', '椎', '骨', '折', '切', '复', '减', '压', '内', '固', '定', '术', '[UNK]', '和', '[UNK]', '左', '内', '踝', '骨', '折', '内', '固', '定', '术', '[UNK]', ',', '于', '2', '0', '1', '4', '年', '8', '月', '2', '1', '日', '出', '院', ',', '共', '计', '支', '出', '住', '院', '费', '用', '5', '4', '5', '0', '5', '.', '5', '7', '元', '。', '经', '本', '院', '委', '托', '温', '州', '天', '正', '司', '法', '鉴', '定', '所', '鉴', '定', ',', '原', '告', '的', '残', '疾', '程', '度', '为', '九', '级', ',', '营', '养', '期', '限', '评', '定', '为', '3', '个', '月', '(', '从', '受', '伤', '之', '日', '起', '计', '算', ')', ',', '二', '期', '手', '术', '(', '拆', '除', '内', '固', '定', ')', '的', '营', '养', '期', '限', '评', '定', '为', '半', '个', '月', ',', '后', '续', '治', '疗', '费', '约', '需', '1', '0', '0', '0', '0', '元', '或', '按', '实', '际', '合', '理', '发', '生', '费', '用', '为', '准', '。', '原', '告', '住', '院', '治', '疗', '及', '出', '院', '后', ',', '被', '告', '胡', 'x', '3', '及', '其', '儿', '子', '曾', '去', '探', '望', '并', '送', '上', '营', '养', '品', '。', '双', '方', '就', '赔', '偿', '事', '宜', '无', '法', '达', '成', '一', '致', '意', '见', ',', '故', '涉', '诉', '。', '以', '上', '事', '实', ',', '有', '原', '告', '身', '份', '证', '、', '两', '被', '告', '户', '籍', '证', '明', '、', '门', '诊', '病', '历', '及', '发', '票', '六', '份', '、', '住', '院', '费', '用', '发', '票', '及', '清', '单', '、', '出', '院', '记', '录', '、', '医', '疗', '证', '明', '书', '、', '司', '法', '鉴', '定', '意', '见', '书', '、', '鉴', '定', '费', '发', '票', '及', '庭', '审', '笔', '录', '在', '案', '佐', '证', ',', '本', '院', '予', '以', '认', '定', '。', '原', '告', '提', '供', '的', '视', '频', '资', '料', ',', '可', '以', '证', '[SEP]']
token_to_orig_map: {12: 0, 13: 1, 14: 2, 15: 3, 16: 4, 17: 5, 18: 6, 19: 7, 20: 8, 21: 9, 22: 10, 23: 11, 24: 12, 25: 13, 26: 14, 27: 15, 28: 16, 29: 17, 30: 18, 31: 19, 32: 20, 33: 21, 34: 22, 35: 23, 36: 24, 37: 25, 38: 26, 39: 27, 40: 28, 41: 29, 42: 30, 43: 31, 44: 32, 45: 33, 46: 34, 47: 35, 48: 36, 49: 37, 50: 38, 51: 39, 52: 40, 53: 41, 54: 42, 55: 43, 56: 44, 57: 45, 58: 46, 59: 47, 60: 48, 61: 49, 62: 50, 63: 51, 64: 52, 65: 53, 66: 54, 67: 55, 68: 56, 69: 57, 70: 58, 71: 59, 72: 60, 73: 61, 74: 62, 75: 63, 76: 64, 77: 65, 78: 66, 79: 67, 80: 68, 81: 69, 82: 70, 83: 71, 84: 72, 85: 73, 86: 74, 87: 75, 88: 76, 89: 77, 90: 78, 91: 79, 92: 80, 93: 81, 94: 82, 95: 83, 96: 84, 97: 85, 98: 86, 99: 87, 100: 88, 101: 89, 102: 90, 103: 91, 104: 92, 105: 93, 106: 94, 107: 95, 108: 96, 109: 97, 110: 98, 111: 99, 112: 100, 113: 101, 114: 102, 115: 103, 116: 104, 117: 105, 118: 106, 119: 107, 120: 108, 121: 109, 122: 110, 123: 111, 124: 112, 125: 113, 126: 114, 127: 115, 128: 116, 129: 117, 130: 118, 131: 119, 132: 120, 133: 121, 134: 122, 135: 123, 136: 124, 137: 125, 138: 126, 139: 127, 140: 128, 141: 129, 142: 130, 143: 131, 144: 132, 145: 133, 146: 134, 147: 135, 148: 136, 149: 137, 150: 138, 151: 139, 152: 140, 153: 141, 154: 142, 155: 143, 156: 144, 157: 145, 158: 146, 159: 147, 160: 148, 161: 149, 162: 150, 163: 151, 164: 152, 165: 153, 166: 154, 167: 155, 168: 156, 169: 157, 170: 158, 171: 159, 172: 160, 173: 161, 174: 162, 175: 163, 176: 164, 177: 165, 178: 166, 179: 167, 180: 168, 181: 169, 182: 170, 183: 171, 184: 172, 185: 173, 186: 174, 187: 175, 188: 176, 189: 177, 190: 178, 191: 179, 192: 180, 193: 181, 194: 182, 195: 183, 196: 184, 197: 185, 198: 186, 199: 187, 200: 188, 201: 189, 202: 190, 203: 191, 204: 192, 205: 193, 206: 194, 207: 195, 208: 196, 209: 197, 210: 198, 211: 199, 212: 200, 213: 201, 214: 202, 215: 203, 216: 204, 217: 205, 218: 206, 219: 207, 220: 208, 221: 209, 222: 210, 223: 211, 224: 212, 225: 213, 226: 214, 227: 215, 228: 216, 229: 217, 230: 218, 231: 219, 232: 220, 233: 221, 234: 222, 235: 223, 236: 224, 237: 225, 238: 226, 239: 227, 240: 228, 241: 229, 242: 230, 243: 231, 244: 232, 245: 233, 246: 234, 247: 235, 248: 236, 249: 237, 250: 238, 251: 239, 252: 240, 253: 241, 254: 242, 255: 243, 256: 244, 257: 245, 258: 246, 259: 247, 260: 248, 261: 249, 262: 250, 263: 251, 264: 252, 265: 253, 266: 254, 267: 255, 268: 256, 269: 257, 270: 258, 271: 259, 272: 260, 273: 261, 274: 262, 275: 263, 276: 264, 277: 265, 278: 266, 279: 267, 280: 268, 281: 269, 282: 270, 283: 271, 284: 272, 285: 273, 286: 274, 287: 275, 288: 276, 289: 277, 290: 278, 291: 279, 292: 280, 293: 281, 294: 282, 295: 283, 296: 284, 297: 285, 298: 286, 299: 287, 300: 288, 301: 289, 302: 290, 303: 291, 304: 292, 305: 293, 306: 294, 307: 295, 308: 296, 309: 297, 310: 298, 311: 299, 312: 300, 313: 301, 314: 302, 315: 303, 316: 304, 317: 305, 318: 306, 319: 307, 320: 308, 321: 309, 322: 310, 323: 311, 324: 312, 325: 313, 326: 314, 327: 315, 328: 316, 329: 317, 330: 318, 331: 319, 332: 320, 333: 321, 334: 322, 335: 323, 336: 324, 337: 325, 338: 326, 339: 327, 340: 328, 341: 329, 342: 330, 343: 331, 344: 332, 345: 333, 346: 334, 347: 335, 348: 336, 349: 337, 350: 338, 351: 339, 352: 340, 353: 341, 354: 342, 355: 343, 356: 344, 357: 345, 358: 346, 359: 347, 360: 348, 361: 349, 362: 350, 363: 351, 364: 352, 365: 353, 366: 354, 367: 355, 368: 356, 369: 357, 370: 358, 371: 359, 372: 360, 373: 361, 374: 362, 375: 363, 376: 364, 377: 365, 378: 366, 379: 367, 380: 368, 381: 369, 382: 370, 383: 371, 384: 372, 385: 373, 386: 374, 387: 375, 388: 376, 389: 377, 390: 378, 391: 379, 392: 380, 393: 381, 394: 382, 395: 383, 396: 384, 397: 385, 398: 386, 399: 387, 400: 388, 401: 389, 402: 390, 403: 391, 404: 392, 405: 393, 406: 394, 407: 395, 408: 396, 409: 397, 410: 398, 411: 399, 412: 400, 413: 401, 414: 402, 415: 403, 416: 404, 417: 405, 418: 406, 419: 407, 420: 408, 421: 409, 422: 410, 423: 411, 424: 412, 425: 413, 426: 414, 427: 415, 428: 416, 429: 417, 430: 418, 431: 419, 432: 420, 433: 421, 434: 422, 435: 423, 436: 424, 437: 425, 438: 426, 439: 427, 440: 428, 441: 429, 442: 430, 443: 431, 444: 432, 445: 433, 446: 434, 447: 435, 448: 436, 449: 437, 450: 438, 451: 439, 452: 440, 453: 441, 454: 442, 455: 443, 456: 444, 457: 445, 458: 446, 459: 447, 460: 448, 461: 449, 462: 450, 463: 451, 464: 452, 465: 453, 466: 454, 467: 455, 468: 456, 469: 457, 470: 458, 471: 459, 472: 460, 473: 461, 474: 462, 475: 463, 476: 464, 477: 465, 478: 466, 479: 467, 480: 468, 481: 469, 482: 470, 483: 471, 484: 472, 485: 473, 486: 474, 487: 475, 488: 476, 489: 477, 490: 478, 491: 479, 492: 480, 493: 481, 494: 482, 495: 483, 496: 484, 497: 485, 498: 486, 499: 487, 500: 488, 501: 489, 502: 490, 503: 491, 504: 492, 505: 493, 506: 494, 507: 495, 508: 496, 509: 497, 510: 498}
token_is_max_context: {12: True, 13: True, 14: True, 15: True, 16: True, 17: True, 18: True, 19: True, 20: True, 21: True, 22: True, 23: True, 24: True, 25: True, 26: True, 27: True, 28: True, 29: True, 30: True, 31: True, 32: True, 33: True, 34: True, 35: True, 36: True, 37: True, 38: True, 39: True, 40: True, 41: True, 42: True, 43: True, 44: True, 45: True, 46: True, 47: True, 48: True, 49: True, 50: True, 51: True, 52: True, 53: True, 54: True, 55: True, 56: True, 57: True, 58: True, 59: True, 60: True, 61: True, 62: True, 63: True, 64: True, 65: True, 66: True, 67: True, 68: True, 69: True, 70: True, 71: True, 72: True, 73: True, 74: True, 75: True, 76: True, 77: True, 78: True, 79: True, 80: True, 81: True, 82: True, 83: True, 84: True, 85: True, 86: True, 87: True, 88: True, 89: True, 90: True, 91: True, 92: True, 93: True, 94: True, 95: True, 96: True, 97: True, 98: True, 99: True, 100: True, 101: True, 102: True, 103: True, 104: True, 105: True, 106: True, 107: True, 108: True, 109: True, 110: True, 111: True, 112: True, 113: True, 114: True, 115: True, 116: True, 117: True, 118: True, 119: True, 120: True, 121: True, 122: True, 123: True, 124: True, 125: True, 126: True, 127: True, 128: True, 129: True, 130: True, 131: True, 132: True, 133: True, 134: True, 135: True, 136: True, 137: True, 138: True, 139: True, 140: True, 141: True, 142: True, 143: True, 144: True, 145: True, 146: True, 147: True, 148: True, 149: True, 150: True, 151: True, 152: True, 153: True, 154: True, 155: True, 156: True, 157: True, 158: True, 159: True, 160: True, 161: True, 162: True, 163: True, 164: True, 165: True, 166: True, 167: True, 168: True, 169: True, 170: True, 171: True, 172: True, 173: True, 174: True, 175: True, 176: True, 177: True, 178: True, 179: True, 180: True, 181: True, 182: True, 183: True, 184: True, 185: True, 186: True, 187: True, 188: True, 189: True, 190: True, 191: True, 192: True, 193: True, 194: True, 195: True, 196: True, 197: True, 198: True, 199: True, 200: True, 201: True, 202: True, 203: True, 204: True, 205: True, 206: True, 207: True, 208: True, 209: True, 210: True, 211: True, 212: True, 213: True, 214: True, 215: True, 216: True, 217: True, 218: True, 219: True, 220: True, 221: True, 222: True, 223: True, 224: True, 225: True, 226: True, 227: True, 228: True, 229: True, 230: True, 231: True, 232: True, 233: True, 234: True, 235: True, 236: True, 237: True, 238: True, 239: True, 240: True, 241: True, 242: True, 243: True, 244: True, 245: True, 246: True, 247: True, 248: True, 249: True, 250: True, 251: True, 252: True, 253: True, 254: True, 255: True, 256: True, 257: True, 258: True, 259: True, 260: True, 261: True, 262: True, 263: True, 264: True, 265: True, 266: True, 267: True, 268: True, 269: True, 270: True, 271: True, 272: True, 273: True, 274: True, 275: True, 276: True, 277: True, 278: True, 279: True, 280: True, 281: True, 282: True, 283: True, 284: True, 285: True, 286: True, 287: True, 288: True, 289: True, 290: True, 291: True, 292: True, 293: True, 294: True, 295: True, 296: True, 297: True, 298: True, 299: True, 300: True, 301: True, 302: True, 303: True, 304: True, 305: True, 306: True, 307: True, 308: True, 309: True, 310: True, 311: True, 312: True, 313: True, 314: True, 315: True, 316: True, 317: True, 318: True, 319: True, 320: True, 321: True, 322: True, 323: True, 324: True, 325: True, 326: True, 327: True, 328: True, 329: True, 330: True, 331: True, 332: False, 333: False, 334: False, 335: False, 336: False, 337: False, 338: False, 339: False, 340: False, 341: False, 342: False, 343: False, 344: False, 345: False, 346: False, 347: False, 348: False, 349: False, 350: False, 351: False, 352: False, 353: False, 354: False, 355: False, 356: False, 357: False, 358: False, 359: False, 360: False, 361: False, 362: False, 363: False, 364: False, 365: False, 366: False, 367: False, 368: False, 369: False, 370: False, 371: False, 372: False, 373: False, 374: False, 375: False, 376: False, 377: False, 378: False, 379: False, 380: False, 381: False, 382: False, 383: False, 384: False, 385: False, 386: False, 387: False, 388: False, 389: False, 390: False, 391: False, 392: False, 393: False, 394: False, 395: False, 396: False, 397: False, 398: False, 399: False, 400: False, 401: False, 402: False, 403: False, 404: False, 405: False, 406: False, 407: False, 408: False, 409: False, 410: False, 411: False, 412: False, 413: False, 414: False, 415: False, 416: False, 417: False, 418: False, 419: False, 420: False, 421: False, 422: False, 423: False, 424: False, 425: False, 426: False, 427: False, 428: False, 429: False, 430: False, 431: False, 432: False, 433: False, 434: False, 435: False, 436: False, 437: False, 438: False, 439: False, 440: False, 441: False, 442: False, 443: False, 444: False, 445: False, 446: False, 447: False, 448: False, 449: False, 450: False, 451: False, 452: False, 453: False, 454: False, 455: False, 456: False, 457: False, 458: False, 459: False, 460: False, 461: False, 462: False, 463: False, 464: False, 465: False, 466: False, 467: False, 468: False, 469: False, 470: False, 471: False, 472: False, 473: False, 474: False, 475: False, 476: False, 477: False, 478: False, 479: False, 480: False, 481: False, 482: False, 483: False, 484: False, 485: False, 486: False, 487: False, 488: False, 489: False, 490: False, 491: False, 492: False, 493: False, 494: False, 495: False, 496: False, 497: False, 498: False, 499: False, 500: False, 501: False, 502: False, 503: False, 504: False, 505: False, 506: False, 507: False, 508: False, 509: False, 510: False}
input_ids: [101, 839, 5442, 6158, 6843, 2518, 1525, 763, 1278, 7368, 8043, 102, 5307, 2144, 4415, 3389, 3209, 131, 123, 121, 122, 125, 2399, 129, 3299, 127, 3189, 677, 1286, 5276, 128, 4157, 117, 1333, 1440, 7942, 166, 121, 3341, 1168, 6158, 1440, 5529, 166, 124, 5307, 5852, 4638, 3717, 3799, 2421, 1079, 6579, 743, 697, 1259, 3717, 3799, 117, 4507, 1333, 1440, 1350, 1071, 707, 3198, 7416, 3341, 4638, 676, 6762, 6756, 1923, 5632, 6121, 6566, 6569, 3021, 6817, 3717, 3799, 511, 1762, 3021, 6817, 6814, 4923, 704, 117, 6158, 1440, 2421, 1079, 1831, 3123, 4638, 3717, 3799, 948, 1847, 678, 3341, 2199, 1333, 1440, 4790, 839, 511, 2496, 1921, 677, 1286, 117, 1333, 1440, 6158, 6843, 2518, 727, 3926, 2356, 5018, 676, 782, 3696, 1278, 7368, 117, 5307, 7305, 6402, 3466, 3389, 6402, 3171, 711, 100, 5587, 123, 510, 124, 3491, 860, 7755, 2835, 510, 2340, 1079, 6674, 7755, 2835, 100, 117, 1066, 3118, 1139, 1278, 4545, 6589, 127, 128, 122, 1039, 511, 1728, 4567, 2658, 698, 7028, 117, 2496, 1921, 6760, 1057, 3946, 2336, 1278, 4906, 1920, 2110, 7353, 2247, 5018, 753, 1278, 7368, 6822, 6121, 857, 7368, 3780, 4545, 117, 754, 123, 121, 122, 125, 2399, 129, 3299, 122, 122, 3189, 1762, 1059, 7937, 678, 6121, 100, 5587, 3491, 7755, 2835, 1147, 1908, 1121, 1327, 1079, 1743, 2137, 3318, 100, 1469, 100, 2340, 1079, 6674, 7755, 2835, 1079, 1743, 2137, 3318, 100, 117, 754, 123, 121, 122, 125, 2399, 129, 3299, 123, 122, 3189, 1139, 7368, 117, 1066, 6369, 3118, 1139, 857, 7368, 6589, 4500, 126, 125, 126, 121, 126, 119, 126, 128, 1039, 511, 5307, 3315, 7368, 1999, 2805, 3946, 2336, 1921, 3633, 1385, 3791, 7063, 2137, 2792, 7063, 2137, 117, 1333, 1440, 4638, 3655, 4565, 4923, 2428, 711, 736, 5277, 117, 5852, 1075, 3309, 7361, 6397, 2137, 711, 124, 702, 3299, 113, 794, 1358, 839, 722, 3189, 6629, 6369, 5050, 114, 117, 753, 3309, 2797, 3318, 113, 2858, 7370, 1079, 1743, 2137, 114, 4638, 5852, 1075, 3309, 7361, 6397, 2137, 711, 1288, 702, 3299, 117, 1400, 5330, 3780, 4545, 6589, 5276, 7444, 122, 121, 121, 121, 121, 1039, 2772, 2902, 2141, 7354, 1394, 4415, 1355, 4495, 6589, 4500, 711, 1114, 511, 1333, 1440, 857, 7368, 3780, 4545, 1350, 1139, 7368, 1400, 117, 6158, 1440, 5529, 166, 124, 1350, 1071, 1036, 2094, 3295, 1343, 2968, 3307, 2400, 6843, 677, 5852, 1075, 1501, 511, 1352, 3175, 2218, 6608, 985, 752, 2139, 3187, 3791, 6809, 2768, 671, 5636, 2692, 6224, 117, 3125, 3868, 6401, 511, 809, 677, 752, 2141, 117, 3300, 1333, 1440, 6716, 819, 6395, 510, 697, 6158, 1440, 2787, 5093, 6395, 3209, 510, 7305, 6402, 4567, 1325, 1350, 1355, 4873, 1063, 819, 510, 857, 7368, 6589, 4500, 1355, 4873, 1350, 3926, 1296, 510, 1139, 7368, 6381, 2497, 510, 1278, 4545, 6395, 3209, 741, 510, 1385, 3791, 7063, 2137, 2692, 6224, 741, 510, 7063, 2137, 6589, 1355, 4873, 1350, 2431, 2144, 5011, 2497, 1762, 3428, 858, 6395, 117, 3315, 7368, 750, 809, 6371, 2137, 511, 1333, 1440, 2990, 897, 4638, 6228, 7574, 6598, 3160, 117, 1377, 809, 6395, 102]
input_mask: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
start_position: [118, 174, 0]
end_position: [126, 185, 0]
is_impossible: False
unk_mask: [0]
yes_mask: [0]
no_mask: [0]
answer_mask: [1, 1, 0]
answer_num: 2
>
====================================================================================================
<qas_id: 3
question_text: 伤者被送往哪些医院?
doc_tokens: ['经', '审', '理', '查', '明', ':', '2', '0', '1', '4', '年', '8', '月', '6', '日', '上', '午', '约', '7', '点', ',', '原', '告', '黄', 'x', '0', '来', '到', '被', '告', '胡', 'x', '3', '经', '营', '的', '水', '泥', '店', '内', '购', '买', '两', '包', '水', '泥', ',', '由', '原', '告', '及', '其', '临', '时', '雇', '来', '的', '三', '轮', '车', '夫', '自', '行', '负', '责', '搬', '运', '水', '泥', '。', '在', '搬', '运', '过', '程', '中', ',', '被', '告', '店', '内', '堆', '放', '的', '水', '泥', '倒', '塌', '下', '来', '将', '原', '告', '砸', '伤', '。', '当', '天', '上', '午', ',', '原', '告', '被', '送', '往', '乐', '清', '市', '第', '三', '人', '民', '医', '院', ',', '经', '门', '诊', '检', '查', '诊', '断', '为', '"', '腰', '2', '、', '3', '椎', '体', '骨', '折', '、', '左', '内', '踝', '骨', '折', '"', ',', '共', '支', '出', '医', '疗', '费', '6', '7', '1', '元', '。', '因', '病', '情', '严', '重', ',', '当', '天', '转', '入', '温', '州', '医', '科', '大', '学', '附', '属', '第', '二', '医', '院', '进', '行', '住', '院', '治', '疗', ',', '于', '2', '0', '1', '4', '年', '8', '月', '1', '1', '日', '在', '全', '麻', '下', '行', '"', '腰', '椎', '骨', '折', '切', '复', '减', '压', '内', '固', '定', '术', '"', '和', '"', '左', '内', '踝', '骨', '折', '内', '固', '定', '术', '"', ',', '于', '2', '0', '1', '4', '年', '8', '月', '2', '1', '日', '出', '院', ',', '共', '计', '支', '出', '住', '院', '费', '用', '5', '4', '5', '0', '5', '.', '5', '7', '元', '。', '经', '本', '院', '委', '托', '温', '州', '天', '正', '司', '法', '鉴', '定', '所', '鉴', '定', ',', '原', '告', '的', '残', '疾', '程', '度', '为', '九', '级', ',', '营', '养', '期', '限', '评', '定', '为', '3', '个', '月', '(', '从', '受', '伤', '之', '日', '起', '计', '算', ')', ',', '二', '期', '手', '术', '(', '拆', '除', '内', '固', '定', ')', '的', '营', '养', '期', '限', '评', '定', '为', '半', '个', '月', ',', '后', '续', '治', '疗', '费', '约', '需', '1', '0', '0', '0', '0', '元', '或', '按', '实', '际', '合', '理', '发', '生', '费', '用', '为', '准', '。', '原', '告', '住', '院', '治', '疗', '及', '出', '院', '后', ',', '被', '告', '胡', 'x', '3', '及', '其', '儿', '子', '曾', '去', '探', '望', '并', '送', '上', '营', '养', '品', '。', '双', '方', '就', '赔', '偿', '事', '宜', '无', '法', '达', '成', '一', '致', '意', '见', ',', '故', '涉', '诉', '。', '以', '上', '事', '实', ',', '有', '原', '告', '身', '份', '证', '、', '两', '被', '告', '户', '籍', '证', '明', '、', '门', '诊', '病', '历', '及', '发', '票', '六', '份', '、', '住', '院', '费', '用', '发', '票', '及', '清', '单', '、', '出', '院', '记', '录', '、', '医', '疗', '证', '明', '书', '、', '司', '法', '鉴', '定', '意', '见', '书', '、', '鉴', '定', '费', '发', '票', '及', '庭', '审', '笔', '录', '在', '案', '佐', '证', ',', '本', '院', '予', '以', '认', '定', '。', '原', '告', '提', '供', '的', '视', '频', '资', '料', ',', '可', '以', '证', '明', '被', '告', '胡', 'x', '3', '确', '认', '原', '告', '在', '其', '经', '营', '的', '水', '泥', '店', '内', '被', '水', '泥', '砸', '伤', '的', '事', '实', ',', '故', '本', '院', '予', '以', '认', '定', ';', '被', '告', '提', '供', '的', '视', '频', '资', '料', ',', '虽', '然', '可', '以', '显', '示', '其', '经', '营', '的', '水', '泥', '店', '内', '有', '两', '处', '位', '置', '张', '贴', '警', '示', '标', '语', ',', '但', '难', '以', '达', '到', '被', '告', '主', '张', '的', '其', '已', '尽', '到', '安', '全', '注', '意', '义', '务', ',', '对', '本', '案', '事', '故', '的', '发', '生', '不', '存', '在', '过', '错', '的', '待', '证', '事', '实', '的', '证', '明', '标', '准', ',', '故', '本', '院', '不', '予', '采', '纳', '。']
orig_answer_text: ['乐清市第三人民医院', '温州医科大学附属第二医院']
start_position: [106, 162]
end_position: [114, 173]
is_impossible: False
is_yes: False
is_no: False
labels: ['O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'I', 'I', 'I', 'I', 'I', 'I', 'I', 'I', 'I', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'I', 'I', 'I', 'I', 'I', 'I', 'I', 'I', 'I', 'I', 'I', 'I', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', '
标签:
0/300
全部评论0
0/300