-
Notifications
You must be signed in to change notification settings - Fork 3
/
utils.py
70 lines (65 loc) · 1.73 KB
/
utils.py
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
62
63
64
65
66
67
68
69
70
import os
manuscript_data_path = os.path.join(os.path.abspath(os.path.dirname(os.path.dirname(__file__))), "m-k-manuscript-data") # default m&k data directory
ms_xml_path = os.path.join(manuscript_data_path, "ms-xml")
versions = ['tc', 'tcn', 'tl']
version_paths = [os.path.join(ms_xml_path, version) for version in versions]
tc_path, tcn_path, tl_path = version_paths
ms_txt_path = os.path.join(manuscript_data_path, "ms-txt")
entries_path = os.path.join(manuscript_data_path,"entries")
all_folios_path = os.path.join(manuscript_data_path, "allFolios")
metadata_path = os.path.join(manuscript_data_path, "metadata")
prop_dict = {
'animal': 'al',
'body_part': 'bp',
'currency': 'cn',
'definition': 'df',
'environment': 'env',
'material': 'm',
'medical': 'md',
'measurement': 'ms',
'music': 'mu',
'plant': 'pa',
'place': 'pl',
'personal_name': 'pn',
'profession': 'pro',
'sensory': 'sn',
'tool': 'tl',
'time': 'tmp',
'weapon': 'wp',
'german': 'de',
'greek': 'el',
'italian': 'it',
'latin': 'la',
'french': 'fr',
'occitan': 'oc',
'poitevin': 'po'
}
categories = [
"lists",
"medicine",
"stones",
"varnish",
"arms and armor",
"casting",
"metal process",
"practical optics",
"decorative",
"painting",
"glass process",
"household and daily life",
"tool",
"wood and its coloring",
"cultivation",
"merchants",
"dyeing",
"preserving",
"tricks and sleight of hand",
"corrosives",
"animal husbandry",
"wax process",
"printing",
"alchemy",
"La boutique",
"manuscript structure"
]
stylesheet_path = os.path.join(os.path.abspath(os.path.dirname(__file__)), "annotations.xslt")