%load_ext autoreload
%autoreload 2
from tf.app import use
Here we suppress the loading of the parallels module (with the edge feature sim
in it).
Normally it is loaded (see config.yaml),
but during feature development we may not have it yet.
A = use("etcbc/dss:clone", checkout="clone", provenanceSpec=dict(moduleSpecs=[]), hoist=globals())
This is Text-Fabric 9.2.1 Api reference : https://annotation.github.io/text-fabric/tf/cheatsheet.html 66 features found and 0 ignored
T.formats
{'lex-default': 'word', 'lex-orig-full': 'word', 'lex-source-full': 'word', 'lex-trans-full': 'word', 'morph-source-full': 'word', 'text-orig-extra': 'word', 'text-orig-full': 'sign', 'text-source-extra': 'word', 'text-source-full': 'sign', 'text-trans-extra': 'word', 'text-trans-full': 'sign', 'layout-orig-full': 'sign', 'layout-source-full': 'sign', 'layout-trans-full': 'sign'}
examplefragment = ("1Q1", "f1")
f = T.nodeFromSection(examplefragment)
lines = L.d(f, otype="line")
for line in lines:
A.pretty(line, fmt="layout-orig-full")
You can also put the data in some other place and load it without any special configuration.
We load the data as it is in our local ~/github/etcbc/dss directory, without using the config.yaml in ~/github/etcbc/dss/app:
A = use("data:~/github/etcbc/dss/tf/0.9", hoist=globals())
This is Text-Fabric 9.2.1 Api reference : https://annotation.github.io/text-fabric/tf/cheatsheet.html 66 features found and 0 ignored
But now the display is not as rich and it makes default choices without knowing what the best choices for the DSS are.
T.formats
{'lex-default': 'word', 'lex-orig-full': 'word', 'lex-source-full': 'word', 'lex-trans-full': 'word', 'morph-source-full': 'word', 'text-orig-extra': 'word', 'text-orig-full': 'sign', 'text-source-extra': 'word', 'text-source-full': 'sign', 'text-trans-extra': 'word', 'text-trans-full': 'sign'}
examplefragment = ("1Q1", "f1")
f = T.nodeFromSection(examplefragment)
lines = L.d(f, otype="line")
for line in lines:
A.pretty(line, fmt="text-orig-full")
When you develop a new version of the features outside the etcbc/dss repo you can still benefit from the dss-app.
Just copy ~/github/etcbc/app to the directory of your choice, e.g. ~/Downloads/dss.
A = use("app:~/Downloads/dss/app", hoist=globals())
This is Text-Fabric 9.2.1 Api reference : https://annotation.github.io/text-fabric/tf/cheatsheet.html 66 features found and 0 ignored
examplefragment = ("1Q1", "f1")
f = T.nodeFromSection(examplefragment)
lines = L.d(f, otype="line")
for line in lines:
A.pretty(line, fmt="layout-orig-full")