#ifndef _TRANSLATION_TABLE_ #define _TRANSLATION_TABLE_ #include #include #include #include #include using namespace std; using namespace tr1; namespace fs = boost::filesystem; class Alignment; class DataArray; typedef boost::hash > PairHash; class TranslationTable { public: TranslationTable( shared_ptr source_data_array, shared_ptr target_data_array, shared_ptr alignment); double GetTargetGivenSourceScore(const string& source_word, const string& target_word); double GetSourceGivenTargetScore(const string& source_word, const string& target_word); void WriteBinary(const fs::path& filepath) const; private: shared_ptr source_data_array; shared_ptr target_data_array; unordered_map, pair, PairHash> translation_probabilities; }; #endif