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

请问我怎么在semeval数据集上运行您的代码? #20

Closed
zlh-source opened this issue Mar 16, 2020 · 5 comments
Closed

请问我怎么在semeval数据集上运行您的代码? #20

zlh-source opened this issue Mar 16, 2020 · 5 comments

Comments

@zlh-source
Copy link

zlh-source commented Mar 16, 2020

您好,
我发现项目里有关于semeval的数据集和相关代码,但是在README里面并没有提及关于semeval的数据集和相关代码的任何事情。
因此,我想问一下,如果要在semeval数据集上运行您的代码,需要做哪些事情?模型在semeval数据集上的得分情况怎么样?

@Cartus
Copy link
Owner

Cartus commented Mar 16, 2020

Hi,

Readme for Semeval dataset is under the semeval folder.

Feel free to ask if it does not help.

@zlh-source
Copy link
Author

zlh-source commented Mar 17, 2020

好的,谢谢您。我刚刚已经把它运行起来了。

下面我对句子“The system as described above has its greatest application in an arrayed configuration of antenna elements .”生成依存树的代码和生成结果。但是我发现和您数据集里面已经生成的数据不一样。
我的生成结果是个三元组,请问您数据集里面样本属性"stanford_head"是怎么生成的?
with StanfordCoreNLP(r'stanford-corenlp-full-2018-10-05',lang="en") as nlp: dp = nlp.dependency_parse("The system as described above has its greatest application in an arrayed configuration of antenna elements .") print(dp)

这是我的生成结果:
image

这是您数据集里面这个句子的信息:
image

我第一次使用Stanford CoreNLP,不是很理解。劳烦您帮我解释一下"stanford_head"是怎么由三元组转化过来的?
十分感谢!

@Cartus
Copy link
Owner

Cartus commented Mar 17, 2020

Basically, u need to write your own preprocessing code.

The head list means the head of the token. Here [the, system, as, described, above, has, ...] [2, 6, 2, 3, 4, 0, ...]
For example, the head of the first token "the" is index 2, which means the second token "system" is the head of "the". Similarly, the head of the token "system" is index 6, which is the token "has". The index of "has" is 0, which means it is the root node of the dependency tree.

For the usage of the Stanford CoreNLP, I suggest you to read their official document.

@zlh-source
Copy link
Author

好的。谢谢您的回复。对我帮助很大!

@Cartus
Copy link
Owner

Cartus commented Mar 17, 2020

No problem. I will close this issue, feel free to reopen it if you have further questions.

@Cartus Cartus closed this as completed Mar 17, 2020
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