reporting on init (pretty slow for binary phrase table!) and bug fix in experiment.perl with setting filter settings

This commit is contained in:
phikoehn 2014-01-05 22:39:47 +00:00
parent e8f00eb420
commit 9ea0f5dd0e
2 changed files with 11 additions and 6 deletions

View File

@ -109,6 +109,13 @@ public:
/** Translate one sentence
* gets called by main function implemented at end of this source file */
void Run() {
// shorthand for "global data"
const StaticData &staticData = StaticData::Instance();
// input sentence
Sentence sentence;
// report wall time spent on translation
Timer translationTime;
translationTime.start();
@ -117,16 +124,14 @@ public:
TRACE_ERR("Translating line " << m_lineNumber << " in thread id " << pthread_self() << std::endl);
#endif
// shorthand for "global data"
const StaticData &staticData = StaticData::Instance();
// input sentence
Sentence sentence;
// execute the translation
// note: this executes the search, resulting in a search graph
// we still need to apply the decision rule (MAP, MBR, ...)
Timer initTime;
initTime.start();
Manager manager(m_lineNumber, *m_source,staticData.GetSearchAlgorithm());
VERBOSE(1, "Line " << m_lineNumber << ": Initialize search took " << initTime << " seconds total" << endl);
manager.ProcessSentence();
// we are done with search, let's look what we got

View File

@ -2558,7 +2558,7 @@ sub define_tuningevaluation_filter {
$input_filter = $input unless $input_filter;
my $settings = &backoff_and_get("EVALUATION:$set:filter-settings") unless $tuning_flag;
$settings = &get("TUNING:filter-settings") if $tuning_flag;
$settings = &backoff_and_get("TUNING:filter-settings") if $tuning_flag;
$settings = "" unless $settings;
$binarizer .= " -no-alignment-info" if defined ($binarizer) && !$hierarchical && defined $word_alignment && $word_alignment eq "no";