How to Map Freebase to Wikipedia in Python

168 Views Asked by At

I met a problem when trying to map the Freebase to Wikipedia, due to the deprecation of the Freebase. I know there is a method by downloading the Freebase Dump and replace the Freebase to Wikipedia, but it might not be realised due to the large size of data. So is there any other method to map the Freebase to Wikipedia? Thanks!

1

There are 1 best solutions below

0
user15517071 On

You can make use of Wikidata which provides a Freebase ID property.

A SPARQL query like this looks up the corresponding article on English Wikipedia with the Freebase ID "/m/0154j".

SELECT
  ?article
WHERE 
{
  ?article schema:about ?item;
      schema:isPartOf <https://en.wikipedia.org/> .
  ?item wdt:P646 "/m/0154j";
}

Try it