00001 // 00002 // SentenceAlignment.cpp 00003 // moses 00004 // 00005 // Created by Hieu Hoang on 26/07/2012. 00006 // Copyright 2012 __MyCompanyName__. All rights reserved. 00007 // 00008 00009 #include <iostream> 00010 #include "util/string_stream.hh" 00011 #include "SentenceAlignment.h" 00012 00013 namespace tmmt 00014 { 00015 std::string SentenceAlignment::getTargetString(const Vocabulary &vocab) const 00016 { 00017 util::StringStream strme; 00018 for (size_t i = 0; i < target.size(); ++i) { 00019 const WORD &word = vocab.GetWord(target[i]); 00020 strme << word << " "; 00021 } 00022 return strme.str(); 00023 } 00024 00025 }