require TMT_ROOT only if TectoMT will be actually needed

git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@3108 1f5c12ca-751b-0410-a591-d2e778427230
This commit is contained in:
bojar 2010-04-09 23:20:30 +00:00
parent 9fe574f6ed
commit 390ee866d8

View File

@ -18,16 +18,6 @@ my $SCRIPTS_ROOTDIR = $Bin;
$SCRIPTS_ROOTDIR =~ s/\/training$//;
$SCRIPTS_ROOTDIR = $ENV{"SCRIPTS_ROOTDIR"} if defined($ENV{"SCRIPTS_ROOTDIR"});
if( !defined $ENV{"TMT_ROOT"}) {
die "Cannot find TMT_ROOT. Is TectoMT really initialized?";
}
my $TMT_ROOT = $ENV{"TMT_ROOT"};
my $srunblocks = "$TMT_ROOT/tools/srunblocks_streaming/srunblocks";
my $scenario_file = "scenario";
my $srunblocks_cmd = "$srunblocks $scenario_file czech_source_sentence factored_output";
# for each _d_istortion, _l_anguage _m_odel, _t_ranslation _m_odel and _w_ord penalty, there is a list
# of [ default value, lower bound, upper bound ]-triples. In most cases, only one triple is used,
# but the translation model has currently 5 features
@ -223,6 +213,18 @@ Options:
exit 1;
}
# ensure we know where is tectomt, if we need it
if( !defined $ENV{"TMT_ROOT"} && $___EXTRACT_SEMPOS =~ /tmt/) {
die "Cannot find TMT_ROOT. Is TectoMT really initialized?";
}
my $TMT_ROOT = $ENV{"TMT_ROOT"};
my $srunblocks = "$TMT_ROOT/tools/srunblocks_streaming/srunblocks";
my $scenario_file = "scenario";
my $srunblocks_cmd = "$srunblocks $scenario_file czech_source_sentence factored_output";
# update variables if input is confusion network
if ($___INPUTTYPE == 1)
{