I've linked phrases in texts to entities in Wikipedia:
Going over the bridge, coming from Aliante Casino, you cant miss the nice
view of the href="http://en.wikipedia.org/wiki/Waterfall">waterfall</a>
that is at the forefron
Now, I would like to get raw text of each linked Wikipedia page. Since the number of Wikipedia pages to process is around 20k, I would like to perform the process offline.
I've downloaded latest Wikipedia dump in XML and extracted raw test using Wikiextractor, here's one line from it:
{
"id": "54551",
"url": "https://en.wikipedia.org/wiki?curid=54551",
"title": "Preston Tucker",
"text": "Preston Tucker\n\nPreston Thomas Tucker (September 21, 1903 – December 26, 1956) was an American automobile entrepreneur...."
}
It looks like Wikipedia dump used Wikipedia page IDs instead of URLS:
http://en.wikipedia.org/wiki/Waterfall
https://en.wikipedia.org/wiki?curid=54551
How can I convert from one to another?