-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathFiles.ecl
61 lines (47 loc) · 1.65 KB
/
Files.ecl
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
60
61
IMPORT Std;
EXPORT Files := MODULE
EXPORT GUID_t := STRING36; // UUID string format
EXPORT NAMEID_t := UNSIGNED4;
EXPORT NAME_HASH_t := UNSIGNED8;
//------------------------------------------------------------
EXPORT CommonRawDataLayout := RECORD
GUID_t entity_guid; // Entity ID
GUID_t name_guid; // Entity Name ID
UTF8 name; // Entity Name
END;
//------------------------------------------------------------
EXPORT NameIndex(STRING path) := INDEX
(
{NAME_HASH_t name_hash},
{
UNSIGNED1 edit_distance,
UNSIGNED1 word_id,
NAMEID_t name_id
},
DYNAMIC(path)
);
//------------------------------------------------------------
EXPORT NameIDIndex(STRING path) := INDEX
(
{NAMEID_t name_id},
{
GUID_t entity_guid,
UNSIGNED1 word_count
},
DYNAMIC(path)
);
//------------------------------------------------------------
EXPORT EntityIDIndex(STRING path) := INDEX
(
{GUID_t entity_guid},
{
NAMEID_t name_id,
GUID_t name_guid,
UTF8 full_name {BLOB}
},
DYNAMIC(path)
);
//------------------------------------------------------------
EXPORT StopwordDS(STRING path) := DATASET(path, {UTF8 word}, FLAT, OPT);
//------------------------------------------------------------
END;