mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-11-10 10:59:21 +03:00
prevent segfault in OSM model when used in factored model with decomposed phrase-tables
This commit is contained in:
parent
55bd87d38c
commit
4d2fea9b38
@ -246,4 +246,10 @@ void OpSequenceModel::SetParameter(const std::string& key, const std::string& va
|
||||
}
|
||||
}
|
||||
|
||||
bool OpSequenceModel::IsUseable(const FactorMask &mask) const
|
||||
{
|
||||
bool ret = mask[0];
|
||||
return ret;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
@ -49,9 +49,7 @@ public:
|
||||
std::vector<float> GetFutureScores(const Phrase &source, const Phrase &target) const;
|
||||
void SetParameter(const std::string& key, const std::string& value);
|
||||
|
||||
bool IsUseable(const FactorMask &mask) const {
|
||||
return true;
|
||||
}
|
||||
bool IsUseable(const FactorMask &mask) const;
|
||||
|
||||
protected:
|
||||
typedef std::pair<Phrase, Phrase> ParallelPhrase;
|
||||
|
Loading…
Reference in New Issue
Block a user