Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

实体嵌套是只能解同类型的实体嵌套问题吗? #106

Open
yuye2133 opened this issue Apr 10, 2024 · 0 comments
Open

实体嵌套是只能解同类型的实体嵌套问题吗? #106

yuye2133 opened this issue Apr 10, 2024 · 0 comments

Comments

@yuye2133
Copy link

yuye2133 commented Apr 10, 2024

for subject in subjects:
    label = subject[0]
    start = subject[1]
    end = subject[2]
    start_ids[start] = label2id[label]
    end_ids[end] = label2id[label]
    subjects_id.append((label2id[label], start, end))

看这段代码,start_ids和end_ids都只有1份数据,所以一个字如果同时属于两种实体类型,会有一种被覆盖掉,比如:《苏轼传》,其中包含实体:苏轼【PER】,苏轼传【BOOK】,那么对于“苏”这个字,其实是否有两种状态的,因为第一种状态会被第二种状态覆盖
不知道是否理解正确

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant