[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: learning lojban



--- In lojban@egroups.com, "michael helsem" <graywyvern@h...> wrote:
> i compiled a lojban rhyming dictionary (unfortunately it's not
computerized, 
> so i can't upload it). somehow for me knowing associations like:
> 
> BLANU blue
> SLANU cylinder
> JGANU angle
> SNANU south
> 
> &
> 
> SPANO Spanish
> CNANO norm
> TRANO nitrogen
> 
> keep them distinct in my memory.
> 

Inspired by you, I just wrote a perl script in about 15 minutes that
will list these automatically using the gismu wordlist:

#!/usr/bin/perl
open (GISMU, 'gismu');
while (<GISMU>) {
  $line = $_;
  $word = substr($line,0,5);
  $meaning = substr($line,19,20);
  if ($word =~ /\w{5}/ && $meaning =~ /\w/) {
    $meaning =~ s/\s*$//g;
    if (substr($word,1,1) =~ /[aeiou]/) {
      $key = substr($word,1,4);
      $hash->{0}{$key}{$word} = $meaning;
    } else {
      $key = substr($word,2,3);
      $hash->{1}{$key}{$word} = $meaning;
    }
  }
}

foreach $hashname (sort keys %$hash) {
  $thehash = $hash->{$hashname};
  foreach $key (sort keys %$thehash) {
    foreach $word (sort keys %{$thehash->{$key}}) {
      $meaning = $thehash->{$key}{$word};
      print "$word: $meaning\n";
    }
  }
}

it lists them neatly in "gismu: meaning" pairs. If you think this list
would be useful, i could upload it into the files section.