2015-08-09 22:51:21 +03:00
|
|
|
// -*- mode: c++; indent-tabs-mode: nil; tab-width:2 -*-
|
2014-10-25 23:06:24 +04:00
|
|
|
#include "mmsapt.h"
|
|
|
|
#include "moses/TranslationModel/PhraseDictionaryTreeAdaptor.h"
|
|
|
|
#include <boost/foreach.hpp>
|
|
|
|
#include <boost/format.hpp>
|
|
|
|
#include <boost/tokenizer.hpp>
|
|
|
|
#include <boost/shared_ptr.hpp>
|
|
|
|
#include <algorithm>
|
|
|
|
#include <iostream>
|
2015-12-17 03:21:25 +03:00
|
|
|
#include "moses/parameters/AllOptions.h"
|
2014-10-25 23:06:24 +04:00
|
|
|
|
|
|
|
using namespace Moses;
|
2015-08-09 22:51:21 +03:00
|
|
|
using namespace sapt;
|
2014-10-25 23:06:24 +04:00
|
|
|
using namespace std;
|
|
|
|
using namespace boost;
|
|
|
|
|
|
|
|
int main()
|
|
|
|
{
|
|
|
|
string line;
|
2014-10-25 23:06:38 +04:00
|
|
|
while(getline(cin,line))
|
|
|
|
{
|
|
|
|
if (line.empty()) continue;
|
|
|
|
size_t k = line.find_first_not_of(" ");
|
2015-12-17 03:21:25 +03:00
|
|
|
if (line.find("Mmsapt") != k &&
|
|
|
|
line.find("PhraseDictionaryBitextSampling") != k)
|
|
|
|
continue;
|
|
|
|
AllOptions::ptr opts(new AllOptions);
|
2014-10-25 23:06:38 +04:00
|
|
|
Mmsapt PT(line);
|
2015-12-17 03:21:25 +03:00
|
|
|
PT.Load(opts, false);
|
2014-10-25 23:06:38 +04:00
|
|
|
cout << PT.GetName() << ":" << endl;
|
|
|
|
vector<string> const& fnames = PT.GetFeatureNames();
|
|
|
|
BOOST_FOREACH(string const& s, fnames)
|
2015-12-17 03:21:25 +03:00
|
|
|
cout << s << endl;
|
2014-10-25 23:06:38 +04:00
|
|
|
cout << endl;
|
|
|
|
}
|
2014-10-25 23:06:24 +04:00
|
|
|
exit(0);
|
|
|
|
}
|
2015-04-30 08:05:11 +03:00
|
|
|
|
|
|
|
|
2014-10-25 23:06:24 +04:00
|
|
|
|