The script can randomly generate german words and their corresponding english translation. Very helpful for personal learning, at least it's the case for me. The dictionary file is available at ftp://ftp.tu-chemnitz.de/pub/Local/urz/ding/ger-eng/ By the way, the module Lingua::DE::ASCII is optional for converting umlauts into plain ascii characters. Without it, the script still can work.
Usage:

# build the database
 % the_script -b

# generate flashcards
 % the_script

# generate flashcards and keep the umlauts
 % the_script -u

#!/usr/bin/perl use strict; use Getopt::Std; use DB_File; my %opt; my $dbpath = 'Lernkarte.db'; getopts('b', \%opt); if( $opt{b} ){ tie my %db, 'DB_File', $dbpath, O_CREAT | O_WRONLY, 0644, $DB_BTRE +E; open my $handle, 'ger-eng.txt'; my $count = 0; while(<$handle>){ chomp; next if /^#/; $db{$count++} = $_; } untie %db; } else { tie my %db, 'DB_File', $dbpath, O_RDONLY, 0644, $DB_BTREE; my $size = scalar keys %db; do { my @entry = split / :: /, $db{int rand $size}; eval "require Lingua::DE::ASCII"; ($opt{u} || $@ ) and my $keep_umlaut = 1; my @de = split / \| /, $entry[0]; my @en = split / \| /, $entry[1]; print "-----\n"; foreach ( 0..$#de ) { print <<FLASHCARD DE => ${$keep_umlaut ? \$de[$_] : \Lingua::DE::ASCII::to_ascii( $de[$_ +])} EN => $en[$_] FLASHCARD } }while(<>); untie %db; }

Replies are listed 'Best First'.
Re: Deutschevocabularyflashcardgenerator
by zentara (Cardinal) on Nov 21, 2003 at 16:30 UTC
    This would really be cool, even sellable, if there was a mp3 or spx voice snippet of each word, to be played as the word is flashed.
      Maybe Festival should come up with a German version :)
      --
      B10m
        Yeah, but even with my "finely tuned English ear" I can barely make out words spoken by festival, let alone having it try to speak in a correct German dialect. They wouldn't know what I was trying to say. :-)