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