Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'moses/TranslationModel/UG/mm/ug_phrasepair.h')
-rw-r--r--moses/TranslationModel/UG/mm/ug_phrasepair.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/moses/TranslationModel/UG/mm/ug_phrasepair.h b/moses/TranslationModel/UG/mm/ug_phrasepair.h
index 7e565c2df..7f03d89df 100644
--- a/moses/TranslationModel/UG/mm/ug_phrasepair.h
+++ b/moses/TranslationModel/UG/mm/ug_phrasepair.h
@@ -30,7 +30,8 @@ namespace Moses
std::vector<uchar> aln;
float score;
bool inverse;
- std::vector<uint32_t> indoc;
+ // std::vector<uint32_t> indoc;
+ std::map<uint32_t,uint32_t> indoc;
PhrasePair() { };
PhrasePair(PhrasePair const& o);
@@ -306,10 +307,12 @@ namespace Moses
out << toString (V1, this->start1, this->len1) << " ::: "
<< toString (V2, this->start2, this->len2) << " "
<< this->joint << " [";
- for (size_t i = 0; i < this->indoc.size(); ++i)
+ // for (size_t i = 0; i < this->indoc.size(); ++i)
+ for (std::map<uint32_t,uint32_t>::const_iterator m = indoc.begin();
+ m != indoc.end(); ++m)
{
- if (i) out << " ";
- out << this->indoc[i];
+ if (m != indoc.begin()) out << " ";
+ out << m->first << ":" << m->second;
}
out << "] [";
vector<float> lrscores;