00001
00002 #include "mmsapt.h"
00003 #include "moses/TranslationModel/PhraseDictionaryTreeAdaptor.h"
00004 #include <boost/foreach.hpp>
00005 #include <boost/format.hpp>
00006 #include <boost/tokenizer.hpp>
00007 #include <boost/shared_ptr.hpp>
00008 #include <algorithm>
00009 #include <iostream>
00010 #include "moses/parameters/AllOptions.h"
00011
00012 using namespace Moses;
00013 using namespace sapt;
00014 using namespace std;
00015 using namespace boost;
00016
00017 int main()
00018 {
00019 string line;
00020 while(getline(cin,line))
00021 {
00022 if (line.empty()) continue;
00023 size_t k = line.find_first_not_of(" ");
00024 if (line.find("Mmsapt") != k &&
00025 line.find("PhraseDictionaryBitextSampling") != k)
00026 continue;
00027 AllOptions::ptr opts(new AllOptions);
00028 Mmsapt PT(line);
00029 PT.Load(opts, false);
00030 cout << PT.GetName() << ":" << endl;
00031 vector<string> const& fnames = PT.GetFeatureNames();
00032 BOOST_FOREACH(string const& s, fnames)
00033 cout << s << endl;
00034 cout << endl;
00035 }
00036 exit(0);
00037 }
00038
00039
00040