Thanks to visit codestin.com
Credit goes to github.com

Skip to content

关于Label Mapping #14

@huangjia2019

Description

@huangjia2019

您好,

根据我对论文的理解,数据集的label应该是类似于'Michael', 'John'这样的名词,然而,再调试时,我发现train_transformer.py的389行之后,label_token_map从下表
'I-PER':['Michael', 'John', 'David', 'Thomas', 'Martin', 'Paul']
'I-ORG':['Corp', 'Inc', 'Commission', 'Union', 'Bank', 'Party']
'I-LOC':['England', 'Germany', 'Australia', 'France', 'Russia', 'Italy']
'I-MISC':['Palestinians', 'Russian', 'Chinese', 'Dutch', 'Russians', 'English']
变成了下面4个新字符
'I-PER':'I-PER'
'I-ORG':'I-ORG'
'I-LOC':'I-LOC'
'I-MISC':'I-MISC'
这4个新字符tokenize之后就变成 {28997: 'I-PER', 28998: 'I-ORG', 28999: 'I-LOC', 28996: 'I-MISC'},这样,在训练过程中,所有实体的token所对应的label都被转换为28997,28998,28999,28996四者其中之一。这似乎与论文的label word engineering的思路不符。

请指教一下应该如何转换为论文中所说的discrete word或virtual word,作为Label。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions