mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-12-27 05:55:02 +03:00
beautify
This commit is contained in:
commit
e07304bdd1
@ -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));
|
||||
|
@ -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 ";
|
||||
|
@ -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($)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user