diff --git a/MT_systems/translate.pm b/MT_systems/translate.pm index 4b8a6f3d..9bcc6c74 100755 --- a/MT_systems/translate.pm +++ b/MT_systems/translate.pm @@ -695,7 +695,7 @@ if($direction eq 'esqu' && $startTrans < $mapInputFormats{'svm'}) #11) my %nounLex = (); my %verbLex = (); - if($nounlex ne ''){ + if($nounlex ne '' and $nounlex ne 'NounLex'){ open (NOUNS, "<:encoding(UTF-8)", $nounlex) or die "Can't open $nounlex : $!"; print STDERR "reading semantic noun lexicon from $nounlex...\n"; while(){ @@ -713,7 +713,7 @@ if($direction eq 'esqu' && $startTrans < $mapInputFormats{'svm'}) #11) } or die "No NounLex in $path/storage found! specify --nounlex=path to read in the Spanish noun lexicon!"; %nounLex = %{ Storable::retrieve("$path/storage/NounLex") }; } - if($verblex ne ''){ + if($verblex ne '' and $verblex =~ /\.xml$/){ open VERBS, "< $verblex" or die "Can't open $verblex : $!"; print STDERR "reading verb frame lexicon form $verblex...\n"; my $verbdom = XML::LibXML->load_xml( IO => *VERBS );