This shows you the differences between two versions of the page.
public:paste:compile_dicts.pl [2014-07-10 20:14] – created Johannes Graën | public:paste:compile_dicts.pl [2023-09-15 20:33] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | <file perl> | ||
+ | # | ||
+ | use strict; | ||
+ | use warnings; | ||
+ | |||
+ | my %languages = ( | ||
+ | 0 => 1550, | ||
+ | 1 => 1834, | ||
+ | 2 => 5996, | ||
+ | 3 => 1948, | ||
+ | 4 => 2645, | ||
+ | ); | ||
+ | |||
+ | foreach my $i (keys %languages) { | ||
+ | foreach my $j (keys %languages) { | ||
+ | next if $j <= $i; | ||
+ | my $c = sprintf 'sed -r -e " | ||
+ | .'| psql --host kitt.ifi.uzh.ch --user laacuser laac -t -A ' | ||
+ | .'> dicts/ | ||
+ | $languages{$i}, | ||
+ | print " | ||
+ | system $c; | ||
+ | } | ||
+ | } | ||
+ | </ |