-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathConversionTypes.h
More file actions
48 lines (42 loc) · 874 Bytes
/
ConversionTypes.h
File metadata and controls
48 lines (42 loc) · 874 Bytes
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
#pragma once
#include <cstdint>
#include <string>
#include <vector>
enum class DictionaryKind
{
System = 0,
User = 1,
PersonName = 2,
PlaceName = 3,
};
struct LexiconEntry
{
std::wstring reading;
std::wstring surface;
int wordCost = 0;
int leftId = 0;
int rightId = 0;
std::uint16_t posId = 0;
DictionaryKind dictionaryKind = DictionaryKind::System;
std::uint32_t sourceEntryId = 0;
};
struct BunsetsuConversion
{
int start = 0;
int length = 0;
std::wstring reading;
std::wstring surface;
std::vector<std::wstring> alternatives;
};
struct ConversionCandidate
{
std::wstring surface;
std::wstring reading;
int totalCost = 0;
std::vector<BunsetsuConversion> bunsetsu;
};
struct ConversionResult
{
std::vector<ConversionCandidate> candidates;
std::vector<int> bestBoundaries;
};