use strict; use locale; if ($#ARGV != 1){ die "Usage : ", $0, " CONSTRUCTION LEXIQUE_REFERENCE\n"; } my ($pre, $c, $post) = split(/§([A-Z])/, $ARGV[0]); open(LEX, "<", $ARGV[1]) or die "impossible d'ouvrir ", $ARGV[1]; my %lex; while (my $ligne = ){ chomp($ligne); my ($forme, $lemme, $cat) = split(/\t/, $ligne); if (substr($cat, 0, 1) eq $c){ $lex{$lemme}{$forme} = 1; } } close(LEX); while (my $ligne = ){ chomp($ligne); foreach my $f (keys %{$lex{$ligne}}){ print "\"", $pre, $f, $post, "\"\n"; } }