Moses::bitext::DocumentBias Class Reference

#include <ug_sampling_bias.h>

Inheritance diagram for Moses::bitext::DocumentBias:

Inheritance graph
[legend]
Collaboration diagram for Moses::bitext::DocumentBias:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 DocumentBias (std::vector< id_type > const &sid2doc, std::map< std::string, id_type > const &docname2docid, 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, std::map< std::string, id_type > const &docname2docid, std::ostream *log)
void init (std::map< std::string, float > const &biasmap, std::map< std::string, id_type > const &docname2docid)
float operator[] (id_type const idx) const
size_t size () const


Detailed Description

Definition at line 44 of file ug_sampling_bias.h.


Constructor & Destructor Documentation

Moses::bitext::DocumentBias::DocumentBias ( std::vector< id_type > const &  sid2doc,
std::map< std::string, id_type > const &  docname2docid,
std::string const &  server_url,
std::string const &  text,
std::ostream *  log 
)

Definition at line 61 of file ug_sampling_bias.cc.

References init_from_json(), Moses::bitext::SamplingBias::log, NULL, Moses::bitext::query_bias_server(), Moses::Timer::start(), and timer.

Here is the call graph for this function:

Moses::bitext::DocumentBias::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 
)

Definition at line 83 of file ug_sampling_bias.cc.

References init(), and Moses::bitext::SamplingBias::log.

Here is the call graph for this function:


Member Function Documentation

void Moses::bitext::DocumentBias::init ( std::map< std::string, float > const &  biasmap,
std::map< std::string, id_type > const &  docname2docid 
)

Definition at line 158 of file ug_sampling_bias.cc.

References m.

Referenced by DocumentBias().

Here is the caller graph for this function:

void Moses::bitext::DocumentBias::init_from_json ( std::string const &  json,
std::map< std::string, id_type > const &  docname2docid,
std::ostream *  log 
)

Definition at line 101 of file ug_sampling_bias.cc.

References init(), k, and m.

Referenced by DocumentBias().

Here is the call graph for this function:

Here is the caller graph for this function:

float Moses::bitext::DocumentBias::operator[] ( id_type const   idx  )  const [virtual]

Implements Moses::bitext::SamplingBias.

Definition at line 190 of file ug_sampling_bias.cc.

References m, and Moses::bitext::SamplingBias::m_sid2docid.

size_t Moses::bitext::DocumentBias::size (  )  const [virtual]


The documentation for this class was generated from the following files:

Generated on Sun Aug 9 00:33:49 2015 for Moses by  doxygen 1.5.9