diff options
author | Ulrich Germann <ugermann@inf.ed.ac.uk> | 2014-07-09 05:41:28 +0400 |
---|---|---|
committer | Ulrich Germann <ugermann@inf.ed.ac.uk> | 2014-07-09 05:41:28 +0400 |
commit | 4d41211c2cd6eb75c5a229c10e98fdfa1acff3b4 (patch) | |
tree | 142dca24625b301147a931f728825dd40cf74e53 /moses/TranslationModel/UG/try-align.cc | |
parent | 28d64e23396cba53a83b75e01e9977db636e2285 (diff) |
Major overhaul of Mmsapt. Reorganization of old and addition of new features in phrase tables. Many critical bug fixes.
Diffstat (limited to 'moses/TranslationModel/UG/try-align.cc')
-rw-r--r-- | moses/TranslationModel/UG/try-align.cc | 47 |
1 files changed, 24 insertions, 23 deletions
diff --git a/moses/TranslationModel/UG/try-align.cc b/moses/TranslationModel/UG/try-align.cc index 30c87ccab..483ad2c34 100644 --- a/moses/TranslationModel/UG/try-align.cc +++ b/moses/TranslationModel/UG/try-align.cc @@ -2,32 +2,33 @@ using namespace std; using namespace Moses; +// currently broken Mmsapt* PT; int main(int argc, char* argv[]) { - string base = argv[1]; - string L1 = argv[2]; - string L2 = argv[3]; - ostringstream buf; - buf << "Mmsapt name=PT0 output-factor=0 num-features=5 base=" - << base << " L1=" << L1 << " L2=" << L2; - string configline = buf.str(); - PT = new Mmsapt(configline); - PT->Load(); - float w[] = { 0.0582634, 0.0518865, 0.0229819, 0.00640856, 0.647506 }; - vector<float> weights(w,w+5); - PT->setWeights(weights); - // these values are taken from a moses.ini file; - // is there a convenient way of accessing them from within mmsapt ??? - string eline,fline; - // TokenIndex V; V.open("crp/trn/mm/de.tdx"); - while (getline(cin,eline) && getline(cin,fline)) - { - cout << eline << endl; - cout << fline << endl; - PT->align(eline,fline); - } - delete PT; + // string base = argv[1]; + // string L1 = argv[2]; + // string L2 = argv[3]; + // ostringstream buf; + // buf << "Mmsapt name=PT0 output-factor=0 num-features=5 base=" + // << base << " L1=" << L1 << " L2=" << L2; + // string configline = buf.str(); + // PT = new Mmsapt(configline); + // PT->Load(); + // float w[] = { 0.0582634, 0.0518865, 0.0229819, 0.00640856, 0.647506 }; + // vector<float> weights(w,w+5); + // PT->setWeights(weights); + // // these values are taken from a moses.ini file; + // // is there a convenient way of accessing them from within mmsapt ??? + // string eline,fline; + // // TokenIndex V; V.open("crp/trn/mm/de.tdx"); + // while (getline(cin,eline) && getline(cin,fline)) + // { + // cout << eline << endl; + // cout << fline << endl; + // PT->align(eline,fline); + // } + // delete PT; } |