mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-09-11 11:25:40 +03:00
bug in SpanLength FF
This commit is contained in:
parent
8c55f98c7a
commit
31a5b78b91
@ -101,6 +101,12 @@ float SpanLengthPhraseProperty::GetProb(size_t ntInd, size_t sourceWidth, float
|
||||
|
||||
const std::pair<Map, float> &data = m_source[ntInd];
|
||||
const Map &map = data.first;
|
||||
|
||||
if (map.size() == 0) {
|
||||
// should this ever be reached? there shouldn't be any span length proprty so FF shouldn't call this
|
||||
return 1;
|
||||
}
|
||||
|
||||
Map::const_iterator iter = map.find(sourceWidth);
|
||||
if (iter == map.end()) {
|
||||
count = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user