]> git.donarmstrong.com Git - deb_pkgs/scowl.git/blobdiff - src/add-other-forms
fix numbering of variants to be 1 and 2 (closes: #867586)
[deb_pkgs/scowl.git] / src / add-other-forms
index 6320606bec6299037a2cfc77ea0ae38fa572e5bd..921033910350ccd68f290e0010c728615a21a08d 100755 (executable)
@@ -5,7 +5,8 @@ open F, "r/alt12dicts/2of12id.txt" or die;
 while (<F>) {
   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 (<F>) {
     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