Welcome to mirror list, hosted at ThFree Co, Russian Federation.

PhraseDictionaryBase.cpp « src « moses - github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 76b0e52d3cff2ef8cf8402b70fa7ce05ebea61fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include "PhraseDictionaryBase.h"
#include "StaticData.h"
#include "Input.h"

PhraseDictionaryBase::PhraseDictionaryBase(size_t noScoreComponent)
	: Dictionary(noScoreComponent),m_maxTargetPhrase(0)
{
	const_cast<ScoreIndexManager&>(StaticData::Instance()->GetScoreIndexManager()).AddScoreProducer(this);
}

PhraseDictionaryBase::~PhraseDictionaryBase() {}
	
const TargetPhraseCollection *PhraseDictionaryBase::
GetTargetPhraseCollection(InputType const& src,WordsRange const& range) const 
{
	return GetTargetPhraseCollection(src.GetSubString(range));
}

const std::string PhraseDictionaryBase::GetScoreProducerDescription() const
{
	return "Translation score, file=" + m_filename;
}

unsigned int PhraseDictionaryBase::GetNumScoreComponents() const
{
	return this->GetNoScoreComponents();
}