https://github.com/nino-cunei/oldbabylonian
Tip revision: 20173f788d445e60e4bc40891f2fee26044119a1 authored by Dirk Roorda on 28 March 2019, 07:29:10 UTC
docs analysis
docs analysis
Tip revision: 20173f7
analysis.ipynb
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"%load_ext autoreload\n",
"%autoreload 2"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
"import collections\n",
"\n",
"from tf.app import use"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Launch Text-Fabric with all features loaded"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"TF app is up-to-date.\n",
"Using annotation/app-oldbabylonian commit 1f12c687368dec8eabefe35264a30f4d5eac3fb4 (=latest)\n",
" in /Users/dirk/text-fabric-data/__apps__/oldbabylonian.\n",
"No new data release available online.\n",
"Using Nino-cunei/oldbabylonian/tf - 1.0.1 rv1.0.1 (=latest) in /Users/dirk/text-fabric-data.\n"
]
},
{
"data": {
"text/html": [
"<b>Documentation:</b> <a target=\"_blank\" href=\"https://github.com/Nino-cunei/oldbabylonian/blob/master/docs/\" title=\"provenance of Old Babylonian Letters 1900-1600: Cuneiform tablets \">OLDBABYLONIAN</a> <a target=\"_blank\" href=\"https://github.com/Nino-cunei/oldbabylonian/blob/master/docs/transcription.md\" title=\"How TF features represent ATF\">Character table</a> <a target=\"_blank\" href=\"https://github.com/Nino-cunei/oldbabylonian/blob/master/docs//transcription.md\" title=\"OLDBABYLONIAN feature documentation\">Feature docs</a> <a target=\"_blank\" href=\"https://github.com/annotation/app-oldbabylonian\" title=\"oldbabylonian API documentation\">oldbabylonian API</a> <a target=\"_blank\" href=\"https://annotation.github.io/text-fabric/Api/Fabric/\" title=\"text-fabric-api\">Text-Fabric API 7.4.11</a> <a target=\"_blank\" href=\"https://annotation.github.io/text-fabric/Use/Search/\" title=\"Search Templates Introduction and Reference\">Search Reference</a><details open><summary><b>Loaded features</b>:</summary>\n",
"<p><b>Old Babylonian Letters 1900-1600: Cuneiform tablets </b>: <a target=\"_blank\" href=\"https://github.com/Nino-cunei/oldbabylonian/blob/master/docs//transcription.md\" title=\"/Users/dirk/text-fabric-data/Nino-cunei/oldbabylonian/tf/1.0.1/after.tf\">after</a> <a target=\"_blank\" href=\"https://github.com/Nino-cunei/oldbabylonian/blob/master/docs//transcription.md\" title=\"/Users/dirk/text-fabric-data/Nino-cunei/oldbabylonian/tf/1.0.1/afterr.tf\">afterr</a> <a target=\"_blank\" href=\"https://github.com/Nino-cunei/oldbabylonian/blob/master/docs//transcription.md\" title=\"/Users/dirk/text-fabric-data/Nino-cunei/oldbabylonian/tf/1.0.1/afteru.tf\">afteru</a> <a target=\"_blank\" href=\"https://github.com/Nino-cunei/oldbabylonian/blob/master/docs//transcription.md\" title=\"/Users/dirk/text-fabric-data/Nino-cunei/oldbabylonian/tf/1.0.1/atf.tf\">atf</a> <a target=\"_blank\" href=\"https://github.com/Nino-cunei/oldbabylonian/blob/master/docs//transcription.md\" title=\"/Users/dirk/text-fabric-data/Nino-cunei/oldbabylonian/tf/1.0.1/atfpost.tf\">atfpost</a> <a target=\"_blank\" href=\"https://github.com/Nino-cunei/oldbabylonian/blob/master/docs//transcription.md\" title=\"/Users/dirk/text-fabric-data/Nino-cunei/oldbabylonian/tf/1.0.1/atfpre.tf\">atfpre</a> <a target=\"_blank\" href=\"https://github.com/Nino-cunei/oldbabylonian/blob/master/docs//transcription.md\" title=\"/Users/dirk/text-fabric-data/Nino-cunei/oldbabylonian/tf/1.0.1/col.tf\">col</a> <a target=\"_blank\" href=\"https://github.com/Nino-cunei/oldbabylonian/blob/master/docs//transcription.md\" title=\"/Users/dirk/text-fabric-data/Nino-cunei/oldbabylonian/tf/1.0.1/collated.tf\">collated</a> <a target=\"_blank\" href=\"https://github.com/Nino-cunei/oldbabylonian/blob/master/docs//transcription.md\" title=\"/Users/dirk/text-fabric-data/Nino-cunei/oldbabylonian/tf/1.0.1/collection.tf\">collection</a> <a target=\"_blank\" href=\"https://github.com/Nino-cunei/oldbabylonian/blob/master/docs//transcription.md\" title=\"/Users/dirk/text-fabric-data/Nino-cunei/oldbabylonian/tf/1.0.1/comment.tf\">comment</a> <a target=\"_blank\" href=\"https://github.com/Nino-cunei/oldbabylonian/blob/master/docs//transcription.md\" title=\"/Users/dirk/text-fabric-data/Nino-cunei/oldbabylonian/tf/1.0.1/damage.tf\">damage</a> <a target=\"_blank\" href=\"https://github.com/Nino-cunei/oldbabylonian/blob/master/docs//transcription.md\" title=\"/Users/dirk/text-fabric-data/Nino-cunei/oldbabylonian/tf/1.0.1/det.tf\">det</a> <a target=\"_blank\" href=\"https://github.com/Nino-cunei/oldbabylonian/blob/master/docs//transcription.md\" title=\"/Users/dirk/text-fabric-data/Nino-cunei/oldbabylonian/tf/1.0.1/docnote.tf\">docnote</a> <a target=\"_blank\" href=\"https://github.com/Nino-cunei/oldbabylonian/blob/master/docs//transcription.md\" title=\"/Users/dirk/text-fabric-data/Nino-cunei/oldbabylonian/tf/1.0.1/docnumber.tf\">docnumber</a> <a target=\"_blank\" href=\"https://github.com/Nino-cunei/oldbabylonian/blob/master/docs//transcription.md\" title=\"/Users/dirk/text-fabric-data/Nino-cunei/oldbabylonian/tf/1.0.1/excised.tf\">excised</a> <a target=\"_blank\" href=\"https://github.com/Nino-cunei/oldbabylonian/blob/master/docs//transcription.md\" title=\"/Users/dirk/text-fabric-data/Nino-cunei/oldbabylonian/tf/1.0.1/face.tf\">face</a> <a target=\"_blank\" href=\"https://github.com/Nino-cunei/oldbabylonian/blob/master/docs//transcription.md\" title=\"/Users/dirk/text-fabric-data/Nino-cunei/oldbabylonian/tf/1.0.1/flags.tf\">flags</a> <a target=\"_blank\" href=\"https://github.com/Nino-cunei/oldbabylonian/blob/master/docs//transcription.md\" title=\"/Users/dirk/text-fabric-data/Nino-cunei/oldbabylonian/tf/1.0.1/fraction.tf\">fraction</a> <a target=\"_blank\" href=\"https://github.com/Nino-cunei/oldbabylonian/blob/master/docs//transcription.md\" title=\"/Users/dirk/text-fabric-data/Nino-cunei/oldbabylonian/tf/1.0.1/grapheme.tf\">grapheme</a> <a target=\"_blank\" href=\"https://github.com/Nino-cunei/oldbabylonian/blob/master/docs//transcription.md\" title=\"/Users/dirk/text-fabric-data/Nino-cunei/oldbabylonian/tf/1.0.1/graphemer.tf\">graphemer</a> <a target=\"_blank\" href=\"https://github.com/Nino-cunei/oldbabylonian/blob/master/docs//transcription.md\" title=\"/Users/dirk/text-fabric-data/Nino-cunei/oldbabylonian/tf/1.0.1/graphemeu.tf\">graphemeu</a> <a target=\"_blank\" href=\"https://github.com/Nino-cunei/oldbabylonian/blob/master/docs//transcription.md\" title=\"/Users/dirk/text-fabric-data/Nino-cunei/oldbabylonian/tf/1.0.1/lang.tf\">lang</a> <a target=\"_blank\" href=\"https://github.com/Nino-cunei/oldbabylonian/blob/master/docs//transcription.md\" title=\"/Users/dirk/text-fabric-data/Nino-cunei/oldbabylonian/tf/1.0.1/langalt.tf\">langalt</a> <a target=\"_blank\" href=\"https://github.com/Nino-cunei/oldbabylonian/blob/master/docs//transcription.md\" title=\"/Users/dirk/text-fabric-data/Nino-cunei/oldbabylonian/tf/1.0.1/ln.tf\">ln</a> <a target=\"_blank\" href=\"https://github.com/Nino-cunei/oldbabylonian/blob/master/docs//transcription.md\" title=\"/Users/dirk/text-fabric-data/Nino-cunei/oldbabylonian/tf/1.0.1/lnc.tf\">lnc</a> <a target=\"_blank\" href=\"https://github.com/Nino-cunei/oldbabylonian/blob/master/docs//transcription.md\" title=\"/Users/dirk/text-fabric-data/Nino-cunei/oldbabylonian/tf/1.0.1/lnno.tf\">lnno</a> <a target=\"_blank\" href=\"https://github.com/Nino-cunei/oldbabylonian/blob/master/docs//transcription.md\" title=\"/Users/dirk/text-fabric-data/Nino-cunei/oldbabylonian/tf/1.0.1/missing.tf\">missing</a> <a target=\"_blank\" href=\"https://github.com/Nino-cunei/oldbabylonian/blob/master/docs//transcription.md\" title=\"/Users/dirk/text-fabric-data/Nino-cunei/oldbabylonian/tf/1.0.1/object.tf\">object</a> <a target=\"_blank\" href=\"https://github.com/Nino-cunei/oldbabylonian/blob/master/docs//transcription.md\" title=\"/Users/dirk/text-fabric-data/Nino-cunei/oldbabylonian/tf/1.0.1/operator.tf\">operator</a> <a target=\"_blank\" href=\"https://github.com/Nino-cunei/oldbabylonian/blob/master/docs//transcription.md\" title=\"/Users/dirk/text-fabric-data/Nino-cunei/oldbabylonian/tf/1.0.1/operatorr.tf\">operatorr</a> <a target=\"_blank\" href=\"https://github.com/Nino-cunei/oldbabylonian/blob/master/docs//transcription.md\" title=\"/Users/dirk/text-fabric-data/Nino-cunei/oldbabylonian/tf/1.0.1/operatoru.tf\">operatoru</a> <a target=\"_blank\" href=\"https://github.com/Nino-cunei/oldbabylonian/blob/master/docs//transcription.md\" title=\"/Users/dirk/text-fabric-data/Nino-cunei/oldbabylonian/tf/1.0.1/otype.tf\">otype</a> <a target=\"_blank\" href=\"https://github.com/Nino-cunei/oldbabylonian/blob/master/docs//transcription.md\" title=\"/Users/dirk/text-fabric-data/Nino-cunei/oldbabylonian/tf/1.0.1/pnumber.tf\">pnumber</a> <a target=\"_blank\" href=\"https://github.com/Nino-cunei/oldbabylonian/blob/master/docs//transcription.md\" title=\"/Users/dirk/text-fabric-data/Nino-cunei/oldbabylonian/tf/1.0.1/primecol.tf\">primecol</a> <a target=\"_blank\" href=\"https://github.com/Nino-cunei/oldbabylonian/blob/master/docs//transcription.md\" title=\"/Users/dirk/text-fabric-data/Nino-cunei/oldbabylonian/tf/1.0.1/primeln.tf\">primeln</a> <a target=\"_blank\" href=\"https://github.com/Nino-cunei/oldbabylonian/blob/master/docs//transcription.md\" title=\"/Users/dirk/text-fabric-data/Nino-cunei/oldbabylonian/tf/1.0.1/question.tf\">question</a> <a target=\"_blank\" href=\"https://github.com/Nino-cunei/oldbabylonian/blob/master/docs//transcription.md\" title=\"/Users/dirk/text-fabric-data/Nino-cunei/oldbabylonian/tf/1.0.1/reading.tf\">reading</a> <a target=\"_blank\" href=\"https://github.com/Nino-cunei/oldbabylonian/blob/master/docs//transcription.md\" title=\"/Users/dirk/text-fabric-data/Nino-cunei/oldbabylonian/tf/1.0.1/readingr.tf\">readingr</a> <a target=\"_blank\" href=\"https://github.com/Nino-cunei/oldbabylonian/blob/master/docs//transcription.md\" title=\"/Users/dirk/text-fabric-data/Nino-cunei/oldbabylonian/tf/1.0.1/readingu.tf\">readingu</a> <a target=\"_blank\" href=\"https://github.com/Nino-cunei/oldbabylonian/blob/master/docs//transcription.md\" title=\"/Users/dirk/text-fabric-data/Nino-cunei/oldbabylonian/tf/1.0.1/remarkable.tf\">remarkable</a> <a target=\"_blank\" href=\"https://github.com/Nino-cunei/oldbabylonian/blob/master/docs//transcription.md\" title=\"/Users/dirk/text-fabric-data/Nino-cunei/oldbabylonian/tf/1.0.1/remarks.tf\">remarks</a> <a target=\"_blank\" href=\"https://github.com/Nino-cunei/oldbabylonian/blob/master/docs//transcription.md\" title=\"/Users/dirk/text-fabric-data/Nino-cunei/oldbabylonian/tf/1.0.1/repeat.tf\">repeat</a> <a target=\"_blank\" href=\"https://github.com/Nino-cunei/oldbabylonian/blob/master/docs//transcription.md\" title=\"/Users/dirk/text-fabric-data/Nino-cunei/oldbabylonian/tf/1.0.1/srcLn.tf\">srcLn</a> <a target=\"_blank\" href=\"https://github.com/Nino-cunei/oldbabylonian/blob/master/docs//transcription.md\" title=\"/Users/dirk/text-fabric-data/Nino-cunei/oldbabylonian/tf/1.0.1/srcLnNum.tf\">srcLnNum</a> <a target=\"_blank\" href=\"https://github.com/Nino-cunei/oldbabylonian/blob/master/docs//transcription.md\" title=\"/Users/dirk/text-fabric-data/Nino-cunei/oldbabylonian/tf/1.0.1/srcfile.tf\">srcfile</a> <a target=\"_blank\" href=\"https://github.com/Nino-cunei/oldbabylonian/blob/master/docs//transcription.md\" title=\"/Users/dirk/text-fabric-data/Nino-cunei/oldbabylonian/tf/1.0.1/supplied.tf\">supplied</a> <a target=\"_blank\" href=\"https://github.com/Nino-cunei/oldbabylonian/blob/master/docs//transcription.md\" title=\"/Users/dirk/text-fabric-data/Nino-cunei/oldbabylonian/tf/1.0.1/sym.tf\">sym</a> <a target=\"_blank\" href=\"https://github.com/Nino-cunei/oldbabylonian/blob/master/docs//transcription.md\" title=\"/Users/dirk/text-fabric-data/Nino-cunei/oldbabylonian/tf/1.0.1/symr.tf\">symr</a> <a target=\"_blank\" href=\"https://github.com/Nino-cunei/oldbabylonian/blob/master/docs//transcription.md\" title=\"/Users/dirk/text-fabric-data/Nino-cunei/oldbabylonian/tf/1.0.1/symu.tf\">symu</a> <a target=\"_blank\" href=\"https://github.com/Nino-cunei/oldbabylonian/blob/master/docs//transcription.md\" title=\"/Users/dirk/text-fabric-data/Nino-cunei/oldbabylonian/tf/1.0.1/trans.tf\">trans</a> <a target=\"_blank\" href=\"https://github.com/Nino-cunei/oldbabylonian/blob/master/docs//transcription.md\" title=\"/Users/dirk/text-fabric-data/Nino-cunei/oldbabylonian/tf/1.0.1/translation@en.tf\">translation@ll</a> <a target=\"_blank\" href=\"https://github.com/Nino-cunei/oldbabylonian/blob/master/docs//transcription.md\" title=\"/Users/dirk/text-fabric-data/Nino-cunei/oldbabylonian/tf/1.0.1/type.tf\">type</a> <a target=\"_blank\" href=\"https://github.com/Nino-cunei/oldbabylonian/blob/master/docs//transcription.md\" title=\"/Users/dirk/text-fabric-data/Nino-cunei/oldbabylonian/tf/1.0.1/uncertain.tf\">uncertain</a> <a target=\"_blank\" href=\"https://github.com/Nino-cunei/oldbabylonian/blob/master/docs//transcription.md\" title=\"/Users/dirk/text-fabric-data/Nino-cunei/oldbabylonian/tf/1.0.1/volume.tf\">volume</a> <b><i><a target=\"_blank\" href=\"https://github.com/Nino-cunei/oldbabylonian/blob/master/docs//transcription.md\" title=\"/Users/dirk/text-fabric-data/Nino-cunei/oldbabylonian/tf/1.0.1/oslots.tf\">oslots</a></i></b> </p></details>"
],
"text/plain": [
"<IPython.core.display.HTML object>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<style>\n",
"@font-face {\n",
" font-family: \"Santakku\";\n",
" src:\n",
" local(\"Santakku.ttf\"),\n",
" url(\"https://github.com/annotation/text-fabric/blob/master/tf/server/static/fonts/Santakku.woff?raw=true\");\n",
"}\n",
".txtn,.txtn a:visited,.txtn a:link {\n",
" font-family: sans-serif;\n",
" font-size: normal;\n",
" text-decoration: none;\n",
"}\n",
".txtp,.txtp a:visited,.txtp a:link {\n",
" font-family: monospace;\n",
" font-size: normal;\n",
" text-decoration: none;\n",
"}\n",
".txtr,.txtr a:visited,.txtr a:link {\n",
" font-family: serif;\n",
" font-size: large;\n",
" text-decoration: none;\n",
"}\n",
".txtu,.txtu a:visited,.txtu a:link {\n",
" font-family: Santakku;\n",
" font-size: x-large;\n",
" text-decoration: none;\n",
"}\n",
".features {\n",
" font-family: monospace;\n",
" font-size: medium;\n",
" font-weight: bold;\n",
" color: #0a6611;\n",
" display: flex;\n",
" flex-flow: column nowrap;\n",
" padding: 0.1em;\n",
" margin: 0.1em;\n",
" direction: ltr;\n",
"}\n",
".features div,.features span {\n",
" padding: 0;\n",
" margin: -0.1rem 0;\n",
"}\n",
".features .f {\n",
" font-family: sans-serif;\n",
" font-size: x-small;\n",
" font-weight: normal;\n",
" color: #5555bb;\n",
"}\n",
".features .xft {\n",
" color: #000000;\n",
" background-color: #eeeeee;\n",
" font-size: medium;\n",
" margin: 0.1em 0em;\n",
"}\n",
".features .xft .f {\n",
" color: #000000;\n",
" background-color: #eeeeee;\n",
" font-style: italic;\n",
" font-size: small;\n",
" font-weight: normal;\n",
"}\n",
".pnum {\n",
" font-family: sans-serif;\n",
" font-size: small;\n",
" font-weight: bold;\n",
" color: #444444;\n",
"}\n",
".nd {\n",
" font-family: monospace;\n",
" font-size: x-small;\n",
" color: #999999;\n",
"}\n",
".meta {\n",
" display: flex;\n",
" justify-content: flex-start;\n",
" align-items: flex-start;\n",
" align-content: flex-start;\n",
" flex-flow: row nowrap;\n",
"}\n",
".features,.comments {\n",
" display: flex;\n",
" justify-content: flex-start;\n",
" align-items: flex-start;\n",
" align-content: flex-start;\n",
" flex-flow: column nowrap;\n",
"}\n",
".children {\n",
" display: flex;\n",
" justify-content: flex-start;\n",
" align-items: flex-start;\n",
" align-content: flex-start;\n",
" border: 0;\n",
" background-color: #ffffff;\n",
"}\n",
".children.document {\n",
" flex-flow: column nowrap;\n",
"}\n",
".children.face {\n",
" flex-flow: column nowrap;\n",
"}\n",
".children.line {\n",
" align-items: stretch;\n",
" flex-flow: row nowrap;\n",
"}\n",
".children.cluster {\n",
" flex-flow: row wrap;\n",
"}\n",
".children.line {\n",
" align-items: stretch;\n",
" flex-flow: row nowrap;\n",
"}\n",
".children.sign {\n",
" flex-flow: column nowrap;\n",
"}\n",
".contnr {\n",
" width: fit-content;\n",
"}\n",
".contnr.document,.contnr.face,\n",
".contnr.line,\n",
".contnr.cluster,\n",
".contnr.word,\n",
".contnr.sign {\n",
" display: flex;\n",
" justify-content: flex-start;\n",
" align-items: flex-start;\n",
" align-content: flex-start;\n",
" flex-flow: column nowrap;\n",
" background: #ffffff none repeat scroll 0 0;\n",
" padding: 0.5em 0.1em 0.1em 0.1em;\n",
" margin: 0.8em 0.1em 0.1em 0.1em;\n",
" border-radius: 0.2em;\n",
" border-style: solid;\n",
" border-width: 0.2em;\n",
" font-size: small;\n",
"}\n",
".contnr.document,.contnr.face {\n",
" border-color: #bb8800;\n",
"}\n",
".contnr.line {\n",
" border-color: #0088bb;\n",
"}\n",
".contnr.cluster {\n",
" flex-flow: row wrap;\n",
" border: 0;\n",
"}\n",
".contnr.word {\n",
" border-color: #44bbff;\n",
"}\n",
".contnr.sign {\n",
" border-color: #bbbbbb;\n",
"}\n",
".contnr.hl {\n",
" background-color: #ffee66;\n",
"}\n",
".lbl.document,.lbl.face,\n",
".lbl.line,\n",
".lbl.cluster,\n",
".lbl.sign,.lbl.word {\n",
" margin-top: -1.2em;\n",
" margin-left: 1em;\n",
" background: #ffffff none repeat scroll 0 0;\n",
" padding: 0 0.3em;\n",
" border-style: solid;\n",
" font-size: small;\n",
" display: block;\n",
"}\n",
".lbl.document,.lbl.face {\n",
" border-color: #bb8800;\n",
" border-width: 0.3em;\n",
" border-radius: 0.3em;\n",
" color: #bb8800;\n",
"}\n",
".lbl.line {\n",
" border-color: #0088bb;\n",
" border-width: 0.3em;\n",
" border-radius: 0.3em;\n",
" color: #0088bb;\n",
"}\n",
".lbl.cluster {\n",
" border-color: #dddddd;\n",
" border-width: 0.2em;\n",
" border-radius: 0.2em;\n",
" color: #0000cc;\n",
"}\n",
".lbl.word {\n",
" border-color: #44bbff;\n",
" border-width: 0.2em;\n",
" border-radius: 0.2em;\n",
" font-size: medium;\n",
" color: #000000;\n",
"}\n",
".lbl.sign {\n",
" border-color: #bbbbbb;\n",
" border-width: 0.1em;\n",
" border-radius: 0.1em;\n",
" font-size: small;\n",
" color: #000000;\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",
".name {\n",
" font-family: monospace;\n",
" font-size: medium;\n",
" color: #0000bb;\n",
"}\n",
".period {\n",
" font-family: monospace;\n",
" font-size: medium;\n",
" font-weight: bold;\n",
" color: #0000bb;\n",
"}\n",
".text {\n",
" font-family: sans-serif;\n",
" font-size: x-small;\n",
" color: #000000;\n",
"}\n",
".srcln {\n",
" font-family: monospace;\n",
" font-size: medium;\n",
" color: #000000;\n",
"}\n",
".srclnnum {\n",
" font-family: monospace;\n",
" font-size: x-small;\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",
"span.hldot {\n",
"\tbackground-color: var(--hl-strong);\n",
"\tborder: 0.2rem solid var(--hl-rim);\n",
"\tborder-radius: 0.4rem;\n",
"\t/*\n",
"\tdisplay: inline-block;\n",
"\twidth: 0.8rem;\n",
"\theight: 0.8rem;\n",
"\t*/\n",
"}\n",
"span.hl {\n",
"\tbackground-color: var(--hl-strong);\n",
"\tborder-width: 0;\n",
"\tborder-radius: 0.1rem;\n",
"\tborder-style: solid;\n",
"}\n",
"\n",
"span.hlup {\n",
"\tborder-color: var(--hl-dark);\n",
"\tborder-width: 0.1rem;\n",
"\tborder-style: solid;\n",
"\tborder-radius: 0.2rem;\n",
" padding: 0.2rem;\n",
"}\n",
"\n",
":root {\n",
"\t--hl-strong: hsla( 60, 100%, 70%, 0.9 );\n",
"\t--hl-rim: hsla( 55, 100%, 60%, 0.9 );\n",
"\t--hl-dark: hsla( 55, 100%, 40%, 0.9 );\n",
"}\n",
"</style>"
],
"text/plain": [
"<IPython.core.display.HTML object>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<details open><summary><b>API members</b>:</summary>\n",
"<a target=\"_blank\" href=\"https://annotation.github.io/text-fabric/Api/Computed/#computed-data\" title=\"doc\">C Computed</a>, <a target=\"_blank\" href=\"https://annotation.github.io/text-fabric/Api/Computed/#computed-data\" title=\"doc\">Call AllComputeds</a>, <a target=\"_blank\" href=\"https://annotation.github.io/text-fabric/Api/Computed/#computed-data\" title=\"doc\">Cs ComputedString</a><br/>\n",
"<a target=\"_blank\" href=\"https://annotation.github.io/text-fabric/Api/Features/#edge-features\" title=\"doc\">E Edge</a>, <a target=\"_blank\" href=\"https://annotation.github.io/text-fabric/Api/Features/#edge-features\" title=\"doc\">Eall AllEdges</a>, <a target=\"_blank\" href=\"https://annotation.github.io/text-fabric/Api/Features/#edge-features\" title=\"doc\">Es EdgeString</a><br/>\n",
"<a target=\"_blank\" href=\"https://annotation.github.io/text-fabric/Api/Fabric/#loading\" title=\"doc\">ensureLoaded</a>, <a target=\"_blank\" href=\"https://annotation.github.io/text-fabric/Api/Fabric/#loading\" title=\"doc\">TF</a>, <a target=\"_blank\" href=\"https://annotation.github.io/text-fabric/Api/Fabric/#loading\" title=\"doc\">ignored</a>, <a target=\"_blank\" href=\"https://annotation.github.io/text-fabric/Api/Fabric/#loading\" title=\"doc\">loadLog</a><br/>\n",
"<a target=\"_blank\" href=\"https://annotation.github.io/text-fabric/Api/Locality/#locality\" title=\"doc\">L Locality</a><br/>\n",
"<a target=\"_blank\" href=\"https://annotation.github.io/text-fabric/Api/Misc/#messaging\" title=\"doc\">cache</a>, <a target=\"_blank\" href=\"https://annotation.github.io/text-fabric/Api/Misc/#messaging\" title=\"doc\">error</a>, <a target=\"_blank\" href=\"https://annotation.github.io/text-fabric/Api/Misc/#messaging\" title=\"doc\">indent</a>, <a target=\"_blank\" href=\"https://annotation.github.io/text-fabric/Api/Misc/#messaging\" title=\"doc\">info</a>, <a target=\"_blank\" href=\"https://annotation.github.io/text-fabric/Api/Misc/#messaging\" title=\"doc\">reset</a><br/>\n",
"<a target=\"_blank\" href=\"https://annotation.github.io/text-fabric/Api/Nodes/#navigating-nodes\" title=\"doc\">N Nodes</a>, <a target=\"_blank\" href=\"https://annotation.github.io/text-fabric/Api/Nodes/#navigating-nodes\" title=\"doc\">sortKey</a>, <a target=\"_blank\" href=\"https://annotation.github.io/text-fabric/Api/Nodes/#navigating-nodes\" title=\"doc\">sortKeyTuple</a>, <a target=\"_blank\" href=\"https://annotation.github.io/text-fabric/Api/Nodes/#navigating-nodes\" title=\"doc\">otypeRank</a>, <a target=\"_blank\" href=\"https://annotation.github.io/text-fabric/Api/Nodes/#navigating-nodes\" title=\"doc\">sortNodes</a><br/>\n",
"<a target=\"_blank\" href=\"https://annotation.github.io/text-fabric/Api/Features/#node-features\" title=\"doc\">F Feature</a>, <a target=\"_blank\" href=\"https://annotation.github.io/text-fabric/Api/Features/#node-features\" title=\"doc\">Fall AllFeatures</a>, <a target=\"_blank\" href=\"https://annotation.github.io/text-fabric/Api/Features/#node-features\" title=\"doc\">Fs FeatureString</a><br/>\n",
"<a target=\"_blank\" href=\"https://annotation.github.io/text-fabric/Api/Search/#search\" title=\"doc\">S Search</a><br/>\n",
"<a target=\"_blank\" href=\"https://annotation.github.io/text-fabric/Api/Text/#text\" title=\"doc\">T Text</a></details>"
],
"text/plain": [
"<IPython.core.display.HTML object>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"A = use('oldbabylonian', hoist=globals(), check=True)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Quick exercises\n",
"\n",
"What are the determinatives?"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
"determinatives = collections.Counter()\n",
"\n",
"for s in F.otype.s('sign'):\n",
" if F.det.v(s):\n",
" determinatives[F.reading.v(s) or F.grapheme.v(s)] += 1"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Counter({'d': 4078,\n",
" 'disz': 1204,\n",
" 'ki': 884,\n",
" 'gesz': 271,\n",
" 'sar': 84,\n",
" 'muszen': 4,\n",
" 'mi2': 46,\n",
" 'gi': 39,\n",
" 'na4': 17,\n",
" 'lu2': 33,\n",
" 'ap': 2,\n",
" 'tug2': 31,\n",
" 'am': 2,\n",
" 'duru5': 5,\n",
" 'dug': 2,\n",
" 'ku': 1,\n",
" 'iri': 28,\n",
" 'gar': 3,\n",
" 'kusz': 12,\n",
" 'uruda': 11,\n",
" 'u2': 4,\n",
" 'i7': 1,\n",
" 'iti': 1,\n",
" 'ir': 1,\n",
" 'p': 2,\n",
" 'id2': 2,\n",
" 'urudu': 7,\n",
" 'asz': 1,\n",
" 'gisz': 1,\n",
" 'an': 2,\n",
" 'uzu': 1,\n",
" 'a': 2,\n",
" 'sza3': 2,\n",
" 'ti': 1,\n",
" 'munus': 1,\n",
" 'la': 1,\n",
" 'ku6': 4,\n",
" 'at': 1,\n",
" 'ar': 1,\n",
" 'szim': 3})"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"determinatives"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"What is the language use?\n",
"\n",
"The main language is Akkadian, but parts are in the secondary language, which is Sumerian.\n",
"\n",
"All words with `langalt=1` are Sumerian:"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"((1, 19064),)"
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"F.langalt.freqList()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"What are the kinds of *signs*?\n",
"\n",
"Signs have a feature `type`, but so have clusters.\n",
"We only want the frequencies of *sign* types:"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"(('reading', 188326),\n",
" ('unknown', 8729),\n",
" ('numeral', 2183),\n",
" ('ellipsis', 1617),\n",
" ('grapheme', 1272),\n",
" ('commentline', 968),\n",
" ('complex', 122),\n",
" ('comment', 2))"
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"F.type.freqList('sign')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"* **commentline**\n",
" does not correspond to inscribed material, but is an artificial sign that carries a ` $ ` line comment\n",
"* **comment** corresponds to an inline comment `($ $)`\n",
"* **unknown**: the symbol `x` or `X`\n",
"* **ellipsis**: the symbol `...`\n",
"* **reading**: the most common sign, just containing a reading, e.g. `ma`\n",
"* **grapheme**: a logogram, such as `ARAD`, which is not in the feature `reading` but in the feature `grapheme`\n",
"* **numeral**: a complex sign, either a repetition of a reading or grapheme, or a combination of a fraction and a\n",
" reading or grpaheme\n",
"* **complex**: a complex sign, either a ligature of a reading and a grapheme connected by `x` or a correction\n",
" of a reading by a grapheme, written as *reading*`!(`*grapheme*`)`"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The total number of signs that correspond to something inscribed:"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"202249 inscribed signs of which 191903 readable\n"
]
}
],
"source": [
"META_TYPES = {'commentline', 'comment'}\n",
"READABLE_TYPES = {'reading', 'grapheme', 'numeral', 'complex'}\n",
"\n",
"inscribed = 0\n",
"readable = 0\n",
"\n",
"for s in F.otype.s('sign'):\n",
" typ = F.type.v(s)\n",
" if typ in META_TYPES:\n",
" continue\n",
" inscribed += 1\n",
" if typ in READABLE_TYPES:\n",
" readable +=1\n",
" \n",
"print(f'{inscribed} inscribed signs of which {readable} readable')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Frequency of the readings (Akkadian) and of the graphemes (Sumerian)"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"(('a', 11672),\n",
" ('ma', 11449),\n",
" ('x', 8729),\n",
" ('na', 8533),\n",
" ('i', 4947),\n",
" ('sza', 4737),\n",
" ('szu', 4500),\n",
" ('d', 4078),\n",
" ('li', 3892),\n",
" ('am', 3839),\n",
" ('ta', 3431),\n",
" ('ka', 3277),\n",
" ('u2', 3258),\n",
" ('ki', 3073),\n",
" ('um', 2990),\n",
" ('ni', 2865),\n",
" ('la', 2740),\n",
" ('bi', 2629),\n",
" ('u3', 2552),\n",
" ('ti', 2483),\n",
" ('ba', 2456),\n",
" ('disz', 2437),\n",
" ('ri', 2354),\n",
" ('ra', 2342),\n",
" ('asz', 2275),\n",
" ('nu', 2259),\n",
" ('im', 2075),\n",
" ('ia', 1811),\n",
" ('al', 1767),\n",
" ('di', 1648))"
]
},
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"F.reading.freqList()[0:30]"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"(('...', 1617),\n",
" ('ARAD', 119),\n",
" ('GAN2', 102),\n",
" ('BI', 54),\n",
" ('DI', 48),\n",
" ('ARAD2', 46),\n",
" ('KU', 46),\n",
" ('KI', 42),\n",
" ('NI', 33),\n",
" ('UD', 31),\n",
" ('ZI', 30),\n",
" ('GA', 29),\n",
" ('BU', 28),\n",
" ('KA', 28),\n",
" ('PI', 25),\n",
" ('ZU', 25),\n",
" ('AD', 23),\n",
" ('AB', 22),\n",
" ('ZA', 22),\n",
" ('ID', 21),\n",
" ('NE', 19),\n",
" ('AH', 18),\n",
" ('SZI', 18),\n",
" ('PA', 17),\n",
" ('DU', 16),\n",
" ('HI', 16),\n",
" ('IG', 16),\n",
" ('SU', 16),\n",
" ('DA', 15),\n",
" ('TA', 14))"
]
},
"execution_count": 12,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"F.grapheme.freqList()[0:30]"
]
}
],
"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.7.2"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
