Page MenuHomePhabricator

DBQ-83 Generate Interlanguage linking for 30 European languages
Closed, ResolvedPublic

Description

This issue was converted from https://jira.toolserver.org/browse/DBQ-83.
Summary: Generate Interlanguage linking for 30 European languages
Issue type: Task - A task that needs to be done.
Priority: Major
Status: Done
Assignee: merl <mewikipedia@to.mabomuja.de>


From: Thomasmp <tm.petzold@gmail.com>

Date: Mon, 14 Dec 2009 04:29:51

To construct a two-way linking table for 30 selected languages based on interlanguage links for corresponding Wikipedias.
SQL query:

select ll_lang, count![][1] as c from langlinks group by ll_lang order by c desc where ll_language in ('de', 'fr', 'nl', 'sv', 'en', 'it', 'da', 'ga', 'es', 'pt', 'cy', 'no', 'ca', 'hsb', 'br', 'ru', 'pl', 'cs', 'sk', 'hu', 'sl', 'hr', 'bs', 'sr', 'lt', 'uk', 'be', 'lv', 'bg', 'sq');

For each of the 30 selected languages listed ('de', 'fr', 'nl', 'sv', 'en', 'it', 'da', 'ga', 'es', 'pt', 'cy', 'no', 'ca', 'hsb', 'br', 'ru', 'pl', 'cs', 'sk', 'hu', 'sl', 'hr', 'bs', 'sr', 'lt', 'uk', 'be', 'lv', 'bg', 'sq'), repeat executing the same query.

Please generate the output in simple plain csv format.

[1]: https://jira.toolserver.org/images/icons/emoticons/star_yellow.gif

Version: unspecified
Severity: major

Details

Reference
bz59337

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 2:24 AM
bzimport set Reference to bz59337.

From: merl <mewikipedia@to.mabomuja.de>

Date: Thu, 17 Dec 2009 16:48:10

#! /bin/bash

#$ -N DBQ-83
#$ -hard
#$ -l sqlprocs-s1=1
#$ -l sqlprocs-s2=1
#$ -l sqlprocs-s3=1
wikilist="de fr nl sv en it da ga es pt cy no ca hsb br ru pl cs sk hu sl hr bs sr lt uk be lv bg sq"
echo "wiki,interwiki,count" > DBQ-83.txt
for runwiki in $wikilist
do
  list=""
  for searchwiki in $wikilist
  do
    if [ "$searchwiki" != "$runwiki" ]
    then
      if [ -n "$list" ]
      then
        list="$list, "
      fi
      list="$list'$searchwiki'"
    fi
  done
  mysql -wBN -h${runwiki}wiki-p.db ${runwiki}wiki_p -e "select CONCAT('${runwiki},', ll_lang, ',', count(*)) as csv from langlinks where ll_lang in (${list}) group by ll_lang order by count(*) desc" >> DBQ-83.txt
done

From: merl <mewikipedia@to.mabomuja.de>

Date: Thu, 17 Dec 2009 16:54:40

http://toolserver.org/~merl/sql/DBQ-83.txt

job execution time: 54 seconds

This bug was imported as RESOLVED. The original assignee has therefore not been
set, and the original reporters/responders have not been added as CC, to
prevent bugspam.

If you re-open this bug, please consider adding these people to the CC list:
Original assignee: bugreporter@to.mabomuja.de
CC list: bugreporter@to.mabomuja.de