From the Freebase dump available here, I need to find the relation between two entities.
Eg.
entity1 = "barack_obama"
entity2 = "USA"
get_relation_from_freebase(entity1, entity2) -> "President"
As of 2018, is there a straightforward way to do that from the RDF dump? If I have around 10k unique entity pairs, what's the most efficient way to get the relation, if it is available in Freebase?
Note : I'm trying to align a large corpus with freebase relations, to generate training sample for relation extraction task.
Also, I have looked at following questions - here and here, I can create a subset for few domains but still haven't figured out a good way to retrieve relations.