e-bug / pascal

[ACL 2020] Code and data for our paper "Enhancing Machine Translation with Dependency-Aware Self-Attention"
https://www.aclweb.org/anthology/2020.acl-main.147/
MIT License
22 stars 10 forks source link

I have a question about the vector p of paper, #3

Closed xinsheng44 closed 3 years ago

xinsheng44 commented 3 years ago

Hello, I have a question about the vector p of paper, how does a sentence get the dependency relationship of its parents? Is this arrow pointing artificially labeled? 图片

e-bug commented 3 years ago

We use a parser (e.g. CoreNLP) to annotate each sentence with its dependency tree.

When the parent is split into multiple subwords, we use its middle position as described in the paper. Code to do this is here.