Uživatel:Stardust85/statistika
Skočit na navigaci
Skočit na vyhledávání
Kód wikitabulky vygenerován skriptem - počítá pouze existující kategorie. Vznikne-li nová kategorie, musí se sem ručně doplnit (nebo spustit znovu skript).
tabulka
[editovat]jazyk / druh | subst. | adjekt. | zájm. | čísl. | slovesa | příslovce | předložky | spojky | částice | citosl. | celkem |
---|---|---|---|---|---|---|---|---|---|---|---|
Afrikánština | 29 | 4 | - | - | - | - | - | - | - | - | 33 |
Angličtina | 8 101 | 2 254 | 49 | 38 | 2 143 | 265 | 48 | 36 | 5 | 54 | 12993 |
Arabština | 139 | - | - | - | - | - | - | - | - | - | 139 |
Asturština | 4 | - | - | - | - | - | - | - | - | - | 4 |
Běloruština | 26 | - | - | - | - | - | - | 1 | - | - | 27 |
Bosenština | 9 | - | - | - | - | - | - | - | - | - | 9 |
Bretonština | 18 | - | - | - | - | - | - | - | - | - | 18 |
Bulharština | 36 | - | - | - | - | - | - | 2 | - | - | 38 |
Čečenština | 10 | - | - | - | - | - | - | - | - | - | 10 |
Čeština | 24 225 | 9 357 | 169 | 214 | 3 340 | 1 311 | 94 | 131 | 119 | 369 | 39329 |
Dánština | 141 | 46 | 3 | 24 | 6 | - | - | - | - | - | 220 |
Esperanto | 641 | - | 9 | - | - | 12 | - | - | - | - | 662 |
Estonština | 126 | 8 | - | - | - | - | - | - | - | - | 134 |
Fidžijština | - | - | - | - | 1 | - | - | - | - | - | 1 |
Finština | 1 802 | 314 | - | - | - | 116 | - | - | - | - | 2232 |
Francouzština | 6 364 | 3 225 | 56 | 34 | 2 179 | 198 | - | 19 | - | 45 | 12120 |
Fríština | - | 1 | - | - | - | - | - | - | - | - | 1 |
Galicijština | 47 | - | - | - | - | - | - | - | - | - | 47 |
Hebrejština | 619 | - | - | - | - | - | - | - | - | - | 619 |
Chorvatština | 54 | - | - | - | - | - | - | - | - | - | 54 |
Interlingua | - | - | - | - | - | - | - | - | - | - | ' |
Irština | 307 | - | - | - | - | - | - | - | - | - | 307 |
Islandština | 151 | - | - | 2 | - | - | - | - | - | - | 153 |
Italština | 1 840 | 252 | 14 | - | 163 | 38 | - | 11 | - | - | 2318 |
Japonština | 2 694 | - | - | - | - | - | - | - | - | - | 2694 |
Kašubština | 136 | - | - | - | - | - | - | - | - | - | 136 |
Katalánština | 143 | 9 | - | - | - | - | - | - | - | - | 152 |
Kečuánština | 5 | - | - | - | - | - | - | - | - | - | 5 |
Krymská tatarština | 9 | - | - | - | - | - | - | - | - | - | 9 |
Latina | 1 422 | 458 | 28 | 18 | 401 | - | - | 26 | - | - | 2353 |
Litevština | 288 | - | - | - | - | - | - | - | 5 | - | 293 |
Lotyština | 254 | - | - | - | - | - | - | - | - | - | 254 |
Maďarština | 548 | 89 | - | - | 85 | - | - | - | - | - | 722 |
Makedonština | - | - | - | - | - | - | - | 1 | - | - | 1 |
Němčina | 8 713 | 1 962 | 44 | 90 | 831 | 265 | 40 | 37 | 9 | - | 11991 |
Nizozemština | 634 | 111 | 15 | - | 110 | - | - | - | - | - | 870 |
Norština | 10 | 2 | 2 | 2 | - | - | - | - | - | - | 16 |
Okcitánština | 85 | - | - | - | - | - | - | - | - | - | 85 |
Oshiwambo | 0 | - | 0 | - | 0 | - | - | - | - | - | 0 |
Polština | 4 100 | 217 | 23 | - | - | 36 | - | 14 | 6 | - | 4396 |
Portugalština | 377 | - | - | - | 55 | - | - | 6 | - | - | 438 |
Romština | 185 | - | 11 | - | - | - | - | - | - | - | 196 |
Rumunština | 86 | - | - | - | - | - | 2 | - | - | - | 88 |
Ruština | 1 615 | 1 359 | 20 | - | 287 | - | - | 7 | - | - | 3288 |
Řečtina | 1 012 | - | - | - | - | - | - | - | - | - | 1012 |
Sanskrt | 31 | - | - | - | - | - | - | - | - | - | 31 |
Skotská gaelština | 15 | - | - | - | - | - | - | - | - | - | 15 |
Slovenština | 1 688 | 801 | 31 | 12 | 171 | 78 | 19 | 17 | - | - | 2817 |
Slovinština | 148 | 15 | - | - | - | 12 | - | - | - | - | 175 |
Slovio | 0 | - | - | - | - | - | - | 0 | - | - | 0 |
Srbština | 1 599 | - | - | - | - | - | - | 3 | - | - | 1602 |
Stará angličtina | 29 | - | - | - | - | - | - | 3 | - | - | 32 |
Staroslověnština | - | - | - | - | - | - | - | 2 | - | - | 2 |
Svahilština | 91 | - | - | - | - | - | - | - | - | - | 91 |
Španělština | 1 642 | 159 | 42 | 53 | 202 | 29 | 9 | 9 | 3 | - | 2148 |
Švédština | 701 | 134 | 49 | 69 | 250 | 93 | 34 | 24 | 8 | 14 | 1376 |
Tádžičtina | - | - | - | - | - | - | 1 | - | - | - | 1 |
Tofalarština | - | - | 1 | - | - | - | - | - | - | - | 1 |
Turečtina | 438 | - | - | - | - | - | - | - | - | - | 438 |
Ukrajinština | 261 | - | - | - | - | - | - | 2 | - | - | 263 |
Velština | 21 | - | 4 | - | - | - | - | - | - | - | 25 |
kód skriptu
[editovat]#!/bin/bash
# Generates table with detailed statistics about languages for cs.wiktionary.org
# see the result at cs.wiktionary.org/wiki/Uživatel:Stardust85/statistika
# author: Michel Samia (m.samia at seznam.cz)
# usage: $ ./newstats.sh > wikitable.txt
# WARNING: this script LOADS wikimedia servers by one request per language category
# (now mid 2009 about 60 GETs), so don't run it too often
LANG= # because behaviour of sorting, greping and other things are locale-dependent
DOMAIN="http://cs.wiktionary.org/wiki"
TYPES="substantiva\nadjektiva\nzájmena\nčíslovky\nslovesa\npříslovce\npředložky\nspojky\nčástice\ncitoslovce"
mkdir langs
i=0 # counter
echo -e "\nSTEP 1: Downloading categories" >&2
# Get list of language categories
wget -q -O- http://cs.wiktionary.org/wiki/Kategorie:Jazykov%C3%A9_kategorie |grep '<span class="CategoryTreeBullet">' |
{
echo "Next language..." >&2
while read line
do
# page containing categories by types of words of given language (nouns, verbs...)
langHref="$DOMAIN` echo $line | sed -e 's/^.*wiki//' | sed -e 's/".*$//'`"
# name of the language
langName="`echo $line | cut -d'>' -f 12 | cut -d'<' -f1`"
echo -n > "langs/${langName}"
echo $i $langName >&2
i=$[ i + 1 ]
# uz mame url kategorie s jazykem, ted z nej musime ziskat vhodne podkategorie
# ty ulozime po radcich do lang/$langname, napr lang/Afrikánština
wget -q -O- $langHref | grep '<li><div class="CategoryTreeSection"><div class="CategoryTreeItem">' |
{
sum=0
while read line2
do
typeHref="` echo $line2 | sed -e 's/<[^>]*>//g' | sed -e 's/\[.*\]//' | sed -e 's/(.*$//'`"
echo "$typeHref" >> "langs/$langName"
done
}
echo -n "sleeping..." >&2
sleep 1
echo "OK" >&2
done
}
######## generating the table ######
#now we have all the data and we can generate the table
echo -e "\nSTEP 2: Creating table" >&2
cd langs/
i=0
for file in *
do
echo "$i: $file" >&2
i=$[ i+1 ]
echo " | $file"
echo -e "${TYPES}" |
{
while read druh
do
completeDruh="`grep "$druh" "$file" | sed 's/^ //'`"
if [[ "$completeDruh" == "" ]]
then
echo ' | -'
else
echo " | [[:Kategorie:$completeDruh| {{PAGESINCATEGORY:$completeDruh}}]]"
fi
done
}
echo " | '''{{#expr:"
first="true"
echo -e "${TYPES}" |
{
while read druh
do
completeDruh="`grep "$druh" "$file" | sed 's/^ //'`"
if [[ $completeDruh != "" ]]
then
if [[ $first == "true" ]]
then
echo "{{PAGESINCATEGORY:$completeDruh|R}}"
first="false"
else
echo "+{{PAGESINCATEGORY:$completeDruh|R}}"
fi
fi
done
echo "}}'''"
echo " |-"
}
done