Skip to content
Snippets Groups Projects

Johannes

Merged Alexis Nasr requested to merge johannes into master
4 files
+ 71
0
Compare changes
  • Side-by-side
  • Inline
Files
4
+ 39
0
#include <iostream>
#include <fstream>
#include "maca_lemmatizer_export.h"
#include "maca_trans_parser_export.h"
#include "maca_trans_tagger_export.h"
// test programme to be able using valgrind on the exported part of macaon
using namespace std ;
int main(int argc, char *argv[]) {
if (argc < 4) {
cerr << "usage: " << argv[0] << " <langue> <mcd-file> <mcf-file>" << endl;
return 1;
}
//MacaonTransTagger *mt = new MacaonTransTagger(argv[1], argv[2]);
//MacaonTransLemmatizer *ml = new MacaonTransLemmatizer(argv[1], argv[2]);
MacaonTransParser *mp = new MacaonTransParser(argv[1], argv[2]);
ifstream ifp(argv[3]);
string text;
string line;
while (!ifp.eof()) {
getline(ifp, line);
text += line + "\n";
}
//const char *tags = mt->tagmcf(text.c_str());
//const char *lemmas = ml->lemmatizemcf(tags);
//const char *deps = mp->parsemcf(lemmas);
const char *deps = mp->parsemcf(text.c_str());
cout << deps << endl;
delete mp;
//delete ml;
//delete mt;
}
Loading