2010-02-24 14:15:44 +03:00
|
|
|
#ifndef moses_PhraseDictionaryDynSuffixArray_h
|
|
|
|
#define moses_PhraseDictionaryDynSuffixArray_h
|
2010-02-12 14:05:43 +03:00
|
|
|
|
2010-04-07 15:02:04 +04:00
|
|
|
#include <map>
|
|
|
|
|
2013-07-28 19:38:33 +04:00
|
|
|
#include "moses/TypeDef.h"
|
2012-11-27 19:08:31 +04:00
|
|
|
#include "moses/TranslationModel/PhraseDictionary.h"
|
2012-11-27 20:31:42 +04:00
|
|
|
#include "moses/TranslationModel/BilingualDynSuffixArray.h"
|
2010-02-12 14:05:43 +03:00
|
|
|
|
2011-02-24 16:14:42 +03:00
|
|
|
namespace Moses
|
|
|
|
{
|
2010-02-12 14:05:43 +03:00
|
|
|
|
2012-06-29 02:29:46 +04:00
|
|
|
/** Implementation of a phrase table using the biconcor suffix array.
|
|
|
|
* Wrapper around a BilingualDynSuffixArray object
|
|
|
|
*/
|
2011-02-24 16:14:42 +03:00
|
|
|
class PhraseDictionaryDynSuffixArray: public PhraseDictionary
|
|
|
|
{
|
|
|
|
public:
|
2013-02-22 23:17:57 +04:00
|
|
|
PhraseDictionaryDynSuffixArray(const std::string &line);
|
2011-02-24 16:14:42 +03:00
|
|
|
~PhraseDictionaryDynSuffixArray();
|
2013-06-05 13:46:42 +04:00
|
|
|
bool InitDictionary();
|
2013-06-26 20:12:22 +04:00
|
|
|
void Load();
|
2011-02-24 16:14:42 +03:00
|
|
|
// functions below required by base class
|
2013-08-24 00:02:03 +04:00
|
|
|
const TargetPhraseCollection* GetTargetPhraseCollectionLEGACY(const Phrase& src) const;
|
2010-05-07 13:50:19 +04:00
|
|
|
void insertSnt(string&, string&, string&);
|
|
|
|
void deleteSnt(unsigned, unsigned);
|
2013-07-31 15:25:34 +04:00
|
|
|
ChartRuleLookupManager *CreateRuleLookupManager(const ChartParser &, const ChartCellCollectionBase&);
|
2013-06-26 20:12:22 +04:00
|
|
|
void SetParameter(const std::string& key, const std::string& value);
|
2010-02-12 14:05:43 +03:00
|
|
|
private:
|
2011-02-24 16:14:42 +03:00
|
|
|
BilingualDynSuffixArray *m_biSA;
|
2013-06-26 20:12:22 +04:00
|
|
|
std::string m_source, m_target, m_alignments;
|
2010-04-08 21:57:38 +04:00
|
|
|
|
2013-06-26 20:12:22 +04:00
|
|
|
std::vector<float> m_weight;
|
2010-02-12 14:05:43 +03:00
|
|
|
};
|
2010-04-08 18:52:35 +04:00
|
|
|
|
2010-02-12 14:05:43 +03:00
|
|
|
} // end namespace
|
|
|
|
#endif
|