diff options
author | Ulrich Germann <ugermann@inf.ed.ac.uk> | 2014-10-07 21:08:31 +0400 |
---|---|---|
committer | Ulrich Germann <ugermann@inf.ed.ac.uk> | 2014-10-07 21:08:31 +0400 |
commit | 576931b088fa71f14ed7316ff6db165e1ea3c9ea (patch) | |
tree | 1749946dad88be13c33b4adf7f7afde70f5ab4b1 /moses/AlignmentInfoCollection.cpp | |
parent | 26666986f33985b13e205ae9bac115385ce0b407 (diff) |
Mmsapt now adds word alignment info to target phrases.
Diffstat (limited to 'moses/AlignmentInfoCollection.cpp')
-rw-r--r-- | moses/AlignmentInfoCollection.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/moses/AlignmentInfoCollection.cpp b/moses/AlignmentInfoCollection.cpp index ef6e62eb3..0a54226cd 100644 --- a/moses/AlignmentInfoCollection.cpp +++ b/moses/AlignmentInfoCollection.cpp @@ -38,23 +38,23 @@ const AlignmentInfo &AlignmentInfoCollection::GetEmptyAlignmentInfo() const return *m_emptyAlignmentInfo; } -const AlignmentInfo *AlignmentInfoCollection::Add( - const std::set<std::pair<size_t,size_t> > &pairs) +AlignmentInfo const * +AlignmentInfoCollection:: +Add(AlignmentInfo const& ainfo) { - AlignmentInfo pairsAlignmentInfo(pairs); #ifdef WITH_THREADS { boost::shared_lock<boost::shared_mutex> read_lock(m_accessLock); - AlignmentInfoSet::const_iterator i = m_collection.find(pairsAlignmentInfo); + AlignmentInfoSet::const_iterator i = m_collection.find(ainfo); if (i != m_collection.end()) return &*i; } boost::unique_lock<boost::shared_mutex> lock(m_accessLock); #endif - std::pair<AlignmentInfoSet::iterator, bool> ret = - m_collection.insert(pairsAlignmentInfo); + std::pair<AlignmentInfoSet::iterator, bool> ret = m_collection.insert(ainfo); return &(*ret.first); } + } |