Cartus / AGGCN

Attention Guided Graph Convolutional Networks for Relation Extraction (authors' PyTorch implementation for the ACL19 paper)
MIT License
432 stars 88 forks source link

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

Closed zlh-source closed 4 years ago

zlh-source commented 4 years ago

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

Cartus commented 4 years ago

Hi,

Readme for Semeval dataset is under the semeval folder.

Feel free to ask if it does not help.

zlh-source commented 4 years ago

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

下面我对句子“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 commented 4 years ago

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 commented 4 years ago

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

Cartus commented 4 years ago

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