X-Git-Url: https://git.donarmstrong.com/?p=deb_pkgs%2Fscowl.git;a=blobdiff_plain;f=7.1%2Fsrc%2Fadd-other-spellings;fp=7.1%2Fsrc%2Fadd-other-spellings;h=0000000000000000000000000000000000000000;hp=9d7fdb07ba2efba3d83897d635aaba9178acb962;hb=b13ea8a082364672c6de2b010e558211ff52ec9a;hpb=01534a94130c1f5a3a230cf4fe18365a235ba271 diff --git a/7.1/src/add-other-spellings b/7.1/src/add-other-spellings deleted file mode 100755 index 9d7fdb0..0000000 --- a/7.1/src/add-other-spellings +++ /dev/null @@ -1,58 +0,0 @@ -#!/usr/bin/perl - -while() { - chop; - $words{$_} = ''; - $know_about{$_} = 1; -} - -sub valid_entry ( $ ){local $_ = $_[0]; /^[A-Za-z\']+$/ && exists $words{$_}} - -foreach my $f (qw(working/variant_0.lst working/variant_1.lst - working/variant_2.lst - working/british_variant_0.lst working/british_variant_1.lst - working/canadian_variant_0.lst working/canadian_variant_1.lst - working/american.lst - working/british.lst working/british_z.lst - working/canadian.lst)) -{ - open F, $f or die "Unable to open $f\n"; - while () { - chop; - $know_about{$_} = 1; - } -} - -open F, "r/varcon/voc.tab" or die; - -while () { - s/\(.+\)\n/\n/; - my ($word) = grep {valid_entry $_} (split /[,\t\n]/); - next unless defined $word; - y/,\t -/\n/; - s/(^|\n)\n/\n/g; - $words{$word} .= $_; -} - -open F, "r/varcon/variant.tab" or die; - -while () { - @w = grep {$know_about{$_}} (split /[\t\n]/); - next unless @w && grep {valid_entry $_} @w; - $words{$w[0]} .= "$_\n" foreach @w; -} - -open F, "r/varcon/variant-wroot.tab" or die; - -while () { - s/^(.+)\:\t// or die; - my $root = $1; - next unless exists $words{$root}; - @w = grep {$know_about{$_}} (split /[\t\n]/); - next unless @w && grep {valid_entry $_} @w; - $words{$w[0]} .= "$_\n" foreach @w; -} - -while (($key, $value) = each %words) { - print "$key\n$value"; -}