mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-09-11 11:25:40 +03:00
Changes to make things compile
This commit is contained in:
parent
92b887fb84
commit
74c6cef3b3
@ -21,7 +21,6 @@
|
|||||||
|
|
||||||
#include <ostream>
|
#include <ostream>
|
||||||
#include <set>
|
#include <set>
|
||||||
#include <map>
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
namespace Moses
|
namespace Moses
|
||||||
@ -34,7 +33,7 @@ class AlignmentInfoCollection;
|
|||||||
*/
|
*/
|
||||||
class AlignmentInfo
|
class AlignmentInfo
|
||||||
{
|
{
|
||||||
typedef std::multimap<size_t,size_t> CollType;
|
typedef std::set< std::pair<size_t,size_t> > CollType;
|
||||||
|
|
||||||
friend std::ostream& operator<<(std::ostream &, const AlignmentInfo &);
|
friend std::ostream& operator<<(std::ostream &, const AlignmentInfo &);
|
||||||
friend struct AlignmentInfoOrderer;
|
friend struct AlignmentInfoOrderer;
|
||||||
|
@ -33,10 +33,9 @@ template <class Model> void Fill<Model>::Add(const TargetPhraseCollection &targe
|
|||||||
}
|
}
|
||||||
|
|
||||||
std::vector<lm::WordIndex> words;
|
std::vector<lm::WordIndex> words;
|
||||||
for (TargetPhraseCollection::const_iterator i(targets.begin()); i != targets.end(); ++i) {
|
for (TargetPhraseCollection::const_iterator iter(targets.begin()); iter != targets.end(); ++iter) {
|
||||||
words.clear();
|
words.clear();
|
||||||
const TargetPhrase &phrase = **i;
|
const TargetPhrase &phrase = **iter;
|
||||||
const AlignmentInfo::NonTermIndexMap &align = phrase.GetAlignmentInfo().GetNonTermIndexMap();
|
|
||||||
search::PartialEdge &edge = edges_.InitializeEdge();
|
search::PartialEdge &edge = edges_.InitializeEdge();
|
||||||
|
|
||||||
size_t i = 0;
|
size_t i = 0;
|
||||||
@ -54,7 +53,7 @@ template <class Model> void Fill<Model>::Add(const TargetPhraseCollection &targe
|
|||||||
for (; i < phrase.GetSize(); ++i) {
|
for (; i < phrase.GetSize(); ++i) {
|
||||||
const Word &word = phrase.GetWord(i);
|
const Word &word = phrase.GetWord(i);
|
||||||
if (word.IsNonTerminal()) {
|
if (word.IsNonTerminal()) {
|
||||||
edge.nt[nt++] = vertices[align[i]];
|
edge.nt[nt++] = vertices[phrase.GetNonTermIndex(i)];
|
||||||
words.push_back(search::kNonTerminal);
|
words.push_back(search::kNonTerminal);
|
||||||
} else {
|
} else {
|
||||||
words.push_back(Convert(word));
|
words.push_back(Convert(word));
|
||||||
|
Loading…
Reference in New Issue
Block a user