diff options
author | pjwilliams <pjwilliams@1f5c12ca-751b-0410-a591-d2e778427230> | 2011-06-17 01:20:20 +0400 |
---|---|---|
committer | pjwilliams <pjwilliams@1f5c12ca-751b-0410-a591-d2e778427230> | 2011-06-17 01:20:20 +0400 |
commit | ab3460591c546534a57c771ce8864c7da4e3c6a5 (patch) | |
tree | 94e7c48705b4a06599f614288c916d2d11cf58b2 /OnDiskPt | |
parent | cdc4179ce130fceba77422f774554cb1073c906b (diff) |
Share AlignmentInfo objects instead of storing one per TargetPhrase.
This can save a significant amount of memory used on rule table storage,
though may increase loading time slightly.
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@4017 1f5c12ca-751b-0410-a591-d2e778427230
Diffstat (limited to 'OnDiskPt')
-rw-r--r-- | OnDiskPt/src/TargetPhrase.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/OnDiskPt/src/TargetPhrase.cpp b/OnDiskPt/src/TargetPhrase.cpp index d2730e9ac..2b62255e4 100644 --- a/OnDiskPt/src/TargetPhrase.cpp +++ b/OnDiskPt/src/TargetPhrase.cpp @@ -216,10 +216,10 @@ Moses::TargetPhrase *TargetPhrase::ConvertToMoses(const std::vector<Moses::Facto ret->SetScoreChart(phraseDict.GetFeature(), m_scores, weightT, lmList, wpProducer); // alignments - std::list<std::pair<size_t, size_t> > alignmentInfo; + std::set<std::pair<size_t, size_t> > alignmentInfo; for (size_t ind = 0; ind < m_align.size(); ++ind) { const std::pair<size_t, size_t> &entry = m_align[ind]; - alignmentInfo.push_back(entry); + alignmentInfo.insert(entry); } ret->SetAlignmentInfo(alignmentInfo); |