X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=current%2Fsrc%2Fadd-other-forms;fp=current%2Fsrc%2Fadd-other-forms;h=0000000000000000000000000000000000000000;hb=b13ea8a082364672c6de2b010e558211ff52ec9a;hp=6320606bec6299037a2cfc77ea0ae38fa572e5bd;hpb=01534a94130c1f5a3a230cf4fe18365a235ba271;p=deb_pkgs%2Fscowl.git diff --git a/current/src/add-other-forms b/current/src/add-other-forms deleted file mode 100755 index 6320606..0000000 --- a/current/src/add-other-forms +++ /dev/null @@ -1,44 +0,0 @@ -#!/usr/bin/perl - -open F, "r/alt12dicts/2of12id.txt" or die; - -while () { - s/\r?\n$// or die; - # (uncommon flag, base word, part of speach, inflected forms) - ($d,$w,$p,$a) = /^([-@]?)(\w+) (.).*: ?(.*?)$/ or die; - next if $d; # - @a0 = split / /, $a; - splice @a0, -1, 0, "'" if $p eq 'V' && @a0 >= 3; # insert placeholder - @a = (); - foreach (@a0) { - s/ {.+?}//g; s/ \(.+?\)//g; - s/ \| / /g; s/ \/ / /g; - push @a, (split / /, $_); - } - @a = grep {!/^[@~-]/} @a; # remove questionable entries - # @a now conatins a list of valid inflected forms - @a0 = grep {$_ ne "'"} @a; - # @a0 is now the same as @a except for the placeholder entries - next unless @a0; - $words = join("\n",$w, @a0)."\n"; - if ($p eq 'V' && @a >= 4) { - while ($a[0] ne "'") {local $_ = shift @a; $lookup{$_} .= $words} - shift @a; - } - push @a, "$w\'s" if $p eq 'N'; - $words = join("\n",$w, @a)."\n"; - foreach (@a) {$lookup{$_} .= $words} -} - -open F, "working/possessive-also.lst"; - -while () { - chop; - $lookup{"$_\'s"} .= "$_\n"; -} - -while () { - print; - chop; - print $lookup{$_}; -}