Blame view

morfeusz/MorphInterpretation.cpp 1.12 KB
Michał Lenart authored
1
2
3
4
5
6
7
8
/* 
 * File:   MorphInterpretation.cpp
 * Author: mlenart
 * 
 * Created on November 14, 2013, 11:47 AM
 */

#include <string>
Michał Lenart authored
9
#include <sstream>
Michał Lenart authored
10
11
#include "morfeusz2.h"
#include "Environment.hpp"
Michał Lenart authored
12
#include "const.hpp"
Michał Lenart authored
13
14
15

using namespace std;
Michał Lenart authored
16
17
namespace morfeusz {
Michał Lenart authored
18
19
20
21
22
23
24
25
26
27
28
29
    MorphInterpretation MorphInterpretation::createIgn(
            int startNode, int endNode,
            const std::string& orth,
            const std::string& lemma) {
        MorphInterpretation mi;
        mi.startNode = startNode;
        mi.endNode = endNode;
        mi.orth = orth;
        mi.lemma = lemma;
        mi.tagId = 0;
        mi.nameId = 0;
        mi.labelsId = 0;
Michał Lenart authored
30
        return mi;
Michał Lenart authored
31
    }
Michał Lenart authored
32
33
34
35
36
37
38
39
40
41
42
43
44

    /**
     * Creates new instance with "sp" tag (meaning: "this is a sequence of whitespaces")
     */
    MorphInterpretation MorphInterpretation::createWhitespace(int startNode, int endNode, const std::string& orth) {
        MorphInterpretation mi;
        mi.startNode = startNode;
        mi.endNode = endNode;
        mi.orth = orth;
        mi.lemma = orth;
        mi.tagId = 1;
        mi.nameId = 0;
        mi.labelsId = 0;
Michał Lenart authored
45
        return mi;
Michał Lenart authored
46
    }
Michał Lenart authored
47
Michał Lenart authored
48
}