forked from MichoelR/trop2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbigtables_export.py
41 lines (37 loc) · 900 Bytes
/
bigtables_export.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
import os, sys, collections
from tf.fabric import Fabric
# locations = '~/github/etcbc'
locations = '/home/oem/text-fabric-data/etcbc'
coreModule = 'bhsa'
sources = [coreModule, 'phono']
# version = '2017'
version = 'c'
tempDir = os.path.expanduser(f'{locations}/{coreModule}/_temp/{version}/r')
tableFile = f'{tempDir}/{coreModule}{version}.txt'
modules = [f'{s}/tf/{version}' for s in sources]
TF = Fabric(locations=locations, modules=modules)
api = TF.load('')
api = TF.load(('suffix_person',
'tab',
'trailer',
'trailer_utf8',
'txt',
'typ',
'uvf',
'vbe',
'vbs',
'verse',
'voc_lex',
'voc_lex_utf8',
'vs',
'vt',
'distributional_parent',
'functional_parent',
'mother',
'oslots'))
allFeatures = TF.explore(silent=False, show=True)
loadableFeatures = allFeatures['nodes'] + allFeatures['edges']
del(api)
api = TF.load(loadableFeatures)
api.makeAvailableIn(globals())
print('done')