Commit f4229266 authored by Christine Köhn's avatar Christine Köhn

make-lexicon, make-verbs, option for generating ALL prefixes

parent bd409cc3
......@@ -17,6 +17,12 @@ use strict;
use File::Basename;
use Cwd 'abs_path';
use File::Spec;
use Getopt::Std;
# see $opt_p in
our $opt_p;
my $dir = dirname(abs_path($0));
my $file = 'deutsch-lexikon.cdg';
......@@ -67,7 +73,13 @@ system("rm -f $dir/AVZ.cdg");
#Build the lexicon by running the make* scripts and concatenating the results:
system("$dir/ <$dir/Namen.txt >>$path");
system("$dir/ <$dir/Nomen.txt >>$path");
system("$dir/ -l <$dir/Verben.txt >>$path");
if ($opt_p) {
system("$dir/ -l -p <$dir/Verben.txt >>$path");
else {
system("$dir/ -l <$dir/Verben.txt >>$path");
system("$dir/ <$dir/Adjektive.txt >>$path");
system("$dir/ <$dir/Adjektiv-Templates.txt >>$path");
......@@ -64,9 +64,12 @@ my $dir = dirname(abs_path($0));
# different object types than their base verbs. Therefore we offer the
# user the option to exclude this possibility altogether by omitting
# `-l'.
our $opt_l;
# By default, some verb prefixes are skipped (WHY?). To turn this off
# and generate all prefixes as declared in Verben.txt, use `-p`.
our ($opt_l, $opt_p);
getopts ( 'l' );
getopts ( 'lp' );
sub deutsch_lc
......@@ -2119,7 +2122,7 @@ sub write_prefixes
# do not generate items of these prefixes, which are really either
# adverbs or postpositions.
next if /^((hin|her)(auf|ab|unter)|entlang)$/;
next if (!$opt_p && /^((hin|her)(auf|ab|unter)|entlang)$/);
printf "%-15s:=[cat:PTKVZ];\n", format_string $_;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment