push calling of OnlyTheseFactors() to individual PT implementations, as needed

This commit is contained in:
Hieu Hoang 2013-06-17 18:31:06 +01:00
parent 8c6344c4ce
commit e51c4feb6b
2 changed files with 4 additions and 2 deletions

View File

@ -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);
}

View File

@ -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();