Blame view

morfeusz/morfeusz_analyzer.cpp 775 Bytes
Michał Lenart authored
1
2
3
4
5
6
7
8
9
/* 
 * File:   main.cc
 * Author: mlenart
 *
 * Created on October 8, 2013, 12:41 PM
 */

#include <cstdlib>
#include <iostream>
Michał Lenart authored
10
#include <vector>
Michał Lenart authored
11
#include <map>
Michał Lenart authored
12
#include "morfeusz2.h"
Michał Lenart authored
13
14
#include "cli/cli.hpp"
Michał Lenart authored
15
using namespace std;
Michał Lenart authored
16
using namespace morfeusz;
Michał Lenart authored
17
18

int main(int argc, const char** argv) {
Michał Lenart authored
19
    cerr << "Morfeusz analyzer, version: " << Morfeusz::getVersion() << endl;
Michał Lenart authored
20
    ez::ezOptionParser& opt = *getOptions(argc, argv, ANALYZER);
Michał Lenart authored
21
    Morfeusz* morfeusz = initializeMorfeusz(opt, ANALYZER);
Michał Lenart authored
22
    string line;
Michał Lenart authored
23
    vector<MorphInterpretation> res;
Michał Lenart authored
24
    while (getline(cin, line)) {
Michał Lenart authored
25
        res.resize(0);
Michał Lenart authored
26
27
        morfeusz->analyse(line, res);
        printMorphResults(*morfeusz, res, true);
Michał Lenart authored
28
    }
Michał Lenart authored
29
    delete morfeusz;
Michał Lenart authored
30
    printf("\n");
Michał Lenart authored
31
    delete &opt;
Michał Lenart authored
32
33
    return 0;
}