migalkin / StarE

EMNLP 2020: Message Passing for Hyper-Relational Knowledge Graphs
MIT License
87 stars 17 forks source link

A typo? #2

Closed Bin-Go2 closed 3 years ago

Bin-Go2 commented 3 years ago

https://github.com/migalkin/StarE/blob/46c63d5a670cd2421fef1bc376114e7a5e8d826c/loops/sampler.py#L72 Hi, I am not sure if there is an error? the qual maybe s[3:]?

migalkin commented 3 years ago

Hi, although the issue is closed, I'd give more details: Original statements arrive in the form

s, r, o, qr1, qv1, qr2, qv2, ...

We use 1-N scoring procedure which implies training not on particular statements, but on data points:

[s, r, qr1, qv1, qr2, qv2, ...] : [o, ... (and other objects for this combination of s,r, and qualifiers)] 

That's why in the sampler we start slicing qualifiers already from s[2:]

Bin-Go2 commented 3 years ago

After looking into the codes carefully, I got it, But still thanks for your patient explanations. :)