{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "%load_ext autoreload\n", "%autoreload 2" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "from tf.app import use" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Cluster display in Old Babylonian\n", "\n", "We show some details of the display logic by following an example: cluster nodes in the Old Babylonian corpus.\n", "\n", "Clusters are difficult, because\n", "\n", "* they do not necessarily respect proper embedding\n", "* material can be part of several clusters\n", "\n", "We show how we deal with the second part and prevent multiple display of members of multiple clusters.\n", "As an illustration, we'll show the effect of an earlier bug and indicate the fix.\n", "\n", "We start with loading the corpus." ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "data": { "text/html": [ "TF-app: ~/github/annotation/app-oldbabylonian/code" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "data: ~/github/Nino-cunei/oldbabylonian/tf/1.0.6" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "Text-Fabric: Text-Fabric API 8.3.4, app-oldbabylonian, Search Reference
Data: OLDBABYLONIAN, Character table, Feature docs
Features:
Old Babylonian Letters 1900-1600: Cuneiform tabletsARK
after
afterr
afteru
atf
atfpost
atfpre
author
col
collated
collection
comment
damage
det
docnote
docnumber
excavation
excised
face
flags
fraction
genre
grapheme
graphemer
graphemeu
lang
langalt
ln
lnc
lnno
material
missing
museumcode
museumname
object
operator
operatorr
operatoru
otype
period
pnumber
primecol
primeln
pubdate
question
reading
readingr
readingu
remarkable
remarks
repeat
srcLn
srcLnNum
srcfile
subgenre
supplied
sym
symr
symu
trans
transcriber
translation@ll
type
uncertain
volume
oslots
" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
Text-Fabric API: names N F E L T S C TF directly usable

" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "A = use(\"oldbabylonian:clone\", checkout=\"clone\", hoist=globals())" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ " 0.29s All features loaded/computed - for details use loadLog()\n" ] }, { "data": { "text/html": [ "" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "A.reuse()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# An example line\n", "\n", "Here is a line with some nested clusters.\n", "In fact, it is the first line of the corpus.\n", "\n", "The node number is stored in the variable `ln`.\n", "\n", "We show the raw ATF source of the line, and the text according to several text formats." ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "230788" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "ln = F.otype.s(\"line\")[0]\n", "ln" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "'1. [a-na] _{d}suen_-i-[din-nam]'" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "F.srcLn.v(ln)" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "'[a-na] _{d}suen_-i-[din-nam]'" ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "T.text(ln)" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "'a-na dโผsuen-i-din-nam'" ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "T.text(ln, fmt=\"text-orig-rich\")" ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "'๐’€€๐’ˆพ ๐’€ญ๐’‚—๐’ช๐’„ฟ๐’ท๐’‰†'" ] }, "execution_count": 8, "metadata": {}, "output_type": "execute_result" } ], "source": [ "T.text(ln, fmt=\"text-orig-unicode\")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "N.B: These are the right unicodes but not the right signs, we need another font for that.\n", "\n", "We can get the right signs by using `plain`:" ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
P509373 obverse:1ย ย ๐’€€๐’ˆพ ๐’€ญ๐’‚—๐’ช๐’„ฟ๐’ท๐’‰†
" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "A.plain(ln, fmt=\"text-orig-unicode\")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "even better, we translate the effect of clusters into layout:" ] }, { "cell_type": "code", "execution_count": 10, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
P509373 obverse:1ย ย ๐’€€๐’ˆพ ๐’€ญ๐’‚—๐’ช๐’„ฟ๐’ท๐’‰†
" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "A.plain(ln, fmt=\"layout-orig-unicode\")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Click on the passage link in order to go to the page for this tablet on CDLI, where you can read off the\n", "exact source:\n", "\n", "```\n", "1. [a-na] _{d}suen_-i-[din-nam]\n", "```" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## The clusters\n", "\n", "By means of the\n", "[`L` API](https://annotation.github.io/text-fabric/tf/core/locality.html)\n", "the clusters of this line can be found.\n", "\n", "They are returned as a tuple of nodes." ] }, { "cell_type": "code", "execution_count": 11, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "(203220, 203221, 203222, 203223)" ] }, "execution_count": 11, "metadata": {}, "output_type": "execute_result" } ], "source": [ "cls = L.d(ln, otype=\"cluster\")\n", "cls" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "We'll give each cluster its own highlight color:" ] }, { "cell_type": "code", "execution_count": 12, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "{203220: 'cyan', 203221: 'yellow', 203222: 'lightsalmon', 203223: 'lightgreen'}" ] }, "execution_count": 12, "metadata": {}, "output_type": "execute_result" } ], "source": [ "colors = \"\"\"\n", " cyan\n", " yellow\n", " lightsalmon\n", " lightgreen\n", " goldenrod\n", " cornflowerblue\n", " forestgreen\n", " burlywood\n", " orange\n", " indianred\n", "\"\"\".strip().split()\n", "\n", "highlights = dict(zip(cls, colors))\n", "highlights" ] }, { "cell_type": "code", "execution_count": 13, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
P509373 obverse:1ย ย [a-na] _{d}suen_-i-[din-nam]
" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "A.plain(ln, highlights=highlights)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "In this corpus, `pretty` displays unfold until the word level, by default.\n", "\n", "But first we want it to unfold to the very end, to the sign level." ] }, { "cell_type": "code", "execution_count": 14, "metadata": { "lines_to_next_cell": 2 }, "outputs": [ { "data": { "text/html": [ "
line
word [a-na]
cluster
[a-
na]
word _{d}suen_-i-[din-nam]
cluster
cluster
_{d}
suen_-
i-
cluster
[din-
nam]
" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "A.pretty(ln, highlights=highlights, baseTypes=\"sign\")" ] }, { "cell_type": "markdown", "metadata": { "lines_to_next_cell": 2 }, "source": [ "Let's see some more examples.\n", "We have written a function to quickly execute examples.\n", "The first example is the index of the line in the list of all lines produces by `F.otype.s('line')`." ] }, { "cell_type": "code", "execution_count": 15, "metadata": {}, "outputs": [], "source": [ "def example(nLine, extraHighlights={}, **options):\n", " ln = F.otype.s(\"line\")[nLine]\n", " print(ln)\n", " print(F.srcLn.v(ln))\n", " print(T.text(ln))\n", " A.plain(ln, fmt=\"layout-orig-unicode\")\n", " cls = L.d(ln, otype=\"cluster\")\n", " highlights = dict(zip(cls, colors[0 : len(cls)]))\n", " print(highlights)\n", " A.plain(ln, highlights={**highlights, **extraHighlights}, **options)\n", " A.pretty(\n", " ln,\n", " highlights={**highlights, **extraHighlights},\n", " baseTypes=\"sign\",\n", " **options,\n", " explain=True\n", " )\n", " A.pretty(ln, highlights={**highlights, **extraHighlights}, **options)" ] }, { "cell_type": "code", "execution_count": 16, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "230788\n", "1. [a-na] _{d}suen_-i-[din-nam]\n", "[a-na] _{d}suen_-i-[din-nam]\n" ] }, { "data": { "text/html": [ "
P509373 obverse:1ย ย ๐’€€๐’ˆพ ๐’€ญ๐’‚—๐’ช๐’„ฟ๐’ท๐’‰†
" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{203220: 'cyan', 203221: 'yellow', 203222: 'lightsalmon', 203223: 'lightgreen'}\n" ] }, { "data": { "text/html": [ "
P509373 obverse:1ย ย 230788203220[a-na] 203221203222_{d}suen_-i-203223[din-nam]
" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "<0> TOP\n", " <1> line 230788 {1-7} \n", " <2> word 258163 {1-2} \n", " <3> cluster 203220 {1-2} \n", " <4> sign 1 {1} \n", " <4> sign 2 {2} \n", " <2> word 258164 {3-7} \n", " <3> cluster 203221 {3-4} \n", " <4> cluster 203222 {3} \n", " <5> sign 3 {3} \n", " <4> sign 4 {4} \n", " <3> sign 5 {5} \n", " <3> cluster 203223 {6-7} \n", " <4> sign 6 {6} \n", " <4> sign 7 {7} \n" ] }, { "data": { "text/html": [ "
line:230788
word:258163 [a-na]
cluster:203220
1 [a-
2 na]
word:258164 _{d}suen_-i-[din-nam]
cluster:203221
cluster:203222
3 _{d}
4 suen_-
5 i-
cluster:203223
6 [din-
7 nam]
" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
line:230788
word:258163 203220[a-na]
word:258164 203221203222_{d}suen_-i-203223[din-nam]
" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "example(0, withNodes=True)" ] }, { "cell_type": "code", "execution_count": 17, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "230810\n", "6'. x _[a-sza3_ s,i]-bi-it ku-un-zu-lum\n", "x _[a-sza3_ s,i]-bi-it ku-un-zu-lum\n" ] }, { "data": { "text/html": [ "
P509373 reverse:6'ย ย x ๐’€€๐’Šฎ ๐’ข๐’‰๐’€‰ ๐’†ช๐’Œฆ๐’ช๐’ˆ
" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{203268: 'cyan', 203269: 'yellow'}\n" ] }, { "data": { "text/html": [ "
P509373 reverse:6'ย ย 230810x 203268203269_[a-sza3_ 258252203268s,i]-bi-it ku-un-zu-lum
" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "<0> TOP\n", " <1> line 230810 {196-205} \n", " <2> word 258250 {196} \n", " <3> sign 196 {196} \n", " <2> word 258251 {197-198} \n", " <3> cluster 203268 {197-198} rno\n", " <4> cluster 203269 {197-198} \n", " <5> sign 197 {197} \n", " <5> sign 198 {198} \n", " <2> word 258252 {199-201} \n", " <3> cluster 203268 {199} lno\n", " <4> sign 199 {199} \n", " <3> sign 200 {200} \n", " <3> sign 201 {201} \n", " <2> word 258253 {202-205} \n", " <3> sign 202 {202} \n", " <3> sign 203 {203} \n", " <3> sign 204 {204} \n", " <3> sign 205 {205} \n" ] }, { "data": { "text/html": [ "
line:230810
word:258250 x
196 x
word:258251 _[a-sza3_
cluster:203268
cluster:203269
197 _[a-
198 sza3_
word:258252 s,i]-bi-it
cluster:203268
199 s,i]-
200 bi-
201 it
word:258253 ku-un-zu-lum
202 ku-
203 un-
204 zu-
205 lum
" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
line:230810
word:258250 x
word:258251 203268203269_[a-sza3_
word:258252 203268s,i]-bi-it
word:258253 ku-un-zu-lum
" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "example(22, withNodes=True, extraHighlights={258252: \"lightsalmon\"})" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# More examples\n", "\n", "We finish off with some more examples." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Something peculiar is going on.\n", "In order to talk about it, we add node numbers." ] }, { "cell_type": "code", "execution_count": 18, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "233341\n", "6. isz-tu sza-ad-da-aq-dam# a-na _sze#-[numun?_]\n", "isz-tu sza-ad-da-aq-dam# a-na _sze#-[numun?_]\n" ] }, { "data": { "text/html": [ "
P510623 obverse:6ย ย ๐’…–๐’Œ… ๐’Šญ๐’€œ๐’•๐’€๐’ฎ ๐’€€๐’ˆพ ๐’Šบ๐’†ฐ
" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{205585: 'cyan', 205586: 'yellow'}\n" ] }, { "data": { "text/html": [ "
P510623 obverse:6ย ย 233341isz-tu sza-ad-da-aq-dam# a-na 265903205585_sze#-205586[numun?_]
" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
line:233341
word:265900 isz-tu
20479 isz-
20480 tu
word:265901 sza-ad-da-aq-dam#
20481 sza-
20482 ad-
20483 da-
20484 aq-
20485 dam#
word:265902 a-na
20486 a-
20487 na
word:265903 _sze#-[numun?_]
cluster:205585
20488 _sze#-
cluster:205586
20489 [numun?_]
" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
line:233341
word:265900 isz-tu
word:265901 sza-ad-da-aq-dam#
word:265902 a-na
word:265903 205585_sze#-205586[numun?_]
" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "example(2553, withNodes=True, extraHighlights={265903: \"lightsalmon\"})" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# More cases" ] }, { "cell_type": "code", "execution_count": 19, "metadata": {}, "outputs": [], "source": [ "results = (\n", " (258201, 112),\n", " (258404, 591),\n", ")" ] }, { "cell_type": "code", "execution_count": 20, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
word:258201 7(disz)
cluster:203253
112 7(disz)
" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "n = results[0][0]\n", "A.pretty(n, highlights=set(results[0]), baseTypes=\"sign\", withNodes=True, explain=False)" ] }, { "cell_type": "code", "execution_count": 21, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
word:258404 4(disz)-kam_
cluster:203324
591 4(disz)-
592 kam_
" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "n = results[1][0]\n", "A.pretty(n, highlights=set(results[1]), baseTypes=\"sign\", withNodes=True, explain=False)" ] }, { "cell_type": "code", "execution_count": 22, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
word _szunigin
cluster
_szunigin
" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "w = 260817\n", "A.pretty(w, baseTypes=\"sign\", explain=False)" ] }, { "cell_type": "code", "execution_count": 23, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "_szunigin 6(gesz2) 2(u) 1(asz) 5(ban2) sze gur {gesz}ban2#_ [{gesz}me]-sze#-qum\n", "8. _szunigin 6(gesz2) 2(u) 1(asz) 5(ban2) sze gur {gesz}ban2#_ [{gesz}me]-sze#-qum\n" ] } ], "source": [ "ln = 231650\n", "print(T.text(ln))\n", "print(F.srcLn.v(ln))" ] }, { "cell_type": "code", "execution_count": 24, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
P510556 reverse:8ย ย _szunigin 6(gesz2) 2(u) 1(asz) 5(ban2) sze gur {gesz}ban2#_ [{gesz}me]-sze#-qum
" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
line
word _szunigin
cluster
_szunigin
word 6(gesz2)
cluster
6(gesz2)
word 2(u)
cluster
2(u)
word 1(asz)
cluster
1(asz)
word 5(ban2)
cluster
5(ban2)
word sze
cluster
sze
word gur
cluster
gur
word {gesz}ban2#_
cluster
cluster
{gesz}
ban2#_
word [{gesz}me]-sze#-qum
cluster
cluster
[{gesz}
me]-
sze#-
qum
" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "A.plain(\n", " ln,\n", " withNodes=False,\n", " baseTypes=\"sign\",\n", " explain=False,\n", " highlights={\n", " 204104: \"lightsalmon\",\n", " 204105: \"yellow\",\n", " 204106: \"lightgreen\",\n", " 204107: \"lightblue\",\n", " },\n", ")\n", "A.pretty(\n", " ln,\n", " withNodes=False,\n", " baseTypes=\"sign\",\n", " explain=False,\n", " highlights={\n", " 204104: \"lightsalmon\",\n", " 204105: \"yellow\",\n", " 204106: \"lightgreen\",\n", " 204107: \"lightblue\",\n", " },\n", ")" ] }, { "cell_type": "code", "execution_count": 25, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
line
word _szunigin
word 6(gesz2)
word 2(u)
word 1(asz)
word 5(ban2)
word sze
word gur
word {gesz}ban2#_
word [{gesz}me]-sze#-qum
" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "A.pretty(ln)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Developer's cells\n", "\n", "\n", "Use `A.reuse()` if you have changed the `config.yaml` of this corpus and want to reapply the settings.\n", "\n", "Inspect the result of the new settings by means of `A.showContext()`." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "A.reuse()" ] }, { "cell_type": "code", "execution_count": 26, "metadata": {}, "outputs": [ { "data": { "text/markdown": [ "
oldbabylonian app context\n", "\n", "
1. afterChild\n", "\n", "{}\n", "\n", "
\n", "
2. allowedValues\n", "\n", "\n", "* **`baseTypes`**: \n", " * `word`\n", " * `cluster`\n", " * `sign`\n", "* **`condenseType`**: \n", " * `document`\n", " * `face`\n", " * `line`\n", " * `word`\n", " * `cluster`\n", "* **`hiddenTypes`**: \n", " * `word`\n", " * `cluster`\n", "* **`textFormat`**: \n", " * **`layout-orig-rich`**: `sign`\n", " * **`layout-orig-unicode`**: `sign`\n", " * **`text-orig-full`**: `sign`\n", " * **`text-orig-plain`**: `sign`\n", " * **`text-orig-rich`**: `sign`\n", " * **`text-orig-unicode`**: `sign`\n", "\n", "
\n", "
3. apiVersion\n", "\n", "None\n", "\n", "
\n", "
4. appName\n", "\n", "`oldbabylonian`\n", "\n", "
\n", "
5. appPath\n", "\n", "`~/github/annotation/app-oldbabylonian/code`\n", "\n", "
\n", "
6. baseTypes\n", "\n", "\n", "1. `word`\n", "\n", "
\n", "
7. bigTypes\n", "\n", "set()\n", "\n", "
\n", "
8. browseContentPretty\n", "\n", "False\n", "\n", "
\n", "
9. browseNavLevel\n", "\n", "`2`\n", "\n", "
\n", "
10. charText\n", "\n", "`mapping from readings to UNICODE`\n", "\n", "
\n", "
11. charUrl\n", "\n", "`https://github.com/Nino-cunei/oldbabylonian/blob/master/docs/programs/mapReadings.ipynb`\n", "\n", "
\n", "
12. childType\n", "\n", "\n", "* **`cluster`**: \n", " * `sign`\n", "* **`document`**: \n", " * `face`\n", "* **`face`**: \n", " * `line`\n", "* **`line`**: \n", " * `word`\n", "* **`word`**: \n", " * `cluster`\n", "\n", "
\n", "
13. commit\n", "\n", "None\n", "\n", "
\n", "
14. condenseType\n", "\n", "`line`\n", "\n", "
\n", "
15. corpus\n", "\n", "`Old Babylonian Letters 1900-1600: Cuneiform tablets `\n", "\n", "
\n", "
16. css\n", "\n", "\n", "```\n", ".pnum {\n", " font-family: sans-serif;\n", " font-size: small;\n", " font-weight: bold;\n", " color: #444444;\n", "}\n", ".op {\n", " padding: 0.5em 0.1em 0.1em 0.1em;\n", " margin: 0.8em 0.1em 0.1em 0.1em;\n", " font-family: monospace;\n", " font-size: x-large;\n", " font-weight: bold;\n", "}\n", ".period {\n", " font-family: monospace;\n", " font-size: medium;\n", " font-weight: bold;\n", " color: #0000bb;\n", "}\n", ".comment {\n", " color: #7777dd;\n", " font-family: monospace;\n", " font-size: small;\n", "}\n", ".operator {\n", " color: #ff77ff;\n", " font-size: large;\n", "}\n", "/* LANGUAGE: superscript and subscript */\n", "\n", "/* cluster */\n", ".det {\n", " vertical-align: super;\n", "}\n", "/* cluster */\n", ".langalt {\n", " vertical-align: sub;\n", "}\n", "/* REDACTIONAL: line over or under */\n", "\n", "/* flag */\n", ".collated {\n", " font-weight: bold;\n", " text-decoration: underline;\n", "}\n", "/* cluster */\n", ".excised {\n", " color: #dd0000;\n", " text-decoration: line-through;\n", "}\n", "/* cluster */\n", ".supplied {\n", " color: #0000ff;\n", " text-decoration: overline;\n", "}\n", "/* flag */\n", ".remarkable {\n", " font-weight: bold;\n", " text-decoration: overline;\n", "}\n", "\n", "/* UNSURE: italic*/\n", "\n", "/* cluster */\n", ".uncertain {\n", " font-style: italic\n", "}\n", "/* flag */\n", ".question {\n", " font-weight: bold;\n", " font-style: italic\n", "}\n", "\n", "/* BROKEN: text-shadow */\n", "\n", "/* cluster */\n", ".missing {\n", " color: #999999;\n", " text-shadow: #bbbbbb 1px 1px;\n", "}\n", "/* flag */\n", ".damage {\n", " font-weight: bold;\n", " color: #999999;\n", " text-shadow: #bbbbbb 1px 1px;\n", "}\n", ".empty {\n", " color: #ff0000;\n", "}\n", "\n", "\n", "```\n", "\n", "\n", "
\n", "
17. dataDisplay\n", "\n", "\n", "* **`showVerseInTuple`**: `True`\n", "* **`textFormats`**: \n", " * **`layout-orig-rich`**: \n", " * **`method`**: `layoutRich`\n", " * **`style`**: `trans`\n", " * **`layout-orig-unicode`**: \n", " * **`method`**: `layoutUnicode`\n", " * **`style`**: `orig`\n", " * **`text-orig-full`**: \n", " * **`style`**: `source`\n", " * **`text-orig-plain`**: \n", " * **`style`**: `trans`\n", " * **`text-orig-rich`**: \n", " * **`style`**: `trans`\n", " * **`text-orig-unicode`**: \n", " * **`style`**: `orig`\n", "\n", "
\n", "
18. defaultClsOrig\n", "\n", "`txtu akk`\n", "\n", "
\n", "
19. descendantType\n", "\n", "\n", "* **`cluster`**: \n", " * `cluster`\n", " * `sign`\n", "* **`document`**: \n", " * `cluster`\n", " * `document`\n", " * `face`\n", " * `line`\n", " * `sign`\n", " * `word`\n", "* **`face`**: \n", " * `cluster`\n", " * `face`\n", " * `line`\n", " * `sign`\n", " * `word`\n", "* **`line`**: \n", " * `cluster`\n", " * `line`\n", " * `sign`\n", " * `word`\n", "* **`word`**: \n", " * `cluster`\n", " * `sign`\n", " * `word`\n", "\n", "
\n", "
20. direction\n", "\n", "`ltr`\n", "\n", "
\n", "
21. docBase\n", "\n", "`https://github.com/Nino-cunei/oldbabylonian/blob/master/docs`\n", "\n", "
\n", "
22. docExt\n", "\n", "`.md`\n", "\n", "
\n", "
23. docPage\n", "\n", "`about`\n", "\n", "
\n", "
24. docRoot\n", "\n", "`https://github.com`\n", "\n", "
\n", "
25. docUrl\n", "\n", "`https://github.com/Nino-cunei/oldbabylonian/blob/master/docs/about.md`\n", "\n", "
\n", "
26. docs\n", "\n", "\n", "* **`charText`**: `mapping from readings to UNICODE`\n", "* **`charUrl`**: `https://github.com/Nino-cunei/oldbabylonian/blob/master/docs/programs/mapReadings.ipynb`\n", "* **`docBase`**: `https://github.com/Nino-cunei/oldbabylonian/blob/master/docs`\n", "* **`docExt`**: `.md`\n", "* **`docPage`**: `about`\n", "* **`docRoot`**: `https://github.com`\n", "* **`docUrl`**: `https://github.com/Nino-cunei/oldbabylonian/blob/master/docs/about.md`\n", "* **`featureBase`**: `https://github.com/Nino-cunei/oldbabylonian/blob/master/docs/transcription.md`\n", "* **`featurePage`**: *empty*\n", "\n", "
\n", "
27. doi\n", "\n", "`10.5281/zenodo.2579207`\n", "\n", "
\n", "
28. exampleSection\n", "\n", "`P509373 obverse:1`\n", "\n", "
\n", "
29. exampleSectionHtml\n", "\n", "`P509373 obverse:1`\n", "\n", "
\n", "
30. excludedFeatures\n", "\n", "set()\n", "\n", "
\n", "
31. exclusions\n", "\n", "{}\n", "\n", "
\n", "
32. extension\n", "\n", "` akk`\n", "\n", "
\n", "
33. featureBase\n", "\n", "`https://github.com/Nino-cunei/oldbabylonian/blob/master/docs/transcription.md`\n", "\n", "
\n", "
34. featurePage\n", "\n", "*empty*\n", "\n", "
\n", "
35. features\n", "\n", "\n", "* **`cluster`**: \n", " * []\n", " * {}\n", "* **`document`**: \n", " * []\n", " * {}\n", "* **`face`**: \n", " * []\n", " * {}\n", "* **`line`**: \n", " * \n", " * `remarks`\n", " * `translation@en`\n", " * {}\n", "* **`sign`**: \n", " * \n", " * `collated`\n", " * `remarkable`\n", " * `question`\n", " * `damage`\n", " * `det`\n", " * `uncertain`\n", " * `missing`\n", " * `excised`\n", " * `supplied`\n", " * `langalt`\n", " * `comment`\n", " * `remarks`\n", " * `repeat`\n", " * `fraction`\n", " * `operator`\n", " * `grapheme`\n", " * {}\n", "* **`word`**: \n", " * []\n", " * {}\n", "\n", "
\n", "
36. featuresBare\n", "\n", "\n", "* **`cluster`**: \n", " * []\n", " * {}\n", "* **`document`**: \n", " * \n", " * `collection`\n", " * `volume`\n", " * `docnumber`\n", " * `docnote`\n", " * {}\n", "* **`face`**: \n", " * \n", " * `object`\n", " * {}\n", "* **`line`**: \n", " * []\n", " * {}\n", "* **`sign`**: \n", " * []\n", " * {}\n", "* **`word`**: \n", " * []\n", " * {}\n", "\n", "
\n", "
37. formatCls\n", "\n", "\n", "* **`layout-orig-rich`**: `txtt`\n", "* **`layout-orig-unicode`**: `txtu akk`\n", "* **`text-orig-full`**: `txto`\n", "* **`text-orig-plain`**: `txtt`\n", "* **`text-orig-rich`**: `txtt`\n", "* **`text-orig-unicode`**: `txtu akk`\n", "\n", "
\n", "
38. formatHtml\n", "\n", "\n", "1. `layout-orig-rich`\n", "2. `layout-orig-unicode`\n", "\n", "
\n", "
39. formatMethod\n", "\n", "\n", "* **`layout-orig-rich`**: `layoutRich`\n", "* **`layout-orig-unicode`**: `layoutUnicode`\n", "\n", "
\n", "
40. formatStyle\n", "\n", "\n", "* **`normal`**: `txtn`\n", "* **`orig`**: `txtu akk`\n", "* **`phono`**: `txtp`\n", "* **`source`**: `txto`\n", "* **`trans`**: `txtt`\n", "\n", "
\n", "
41. graphicsRelative\n", "\n", "None\n", "\n", "
\n", "
42. hasGraphics\n", "\n", "set()\n", "\n", "
\n", "
43. hiddenTypes\n", "\n", "set()\n", "\n", "
\n", "
44. interfaceDefaults\n", "\n", "\n", "* **`condensed`**: False\n", "* **`hideTypes`**: `True`\n", "* **`lineNumbers`**: False\n", "* **`plainGaps`**: `True`\n", "* **`prettyTypes`**: `True`\n", "* **`queryFeatures`**: `True`\n", "* **`showGraphics`**: None\n", "* **`standardFeatures`**: False\n", "* **`withNodes`**: False\n", "* **`withTypes`**: False\n", "\n", "
\n", "
45. isCompatible\n", "\n", "`True`\n", "\n", "
\n", "
46. labels\n", "\n", "\n", "* **`cluster`**: \n", " * `{type}`\n", " * \n", " * `type`\n", "* **`document`**: \n", " * `True`\n", " * ()\n", "* **`face`**: \n", " * `True`\n", " * ()\n", "* **`line`**: \n", " * *empty*\n", " * ()\n", "* **`sign`**: \n", " * `True`\n", " * ()\n", "* **`word`**: \n", " * `True`\n", " * ()\n", "\n", "
\n", "
47. language\n", "\n", "`akkadian`\n", "\n", "
\n", "
48. levelCls\n", "\n", "\n", "* **`cluster`**: \n", " * **`children`**: `children hor wrap`\n", " * **`container`**: `contnr c1`\n", " * **`label`**: `lbl c1`\n", "* **`document`**: \n", " * **`children`**: `children hor wrap`\n", " * **`container`**: `contnr c4`\n", " * **`label`**: `lbl c4`\n", "* **`face`**: \n", " * **`children`**: `children hor wrap`\n", " * **`container`**: `contnr c4`\n", " * **`label`**: `lbl c4`\n", "* **`line`**: \n", " * **`children`**: `children hor wrap`\n", " * **`container`**: `contnr c3`\n", " * **`label`**: `lbl c3`\n", "* **`sign`**: \n", " * **`children`**: *empty*\n", " * **`container`**: `contnr c0`\n", " * **`label`**: `lbl c0`\n", "* **`word`**: \n", " * **`children`**: `children hor `\n", " * **`container`**: `contnr c2`\n", " * **`label`**: `lbl c2`\n", "\n", "
\n", "
49. levels\n", "\n", "\n", "* **`cluster`**: \n", " * **`flow`**: `hor`\n", " * **`level`**: `1`\n", " * **`stretch`**: False\n", " * **`wrap`**: `True`\n", "* **`document`**: \n", " * **`flow`**: `hor`\n", " * **`level`**: `4`\n", " * **`stretch`**: `True`\n", " * **`wrap`**: `True`\n", "* **`face`**: \n", " * **`flow`**: `hor`\n", " * **`level`**: `4`\n", " * **`stretch`**: `True`\n", " * **`wrap`**: `True`\n", "* **`line`**: \n", " * **`flow`**: `hor`\n", " * **`level`**: `3`\n", " * **`stretch`**: `True`\n", " * **`wrap`**: `True`\n", "* **`sign`**: \n", " * **`flow`**: `ver`\n", " * **`level`**: 0\n", " * **`stretch`**: False\n", " * **`wrap`**: False\n", "* **`word`**: \n", " * **`flow`**: `hor`\n", " * **`level`**: `2`\n", " * **`stretch`**: `True`\n", " * **`wrap`**: False\n", "\n", "
\n", "
50. lexMap\n", "\n", "{}\n", "\n", "
\n", "
51. lexTypes\n", "\n", "set()\n", "\n", "
\n", "
52. lineNumberFeature\n", "\n", "\n", "* **`document`**: `srcLnNum`\n", "* **`face`**: `srcLnNum`\n", "* **`line`**: `srcLnNum`\n", "\n", "
\n", "
53. local\n", "\n", "`clone`\n", "\n", "
\n", "
54. localDir\n", "\n", "`~/github/Nino-cunei/oldbabylonian/_temp`\n", "\n", "
\n", "
55. moduleSpecs\n", "\n", "()\n", "\n", "
\n", "
56. noDescendTypes\n", "\n", "set()\n", "\n", "
\n", "
57. noneValues\n", "\n", "\n", "1. None\n", "\n", "
\n", "
58. org\n", "\n", "`Nino-cunei`\n", "\n", "
\n", "
59. plainCustom\n", "\n", "{}\n", "\n", "
\n", "
60. prettyCustom\n", "\n", "{}\n", "\n", "
\n", "
61. provenanceSpec\n", "\n", "\n", "* **`corpus`**: `Old Babylonian Letters 1900-1600: Cuneiform tablets `\n", "* **`doi`**: `10.5281/zenodo.2579207`\n", "* **`graphicsRelative`**: None\n", "* **`moduleSpecs`**: ()\n", "* **`org`**: `Nino-cunei`\n", "* **`relative`**: `tf`\n", "* **`repo`**: `oldbabylonian`\n", "* **`version`**: `1.0.5`\n", "* **`webBase`**: `https://cdli.ucla.edu`\n", "* **`webHint`**: `Show this document on CDLI`\n", "* **`webLang`**: None\n", "* **`webLexId`**: None\n", "* **`webUrl`**: `https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=<1>`\n", "* **`webUrlLex`**: None\n", "* **`zip`**: None\n", "\n", "
\n", "
62. relative\n", "\n", "`tf`\n", "\n", "
\n", "
63. release\n", "\n", "None\n", "\n", "
\n", "
64. repo\n", "\n", "`oldbabylonian`\n", "\n", "
\n", "
65. sectionSep1\n", "\n", "` `\n", "\n", "
\n", "
66. sectionSep2\n", "\n", "`:`\n", "\n", "
\n", "
67. showVerseInTuple\n", "\n", "`True`\n", "\n", "
\n", "
68. styles\n", "\n", "{}\n", "\n", "
\n", "
69. templates\n", "\n", "\n", "* **`cluster`**: \n", " * *empty*\n", " * ()\n", "* **`document`**: \n", " * `True`\n", " * ()\n", "* **`face`**: \n", " * `True`\n", " * ()\n", "* **`line`**: \n", " * *empty*\n", " * ()\n", "* **`sign`**: \n", " * `True`\n", " * ()\n", "* **`word`**: \n", " * *empty*\n", " * ()\n", "\n", "
\n", "
70. textFormat\n", "\n", "`text-orig-full`\n", "\n", "
\n", "
71. tfDoc\n", "\n", "`https://annotation.github.io/text-fabric`\n", "\n", "
\n", "
72. transform\n", "\n", "{}\n", "\n", "
\n", "
73. typeDisplay\n", "\n", "\n", "* **`cluster`**: \n", " * **`label`**: `{type}`\n", " * **`stretch`**: False\n", "* **`document`**: \n", " * **`featuresBare`**: `collection volume docnumber docnote`\n", " * **`lineNumber`**: `srcLnNum`\n", "* **`face`**: \n", " * **`featuresBare`**: `object`\n", " * **`lineNumber`**: `srcLnNum`\n", "* **`line`**: \n", " * **`features`**: `remarks translation@en`\n", " * **`lineNumber`**: `srcLnNum`\n", "* **`sign`**: \n", " * **`features`**: `collated remarkable question damage det uncertain missing excised supplied langalt comment remarks repeat fraction operator grapheme`\n", "* **`word`**: \n", " * **`base`**: `True`\n", " * **`label`**: `True`\n", " * **`wrap`**: False\n", "\n", "
\n", "
74. urlGh\n", "\n", "`https://github.com`\n", "\n", "
\n", "
75. urlNb\n", "\n", "`https://nbviewer.jupyter.org/github`\n", "\n", "
\n", "
76. verseTypes\n", "\n", "\n", "1. `line`\n", "\n", "
\n", "
77. version\n", "\n", "`1.0.5`\n", "\n", "
\n", "
78. webBase\n", "\n", "`https://cdli.ucla.edu`\n", "\n", "
\n", "
79. webHint\n", "\n", "`Show this document on CDLI`\n", "\n", "
\n", "
80. webLang\n", "\n", "None\n", "\n", "
\n", "
81. webLexId\n", "\n", "None\n", "\n", "
\n", "
82. webUrl\n", "\n", "`https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=<1>`\n", "\n", "
\n", "
83. webUrlLex\n", "\n", "None\n", "\n", "
\n", "
84. writing\n", "\n", "`akk`\n", "\n", "
\n", "
85. zip\n", "\n", "\n", "1. `oldbabylonian`\n", "\n", "
\n", "
\n" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "A.showContext()" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.8.3" } }, "nbformat": 4, "nbformat_minor": 4 }