#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; class TranslationTable { public: TranslationTable( shared_ptr source_data_array, shared_ptr target_data_array, const Alignment& alignment); double GetEgivenFScore(const string& source_word, const string& target_word); double GetFgivenEScore(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, boost::hash > > translation_probabilities; }; #endif