Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHieu Hoang <hieuhoang@gmail.com>2013-07-08 23:56:51 +0400
committerHieu Hoang <hieuhoang@gmail.com>2013-07-08 23:56:51 +0400
commite07304bdd16b287471b643379a9ca76124910737 (patch)
treec9402821c929f41aeb1cdb0c9355d8670fb27a2f
parente2dd5b2efa10673e063868e83bc7b0be9bc5581e (diff)
parent3eba5782c2df7b03cf2dad99b52e0a97c0ca39e9 (diff)
beautify
-rw-r--r--moses/TranslationModel/CompactPT/PhraseDictionaryCompact.cpp2
-rw-r--r--moses/TranslationModel/CompactPT/PhraseTableCreator.cpp10
-rwxr-xr-xscripts/other/beautify.perl5
3 files changed, 10 insertions, 7 deletions
diff --git a/moses/TranslationModel/CompactPT/PhraseDictionaryCompact.cpp b/moses/TranslationModel/CompactPT/PhraseDictionaryCompact.cpp
index 8d0f9ff2f..60c1876ba 100644
--- a/moses/TranslationModel/CompactPT/PhraseDictionaryCompact.cpp
+++ b/moses/TranslationModel/CompactPT/PhraseDictionaryCompact.cpp
@@ -117,7 +117,7 @@ PhraseDictionaryCompact::GetTargetPhraseCollection(const Phrase &sourcePhrase) c
// Retrieve target phrase collection from phrase table
TargetPhraseVectorPtr decodedPhraseColl
- = m_phraseDecoder->CreateTargetPhraseCollection(sourcePhrase, true, true);
+ = m_phraseDecoder->CreateTargetPhraseCollection(sourcePhrase, true, true);
if(decodedPhraseColl != NULL && decodedPhraseColl->size()) {
TargetPhraseVectorPtr tpv(new TargetPhraseVector(*decodedPhraseColl));
diff --git a/moses/TranslationModel/CompactPT/PhraseTableCreator.cpp b/moses/TranslationModel/CompactPT/PhraseTableCreator.cpp
index f62e69f05..25e232eec 100644
--- a/moses/TranslationModel/CompactPT/PhraseTableCreator.cpp
+++ b/moses/TranslationModel/CompactPT/PhraseTableCreator.cpp
@@ -1034,16 +1034,16 @@ void RankingTask::operator()()
for(size_t i = 0; i < lines.size(); i++) {
std::vector<std::string> tokens;
Moses::TokenizeMultiCharSeparator(tokens, lines[i], m_creator.m_separator);
-
+
for(std::vector<std::string>::iterator it = tokens.begin(); it != tokens.end(); it++)
*it = Moses::Trim(*it);
-
+
if(tokens.size() < 4) {
std::cerr << "Error: It seems the following line has a wrong format:" << std::endl;
std::cerr << "Line " << i << ": " << lines[i] << std::endl;
abort();
}
-
+
if(tokens[3].size() <= 1 && m_creator.m_coding != PhraseTableCreator::None) {
std::cerr << "Error: It seems the following line contains no alignment information, " << std::endl;
std::cerr << "but you are using ";
@@ -1134,13 +1134,13 @@ void EncodingTask::operator()()
for(std::vector<std::string>::iterator it = tokens.begin(); it != tokens.end(); it++)
*it = Moses::Trim(*it);
-
+
if(tokens.size() < 3) {
std::cerr << "Error: It seems the following line has a wrong format:" << std::endl;
std::cerr << "Line " << i << ": " << lines[i] << std::endl;
abort();
}
-
+
if(tokens[3].size() <= 1 && m_creator.m_coding != PhraseTableCreator::None) {
std::cerr << "Error: It seems the following line contains no alignment information, " << std::endl;
std::cerr << "but you are using ";
diff --git a/scripts/other/beautify.perl b/scripts/other/beautify.perl
index debf24861..e23f7e2a4 100755
--- a/scripts/other/beautify.perl
+++ b/scripts/other/beautify.perl
@@ -2,10 +2,13 @@
use strict;
use File::Basename;
+use FindBin qw($RealBin);
sub Beautify($);
-Beautify("/Users/hieuhoang/unison/workspace/github/hh");
+print STDERR "RealBin=$RealBin \n\n";
+
+Beautify("$RealBin/../..");
sub Beautify($)
{