Closed darvid7 closed 6 years ago
You should use grep -e "/m/015qsq\t/m/.\t/film/film/country" not "grep -e "/m/015qsq\t/m/.\t/film/film/language" " . And the path (748, 1327) is in train.txt as " /m/015qsq-->/film/film/country-->/m/03rjj-->/location/country/official_language-->/m/02bjrlw"
Ah thank you so much! Thank you for your time! silly mistake by me.
Hi! I ran
PCRA.py
and got this as part of the output oftrain_pra_sample.txt
My understanding of this is that the has the entities
/m/015qsq
,/m/02bjrlw
an a single relation id935
. The first item in the second line contains the number of relation paths joining the entities/m/015qsq
&/m/02bjrlw
which is 4.The next sections hold the number of relations along a single relation path joining
/m/015qsq
and/m/02bjrlw
, eg:2 748 1327 0.375
. This means that this relation path has two relations (748, 1327) and a confidence of 0.375.This would mean that this path exists in the FB15K dataset
/m/015qsq -relation with id 748-> missing entity -relation with id 1327-> /m/02bjrlw/
which is the same as/m/015qsq -/film/film/country-> missing entity -/location/country/official_language-> /m/02bjrlw/
from
relation2id.txt
I am trying to construct the path, or find the missing entity. However, when investigating the
test.txt
,train.txt
andvalid.txt
triple files I could not find a triple which had/m/015qsq missing entity /film/film/country
andmissing entity /m/02bjrlw/ /location/country/official_language
Note: in
test.txt
,train.txt
andvalid.txt
the format ishead \t tail \t relation
.I searched using this command
grep -e "/m/015qsq\t/m/.*\t/film/film/language" test.txt train.txt valid.txt
which outputs the followingso our candidates for the missing entity are
/m/02bjrlw
,/m/02h40lc
and/m/06nm1
.to find which one is the bridging entity I ran the following but there were no matches.
Am I missing something? How can I construct the paths based on the entities and relation paths produced by PCRA?
Thanks for your time.