mosesdecoder/moses/TranslationModel/PhraseDictionaryDynSuffixArray.h
2013-05-21 12:47:26 +01:00

44 lines
1.3 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
, 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;
float m_weightWP;
};
} // end namespace
#endif