mosesdecoder/moses/TranslationModel/PhraseDictionaryDynSuffixArray.h
2013-02-22 19:17:57 +00:00

46 lines
1.4 KiB
C++

#ifndef moses_PhraseDictionaryDynSuffixArray_h
#define moses_PhraseDictionaryDynSuffixArray_h
#include <map>
#include "moses/TranslationModel/PhraseDictionary.h"
#include "moses/TranslationModel/BilingualDynSuffixArray.h"
namespace Moses
{
/** Implementation of a phrase table using the biconcor suffix array.
* Wrapper around a BilingualDynSuffixArray object
*/
class PhraseDictionaryDynSuffixArray: public PhraseDictionary
{
public:
PhraseDictionaryDynSuffixArray(const std::string &line);
~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 insertSnt(string&, string&, string&);
void deleteSnt(unsigned, unsigned);
ChartRuleLookupManager *CreateRuleLookupManager(const InputType&, const ChartCellCollectionBase&);
private:
BilingualDynSuffixArray *m_biSA;
std::vector<float> m_weight;
size_t m_tableLimit;
const LMList *m_languageModels;
float m_weightWP;
};
} // end namespace
#endif