mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-12-26 13:23:25 +03:00
error in constrained decoding
This commit is contained in:
parent
63ca61ba0b
commit
67b1cbce13
@ -380,6 +380,11 @@ void Phrase::InitStartEndWord()
|
||||
|
||||
size_t Phrase::Find(const Phrase &sought, int maxUnknown) const
|
||||
{
|
||||
if (GetSize() < sought.GetSize()) {
|
||||
// sought phrase too big
|
||||
return NOT_FOUND;
|
||||
}
|
||||
|
||||
size_t maxStartPos = GetSize() - sought.GetSize();
|
||||
for (size_t startThisPos = 0; startThisPos <= maxStartPos; ++startThisPos) {
|
||||
size_t thisPos = startThisPos;
|
||||
|
Loading…
Reference in New Issue
Block a user