Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'moses/TranslationModel/UG/mm/ug_sampling_bias.h')
-rw-r--r--moses/TranslationModel/UG/mm/ug_sampling_bias.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/moses/TranslationModel/UG/mm/ug_sampling_bias.h b/moses/TranslationModel/UG/mm/ug_sampling_bias.h
index 24d39689e..999d93704 100644
--- a/moses/TranslationModel/UG/mm/ug_sampling_bias.h
+++ b/moses/TranslationModel/UG/mm/ug_sampling_bias.h
@@ -20,6 +20,8 @@ namespace Moses
public:
int loglevel;
std::ostream* log;
+ std::map<std::string, float> m_bias_map; //Map to store the biasmap as you get it from the server
+ std::map<std::string, float>& getBiasMap();
virtual float
operator[](id_type const ID) const = 0;
// returns (unnormalized bias) for the class of item ID
@@ -46,6 +48,11 @@ namespace Moses
std::string const& server_url, std::string const& text,
std::ostream* log);
+ DocumentBias(std::vector<id_type> const& sid2doc,
+ std::map<std::string,id_type> const& docname2docid,
+ std::map<std::string, float> const& context_weights,
+ std::ostream* log);
+
void
init_from_json
( std::string const& json,