More namespace fixes.

This commit is contained in:
Ulrich Germann 2015-08-10 15:14:44 +01:00
parent 67ba055213
commit 1dcd077806
4 changed files with 11 additions and 9 deletions

View File

@ -12,6 +12,7 @@
// using namespace Moses;
using namespace ugdiss;
using namespace sapt;
using namespace std;
typedef L2R_Token<SimpleWordId> Token;
TokenIndex V;
@ -19,7 +20,7 @@ SPTR<vector<vector<Token> > > C(new vector<vector<Token> >());
void
add_file(string fname)
{
filtering_istream in;
boost::iostreams::filtering_istream in;
open_input_stream(fname,in);
string line;
while (getline(in,line))

View File

@ -198,13 +198,14 @@ go(string t1name, string t2name, string A3filename)
{
typedef mmTtrack<TKN> track_t;
track_t T1(t1name),T2(t2name);
filtering_istream A3file; open_input_stream(A3filename,A3file);
boost::iostreams::filtering_istream A3file;
open_input_stream(A3filename, A3file);
string line; int check1=-1,check2=-1;
vector<id_type> idx1(1,0),idx2(1,0),idxm(1,mam.tellp());
vector<id_type> idx1(1,0),idx2(1,0),idxm(1, mam.tellp());
size_t tokenCount1=0,tokenCount2=0;
size_t skipCtr=0,lineCtr=0;
if (!getCheckValues(A3file,check1,check2))
if (!getCheckValues(A3file, check1, check2))
UTIL_THROW(util::Exception, "Mismatch in input files!");
for (sid = 0; sid < T1.size(); ++sid)

View File

@ -222,7 +222,7 @@ namespace Moses
m_bias_log = &std::cout;
else
{
m_bias_logger.reset(new ofstream(m_bias_logfile.c_str()));
m_bias_logger.reset(new std::ofstream(m_bias_logfile.c_str()));
m_bias_log = m_bias_logger.get();
}
}
@ -319,7 +319,7 @@ namespace Moses
// - sane word alignment?
vector<string> text1,text2,symal;
string line;
filtering_istream in1,in2,ina;
boost::iostreams::filtering_istream in1,in2,ina;
open_input_stream(bname+L1+".txt.gz",in1);
open_input_stream(bname+L2+".txt.gz",in2);

View File

@ -78,11 +78,11 @@ namespace Moses
size_t m_workers; // number of worker threads for sampling the bitexts
std::vector<std::string> m_feature_set_names; // one or more of: standard, datasource
std::string m_bias_logfile;
boost::scoped_ptr<ofstream> m_bias_logger; // for logging to a file
ostream* m_bias_log;
boost::scoped_ptr<std::ofstream> m_bias_logger; // for logging to a file
std::ostream* m_bias_log;
int m_bias_loglevel;
LexicalReordering* m_lr_func; // associated lexical reordering function
string m_lr_func_name; // name of associated lexical reordering function
std::string m_lr_func_name; // name of associated lexical reordering function
sapt::sampling_method m_sampling_method; // sampling method, see ug_bitext_sampler
boost::scoped_ptr<ug::ThreadPool> m_thread_pool;
public: