Blame view

morfeusz/morfeusz_generator.cpp 898 Bytes
Michał Lenart authored
1
/* 
Michał Lenart authored
2
 * File:   morfeusz_generator.cpp
Michał Lenart authored
3
4
 * Author: mlenart
 *
Michał Lenart authored
5
 * Created on 21 styczeń 2014, 12:02
Michał Lenart authored
6
7
8
9
 */

#include <cstdlib>
#include <iostream>
Michał Lenart authored
10
#include <vector>
Michał Lenart authored
11
#include "fsa/fsa.hpp"
Michał Lenart authored
12
#include "Tagset.hpp"
Michał Lenart authored
13
#include "Morfeusz.hpp"
Michał Lenart authored
14
#include "MorfeuszVersion.hpp"
Michał Lenart authored
15
#include "const.hpp"
Michał Lenart authored
16
#include "cli/cli.hpp"
Michał Lenart authored
17
#include "cli/outputUtils.hpp"
Michał Lenart authored
18
19

using namespace std;
Michał Lenart authored
20
using namespace morfeusz;
Michał Lenart authored
21
Michał Lenart authored
22
int main(int argc, const char** argv) {
Michał Lenart authored
23
    cerr << "Morfeusz generator, version: " << MORFEUSZ_VERSION << endl;
Michał Lenart authored
24
    ez::ezOptionParser& opt = *getOptions(argc, argv, GENERATOR);
Michał Lenart authored
25
    Morfeusz morfeusz;
Michał Lenart authored
26
    initializeMorfeusz(opt, morfeusz);
Michał Lenart authored
27
28
29
30
    string line;
    while (getline(cin, line)) {
        //        printf("%s\n", line.c_str());
        vector<MorphInterpretation> res;
Michał Lenart authored
31
        morfeusz.generate(line, res);
Michał Lenart authored
32
        printMorphResults(res, false);
Michał Lenart authored
33
34
    }
    printf("\n");
Michał Lenart authored
35
    delete &opt;
Michał Lenart authored
36
37
    return 0;
}