mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-12-26 13:23:25 +03:00
25 lines
475 B
C++
25 lines
475 B
C++
//
|
|
// SentenceAlignment.cpp
|
|
// moses
|
|
//
|
|
// Created by Hieu Hoang on 26/07/2012.
|
|
// Copyright 2012 __MyCompanyName__. All rights reserved.
|
|
//
|
|
|
|
#include <iostream>
|
|
#include "SentenceAlignment.h"
|
|
|
|
namespace tmmt
|
|
{
|
|
std::string SentenceAlignment::getTargetString(const Vocabulary &vocab) const
|
|
{
|
|
std::stringstream strme;
|
|
for (size_t i = 0; i < target.size(); ++i) {
|
|
const WORD &word = vocab.GetWord(target[i]);
|
|
strme << word << " ";
|
|
}
|
|
return strme.str();
|
|
}
|
|
|
|
}
|