https://github.com/nino-cunei/oldbabylonian
Tip revision: 43c36d148794e3feeb3dd39e105ce6a4df79c467 authored by Dirk Roorda on 20 March 2019, 08:31:47 UTC
data version 0.3-1.0.4
data version 0.3-1.0.4
Tip revision: 43c36d1
determinatives.ipynb
{
"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": [
"import collections\n",
"\n",
"from tf.app import use"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"TF app is up-to-date.\n",
"Using annotation/app-oldbabylonian commit 08cb9224c1f4e5bbb951245544773bc71821e569 (=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.3 rv1.3 (=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.5.1</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.3/ARK.tf\">ARK</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.3/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.3/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.3/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.3/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.3/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.3/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.3/author.tf\">author</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.3/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.3/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.3/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.3/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.3/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.3/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.3/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.3/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.3/excavation.tf\">excavation</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.3/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.3/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.3/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.3/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.3/genre.tf\">genre</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.3/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.3/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.3/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.3/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.3/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.3/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.3/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.3/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.3/material.tf\">material</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.3/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.3/museumcode.tf\">museumcode</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.3/museumname.tf\">museumname</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.3/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.3/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.3/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.3/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.3/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.3/period.tf\">period</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.3/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.3/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.3/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.3/pubdate.tf\">pubdate</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.3/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.3/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.3/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.3/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.3/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.3/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.3/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.3/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.3/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.3/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.3/subgenre.tf\">subgenre</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.3/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.3/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.3/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.3/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.3/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.3/transcriber.tf\">transcriber</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.3/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.3/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.3/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.3/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.3/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",
"\n",
"tr.tf, td.tf, th.tf {\n",
" text-align: left;\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": [
"# Determinatives\n",
"\n",
"Determinatives play a role in finding nouns.\n",
"\n",
"Here we do some basic checks."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Overview of the determinatives\n",
"\n",
"Which readings occur as determinative, and how often?\n",
"\n",
"The following cell gets all signs that are a determinative."
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"6796"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"dets = F.det.s(1)\n",
"len(dets)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"*In words:* for the feature `det`, give all nodes that have value 1.\n",
"\n",
"From the feature docs (there is a link to it after the incantantion above), we know that the determiners are exactly those signs with `det=1`."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We are going to count them by reading, and for each reading we want to list one or two examples.\n",
"\n",
"So we make a mapping from readings to sign nodes that have that reading.\n",
"\n",
"Theoretically, we could have something like `{AN}`, i.e. not a *reading* but a *grapheme*.\n",
"\n",
"Let's check whether there are determinatives that do not have a reading."
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"noReading = collections.Counter()\n",
"for s in dets:\n",
" if not F.reading.v(s):\n",
" noReading[F.grapheme.v(s)] += 1\n",
"len(noReading)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"No, we do not have to reckon with determinatives without reading."
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"40"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"readings = collections.defaultdict(list)\n",
"\n",
"for s in dets:\n",
" readings[F.reading.v(s)].append(s)\n",
" \n",
"len(readings)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We have a limited set of distinct determinatives. Lets print them by frequency.\n",
"Remember that the keys of the `readings` dictionary are concrete readings, and the value for each key is the list of nodes\n",
"that have that reading. These are all sign nodes for which `det=1`."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We are going to sort a dictionary based on frequencies.\n",
"\n",
"That kind of sortings occurs quite often.\n",
"\n",
"So we define a few *key* functions for that.\n",
"\n",
"A key function is a function that maps a value to another value.\n",
"If we pass a key function to `sorted()`, the values will be sorted by their key values, i.e. the values assigned to\n",
"them by the key function.\n",
"\n",
"If we have a `collections.Counter()` that maps things to amounts, here is a suitable key function:"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [],
"source": [
"def freqKey(x):\n",
" return (-x[1], x[0])"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Explanation: `x` is an item of a counter, i.e. a pair `(thing, amount)`. So the `x[0]` is the thing, and the `x[1]` is the amount.\n",
"\n",
"We want things with a high amount on top, so we should sort on `-x[1]`. If things have the same amount, we want to sort on the thing\n",
"itself: `x[0]`. We achieve this by sorting on the pair `(-x[1], x[0])`."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Sometimes we want to sort a dictionary that maps things to sets or lists of nodes, and we want the things that map to large sets first.\n",
"\n",
"We do this with a slight adaptation of the `freqKey()` function:"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [],
"source": [
"def freqKeyL(x):\n",
" return (-len(x[1]), x[0])"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Because `x[1]` is now a set or list, we need to take its length."
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"d 4078\n",
"disz 1204\n",
"ki 884\n",
"gesz 271\n",
"sar 84\n",
"mi2 46\n",
"gi 39\n",
"lu2 33\n",
"tug2 31\n",
"iri 28\n",
"na4 17\n",
"kusz 12\n",
"uruda 11\n",
"urudu 7\n",
"duru5 5\n",
"ku6 4\n",
"muszen 4\n",
"u2 4\n",
"gar 3\n",
"szim 3\n",
"a 2\n",
"am 2\n",
"an 2\n",
"ap 2\n",
"dug 2\n",
"id2 2\n",
"p 2\n",
"sza3 2\n",
"ar 1\n",
"asz 1\n",
"at 1\n",
"gisz 1\n",
"i7 1\n",
"ir 1\n",
"iti 1\n",
"ku 1\n",
"la 1\n",
"munus 1\n",
"ti 1\n",
"uzu 1\n"
]
}
],
"source": [
"for (reading, signNodes) in sorted(\n",
" readings.items(),\n",
" key=freqKeyL\n",
"):\n",
" print(f'{reading:<10} {len(signNodes):>4}')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Now we show the first example in the corpus for each reading.\n",
"\n",
"If we have tuples of nodes, we can display them with `A.table()`.\n",
"\n",
"So let's make a tuple of nodes: for each example, we take the sign node and its encompassing line node."
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<table>\n",
"<tr class=\"tf\">\n",
" <th class=\"tf\">n</th><th class=\"tf\">p</th>\n",
" <th class=\"tf\">line</th><th>sign</th>\n",
"</tr>\n",
"\n",
"<tr class=\"tf\"><td class=\"tf\">1</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P509373\" title=\"show this document on CDLI\" sec=\"P509373 obverse:1\">P509373 obverse:1</a></td><td class=\"tf\"><span class=\"txtp\">[a-na] <span class=\"hl\" >_{d}</span>suen_-i-[din-nam]</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl\" >_{d}</span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">2</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P509373\" title=\"show this document on CDLI\" sec=\"P509373 obverse:6\">P509373 obverse:6</a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl\" >{disz}</span>sze-ep-_{d}suen a2-gal2 [dumu] um-mi-a-mesz_</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl\" >{disz}</span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">3</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P509373\" title=\"show this document on CDLI\" sec=\"P509373 obverse:10\">P509373 obverse:10</a></td><td class=\"tf\"><span class=\"txtp\">_a-sza3 a-gar3_ na-ag-[ma-lum] _uru_ x x x<span class=\"hl\" >{ki}</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl\" >{ki}</span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">4</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P389958\" title=\"show this document on CDLI\" sec=\"P389958 obverse:7'\">P389958 obverse:7'</a></td><td class=\"tf\"><span class=\"txtp\">_5(disz) ma-na <span class=\"hl\" >{gesz}</span>zu2 geszimmar_</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl\" >{gesz}</span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">5</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P510537\" title=\"show this document on CDLI\" sec=\"P510537 obverse:5\">P510537 obverse:5</a></td><td class=\"tf\"><span class=\"txtp\">[x x (x)] SU<span class=\"hl\" >{sar} </span>sza qa2-ti {disz}mi#-[x x x (x) (x)]</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl\" >{sar} </span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">6</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P510559\" title=\"show this document on CDLI\" sec=\"P510559 obverse:7\">P510559 obverse:7</a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl\" >{mi2}</span>be-le-su#-nu# a-ha#-ti#</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl\" >{mi2}</span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">7</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P510569\" title=\"show this document on CDLI\" sec=\"P510569 obverse:15\">P510569 obverse:15</a></td><td class=\"tf\"><span class=\"txtp\">asz-szum# <span class=\"hl\" >{gi}</span>ku-ru-pe2-e asz-szum ha nu x</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl\" >{gi}</span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">8</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P510589\" title=\"show this document on CDLI\" sec=\"P510589 obverse:3\">P510589 obverse:3</a></td><td class=\"tf\"><span class=\"txtp\">um-ma a-na-ku-ma <span class=\"hl\" >_{lu2}</span>na-asz#-[bar_]</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl\" >_{lu2}</span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">9</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P510618\" title=\"show this document on CDLI\" sec=\"P510618 reverse:13\">P510618 reverse:13</a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl\" >_{tug2}</span>bar-si-ig_ ta AH? ti i ma</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl\" >_{tug2}</span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">10</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P510700\" title=\"show this document on CDLI\" sec=\"P510700 obverse:5\">P510700 obverse:5</a></td><td class=\"tf\"><span class=\"txtp\">i-na <span class=\"hl\" >{iri}</span>dag-la-a _gu4 hi-a_-ni ka-su2-ma</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl\" >{iri}</span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">11</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P510578\" title=\"show this document on CDLI\" sec=\"P510578 obverse:8\">P510578 obverse:8</a></td><td class=\"tf\"><span class=\"txtp\">at-ta-s,i2 _{gesz}ma2_ sza <span class=\"hl\" >_{na4}</span>ur5_</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl\" >_{na4}</span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">12</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P510765\" title=\"show this document on CDLI\" sec=\"P510765 obverse:9\">P510765 obverse:9</a></td><td class=\"tf\"><span class=\"txtp\">a-na <span class=\"hl\" >_{kusz}</span>usan3_ is,-ba-at-ma ip-ta-a-ad</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl\" >_{kusz}</span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">13</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P510829\" title=\"show this document on CDLI\" sec=\"P510829 left:1\">P510829 left:1</a></td><td class=\"tf\"><span class=\"txtp\">_sze_-a-am _szuku erin2_ u3 2(disz) <span class=\"hl\" >_{uruda}</span>mar_</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl\" >_{uruda}</span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">14</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P313347\" title=\"show this document on CDLI\" sec=\"P313347 obverse:13\">P313347 obverse:13</a></td><td class=\"tf\"><span class=\"txtp\">_{gesz}mar-hi-a <span class=\"hl\" >{urudu}</span>ha-zi-in-hi-a_</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl\" >{urudu}</span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">15</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P510661\" title=\"show this document on CDLI\" sec=\"P510661 reverse:9\">P510661 reverse:9</a></td><td class=\"tf\"><span class=\"txtp\">_u4 <<kam iti>> 1(u) 6(disz)-kam_ sza _iti udru<span class=\"hl\" >{duru5}_</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl\" >{duru5}_</span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">16</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P372906\" title=\"show this document on CDLI\" sec=\"P372906 obverse:4\">P372906 obverse:4</a></td><td class=\"tf\"><span class=\"txtp\">_ba-al-gi<span class=\"hl\" >{ku6} </span>hi-a u3 nig2-bun2-na{ku6} hi#-[a]_</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl\" >{ku6} </span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">17</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P510549\" title=\"show this document on CDLI\" sec=\"P510549 obverse:8\">P510549 obverse:8</a></td><td class=\"tf\"><span class=\"txtp\">x x _tu<span class=\"hl\" >{muszen} </span>hi-a_ u3 _zi3-da_</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl\" >{muszen} </span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">18</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P491915\" title=\"show this document on CDLI\" sec=\"P491915 obverse:7\">P491915 obverse:7</a></td><td class=\"tf\"><span class=\"txtp\">_2(gesz'u) <span class=\"hl\" >{u2}</span>x_</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl\" >{u2}</span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">19</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P510724\" title=\"show this document on CDLI\" sec=\"P510724 obverse:1\">P510724 obverse:1</a></td><td class=\"tf\"><span class=\"txtp\">a-na {d}pa4-nigar<span class=\"hl\" >{gar}-</span>ra-lugal# [x x x x (x) (x)]</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl\" >{gar}-</span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">20</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P306561\" title=\"show this document on CDLI\" sec=\"P306561 obverse:12\">P306561 obverse:12</a></td><td class=\"tf\"><span class=\"txtp\">kar3-szum{sar} u3 _szim_ u3 <span class=\"hl\" >_{szim}</span>li_</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl\" >_{szim}</span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">21</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P384863\" title=\"show this document on CDLI\" sec=\"P384863 obverse:6\">P384863 obverse:6</a></td><td class=\"tf\"><span class=\"txtp\">_3(bur3) asza5<span class=\"hl\" >{a-</span>sza3}_ sza i-na ka-ni-ik be-li2-ia</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl\" >{a-</span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">22</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P510622\" title=\"show this document on CDLI\" sec=\"P510622 obverse:9\">P510622 obverse:9</a></td><td class=\"tf\"><span class=\"txtp\">id-nam<span class=\"hl\" >{am}</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl\" >{am}</span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">23</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P481778\" title=\"show this document on CDLI\" sec=\"P481778 reverse:4\">P481778 reverse:4</a></td><td class=\"tf\"><span class=\"txtp\">{disz}kalag<span class=\"hl\" >{an}-</span>dingir-szu ha-li-iq</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl\" >{an}-</span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">24</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P510610\" title=\"show this document on CDLI\" sec=\"P510610 reverse:14\">P510610 reverse:14</a></td><td class=\"tf\"><span class=\"txtp\">tap<span class=\"hl\" >{ap}-</span>pu-ut-ka a-na mi-nim# [...]</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl\" >{ap}-</span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">25</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P510676\" title=\"show this document on CDLI\" sec=\"P510676 reverse:5\">P510676 reverse:5</a></td><td class=\"tf\"><span class=\"txtp\">_igi-6(disz)-gal2 ku3-babbar_ sza <span class=\"hl\" >{dug}</span>la-ah-ta-nim</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl\" >{dug}</span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">26</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P313345\" title=\"show this document on CDLI\" sec=\"P313345 obverse:2\">P313345 obverse:2</a></td><td class=\"tf\"><span class=\"txtp\">um-ma _dumu-<span class=\"hl\" >{id2}</span>UD.KIB.NUN{ki}_-ma</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl\" >{id2}</span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">27</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P313320\" title=\"show this document on CDLI\" sec=\"P313320 obverse:5\">P313320 obverse:5</a></td><td class=\"tf\"><span class=\"txtp\">sza _sag-geme2_ a-na <span class=\"hl\" >{p}</span>be-el-[...]</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl\" >{p}</span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">28</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P384863\" title=\"show this document on CDLI\" sec=\"P384863 obverse:6\">P384863 obverse:6</a></td><td class=\"tf\"><span class=\"txtp\">_3(bur3) asza5{a-<span class=\"hl\" >sza3}_ </span>sza i-na ka-ni-ik be-li2-ia</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl\" >sza3}_ </span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">29</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P373033\" title=\"show this document on CDLI\" sec=\"P373033 obverse:5\">P373033 obverse:5</a></td><td class=\"tf\"><span class=\"txtp\">i-na _kar<span class=\"hl\" >{ar}_ </span>{d}e2-a</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl\" >{ar}_ </span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">30</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P313377\" title=\"show this document on CDLI\" sec=\"P313377 obverse:11\">P313377 obverse:11</a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl\" >{asz}</span>i-din-e2-a _ugula_</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl\" >{asz}</span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">31</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P372977\" title=\"show this document on CDLI\" sec=\"P372977 obverse:1\">P372977 obverse:1</a></td><td class=\"tf\"><span class=\"txtp\">a-na dingir-szu-illat<span class=\"hl\" >{at}-</span>su2</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl\" >{at}-</span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">32</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P313391\" title=\"show this document on CDLI\" sec=\"P313391 obverse:2\">P313391 obverse:2</a></td><td class=\"tf\"><span class=\"txtp\">u3 _ugula lu2-<span class=\"hl\" >{gisz}</span>ma2_</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl\" >{gisz}</span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">33</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P313292\" title=\"show this document on CDLI\" sec=\"P313292 obverse:11\">P313292 obverse:11</a></td><td class=\"tf\"><span class=\"txtp\">_dub-sar erin2_ sza _an-za-qar_ sza <span class=\"hl\" >_{i7}</span>idigna_ i-hi-t,a2-am-ma</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl\" >_{i7}</span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">34</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P313309\" title=\"show this document on CDLI\" sec=\"P313309 obverse:3'\">P313309 obverse:3'</a></td><td class=\"tf\"><span class=\"txtp\">_dingir_ na-s,ir<span class=\"hl\" >{ir}-</span>ka ri-isz-ka a-[na da-mi-iq]-tim</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl\" >{ir}-</span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">35</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P313292\" title=\"show this document on CDLI\" sec=\"P313292 reverse:6\">P313292 reverse:6</a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl\" >_{iti}</span>gan-gan-e3 u4 1(u) 6(disz)-kam_</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl\" >_{iti}</span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">36</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P510687\" title=\"show this document on CDLI\" sec=\"P510687 obverse:7\">P510687 obverse:7</a></td><td class=\"tf\"><span class=\"txtp\">a-na t,a-ab-ti i-di-nu-<span class=\"hl\" >{ku}</span>kum</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl\" >{ku}</span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">37</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P387323\" title=\"show this document on CDLI\" sec=\"P387323 obverse:9\">P387323 obverse:9</a></td><td class=\"tf\"><span class=\"txtp\">u3 a-na ka-szum usz-<ta>-bi-<span class=\"hl\" >{la}</span>lam</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl\" >{la}</span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">38</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P386488\" title=\"show this document on CDLI\" sec=\"P386488 obverse:10\">P386488 obverse:10</a></td><td class=\"tf\"><span class=\"txtp\">{disz}<span class=\"hl\" >{munus}</span>sza-mu-uh2-tum</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl\" >{munus}</span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">39</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P386459\" title=\"show this document on CDLI\" sec=\"P386459 obverse:7\">P386459 obverse:7</a></td><td class=\"tf\"><span class=\"txtp\">u3 dumu-ki-<span class=\"hl\" >{ti}</span>tim</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl\" >{ti}</span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">40</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P275129\" title=\"show this document on CDLI\" sec=\"P275129 reverse:7\">P275129 reverse:7</a></td><td class=\"tf\"><span class=\"txtp\">i-na <span class=\"hl\" >{uzu}</span>te-re-e-tim sza-al-ma-a-tim#</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl\" >{uzu}</span></span></td></tr></table>"
],
"text/plain": [
"<IPython.core.display.HTML object>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"examples = []\n",
"\n",
"for (reading, signNodes) in sorted(\n",
" readings.items(),\n",
" key=freqKeyL,\n",
"):\n",
" exampleSign = signNodes[0]\n",
" exampleLine = L.u(exampleSign, otype='line')[0]\n",
" examples.append((exampleLine, exampleSign))\n",
"\n",
"A.table(examples)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"It seems that determinatives only occur at the beginning or at the start of words. Let's check that.\n",
"\n",
"Search is handy here: we look for a determinative sign between the first and the last sign of a word."
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [],
"source": [
"query = '''\n",
"word\n",
" =: sign det#\n",
" < sign det\n",
" < sign det#\n",
" :=\n",
"'''"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"A little bit of explanation:\n",
"\n",
"We look for a word with three signs in it: one at the start (`=:`), one further on (`<`), and one still further on (`<`) that\n",
"is also at the end (`:=`).\n",
"\n",
"The signs at the start and at the end should *not* be determinatives (`det#`), and the middle sign should be a determinative (`det`)."
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
" 0.49s 913 results\n"
]
}
],
"source": [
"results = A.search(query)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Yes there are, quite many even. Let's show some:"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<table>\n",
"<tr class=\"tf\">\n",
" <th class=\"tf\">n</th><th class=\"tf\">p</th>\n",
" <th class=\"tf\">word</th><th>sign</th><th>sign</th><th>sign</th>\n",
"</tr>\n",
"\n",
"<tr class=\"tf\"><td class=\"tf\">1</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P509376\" title=\"show this document on CDLI\" sec=\"P509376 obverse:9\">P509376 obverse:9</a></td><td class=\"tf\"><a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P509376\" title=\"P509376 obverse:9\" sec=\"P509376 obverse:9\"><span class=\"txtp\"><span class=\"hl hlup\" >na-</span><span class=\"hlup\" >bi-</span><span class=\"hl hlup\" >{d}</span><span class=\"hl hlup\" >suen</span></span></a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >na-</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >{d}</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >suen</span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">2</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P509376\" title=\"show this document on CDLI\" sec=\"P509376 reverse:10\">P509376 reverse:10</a></td><td class=\"tf\"><a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P509376\" title=\"P509376 reverse:10\" sec=\"P509376 reverse:10\"><span class=\"txtp\"><span class=\"hl hlup\" >na-</span><span class=\"hlup\" >bi-</span><span class=\"hl hlup\" >{d}</span><span class=\"hl hlup\" >suen </span></span></a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >na-</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >{d}</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >suen </span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">3</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P509377\" title=\"show this document on CDLI\" sec=\"P509377 obverse:8\">P509377 obverse:8</a></td><td class=\"tf\"><a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P509377\" title=\"P509377 obverse:8\" sec=\"P509377 obverse:8\"><span class=\"txtp\"><span class=\"hl hlup\" >kin-</span><span class=\"hl hlup\" >{d}</span><span class=\"hl hlup\" >inanna_</span></span></a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >kin-</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >{d}</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >inanna_</span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">4</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P510526\" title=\"show this document on CDLI\" sec=\"P510526 obverse:3\">P510526 obverse:3</a></td><td class=\"tf\"><a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P510526\" title=\"P510526 obverse:3\" sec=\"P510526 obverse:3\"><span class=\"txtp\"><span class=\"hl hlup\" >geme2-</span><span class=\"hl hlup\" >{d}</span><span class=\"hlup\" >utu-</span><span class=\"hl hlup\" >ma</span></span></a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >geme2-</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >{d}</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >ma</span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">5</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P510527\" title=\"show this document on CDLI\" sec=\"P510527 obverse:11\">P510527 obverse:11</a></td><td class=\"tf\"><a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P510527\" title=\"P510527 obverse:11\" sec=\"P510527 obverse:11\"><span class=\"txtp\"><span class=\"hl hlup\" >ip-</span><span class=\"hlup\" >qu2-</span><span class=\"hl hlup\" >{d}</span><span class=\"hlup\" >na-</span><span class=\"hlup\" >bi-</span><span class=\"hl hlup\" >um </span></span></a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >ip-</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >{d}</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >um </span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">6</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P510527\" title=\"show this document on CDLI\" sec=\"P510527 reverse:8\">P510527 reverse:8</a></td><td class=\"tf\"><a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P510527\" title=\"P510527 reverse:8\" sec=\"P510527 reverse:8\"><span class=\"txtp\"><span class=\"hl hlup\" >e-</span><span class=\"hlup\" >tel-</span><span class=\"hlup\" >pi4-</span><span class=\"hl hlup\" >{d}</span><span class=\"hlup\" >na-</span><span class=\"hlup\" >bi-</span><span class=\"hl hlup\" >um </span></span></a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >e-</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >{d}</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >um </span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">7</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P510530\" title=\"show this document on CDLI\" sec=\"P510530 reverse:15\">P510530 reverse:15</a></td><td class=\"tf\"><a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P510530\" title=\"P510530 reverse:15\" sec=\"P510530 reverse:15\"><span class=\"txtp\"><span class=\"hl hlup\" >ARAD#-</span><span class=\"hl hlup\" >{d}</span><span class=\"hlup\" >ul-</span><span class=\"hlup\" >masz-</span><span class=\"hlup\" >szi-</span><span class=\"hl hlup\" >tum </span></span></a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >ARAD#-</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >{d}</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >tum </span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">8</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P510530\" title=\"show this document on CDLI\" sec=\"P510530 reverse:18\">P510530 reverse:18</a></td><td class=\"tf\"><a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P510530\" title=\"P510530 reverse:18\" sec=\"P510530 reverse:18\"><span class=\"txtp\"><span class=\"hl hlup\" >ARAD-</span><span class=\"hl hlup\" >{d}</span><span class=\"hlup\" >ul-</span><span class=\"hlup\" >masz-</span><span class=\"hlup\" >szi-</span><span class=\"hl hlup\" >tum </span></span></a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >ARAD-</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >{d}</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >tum </span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">9</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P510530\" title=\"show this document on CDLI\" sec=\"P510530 reverse:19\">P510530 reverse:19</a></td><td class=\"tf\"><a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P510530\" title=\"P510530 reverse:19\" sec=\"P510530 reverse:19\"><span class=\"txtp\"><span class=\"hl hlup\" >ARAD-</span><span class=\"hl hlup\" >{d}</span><span class=\"hlup\" >ul-</span><span class=\"hlup\" >masz-</span><span class=\"hlup\" >szi-</span><span class=\"hl hlup\" >tum </span></span></a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >ARAD-</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >{d}</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >tum </span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">10</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P510531\" title=\"show this document on CDLI\" sec=\"P510531 obverse:5\">P510531 obverse:5</a></td><td class=\"tf\"><a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P510531\" title=\"P510531 obverse:5\" sec=\"P510531 obverse:5\"><span class=\"txtp\"><span class=\"hl hlup\" >ip-</span><span class=\"hlup\" >qu2-</span><span class=\"hl hlup\" >{d}</span><span class=\"hlup\" >na#-</span><span class=\"hlup\" >bi-</span><span class=\"hl hlup\" >um </span></span></a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >ip-</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >{d}</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >um </span></span></td></tr></table>"
],
"text/plain": [
"<IPython.core.display.HTML object>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"A.table(results, end=10)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The question arises: can a word be divided into parts my several determinatives inside it?\n",
"\n",
"We adjust the query:"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {},
"outputs": [],
"source": [
"query2 = '''\n",
"word\n",
" =: sign det#\n",
" < sign det\n",
" <: sign det#\n",
" < sign det\n",
" < sign det#\n",
" :=\n",
"'''"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
" 0.74s 2 results\n"
]
}
],
"source": [
"results2 = A.search(query2)"
]
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<table>\n",
"<tr class=\"tf\">\n",
" <th class=\"tf\">n</th><th class=\"tf\">p</th>\n",
" <th class=\"tf\">word</th><th>sign</th><th>sign</th><th>sign</th><th>sign</th><th>sign</th>\n",
"</tr>\n",
"\n",
"<tr class=\"tf\"><td class=\"tf\">1</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P365956\" title=\"show this document on CDLI\" sec=\"P365956 obverse:4\">P365956 obverse:4</a></td><td class=\"tf\"><a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P365956\" title=\"P365956 obverse:4\" sec=\"P365956 obverse:4\"><span class=\"txtp\"><span class=\"hl hlup\" >kar-</span><span class=\"hl hlup\" >{d}</span><span class=\"hl hlup\" >utu</span><span class=\"hl hlup\" >{ki}-</span><span class=\"hl hlup\" >mesz_ </span></span></a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >kar-</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >{d}</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >utu</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >{ki}-</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >mesz_ </span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">2</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P313345\" title=\"show this document on CDLI\" sec=\"P313345 obverse:2\">P313345 obverse:2</a></td><td class=\"tf\"><a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P313345\" title=\"P313345 obverse:2\" sec=\"P313345 obverse:2\"><span class=\"txtp\"><span class=\"hl hlup\" >_dumu-</span><span class=\"hl hlup\" >{id2}</span><span class=\"hl hlup\" >UD.</span><span class=\"hlup\" >KIB.</span><span class=\"hlup\" >NUN</span><span class=\"hl hlup\" >{ki}_-</span><span class=\"hl hlup\" >ma</span></span></a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >_dumu-</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >{id2}</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >UD.</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >{ki}_-</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >ma</span></span></td></tr></table>"
],
"text/plain": [
"<IPython.core.display.HTML object>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"A.table(results2)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"This seems to be really exceptional."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Words starting or ending with specific determinatives\n",
"\n",
"We want to single out words that start with a determinative of a certain class and words that end with a determinative of a certain class.\n",
"\n",
"We define those classes by means of a few variables, and then construct a query with them."
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"detStart=['d', 'disz', 'gesz', 'gi', 'mi2', 'na4', 'iri', 'lu2', 'tug2', 'u2']\n",
"detEnd=['ki', 'sar', 'muszen', 'ku6']\n"
]
}
],
"source": [
"detStart = '''\n",
" d\n",
" disz\n",
" gesz\n",
" gi\n",
" mi2\n",
" na4\n",
" iri\n",
" lu2\n",
" tug2\n",
" u2\n",
"'''.strip().split()\n",
"\n",
"detEnd = '''\n",
" ki\n",
" sar\n",
" muszen\n",
" ku6\n",
"'''.strip().split()\n",
"\n",
"print(f'detStart={str(detStart)}')\n",
"print(f'detEnd={str(detEnd)}')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"In order to use this in a query, we need a `|`-separated string of those values."
]
},
{
"cell_type": "code",
"execution_count": 19,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"detStartCriterion=d|disz|gesz|gi|mi2|na4|iri|lu2|tug2|u2\n",
"detEndCriterion=ki|sar|muszen|ku6\n"
]
}
],
"source": [
"detStartCriterion = '|'.join(detStart)\n",
"detEndCriterion = '|'.join(detEnd)\n",
"\n",
"print(f'detStartCriterion={detStartCriterion}')\n",
"print(f'detEndCriterion={detEndCriterion}')"
]
},
{
"cell_type": "code",
"execution_count": 20,
"metadata": {},
"outputs": [],
"source": [
"queryStart = f'''\n",
"word\n",
" =: sign det reading={detStartCriterion}\n",
"'''\n",
"\n",
"queryEnd = f'''\n",
"word\n",
" := sign det reading={detEndCriterion}\n",
"'''"
]
},
{
"cell_type": "code",
"execution_count": 21,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
" 0.19s 4342 results\n",
" 0.19s 890 results\n"
]
}
],
"source": [
"resultsStart = A.search(queryStart)\n",
"resultsEnd = A.search(queryEnd)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The results are pairs of a word and a sign (the determinative).\n",
"\n",
"Let's just look at the words. Are the words found by the first query distinct from the words found by the second query?\n",
"\n",
"We count the number of words in the intersection."
]
},
{
"cell_type": "code",
"execution_count": 22,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"31"
]
},
"execution_count": 22,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"wordsStart = {w for (w, s) in resultsStart}\n",
"wordsEnd = {w for (w, s) in resultsEnd}\n",
"wordsBoth = wordsStart & wordsEnd\n",
"len(wordsBoth)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Just for expository reasons, we are going to show the words with determinatives at both ends in two ways:\n",
"\n",
"1. By picking the result sets and combining them\n",
"2. By writing a modified query."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Combine result sets\n",
"\n",
"We need to get the word nodes of the intersection and also there first and last signs."
]
},
{
"cell_type": "code",
"execution_count": 23,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<table>\n",
"<tr class=\"tf\">\n",
" <th class=\"tf\">n</th><th class=\"tf\">p</th>\n",
" <th class=\"tf\">word</th><th>sign</th><th>sign</th>\n",
"</tr>\n",
"\n",
"<tr class=\"tf\"><td class=\"tf\">1</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P510644\" title=\"show this document on CDLI\" sec=\"P510644 reverse:5\">P510644 reverse:5</a></td><td class=\"tf\"><a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P510644\" title=\"P510644 reverse:5\" sec=\"P510644 reverse:5\"><span class=\"txtp\"><span class=\"hl hlup\" >{disz}</span><span class=\"hlup\" >dumu-</span><span class=\"hlup\" >zimbir</span><span class=\"hl hlup\" >{ki} </span></span></a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >{disz}</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >{ki} </span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">2</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P510701\" title=\"show this document on CDLI\" sec=\"P510701 obverse:10\">P510701 obverse:10</a></td><td class=\"tf\"><a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P510701\" title=\"P510701 obverse:10\" sec=\"P510701 obverse:10\"><span class=\"txtp\"><span class=\"hl hlup\" >{d}</span><span class=\"hlup\" >nin-</span><span class=\"hlup\" >iri?</span><span class=\"hl hlup\" >{ki} </span></span></a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >{d}</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >{ki} </span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">3</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P510744\" title=\"show this document on CDLI\" sec=\"P510744 obverse:4\">P510744 obverse:4</a></td><td class=\"tf\"><a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P510744\" title=\"P510744 obverse:4\" sec=\"P510744 obverse:4\"><span class=\"txtp\"><span class=\"hl hlup\" >{iri#}</span><span class=\"hlup\" >ra-</span><span class=\"hlup\" >pi2-</span><span class=\"hlup\" >qum</span><span class=\"hl hlup\" >{ki} </span></span></a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >{iri#}</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >{ki} </span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">4</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P413253\" title=\"show this document on CDLI\" sec=\"P413253 reverse:11'\">P413253 reverse:11'</a></td><td class=\"tf\"><a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P413253\" title=\"P413253 reverse:11'\" sec=\"P413253 reverse:11'\"><span class=\"txtp\"><span class=\"hl hlup\" >{iri}</span><span class=\"hlup\" >eresz2</span><span class=\"hl hlup\" >{ki}</span></span></a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >{iri}</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >{ki}</span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">5</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P365956\" title=\"show this document on CDLI\" sec=\"P365956 obverse:9\">P365956 obverse:9</a></td><td class=\"tf\"><a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P365956\" title=\"P365956 obverse:9\" sec=\"P365956 obverse:9\"><span class=\"txtp\"><span class=\"hl hlup\" >{iri}</span><span class=\"hlup\" >kisz</span><span class=\"hl hlup\" >{ki} </span></span></a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >{iri}</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >{ki} </span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">6</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P313376\" title=\"show this document on CDLI\" sec=\"P313376 obverse:4\">P313376 obverse:4</a></td><td class=\"tf\"><a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P313376\" title=\"P313376 obverse:4\" sec=\"P313376 obverse:4\"><span class=\"txtp\"><span class=\"hl hlup\" >{disz}</span><span class=\"hlup\" >szi#-</span><span class=\"hlup\" >ma#-</span><span class=\"hlup\" >at-</span><span class=\"hlup\" >_uri2</span><span class=\"hl hlup\" >{ki#}_ </span></span></a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >{disz}</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >{ki#}_ </span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">7</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P313393\" title=\"show this document on CDLI\" sec=\"P313393 obverse:5\">P313393 obverse:5</a></td><td class=\"tf\"><a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P313393\" title=\"P313393 obverse:5\" sec=\"P313393 obverse:5\"><span class=\"txtp\"><span class=\"hl hlup\" >{iri}</span><span class=\"hlup\" >za-</span><span class=\"hlup\" >mi-</span><span class=\"hlup\" >ri-</span><span class=\"hlup\" >i</span><span class=\"hl hlup\" >{ki} </span></span></a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >{iri}</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >{ki} </span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">8</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P313407\" title=\"show this document on CDLI\" sec=\"P313407 obverse:5\">P313407 obverse:5</a></td><td class=\"tf\"><a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P313407\" title=\"P313407 obverse:5\" sec=\"P313407 obverse:5\"><span class=\"txtp\"><span class=\"hl hlup\" >{iri}</span><span class=\"hlup\" >za-</span><span class=\"hlup\" >mi-</span><span class=\"hlup\" >ri-</span><span class=\"hlup\" >i</span><span class=\"hl hlup\" >{ki} </span></span></a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >{iri}</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >{ki} </span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">9</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P345556\" title=\"show this document on CDLI\" sec=\"P345556 reverse:10\">P345556 reverse:10</a></td><td class=\"tf\"><a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P345556\" title=\"P345556 reverse:10\" sec=\"P345556 reverse:10\"><span class=\"txtp\"><span class=\"hl hlup\" >{iri}</span><span class=\"hlup\" >a-</span><span class=\"hlup\" >ta-</span><span class=\"hlup\" >szum#</span><span class=\"hl hlup\" >{ki}</span></span></a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >{iri}</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >{ki}</span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">10</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P345558\" title=\"show this document on CDLI\" sec=\"P345558 obverse:9\">P345558 obverse:9</a></td><td class=\"tf\"><a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P345558\" title=\"P345558 obverse:9\" sec=\"P345558 obverse:9\"><span class=\"txtp\"><span class=\"hl hlup\" >{iri}</span><span class=\"hlup\" >sza3-</span><span class=\"hlup\" >gu4</span><span class=\"hl hlup\" >{ki}_</span></span></a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >{iri}</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >{ki}_</span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">11</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P345569\" title=\"show this document on CDLI\" sec=\"P345569 obverse:6\">P345569 obverse:6</a></td><td class=\"tf\"><a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P345569\" title=\"P345569 obverse:6\" sec=\"P345569 obverse:6\"><span class=\"txtp\"><span class=\"hl hlup\" >_{iri}</span><span class=\"hlup\" >zimbir</span><span class=\"hl hlup\" >{ki}_ </span></span></a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >_{iri}</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >{ki}_ </span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">12</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P275094\" title=\"show this document on CDLI\" sec=\"P275094 obverse:4\">P275094 obverse:4</a></td><td class=\"tf\"><a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P275094\" title=\"P275094 obverse:4\" sec=\"P275094 obverse:4\"><span class=\"txtp\"><span class=\"hl hlup\" >{iri}</span><span class=\"hlup\" >me-</span><span class=\"hlup\" >de-</span><span class=\"hlup\" >e-</span><span class=\"hlup\" >em</span><span class=\"hl hlup\" >{ki#}</span></span></a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >{iri}</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >{ki#}</span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">13</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P275094\" title=\"show this document on CDLI\" sec=\"P275094 obverse:7\">P275094 obverse:7</a></td><td class=\"tf\"><a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P275094\" title=\"P275094 obverse:7\" sec=\"P275094 obverse:7\"><span class=\"txtp\"><span class=\"hl hlup\" >{iri}</span><span class=\"hlup\" >me-</span><span class=\"hlup\" >de#-</span><span class=\"hlup\" >e#-</span><span class=\"hlup\" >em#</span><span class=\"hl hlup\" >{ki} </span></span></a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >{iri}</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >{ki} </span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">14</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P275105\" title=\"show this document on CDLI\" sec=\"P275105 obverse:11\">P275105 obverse:11</a></td><td class=\"tf\"><a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P275105\" title=\"P275105 obverse:11\" sec=\"P275105 obverse:11\"><span class=\"txtp\"><span class=\"hl hlup\" >{iri}</span><span class=\"hlup\" >ra-</span><span class=\"hlup\" >ha-</span><span class=\"hlup\" >bu</span><span class=\"hl hlup\" >{ki} </span></span></a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >{iri}</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >{ki} </span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">15</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P275112\" title=\"show this document on CDLI\" sec=\"P275112 obverse:4\">P275112 obverse:4</a></td><td class=\"tf\"><a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P275112\" title=\"P275112 obverse:4\" sec=\"P275112 obverse:4\"><span class=\"txtp\"><span class=\"hl hlup\" >{disz}</span><span class=\"hlup\" >dumu-</span><span class=\"hlup\" >uri2</span><span class=\"hl hlup\" >{ki} </span></span></a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >{disz}</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >{ki} </span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">16</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P275117\" title=\"show this document on CDLI\" sec=\"P275117 obverse:10\">P275117 obverse:10</a></td><td class=\"tf\"><a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P275117\" title=\"P275117 obverse:10\" sec=\"P275117 obverse:10\"><span class=\"txtp\"><span class=\"hl hlup\" >{iri}</span><span class=\"hlup\" >a-</span><span class=\"hlup\" >ha-</span><span class=\"hlup\" >am-</span><span class=\"hlup\" >nu-</span><span class=\"hlup\" >ta</span><span class=\"hl hlup\" >{ki} </span></span></a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >{iri}</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >{ki} </span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">17</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P275117\" title=\"show this document on CDLI\" sec=\"P275117 reverse:2\">P275117 reverse:2</a></td><td class=\"tf\"><a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P275117\" title=\"P275117 reverse:2\" sec=\"P275117 reverse:2\"><span class=\"txtp\"><span class=\"hl hlup\" >{iri}</span><span class=\"hlup\" >giri3-</span><span class=\"hlup\" >ni-</span><span class=\"hlup\" >i3-</span><span class=\"hlup\" >sa6</span><span class=\"hl hlup\" >{ki}</span></span></a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >{iri}</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >{ki}</span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">18</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P275117\" title=\"show this document on CDLI\" sec=\"P275117 reverse:4\">P275117 reverse:4</a></td><td class=\"tf\"><a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P275117\" title=\"P275117 reverse:4\" sec=\"P275117 reverse:4\"><span class=\"txtp\"><span class=\"hl hlup\" >{d}</span><span class=\"hlup\" >en-</span><span class=\"hlup\" >lil2-</span><span class=\"hlup\" >gar-</span><span class=\"hlup\" >ra</span><span class=\"hl hlup\" >{ki}</span></span></a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >{d}</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >{ki}</span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">19</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P386437\" title=\"show this document on CDLI\" sec=\"P386437 reverse:9\">P386437 reverse:9</a></td><td class=\"tf\"><a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P386437\" title=\"P386437 reverse:9\" sec=\"P386437 reverse:9\"><span class=\"txtp\"><span class=\"hl hlup\" >{iri}</span><span class=\"hlup\" >a-</span><span class=\"hlup\" >ha-</span><span class=\"hlup\" >[nu-</span><span class=\"hlup\" >ta]</span><span class=\"hl hlup\" >{ki}</span></span></a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >{iri}</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >{ki}</span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">20</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P386439\" title=\"show this document on CDLI\" sec=\"P386439 obverse:9\">P386439 obverse:9</a></td><td class=\"tf\"><a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P386439\" title=\"P386439 obverse:9\" sec=\"P386439 obverse:9\"><span class=\"txtp\"><span class=\"hl hlup\" >{iri}</span><span class=\"hlup\" >ra-</span><span class=\"hlup\" >ha-</span><span class=\"hlup\" >bi</span><span class=\"hl hlup\" >{ki}</span></span></a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >{iri}</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >{ki}</span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">21</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P387297\" title=\"show this document on CDLI\" sec=\"P387297 reverse:2\">P387297 reverse:2</a></td><td class=\"tf\"><a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P387297\" title=\"P387297 reverse:2\" sec=\"P387297 reverse:2\"><span class=\"txtp\"><span class=\"hl hlup\" >{d}</span><span class=\"hlup\" >suen-</span><span class=\"hlup\" >ri-</span><span class=\"hlup\" >im-</span><span class=\"hlup\" >uri2</span><span class=\"hl hlup\" >{ki}</span></span></a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >{d}</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >{ki}</span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">22</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P387309\" title=\"show this document on CDLI\" sec=\"P387309 obverse:5\">P387309 obverse:5</a></td><td class=\"tf\"><a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P387309\" title=\"P387309 obverse:5\" sec=\"P387309 obverse:5\"><span class=\"txtp\"><span class=\"hl hlup\" >{iri}</span><span class=\"hlup\" >tu-</span><span class=\"hlup\" >ur-</span><span class=\"hlup\" >{d}</span><span class=\"hlup\" >u3-</span><span class=\"hlup\" >gul-</span><span class=\"hlup\" >la2!</span><span class=\"hl hlup\" >{ki#}</span></span></a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >{iri}</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >{ki#}</span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">23</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P372944\" title=\"show this document on CDLI\" sec=\"P372944 reverse:9\">P372944 reverse:9</a></td><td class=\"tf\"><a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P372944\" title=\"P372944 reverse:9\" sec=\"P372944 reverse:9\"><span class=\"txtp\"><span class=\"hl hlup\" >{iri}</span><span class=\"hlup\" >ku-</span><span class=\"hlup\" >ma-</span><span class=\"hlup\" >ta-</span><span class=\"hlup\" >ni</span><span class=\"hl hlup\" >{ki} </span></span></a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >{iri}</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >{ki} </span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">24</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P372968\" title=\"show this document on CDLI\" sec=\"P372968 obverse:8\">P372968 obverse:8</a></td><td class=\"tf\"><a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P372968\" title=\"P372968 obverse:8\" sec=\"P372968 obverse:8\"><span class=\"txtp\"><span class=\"hl hlup\" >{d}</span><span class=\"hlup\" >za-</span><span class=\"hlup\" >ba4-</span><span class=\"hlup\" >ba4</span><span class=\"hl hlup\" >{ki}</span></span></a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >{d}</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >{ki}</span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">25</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P372997\" title=\"show this document on CDLI\" sec=\"P372997 obverse:2\">P372997 obverse:2</a></td><td class=\"tf\"><a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P372997\" title=\"P372997 obverse:2\" sec=\"P372997 obverse:2\"><span class=\"txtp\"><span class=\"hl hlup\" >{iri}</span><span class=\"hlup\" >BU-</span><span class=\"hlup\" >lum</span><span class=\"hl hlup\" >{ki}</span></span></a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >{iri}</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >{ki}</span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">26</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P373000\" title=\"show this document on CDLI\" sec=\"P373000 obverse:8\">P373000 obverse:8</a></td><td class=\"tf\"><a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P373000\" title=\"P373000 obverse:8\" sec=\"P373000 obverse:8\"><span class=\"txtp\"><span class=\"hl hlup\" >{iri}</span><span class=\"hlup\" >ra-</span><span class=\"hlup\" >ha-</span><span class=\"hlup\" >bu-</span><span class=\"hlup\" >um</span><span class=\"hl hlup\" >{ki}</span></span></a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >{iri}</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >{ki}</span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">27</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P373000\" title=\"show this document on CDLI\" sec=\"P373000 reverse:2\">P373000 reverse:2</a></td><td class=\"tf\"><a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P373000\" title=\"P373000 reverse:2\" sec=\"P373000 reverse:2\"><span class=\"txtp\"><span class=\"hl hlup\" >{iri}</span><span class=\"hlup\" >ra-</span><span class=\"hlup\" >ha-</span><span class=\"hlup\" >bu</span><span class=\"hl hlup\" >{ki}</span></span></a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >{iri}</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >{ki}</span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">28</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P307174\" title=\"show this document on CDLI\" sec=\"P307174 reverse:10\">P307174 reverse:10</a></td><td class=\"tf\"><a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P307174\" title=\"P307174 reverse:10\" sec=\"P307174 reverse:10\"><span class=\"txtp\"><span class=\"hl hlup\" >_{lu2}</span><span class=\"hlup\" >sig4</span><span class=\"hl hlup\" >{ki}_ </span></span></a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >_{lu2}</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >{ki}_ </span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">29</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P307174\" title=\"show this document on CDLI\" sec=\"P307174 reverse:11\">P307174 reverse:11</a></td><td class=\"tf\"><a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P307174\" title=\"P307174 reverse:11\" sec=\"P307174 reverse:11\"><span class=\"txtp\"><span class=\"hl hlup\" >_{lu2#}</span><span class=\"hlup\" >sig4#</span><span class=\"hl hlup\" >{ki}_ </span></span></a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >_{lu2#}</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >{ki}_ </span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">30</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P305823\" title=\"show this document on CDLI\" sec=\"P305823 obverse:11\">P305823 obverse:11</a></td><td class=\"tf\"><a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P305823\" title=\"P305823 obverse:11\" sec=\"P305823 obverse:11\"><span class=\"txtp\"><span class=\"hl hlup\" >{iri}</span><span class=\"hlup\" >ma-</span><span class=\"hlup\" >nu-</span><span class=\"hlup\" >um</span><span class=\"hl hlup\" >{ki}</span></span></a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >{iri}</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >{ki}</span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">31</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P296050\" title=\"show this document on CDLI\" sec=\"P296050 obverse:9\">P296050 obverse:9</a></td><td class=\"tf\"><a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P296050\" title=\"P296050 obverse:9\" sec=\"P296050 obverse:9\"><span class=\"txtp\"><span class=\"hl hlup\" >{disz}</span><span class=\"hlup\" >li-</span><span class=\"hlup\" >wi-</span><span class=\"hlup\" >ir-</span><span class=\"hlup\" >_ka2-</span><span class=\"hlup\" >dingir-</span><span class=\"hlup\" >ra</span><span class=\"hl hlup\" >{ki}_</span></span></a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >{disz}</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >{ki}_</span></span></td></tr></table>"
],
"text/plain": [
"<IPython.core.display.HTML object>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"resultsBoth1 = []\n",
"for w in sorted(wordsBoth):\n",
" signs = L.d(w, otype='sign')\n",
" first = signs[0]\n",
" last = signs[-1]\n",
" resultsBoth1.append((w, first, last))\n",
"A.table(resultsBoth1)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Modified query\n",
"\n",
"We show these cases by means of a third query:"
]
},
{
"cell_type": "code",
"execution_count": 24,
"metadata": {},
"outputs": [],
"source": [
"queryBoth = f'''\n",
"word\n",
" =: sign det reading={detStartCrit}\n",
" sign det reading={detEndCrit}\n",
" :=\n",
"'''"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Note that we do not say:\n",
"\n",
"```python\n",
"queryBoth = f'''\n",
"word\n",
" =: sign det reading={detStartCrit}\n",
" := sign det reading={detEndCrit}\n",
"'''\n",
"```\n",
"\n",
"The meaning of this would be that the second sign ends at the same place as the first sign ends.\n",
"\n",
"But we want that the second sign ends at the same place as the word ends.\n",
"\n",
"The way to achieve that, is to place the `:=` after the second sign on a line of its own.\n",
"\n",
"The lonely relation symbol on such a last line holds between the preceding atom (the second sign here)\n",
"and the latest embedder (the word here)."
]
},
{
"cell_type": "code",
"execution_count": 25,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
" 0.32s 31 results\n"
]
}
],
"source": [
"resultsBoth2 = A.search(queryBoth)"
]
},
{
"cell_type": "code",
"execution_count": 26,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"True"
]
},
"execution_count": 26,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"resultsBoth1 == resultsBoth2"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Equal results."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Noun compilation\n",
"\n",
"We want to compile a list of nouns found in this way:\n",
"we take all words that have a specified start determiner at the start or a specified end determiner at the end (or both).\n",
"\n",
"From all those words, we strip the start and/or end determiners. \n",
"What remains, we store in a dictionary, with the form as key, and the word nodes that exhibit that form as value.\n",
"\n",
"When we compute the form, we pick the basic info of a sign, not the full atf with flags and brackets.\n",
"\n",
"Looking at the\n",
"[feature documentation, section Text-Formats](https://github.com/Nino-cunei/oldbabylonian/blob/master/docs//transcription.md#text-formats), \n",
"we choose `text-orig-rich` for our representation."
]
},
{
"cell_type": "code",
"execution_count": 27,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"1604 distinct plain words\n"
]
}
],
"source": [
"nouns = collections.defaultdict(list)\n",
"\n",
"for (w, s) in resultsStart + resultsEnd:\n",
" signs = L.d(w, otype='sign')\n",
" isDetStart = F.det.v(signs[0])\n",
" isDetEnd = F.det.v(signs[-1])\n",
" # strip determiners\n",
" nounSigns = signs[(1 if isDetStart else 0):(-1 if isDetEnd else len(signs))]\n",
" \n",
" noun = T.text(nounSigns, fmt='text-orig-rich').strip()\n",
" \n",
" nouns[noun].append(w)\n",
" \n",
"print(f'{len(nouns)} distinct plain words') "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We show a frequency list of the top 20 plain words:"
]
},
{
"cell_type": "code",
"execution_count": 29,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"1 utu 776 x\n",
"2 marduk 626 x\n",
"3 babila₂⁼ 180 x\n",
"4 zimbir⁼ 154 x\n",
"5 suen-i-din-nam 114 x\n",
"6 ma₂ 47 x\n",
"7 utu-ha-zi-ir 41 x\n",
"8 iri⁼ 39 x\n",
"9 kiri₆ 39 x\n",
"10 x 36 x\n",
"11 larsa⁼ 31 x\n",
"12 ban₂ 29 x\n",
"13 inanna 27 x\n",
"14 ka₂-dingir-ra⁼ 24 x\n",
"15 d⁼suen-i-din-nam 23 x\n",
"16 na-bi-um-at-pa-lam 23 x\n",
"17 kiš⁼ 21 x\n",
"18 suen-i-di₂-nam 20 x\n",
"19 marduk-na-ṣi-ir 19 x\n",
"20 marduk-mu-ša-lim-ma 17 x\n"
]
}
],
"source": [
"showLimit = 20\n",
"\n",
"for (i, (noun, ws)) in enumerate(sorted(\n",
" nouns.items(),\n",
" key=freqKeyL,\n",
")[0:showLimit]):\n",
" print(f'{i + 1:<2} {noun:<20} {len(ws):>4} x')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Note noun 15: it starts with a determiner! Why hasn't it be stripped?\n",
"\n",
"We'll have a closer look and make a table of examples-with-context of the top 20 plain words.\n",
"\n",
"We recompute the signs to be stripped away and color them red and green.\n",
"The remaining parts of the words we color yellow."
]
},
{
"cell_type": "code",
"execution_count": 35,
"metadata": {},
"outputs": [],
"source": [
"highlights = {}\n",
"nounExamples = []\n",
"\n",
"for (noun, ws) in sorted(\n",
" nouns.items(),\n",
" key=freqKeyL,\n",
")[0:showLimit]:\n",
" w = ws[0]\n",
" \n",
" # get to the signs and study the determiners\n",
" \n",
" signs = L.d(w, otype='sign')\n",
" isDetStart = F.det.v(signs[0])\n",
" isDetEnd = F.det.v(signs[-1])\n",
" nounSigns = signs[(1 if isDetStart else 0):(-1 if isDetEnd else len(signs))]\n",
" \n",
" # add nodes for highlighting\n",
" \n",
" if isDetStart:\n",
" highlights[signs[0]] = 'red'\n",
" if isDetEnd:\n",
" highlights[signs[-1]] = 'lightgreen'\n",
" for ns in nounSigns:\n",
" highlights[ns] = 'yellow'\n",
" \n",
" # end highlighting\n",
"\n",
" line = L.u(w, otype='line')[0]\n",
" nounExamples.append((line, w))"
]
},
{
"cell_type": "code",
"execution_count": 36,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<table>\n",
"<tr class=\"tf\">\n",
" <th class=\"tf\">n</th><th class=\"tf\">p</th>\n",
" <th class=\"tf\">line</th><th>word</th>\n",
"</tr>\n",
"\n",
"<tr class=\"tf\"><td class=\"tf\">1</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P509373\" title=\"show this document on CDLI\" sec=\"P509373 obverse:4\">P509373 obverse:4</a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl\" style=\"background-color: red;\" >_{d}</span><span class=\"hl\" style=\"background-color: yellow;\" >utu_ </span>u3 <span class=\"hl\" style=\"background-color: red;\" >_{d}</span><span class=\"hl\" style=\"background-color: yellow;\" >[marduk]_ </span>a-na da-ri-a-[tim]</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl\" style=\"background-color: red;\" >_{d}</span><span class=\"hl\" style=\"background-color: yellow;\" >utu_ </span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">2</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P509373\" title=\"show this document on CDLI\" sec=\"P509373 obverse:4\">P509373 obverse:4</a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl\" style=\"background-color: red;\" >_{d}</span><span class=\"hl\" style=\"background-color: yellow;\" >utu_ </span>u3 <span class=\"hl\" style=\"background-color: red;\" >_{d}</span><span class=\"hl\" style=\"background-color: yellow;\" >[marduk]_ </span>a-na da-ri-a-[tim]</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl\" style=\"background-color: red;\" >_{d}</span><span class=\"hl\" style=\"background-color: yellow;\" >[marduk]_ </span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">3</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P509376\" title=\"show this document on CDLI\" sec=\"P509376 obverse:7\">P509376 obverse:7</a></td><td class=\"tf\"><span class=\"txtp\">{disz}na-bi-{d}suen a-na <span class=\"hl\" style=\"background-color: yellow;\" >babila2</span><span class=\"hl\" style=\"background-color: lightgreen;\" >{ki} </span>i-li-a-am#-ma</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl\" style=\"background-color: yellow;\" >babila2</span><span class=\"hl\" style=\"background-color: lightgreen;\" >{ki} </span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">4</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P345569\" title=\"show this document on CDLI\" sec=\"P345569 obverse:6\">P345569 obverse:6</a></td><td class=\"tf\"><span class=\"txtp\">i-na <span class=\"hl\" style=\"background-color: red;\" >_{iri}</span><span class=\"hl\" style=\"background-color: yellow;\" >zimbir</span><span class=\"hl\" style=\"background-color: lightgreen;\" >{ki}_ </span>ni-in-na-am-ru</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl\" style=\"background-color: red;\" >_{iri}</span><span class=\"hl\" style=\"background-color: yellow;\" >zimbir</span><span class=\"hl\" style=\"background-color: lightgreen;\" >{ki}_ </span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">5</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P509373\" title=\"show this document on CDLI\" sec=\"P509373 obverse:1\">P509373 obverse:1</a></td><td class=\"tf\"><span class=\"txtp\">[a-na] <span class=\"hl\" style=\"background-color: red;\" >_{d}</span><span class=\"hl\" style=\"background-color: yellow;\" >suen_-</span><span class=\"hl\" style=\"background-color: yellow;\" >i-</span><span class=\"hl\" style=\"background-color: yellow;\" >[din-</span><span class=\"hl\" style=\"background-color: yellow;\" >nam]</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl\" style=\"background-color: red;\" >_{d}</span><span class=\"hl\" style=\"background-color: yellow;\" >suen_-</span><span class=\"hl\" style=\"background-color: yellow;\" >i-</span><span class=\"hl\" style=\"background-color: yellow;\" >[din-</span><span class=\"hl\" style=\"background-color: yellow;\" >nam]</span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">6</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P510546\" title=\"show this document on CDLI\" sec=\"P510546 obverse:10\">P510546 obverse:10</a></td><td class=\"tf\"><span class=\"txtp\">_1(disz) <span class=\"hl\" style=\"background-color: red;\" >{gesz}</span><span class=\"hl\" style=\"background-color: yellow;\" >ma2_ </span>u3 _1(u) erin2_-am</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl\" style=\"background-color: red;\" >{gesz}</span><span class=\"hl\" style=\"background-color: yellow;\" >ma2_ </span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">7</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P509373\" title=\"show this document on CDLI\" sec=\"P509373 obverse:11\">P509373 obverse:11</a></td><td class=\"tf\"><span class=\"txtp\">sza <span class=\"hl\" style=\"background-color: red;\" >_{d}</span><span class=\"hl\" style=\"background-color: yellow;\" >utu_-</span><span class=\"hl\" style=\"background-color: yellow;\" >ha-</span><span class=\"hl\" style=\"background-color: yellow;\" >zi-</span><span class=\"hl\" style=\"background-color: yellow;\" >[ir] </span>isz-tu _mu 7(disz) kam_ id-di-nu-szum</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl\" style=\"background-color: red;\" >_{d}</span><span class=\"hl\" style=\"background-color: yellow;\" >utu_-</span><span class=\"hl\" style=\"background-color: yellow;\" >ha-</span><span class=\"hl\" style=\"background-color: yellow;\" >zi-</span><span class=\"hl\" style=\"background-color: yellow;\" >[ir] </span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">8</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P510534\" title=\"show this document on CDLI\" sec=\"P510534 obverse:11\">P510534 obverse:11</a></td><td class=\"tf\"><span class=\"txtp\">i-nu-ma _{gesz}apin hi-a_ sza <span class=\"hl\" style=\"background-color: yellow;\" >_iri</span><span class=\"hl\" style=\"background-color: lightgreen;\" >{ki}_ </span>[(x) (x)]</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl\" style=\"background-color: yellow;\" >_iri</span><span class=\"hl\" style=\"background-color: lightgreen;\" >{ki}_ </span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">9</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P510762\" title=\"show this document on CDLI\" sec=\"P510762 obverse:11\">P510762 obverse:11</a></td><td class=\"tf\"><span class=\"txtp\">u3 <span class=\"hl\" style=\"background-color: red;\" >_{gesz}</span><span class=\"hl\" style=\"background-color: yellow;\" >kiri6_ </span>e-tel-pi4-{d}marduk</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl\" style=\"background-color: red;\" >_{gesz}</span><span class=\"hl\" style=\"background-color: yellow;\" >kiri6_ </span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">10</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P481192\" title=\"show this document on CDLI\" sec=\"P481192 obverse:6'\">P481192 obverse:6'</a></td><td class=\"tf\"><span class=\"txtp\">szu-lum-ka ma-har <span class=\"hl\" style=\"background-color: red;\" >{d}</span><span class=\"hl\" style=\"background-color: yellow;\" >[x </span>u3] {d}[x lu da-ri]</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl\" style=\"background-color: red;\" >{d}</span><span class=\"hl\" style=\"background-color: yellow;\" >[x </span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">11</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P510592\" title=\"show this document on CDLI\" sec=\"P510592 obverse:13\">P510592 obverse:13</a></td><td class=\"tf\"><span class=\"txtp\">i-na <span class=\"hl\" style=\"background-color: yellow;\" >larsa</span><span class=\"hl\" style=\"background-color: lightgreen;\" >{ki}</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl\" style=\"background-color: yellow;\" >larsa</span><span class=\"hl\" style=\"background-color: lightgreen;\" >{ki}</span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">12</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P510556\" title=\"show this document on CDLI\" sec=\"P510556 reverse:4\">P510556 reverse:4</a></td><td class=\"tf\"><span class=\"txtp\">ib-ba-szu-u2 _5(gesz2) 3(u) sze gur <span class=\"hl\" style=\"background-color: red;\" >{gesz#}</span><span class=\"hl\" style=\"background-color: yellow;\" >ban2#_ </span>{gesz#}me-sze-qum#</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl\" style=\"background-color: red;\" >{gesz#}</span><span class=\"hl\" style=\"background-color: yellow;\" >ban2#_ </span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">13</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P510611\" title=\"show this document on CDLI\" sec=\"P510611 obverse:4\">P510611 obverse:4</a></td><td class=\"tf\"><span class=\"txtp\">{d}utu u3 <span class=\"hl\" style=\"background-color: red;\" >{d}</span><span class=\"hl\" style=\"background-color: yellow;\" >inanna </span>asz-szu-mi-ia</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl\" style=\"background-color: red;\" >{d}</span><span class=\"hl\" style=\"background-color: yellow;\" >inanna </span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">14</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P297172\" title=\"show this document on CDLI\" sec=\"P297172 reverse:12\">P297172 reverse:12</a></td><td class=\"tf\"><span class=\"txtp\">ma#-na#-ha-at# [x x x] <span class=\"hl\" style=\"background-color: yellow;\" >_ka2#-</span><span class=\"hl\" style=\"background-color: yellow;\" >[dingir]-</span><span class=\"hl\" style=\"background-color: yellow;\" >ra</span><span class=\"hl\" style=\"background-color: lightgreen;\" >{ki}_</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl\" style=\"background-color: yellow;\" >_ka2#-</span><span class=\"hl\" style=\"background-color: yellow;\" >[dingir]-</span><span class=\"hl\" style=\"background-color: yellow;\" >ra</span><span class=\"hl\" style=\"background-color: lightgreen;\" >{ki}_</span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">15</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P510531\" title=\"show this document on CDLI\" sec=\"P510531 obverse:9\">P510531 obverse:9</a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl\" style=\"background-color: red;\" >[{disz}</span><span class=\"hl\" style=\"background-color: yellow;\" >{d}]</span><span class=\"hl\" style=\"background-color: yellow;\" >suen#-</span><span class=\"hl\" style=\"background-color: yellow;\" >i-</span><span class=\"hl\" style=\"background-color: yellow;\" >din-</span><span class=\"hl\" style=\"background-color: yellow;\" >nam </span>{disz}{d}suen-mu-sza-lim u3 u2-s,ur-pi4-esz18-dar</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl\" style=\"background-color: red;\" >[{disz}</span><span class=\"hl\" style=\"background-color: yellow;\" >{d}]</span><span class=\"hl\" style=\"background-color: yellow;\" >suen#-</span><span class=\"hl\" style=\"background-color: yellow;\" >i-</span><span class=\"hl\" style=\"background-color: yellow;\" >din-</span><span class=\"hl\" style=\"background-color: yellow;\" >nam </span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">16</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P510535\" title=\"show this document on CDLI\" sec=\"P510535 obverse:1\">P510535 obverse:1</a></td><td class=\"tf\"><span class=\"txtp\">a-na <span class=\"hl\" style=\"background-color: red;\" >{d}</span><span class=\"hl\" style=\"background-color: yellow;\" >na-</span><span class=\"hl\" style=\"background-color: yellow;\" >bi-</span><span class=\"hl\" style=\"background-color: yellow;\" >um-</span><span class=\"hl\" style=\"background-color: yellow;\" >at-</span><span class=\"hl\" style=\"background-color: yellow;\" >pa-</span><span class=\"hl\" style=\"background-color: yellow;\" >lam</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl\" style=\"background-color: red;\" >{d}</span><span class=\"hl\" style=\"background-color: yellow;\" >na-</span><span class=\"hl\" style=\"background-color: yellow;\" >bi-</span><span class=\"hl\" style=\"background-color: yellow;\" >um-</span><span class=\"hl\" style=\"background-color: yellow;\" >at-</span><span class=\"hl\" style=\"background-color: yellow;\" >pa-</span><span class=\"hl\" style=\"background-color: yellow;\" >lam</span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">17</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P365956\" title=\"show this document on CDLI\" sec=\"P365956 obverse:9\">P365956 obverse:9</a></td><td class=\"tf\"><span class=\"txtp\">it-ru-ma i-na <span class=\"hl\" style=\"background-color: red;\" >{iri}</span><span class=\"hl\" style=\"background-color: yellow;\" >kisz</span><span class=\"hl\" style=\"background-color: lightgreen;\" >{ki} </span>ip-ta-ad</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl\" style=\"background-color: red;\" >{iri}</span><span class=\"hl\" style=\"background-color: yellow;\" >kisz</span><span class=\"hl\" style=\"background-color: lightgreen;\" >{ki} </span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">18</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P293189\" title=\"show this document on CDLI\" sec=\"P293189 reverse:3\">P293189 reverse:3</a></td><td class=\"tf\"><span class=\"txtp\">sza <span class=\"hl\" style=\"background-color: red;\" >{d}</span><span class=\"hl\" style=\"background-color: yellow;\" >suen-</span><span class=\"hl\" style=\"background-color: yellow;\" >i-</span><span class=\"hl\" style=\"background-color: yellow;\" >di2-</span><span class=\"hl\" style=\"background-color: yellow;\" >nam </span>ip-pu-u2</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl\" style=\"background-color: red;\" >{d}</span><span class=\"hl\" style=\"background-color: yellow;\" >suen-</span><span class=\"hl\" style=\"background-color: yellow;\" >i-</span><span class=\"hl\" style=\"background-color: yellow;\" >di2-</span><span class=\"hl\" style=\"background-color: yellow;\" >nam </span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">19</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P510840\" title=\"show this document on CDLI\" sec=\"P510840 obverse:1\">P510840 obverse:1</a></td><td class=\"tf\"><span class=\"txtp\">a-na# <span class=\"hl\" style=\"background-color: red;\" >{d}</span><span class=\"hl\" style=\"background-color: yellow;\" >marduk-</span><span class=\"hl\" style=\"background-color: yellow;\" >na-</span><span class=\"hl\" style=\"background-color: yellow;\" >s,i-</span><span class=\"hl\" style=\"background-color: yellow;\" >ir </span>_ugula dam-gar3_</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl\" style=\"background-color: red;\" >{d}</span><span class=\"hl\" style=\"background-color: yellow;\" >marduk-</span><span class=\"hl\" style=\"background-color: yellow;\" >na-</span><span class=\"hl\" style=\"background-color: yellow;\" >s,i-</span><span class=\"hl\" style=\"background-color: yellow;\" >ir </span></span></td></tr>\n",
"<tr class=\"tf\"><td class=\"tf\">20</td><td class=\"tf\"> <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P510541\" title=\"show this document on CDLI\" sec=\"P510541 obverse:3\">P510541 obverse:3</a></td><td class=\"tf\"><span class=\"txtp\">um#-ma <span class=\"hl\" style=\"background-color: red;\" >{d}</span><span class=\"hl\" style=\"background-color: yellow;\" >marduk-</span><span class=\"hl\" style=\"background-color: yellow;\" >mu-</span><span class=\"hl\" style=\"background-color: yellow;\" >sza-</span><span class=\"hl\" style=\"background-color: yellow;\" >lim-</span><span class=\"hl\" style=\"background-color: yellow;\" >ma</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl\" style=\"background-color: red;\" >{d}</span><span class=\"hl\" style=\"background-color: yellow;\" >marduk-</span><span class=\"hl\" style=\"background-color: yellow;\" >mu-</span><span class=\"hl\" style=\"background-color: yellow;\" >sza-</span><span class=\"hl\" style=\"background-color: yellow;\" >lim-</span><span class=\"hl\" style=\"background-color: yellow;\" >ma</span></span></td></tr></table>"
],
"text/plain": [
"<IPython.core.display.HTML object>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"A.table(nounExamples, highlights=highlights)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Looking again at noun 15, we see that it starts with *two* determinatives, and only the first one got stripped."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"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
}
