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

PhraseDictionaryDynSuffixArray.h « src « moses - github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 0d6be08ddffc55498fe4e38098f2c6803ea4a2d9 (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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#ifndef moses_PhraseDictionaryDynSuffixArray_h
#define moses_PhraseDictionaryDynSuffixArray_h

#include <map>

#include "PhraseDictionary.h"
#include "BilingualDynSuffixArray.h"

namespace Moses
{

class PhraseDictionaryDynSuffixArray: public PhraseDictionary
{
public:
  PhraseDictionaryDynSuffixArray(size_t m_numScoreComponent, PhraseDictionaryFeature* feature);
  ~PhraseDictionaryDynSuffixArray();
  bool Load( const std::vector<FactorType>& m_input
             , const std::vector<FactorType>& m_output
             , std::string m_source
             , std::string m_target
             , std::string m_alignments
             , const std::vector<float> &m_weight
             , size_t m_tableLimit
             , const LMList &languageModels
             , float weightWP);
  // functions below required by base class
  const TargetPhraseCollection* GetTargetPhraseCollection(const Phrase& src) const;
  void InitializeForInput(const InputType& i);
  void CleanUp();
  void insertSnt(string&, string&, string&);
  void deleteSnt(unsigned, unsigned);
  ChartRuleLookupManager *CreateRuleLookupManager(const InputType&, const ChartCellCollection&);
private:
  BilingualDynSuffixArray *m_biSA;
  std::vector<float> m_weight;
  size_t m_tableLimit;
  const LMList *m_languageModels;
  float m_weightWP;


};

} // end namespace
#endif