X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=src%2Fadd-other-forms;h=921033910350ccd68f290e0010c728615a21a08d;hb=8ace84503eae30ad101165a9bf4c96ac1c87f9b1;hp=6320606bec6299037a2cfc77ea0ae38fa572e5bd;hpb=adbd0c3d3296ead6c49b4f13012aca4a558efc7f;p=deb_pkgs%2Fscowl.git diff --git a/src/add-other-forms b/src/add-other-forms index 6320606..9210339 100755 --- a/src/add-other-forms +++ b/src/add-other-forms @@ -5,7 +5,8 @@ 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; + ($d,$w,$p,$a) = /^([-@\+]?)(\w+) (.).*: ?(.*?)$/ or die; + $d =~ tr/+//d; next if $d; # @a0 = split / /, $a; splice @a0, -1, 0, "'" if $p eq 'V' && @a0 >= 3; # insert placeholder @@ -15,7 +16,7 @@ while () { s/ \| / /g; s/ \/ / /g; push @a, (split / /, $_); } - @a = grep {!/^[@~-]/} @a; # remove questionable entries + @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