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

gridlabels的构建 #170

Open
wuxiaohui0 opened this issue Jun 7, 2024 · 1 comment
Open

gridlabels的构建 #170

wuxiaohui0 opened this issue Jun 7, 2024 · 1 comment

Comments

@wuxiaohui0
Copy link

            for entity in d:
                e_start, e_end, e_type = entity[0], entity[1] + 1, entity[-1]
                if e_end >= maxlen - 2:
                    continue
                index = list(range(e_start, e_end))
                for i in range(len(index)):
                    if i + 1 >= len(index):
                        break
                    _grid_labels[index[i], index[i + 1]] = 1
                _grid_labels[index[-1], index[0]] = categories[e_type]

想问一下作者这样吧上三角设置为开始和结束位置设置为1,把下三角的对称位置却设置为类型对应的标签,这样做的目的是什么

@Tongjilibo
Copy link
Owner

我先看了下原作者的repo确认了下没有实现错误;其次我感觉上三角是开始和结束位置中间所有的设置为1,下三角只是实体起终点位置设置为实体类型,具体理论我还没复看,如果还有疑问我这边再细看下

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

2 participants