Import Wikipedia - get related articles in different languages

I imported the Wikipedia database dumps ( pages-articles.xml versions) from two respective languages, in English and Maltese.

However, I need to be able to link an article from one language to another. I get the impression that for this I need to import additional tables. What tables do I need to import?

Thanks in advance!

Maltese db dump repository: http://dumps.wikimedia.org/mtwiki/20121012/

English db dump repository: http://dumps.wikimedia.org/enwiki/20121001/

+4
source share
2 answers

This information is in the langlinks table , so you need to download langlinks.sql.gz , which is a dump of SQL, not XML.

One of the possible problems is that these links cannot be symmetrical, therefore, for example, en:A can refer to mt:B , but mt:B links to en:C You must decide what to do with it.

+4
source

If I understand correctly, you want to create an English wiki and quiz in Malta and link them together.

To do this, you need to add the interlanguage prefixes for "en" and "mt" in the interwiki table. Here is a description of it:

https://www.mediawiki.org/wiki/Interwiki_link

You should probably remove links from all other languages ​​from articles. Otherwise, they will appear as trash at the bottom of a large number of articles.

PS: It's great to hear that you work with the Maltese language! I love it:)

0
source

Source: https://habr.com/ru/post/1441632/


All Articles