diff options
author | Hieu Hoang <fishandfrolick@gmail.com> | 2013-06-14 13:09:06 +0400 |
---|---|---|
committer | Hieu Hoang <fishandfrolick@gmail.com> | 2013-06-14 13:09:06 +0400 |
commit | 029110c2451be2ecafbb1ed5f912e573647b3401 (patch) | |
tree | 2199de3e151df67ae8015fbc6877791c0524fbf7 /scripts/training | |
parent | b7cbecad0f723df45340f762555008a5d1114918 (diff) |
change table-limit specification to new format
Diffstat (limited to 'scripts/training')
-rwxr-xr-x | scripts/training/train-model.perl | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/scripts/training/train-model.perl b/scripts/training/train-model.perl index 400eafcbc..db6103c99 100755 --- a/scripts/training/train-model.perl +++ b/scripts/training/train-model.perl @@ -1920,8 +1920,13 @@ sub create_ini { $phrase_table_impl_name = "PhraseDictionaryOnDisk" if $phrase_table_impl==2; $phrase_table_impl_name = "PhraseDictionaryMemory" if $phrase_table_impl==6; + #table limit + my $table_limit = 0; + if ($i == 0) { + $table_limit = 20; + } # sum up... - $feature_spec .= "$phrase_table_impl_name name=TranslationModel$i num-features=$basic_weight_count path=$file input-factor=$input_factor output-factor=$output_factor\n"; + $feature_spec .= "$phrase_table_impl_name name=TranslationModel$i table-limit=$table_limit num-features=$basic_weight_count path=$file input-factor=$input_factor output-factor=$output_factor\n"; $weight_spec .= "TranslationModel$i="; for(my $j=0;$j<$basic_weight_count;$j++) { $weight_spec .= " 0.2"; } $weight_spec .= "\n"; @@ -1941,12 +1946,6 @@ sub create_ini { $weight_spec .= "TranslationModel$i= 1.0\n"; } - # ttable limit - print INI "\n\# limit on how many phrase translations e for each phrase f are loaded\n# 0 = all elements loaded\n[ttable-limit]\n20\n"; - foreach(1 .. ($i-1)) { - print INI (defined($FIRST_TTABLE{$_})?"20":"0")."\n"; - } - # generation model if (defined $___GENERATION_FACTORS) { my @TYPE = @_GENERATION_TYPE; |