mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2025-01-08 20:46:59 +03:00
50 lines
1.0 KiB
C++
50 lines
1.0 KiB
C++
/*
|
|
* System.h
|
|
*
|
|
* Created on: 23 Oct 2015
|
|
* Author: hieu
|
|
*/
|
|
|
|
#pragma once
|
|
#include <vector>
|
|
#include <boost/thread/tss.hpp>
|
|
#include "FF/FeatureFunctions.h"
|
|
#include "Weights.h"
|
|
#include "MemPool.h"
|
|
#include "Recycler.h"
|
|
#include "moses/FactorCollection.h"
|
|
#include "moses/Parameter.h"
|
|
|
|
class FeatureFunction;
|
|
class StatefulFeatureFunction;
|
|
class PhraseTable;
|
|
class Hypothesis;
|
|
|
|
class System {
|
|
public:
|
|
System(const Moses::Parameter ¶msArg);
|
|
virtual ~System();
|
|
|
|
MemPool &GetManagerPool() const;
|
|
Recycler<Hypothesis*> &GetHypoRecycle() const;
|
|
|
|
const Moses::Parameter ¶ms;
|
|
mutable Moses::FactorCollection vocab;
|
|
FeatureFunctions featureFunctions;
|
|
Weights weights;
|
|
std::vector<const PhraseTable*> mappings;
|
|
|
|
MemPool systemPool;
|
|
|
|
size_t stackSize;
|
|
int maxDistortion;
|
|
size_t maxPhraseLength;
|
|
protected:
|
|
mutable boost::thread_specific_ptr<MemPool> m_managerPool;
|
|
mutable boost::thread_specific_ptr<Recycler<Hypothesis*> > m_hypoRecycle;
|
|
|
|
void LoadWeights();
|
|
void LoadMappings();
|
|
};
|
|
|