mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-12-25 12:52:29 +03:00
push calling of OnlyTheseFactors() to individual PT implementations, as needed
This commit is contained in:
parent
8c6344c4ce
commit
e51c4feb6b
@ -51,7 +51,6 @@ const TargetPhraseCollection *PhraseDictionary::
|
||||
GetTargetPhraseCollection(InputType const& src,WordsRange const& range) const
|
||||
{
|
||||
Phrase phrase = src.GetSubString(range);
|
||||
phrase.OnlyTheseFactors(m_inputFactors);
|
||||
return GetTargetPhraseCollection(phrase);
|
||||
}
|
||||
|
||||
|
@ -49,8 +49,11 @@ TargetPhraseCollection &PhraseDictionaryMemory::GetOrCreateTargetPhraseCollectio
|
||||
return currNode.GetOrCreateTargetPhraseCollection();
|
||||
}
|
||||
|
||||
const TargetPhraseCollection *PhraseDictionaryMemory::GetTargetPhraseCollection(const Phrase& source) const
|
||||
const TargetPhraseCollection *PhraseDictionaryMemory::GetTargetPhraseCollection(const Phrase& sourceOrig) const
|
||||
{
|
||||
Phrase source(sourceOrig);
|
||||
source.OnlyTheseFactors(m_inputFactors);
|
||||
|
||||
// exactly like CreateTargetPhraseCollection, but don't create
|
||||
const size_t size = source.GetSize();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user