Skip to content

Create a network of Wikpedia articles, based on the links written into the text of the articles as wikilinks

Notifications You must be signed in to change notification settings

sdivad/WikilinkNetworks

Repository files navigation

WikilinkNetworks

The script make_wikilink_network.py creates a network of Wikpedia articles based on the links written into the text of the articles as wikilinks.

It retrieves from the Wikimedia API the text of all the articles in the list of article titles taken as input, it parses the text of each article identifying all the outgoing wikilinks an solving redirects, and writes the resulting network as a csv file in which each line contains two article titles and represents a link from the first article to the second article.

The result is different from the one that would be obtained by just querying the Wikipedia API to retrieve the links: in that case, also links generated by templates would be included.

This repository also contains two wikilinks networks created for two datasets, in the corresponding folders: Climate change and Geoengineering.

The script make_wikilink_ego_network.py takes in input one only article title, identifies all the articles linked from it, and creates the network of hyperlinks between them.

Language

Tested with Python 2.7

Author

David Laniado

About

Create a network of Wikpedia articles, based on the links written into the text of the articles as wikilinks

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages