Morfeusz.hpp
1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/*
* File: Morfeusz.hpp
* Author: lennyn
*
* Created on November 13, 2013, 5:21 PM
*/
#ifndef MORFEUSZ_HPP
#define MORFEUSZ_HPP
#include <string>
#include "MorphInterpretation.hpp"
//#include "interpretations.hpp"
class Morfeusz;
class AnalyzeResult;
class ResultsIterator;
class Morfeusz {
public:
AnalyzeResult analyze(const std::string& text);
Morfeusz();
Morfeusz(const Morfeusz& orig);
virtual ~Morfeusz();
private:
void processOneWord(const char*& inputData, int startNodeNum, vector<MorphInterpretation>& resInterps);
};
class ResultsIterator {
public:
ResultsIterator(
const std::string& text,
const Morfeusz& morfeusz);
ResultsIterator(
const char* startOfInput,
const char* endOfInput,
const Morfeusz& morfeusz);
virtual ~ResultsIterator();
// ResultsIterator(int* x);
ResultsIterator(const ResultsIterator& mit);
ResultsIterator& operator++();
ResultsIterator operator++(int);
bool operator==(const ResultsIterator& rhs);
bool operator!=(const ResultsIterator& rhs);
MorphInterpretation& operator*();
private:
const char* rawInput;
const char* endOfInput;
};
struct AnalyzeResult {
ResultsIterator iterator;
const ResultsIterator end;
};
#endif /* MORFEUSZ_HPP */