{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"from tf.app import use"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\tdownloading latest annotation/app-oldbabylonian\n",
"\tfrom https://api.github.com/repos/annotation/app-oldbabylonian/zipball ...\n",
"\tunzipping ...\n",
"\tsaving annotation/app-oldbabylonian commit 1e24c3de9f38234d7d351196e828c74fe06151c0\n",
"\tsaved annotation/app-oldbabylonian commit 1e24c3de9f38234d7d351196e828c74fe06151c0\n",
"Using annotation/app-oldbabylonian commit 1e24c3de9f38234d7d351196e828c74fe06151c0 (=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.4 rv1.4 (=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.3</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.4/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.4/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.4/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.4/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.4/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.4/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.4/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.4/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.4/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.4/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.4/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.4/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.4/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.4/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.4/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.4/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.4/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.4/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.4/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.4/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.4/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.4/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.4/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.4/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.4/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.4/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.4/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.4/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.4/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.4/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.4/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.4/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.4/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.4/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.4/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.4/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.4/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.4/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.4/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.4/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.4/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.4/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.4/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.4/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.4/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.4/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.4/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.4/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.4/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.4/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.4/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.4/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.4/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.4/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.4/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.4/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.4/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.4/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.4/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.4/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.4/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.4/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.4/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.4/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.4/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.4/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": [
"# Word searches\n",
"\n",
"Searches for particular morphology inside words can become complicated. Here are some ways to achieve results."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# i-na + ...-?im\n",
"\n",
"We look for word pairs, of which the first is `i-na` and the second ends in a sign whose reading ends in `im`."
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
"query = '''\n",
"line\n",
" word\n",
" =: sign reading=i\n",
" <: sign reading=na\n",
" :=\n",
" <: word\n",
" := sign reading~im$\n",
"'''"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Explanation of the expression in the last line `reading~im$`.\n",
"\n",
"We do not say: \n",
"> `reading` equals `im` \n",
"\n",
"but\n",
"\n",
"> `reading` **matches** `im$`\n",
"\n",
"Matching means that the reading is matched against a pattern, also known as a *regular expression*.\n",
"\n",
"This regular expression means: it should contain the substring `im` at the end. The `$` matches the end of the string.\n",
"\n",
"You can use any legal regular expression that Python recognizes.\n",
"\n",
"For a reference, consult the\n",
"[Python documentation](https://docs.python.org/3/library/re.html#module-re)\n",
"of regular expressions."
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
" 0.71s 307 results\n"
]
}
],
"source": [
"results = A.search(query)"
]
},
{
"cell_type": "code",
"execution_count": 5,
"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><th>sign</th><th>sign</th><th>word</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=P509375\" title=\"show this document on CDLI\" sec=\"P509375 reverse:9\">P509375 reverse:9</a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na </span><span class=\"hlup\" >la-</span><span class=\"hlup\" >hi-</span><span class=\"hlup\" >a-</span><span class=\"hl hlup\" >nim</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >la-</span><span class=\"hlup\" >hi-</span><span class=\"hlup\" >a-</span><span class=\"hl hlup\" >nim</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >nim</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=P510527\" title=\"show this document on CDLI\" sec=\"P510527 obverse:6\">P510527 obverse:6</a></td><td class=\"tf\"><span class=\"txtp\">{disz}ip-qu2-i3-li2-szu _di-ku5_ <span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na </span><span class=\"hlup\" >pu-</span><span class=\"hlup\" >uh2-</span><span class=\"hlup\" >ri-</span><span class=\"hl hlup\" >im</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >pu-</span><span class=\"hlup\" >uh2-</span><span class=\"hlup\" >ri-</span><span class=\"hl hlup\" >im</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >im</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=P510527\" title=\"show this document on CDLI\" sec=\"P510527 obverse:15\">P510527 obverse:15</a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na </span><span class=\"hlup\" >pu-</span><span class=\"hlup\" >uh2-</span><span class=\"hlup\" >ri-</span><span class=\"hl hlup\" >im </span>i-na da-ba-bi-im</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >pu-</span><span class=\"hlup\" >uh2-</span><span class=\"hlup\" >ri-</span><span class=\"hl hlup\" >im </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >im </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=P510527\" title=\"show this document on CDLI\" sec=\"P510527 obverse:15\">P510527 obverse:15</a></td><td class=\"tf\"><span class=\"txtp\">i-na pu-uh2-ri-im <span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na </span><span class=\"hlup\" >da-</span><span class=\"hlup\" >ba-</span><span class=\"hlup\" >bi-</span><span class=\"hl hlup\" >im</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >da-</span><span class=\"hlup\" >ba-</span><span class=\"hlup\" >bi-</span><span class=\"hl hlup\" >im</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >im</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=P510538\" title=\"show this document on CDLI\" sec=\"P510538 obverse:10\">P510538 obverse:10</a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na </span><span class=\"hlup\" >tam-</span><span class=\"hlup\" >li-</span><span class=\"hl hlup\" >tim</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >tam-</span><span class=\"hlup\" >li-</span><span class=\"hl hlup\" >tim</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >tim</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=P510562\" title=\"show this document on CDLI\" sec=\"P510562 obverse:7\">P510562 obverse:7</a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na# </span><span class=\"hlup\" >pa-</span><span class=\"hlup\" >ni-</span><span class=\"hl hlup\" >tim </span>a-na a-<ma?>-az{ki} ta-al-li-ik-ma#</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na# </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >na# </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >pa-</span><span class=\"hlup\" >ni-</span><span class=\"hl hlup\" >tim </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >tim </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=P510567\" title=\"show this document on CDLI\" sec=\"P510567 reverse:7\">P510567 reverse:7</a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >[i-</span><span class=\"hl hlup\" >na] </span><span class=\"hlup\" >e-</span><span class=\"hlup\" >bu-</span><span class=\"hlup\" >ri-</span><span class=\"hl hlup\" >im</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >[i-</span><span class=\"hl hlup\" >na] </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >[i-</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >na] </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >e-</span><span class=\"hlup\" >bu-</span><span class=\"hlup\" >ri-</span><span class=\"hl hlup\" >im</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >im</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=P510571\" title=\"show this document on CDLI\" sec=\"P510571 reverse:13\">P510571 reverse:13</a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na </span><span class=\"hlup\" >an-</span><span class=\"hlup\" >ni-</span><span class=\"hl hlup\" >tim </span>at-hu-<ut>-ka#</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >an-</span><span class=\"hlup\" >ni-</span><span class=\"hl hlup\" >tim </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >tim </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=P510574\" title=\"show this document on CDLI\" sec=\"P510574 obverse:8\">P510574 obverse:8</a></td><td class=\"tf\"><span class=\"txtp\">tup-pi2 <span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na </span><span class=\"hlup\" >a-</span><span class=\"hlup\" >ma-</span><span class=\"hlup\" >ri-</span><span class=\"hl hlup\" >im</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >a-</span><span class=\"hlup\" >ma-</span><span class=\"hlup\" >ri-</span><span class=\"hl hlup\" >im</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >im</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=P510575\" title=\"show this document on CDLI\" sec=\"P510575 obverse:11\">P510575 obverse:11</a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >[i]-</span><span class=\"hl hlup\" >na# </span><span class=\"hlup\" >qa-</span><span class=\"hl hlup\" >tim </span>ta-ki-il-tim</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >[i]-</span><span class=\"hl hlup\" >na# </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >[i]-</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >na# </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >qa-</span><span class=\"hl hlup\" >tim </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >tim </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": [
"Let's vary a bit on this theme. Suppose we want to tighten the criterion that the last sign of the last word \n",
"ends in `im`. Suppose we want it to be `tim` or `nim`. We can express that as follows:"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [],
"source": [
"query = '''\n",
"line\n",
" word\n",
" =: sign reading=i\n",
" <: sign reading=na\n",
" :=\n",
" <: word\n",
" := sign reading~^[nt]im$\n",
"'''"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Explanation: `^` matches the start of the reading. So the pattern `[nt]im` must cover the whole reading.\n",
"`[nt]` means: either `n` or `t`. In general, `[` *characters* `]` is a choice between the *characters*.\n",
"You can also say things like `[A-Z0-9]`, which matches any upper case latin letter or a digit."
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
" 0.70s 120 results\n"
]
}
],
"source": [
"results = A.search(query)"
]
},
{
"cell_type": "code",
"execution_count": 8,
"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><th>sign</th><th>sign</th><th>word</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=P509375\" title=\"show this document on CDLI\" sec=\"P509375 reverse:9\">P509375 reverse:9</a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na </span><span class=\"hlup\" >la-</span><span class=\"hlup\" >hi-</span><span class=\"hlup\" >a-</span><span class=\"hl hlup\" >nim</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >la-</span><span class=\"hlup\" >hi-</span><span class=\"hlup\" >a-</span><span class=\"hl hlup\" >nim</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >nim</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=P510538\" title=\"show this document on CDLI\" sec=\"P510538 obverse:10\">P510538 obverse:10</a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na </span><span class=\"hlup\" >tam-</span><span class=\"hlup\" >li-</span><span class=\"hl hlup\" >tim</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >tam-</span><span class=\"hlup\" >li-</span><span class=\"hl hlup\" >tim</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >tim</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=P510562\" title=\"show this document on CDLI\" sec=\"P510562 obverse:7\">P510562 obverse:7</a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na# </span><span class=\"hlup\" >pa-</span><span class=\"hlup\" >ni-</span><span class=\"hl hlup\" >tim </span>a-na a-<ma?>-az{ki} ta-al-li-ik-ma#</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na# </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >na# </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >pa-</span><span class=\"hlup\" >ni-</span><span class=\"hl hlup\" >tim </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >tim </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=P510571\" title=\"show this document on CDLI\" sec=\"P510571 reverse:13\">P510571 reverse:13</a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na </span><span class=\"hlup\" >an-</span><span class=\"hlup\" >ni-</span><span class=\"hl hlup\" >tim </span>at-hu-<ut>-ka#</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >an-</span><span class=\"hlup\" >ni-</span><span class=\"hl hlup\" >tim </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >tim </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=P510575\" title=\"show this document on CDLI\" sec=\"P510575 obverse:11\">P510575 obverse:11</a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >[i]-</span><span class=\"hl hlup\" >na# </span><span class=\"hlup\" >qa-</span><span class=\"hl hlup\" >tim </span>ta-ki-il-tim</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >[i]-</span><span class=\"hl hlup\" >na# </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >[i]-</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >na# </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >qa-</span><span class=\"hl hlup\" >tim </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >tim </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=P510593\" title=\"show this document on CDLI\" sec=\"P510593 obverse:8\">P510593 obverse:8</a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na </span><span class=\"hlup\" >pa-</span><span class=\"hlup\" >ni-</span><span class=\"hl hlup\" >tim </span>i-nu-ma a-na tam-li-tim a-na e2-duru5-bi2-sa3{ki#}</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >pa-</span><span class=\"hlup\" >ni-</span><span class=\"hl hlup\" >tim </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >tim </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=P510643\" title=\"show this document on CDLI\" sec=\"P510643 reverse:6\">P510643 reverse:6</a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na </span><span class=\"hlup\" >an-</span><span class=\"hlup\" >ni-</span><span class=\"hl hlup\" >tim </span>ta-ka-li ta-ma-ar</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >an-</span><span class=\"hlup\" >ni-</span><span class=\"hl hlup\" >tim </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >tim </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=P510659\" title=\"show this document on CDLI\" sec=\"P510659 reverse:10'\">P510659 reverse:10'</a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na </span><span class=\"hlup\" >an-</span><span class=\"hlup\" >ni-</span><span class=\"hl hlup\" >tim </span>at#-[hu-ut-ka]</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >an-</span><span class=\"hlup\" >ni-</span><span class=\"hl hlup\" >tim </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >tim </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=P510698\" title=\"show this document on CDLI\" sec=\"P510698 obverse:11\">P510698 obverse:11</a></td><td class=\"tf\"><span class=\"txtp\">szum-ma <span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na </span><span class=\"hlup\" >ki-</span><span class=\"hl hlup\" >tim </span>a-bi</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >ki-</span><span class=\"hl hlup\" >tim </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >tim </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=P510698\" title=\"show this document on CDLI\" sec=\"P510698 obverse:13\">P510698 obverse:13</a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na </span><span class=\"hlup\" >an-</span><span class=\"hlup\" >ni-</span><span class=\"hl hlup\" >tim </span>et,-ra-an-ni-i-ma</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >an-</span><span class=\"hlup\" >ni-</span><span class=\"hl hlup\" >tim </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >tim </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": [
"What if we wanted a reading that is `tim`, `nim` or `im`? We can say that as follows:"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [],
"source": [
"query = '''\n",
"line\n",
" word\n",
" =: sign reading=i\n",
" <: sign reading=na\n",
" :=\n",
" <: word\n",
" := sign reading~^[nt]?im$\n",
"'''"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Explanation: the `?` makes the preceding thing *optional*. The preceding thing here is `[nt]`."
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
" 0.72s 301 results\n"
]
}
],
"source": [
"results = A.search(query)"
]
},
{
"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\">line</th><th>word</th><th>sign</th><th>sign</th><th>word</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=P509375\" title=\"show this document on CDLI\" sec=\"P509375 reverse:9\">P509375 reverse:9</a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na </span><span class=\"hlup\" >la-</span><span class=\"hlup\" >hi-</span><span class=\"hlup\" >a-</span><span class=\"hl hlup\" >nim</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >la-</span><span class=\"hlup\" >hi-</span><span class=\"hlup\" >a-</span><span class=\"hl hlup\" >nim</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >nim</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=P510527\" title=\"show this document on CDLI\" sec=\"P510527 obverse:6\">P510527 obverse:6</a></td><td class=\"tf\"><span class=\"txtp\">{disz}ip-qu2-i3-li2-szu _di-ku5_ <span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na </span><span class=\"hlup\" >pu-</span><span class=\"hlup\" >uh2-</span><span class=\"hlup\" >ri-</span><span class=\"hl hlup\" >im</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >pu-</span><span class=\"hlup\" >uh2-</span><span class=\"hlup\" >ri-</span><span class=\"hl hlup\" >im</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >im</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=P510527\" title=\"show this document on CDLI\" sec=\"P510527 obverse:15\">P510527 obverse:15</a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na </span><span class=\"hlup\" >pu-</span><span class=\"hlup\" >uh2-</span><span class=\"hlup\" >ri-</span><span class=\"hl hlup\" >im </span>i-na da-ba-bi-im</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >pu-</span><span class=\"hlup\" >uh2-</span><span class=\"hlup\" >ri-</span><span class=\"hl hlup\" >im </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >im </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=P510527\" title=\"show this document on CDLI\" sec=\"P510527 obverse:15\">P510527 obverse:15</a></td><td class=\"tf\"><span class=\"txtp\">i-na pu-uh2-ri-im <span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na </span><span class=\"hlup\" >da-</span><span class=\"hlup\" >ba-</span><span class=\"hlup\" >bi-</span><span class=\"hl hlup\" >im</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >da-</span><span class=\"hlup\" >ba-</span><span class=\"hlup\" >bi-</span><span class=\"hl hlup\" >im</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >im</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=P510538\" title=\"show this document on CDLI\" sec=\"P510538 obverse:10\">P510538 obverse:10</a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na </span><span class=\"hlup\" >tam-</span><span class=\"hlup\" >li-</span><span class=\"hl hlup\" >tim</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >tam-</span><span class=\"hlup\" >li-</span><span class=\"hl hlup\" >tim</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >tim</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=P510562\" title=\"show this document on CDLI\" sec=\"P510562 obverse:7\">P510562 obverse:7</a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na# </span><span class=\"hlup\" >pa-</span><span class=\"hlup\" >ni-</span><span class=\"hl hlup\" >tim </span>a-na a-<ma?>-az{ki} ta-al-li-ik-ma#</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na# </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >na# </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >pa-</span><span class=\"hlup\" >ni-</span><span class=\"hl hlup\" >tim </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >tim </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=P510567\" title=\"show this document on CDLI\" sec=\"P510567 reverse:7\">P510567 reverse:7</a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >[i-</span><span class=\"hl hlup\" >na] </span><span class=\"hlup\" >e-</span><span class=\"hlup\" >bu-</span><span class=\"hlup\" >ri-</span><span class=\"hl hlup\" >im</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >[i-</span><span class=\"hl hlup\" >na] </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >[i-</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >na] </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >e-</span><span class=\"hlup\" >bu-</span><span class=\"hlup\" >ri-</span><span class=\"hl hlup\" >im</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >im</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=P510571\" title=\"show this document on CDLI\" sec=\"P510571 reverse:13\">P510571 reverse:13</a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na </span><span class=\"hlup\" >an-</span><span class=\"hlup\" >ni-</span><span class=\"hl hlup\" >tim </span>at-hu-<ut>-ka#</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >an-</span><span class=\"hlup\" >ni-</span><span class=\"hl hlup\" >tim </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >tim </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=P510574\" title=\"show this document on CDLI\" sec=\"P510574 obverse:8\">P510574 obverse:8</a></td><td class=\"tf\"><span class=\"txtp\">tup-pi2 <span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na </span><span class=\"hlup\" >a-</span><span class=\"hlup\" >ma-</span><span class=\"hlup\" >ri-</span><span class=\"hl hlup\" >im</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >a-</span><span class=\"hlup\" >ma-</span><span class=\"hlup\" >ri-</span><span class=\"hl hlup\" >im</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >im</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=P510575\" title=\"show this document on CDLI\" sec=\"P510575 obverse:11\">P510575 obverse:11</a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >[i]-</span><span class=\"hl hlup\" >na# </span><span class=\"hlup\" >qa-</span><span class=\"hl hlup\" >tim </span>ta-ki-il-tim</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >[i]-</span><span class=\"hl hlup\" >na# </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >[i]-</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >na# </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >qa-</span><span class=\"hl hlup\" >tim </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >tim </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": [
"If you have a few discrete options, you can also list the options and separate them with `|`.\n",
"\n",
"Let's obtain the same results with a different expression:"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {},
"outputs": [],
"source": [
"query = '''\n",
"line\n",
" word\n",
" =: sign reading=i\n",
" <: sign reading=na\n",
" :=\n",
" <: word\n",
" := sign reading~^(tim|nim|im)$\n",
"'''"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Caution: mind the brackets: we do not want \n",
"\n",
"> `^tim` or `nim` or `im$`\n",
"\n",
"but\n",
"\n",
"> `^`, then `tim` or `nim` or `im`, then `$`"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
" 0.71s 301 results\n"
]
}
],
"source": [
"results = A.search(query)"
]
},
{
"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\">line</th><th>word</th><th>sign</th><th>sign</th><th>word</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=P509375\" title=\"show this document on CDLI\" sec=\"P509375 reverse:9\">P509375 reverse:9</a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na </span><span class=\"hlup\" >la-</span><span class=\"hlup\" >hi-</span><span class=\"hlup\" >a-</span><span class=\"hl hlup\" >nim</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >la-</span><span class=\"hlup\" >hi-</span><span class=\"hlup\" >a-</span><span class=\"hl hlup\" >nim</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >nim</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=P510527\" title=\"show this document on CDLI\" sec=\"P510527 obverse:6\">P510527 obverse:6</a></td><td class=\"tf\"><span class=\"txtp\">{disz}ip-qu2-i3-li2-szu _di-ku5_ <span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na </span><span class=\"hlup\" >pu-</span><span class=\"hlup\" >uh2-</span><span class=\"hlup\" >ri-</span><span class=\"hl hlup\" >im</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >pu-</span><span class=\"hlup\" >uh2-</span><span class=\"hlup\" >ri-</span><span class=\"hl hlup\" >im</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >im</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=P510527\" title=\"show this document on CDLI\" sec=\"P510527 obverse:15\">P510527 obverse:15</a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na </span><span class=\"hlup\" >pu-</span><span class=\"hlup\" >uh2-</span><span class=\"hlup\" >ri-</span><span class=\"hl hlup\" >im </span>i-na da-ba-bi-im</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >pu-</span><span class=\"hlup\" >uh2-</span><span class=\"hlup\" >ri-</span><span class=\"hl hlup\" >im </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >im </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=P510527\" title=\"show this document on CDLI\" sec=\"P510527 obverse:15\">P510527 obverse:15</a></td><td class=\"tf\"><span class=\"txtp\">i-na pu-uh2-ri-im <span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na </span><span class=\"hlup\" >da-</span><span class=\"hlup\" >ba-</span><span class=\"hlup\" >bi-</span><span class=\"hl hlup\" >im</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >da-</span><span class=\"hlup\" >ba-</span><span class=\"hlup\" >bi-</span><span class=\"hl hlup\" >im</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >im</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=P510538\" title=\"show this document on CDLI\" sec=\"P510538 obverse:10\">P510538 obverse:10</a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na </span><span class=\"hlup\" >tam-</span><span class=\"hlup\" >li-</span><span class=\"hl hlup\" >tim</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >tam-</span><span class=\"hlup\" >li-</span><span class=\"hl hlup\" >tim</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >tim</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=P510562\" title=\"show this document on CDLI\" sec=\"P510562 obverse:7\">P510562 obverse:7</a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na# </span><span class=\"hlup\" >pa-</span><span class=\"hlup\" >ni-</span><span class=\"hl hlup\" >tim </span>a-na a-<ma?>-az{ki} ta-al-li-ik-ma#</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na# </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >na# </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >pa-</span><span class=\"hlup\" >ni-</span><span class=\"hl hlup\" >tim </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >tim </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=P510567\" title=\"show this document on CDLI\" sec=\"P510567 reverse:7\">P510567 reverse:7</a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >[i-</span><span class=\"hl hlup\" >na] </span><span class=\"hlup\" >e-</span><span class=\"hlup\" >bu-</span><span class=\"hlup\" >ri-</span><span class=\"hl hlup\" >im</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >[i-</span><span class=\"hl hlup\" >na] </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >[i-</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >na] </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >e-</span><span class=\"hlup\" >bu-</span><span class=\"hlup\" >ri-</span><span class=\"hl hlup\" >im</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >im</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=P510571\" title=\"show this document on CDLI\" sec=\"P510571 reverse:13\">P510571 reverse:13</a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na </span><span class=\"hlup\" >an-</span><span class=\"hlup\" >ni-</span><span class=\"hl hlup\" >tim </span>at-hu-<ut>-ka#</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >an-</span><span class=\"hlup\" >ni-</span><span class=\"hl hlup\" >tim </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >tim </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=P510574\" title=\"show this document on CDLI\" sec=\"P510574 obverse:8\">P510574 obverse:8</a></td><td class=\"tf\"><span class=\"txtp\">tup-pi2 <span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na </span><span class=\"hlup\" >a-</span><span class=\"hlup\" >ma-</span><span class=\"hlup\" >ri-</span><span class=\"hl hlup\" >im</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >a-</span><span class=\"hlup\" >ma-</span><span class=\"hlup\" >ri-</span><span class=\"hl hlup\" >im</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >im</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=P510575\" title=\"show this document on CDLI\" sec=\"P510575 obverse:11\">P510575 obverse:11</a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >[i]-</span><span class=\"hl hlup\" >na# </span><span class=\"hlup\" >qa-</span><span class=\"hl hlup\" >tim </span>ta-ki-il-tim</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >[i]-</span><span class=\"hl hlup\" >na# </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >[i]-</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >na# </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >qa-</span><span class=\"hl hlup\" >tim </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >tim </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": [
"We have 6 results less than our original query.\n",
"\n",
"Can we find a template that searches exactly for the missing ones?"
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {},
"outputs": [],
"source": [
"query = '''\n",
"line\n",
" word\n",
" =: sign reading=i\n",
" <: sign reading=na\n",
" :=\n",
" <: word\n",
" := sign reading~^[^nt]im$\n",
"'''"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Explanation: the `^` inside the square brackets means the negation of the characters listed.\n",
"So here we say: we want anything **but** an `n` or a `t`.\n",
"Note that we still want *anything*, so the case of a bare `im` will not match.\n",
"\n",
"So this yields precisely those cases that we found initially, minus the `nim`, `tim`, `im` cases."
]
},
{
"cell_type": "code",
"execution_count": 18,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
" 0.73s 6 results\n"
]
}
],
"source": [
"results = A.search(query)"
]
},
{
"cell_type": "code",
"execution_count": 19,
"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><th>sign</th><th>sign</th><th>word</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=P510596\" title=\"show this document on CDLI\" sec=\"P510596 obverse:11\">P510596 obverse:11</a></td><td class=\"tf\"><span class=\"txtp\">ki#-ma ti-du-u2 <span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na </span><span class=\"hlup\" >a-</span><span class=\"hl hlup\" >lim </span>ma-ah-ri-ka</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >a-</span><span class=\"hl hlup\" >lim </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >lim </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=P510608\" title=\"show this document on CDLI\" sec=\"P510608 obverse:10\">P510608 obverse:10</a></td><td class=\"tf\"><span class=\"txtp\">u2-lu <span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na </span><span class=\"hlup\" >a-</span><span class=\"hl hlup\" >lim </span>e-ma i-ba-asz-szu#-u2</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >a-</span><span class=\"hl hlup\" >lim </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >lim </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=P510784\" title=\"show this document on CDLI\" sec=\"P510784 reverse:3\">P510784 reverse:3</a></td><td class=\"tf\"><span class=\"txtp\">ki-ma <span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na </span><span class=\"hlup\" >a-</span><span class=\"hl hlup\" >lim </span>te-<esz>-te-ne2-em-mu</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >a-</span><span class=\"hl hlup\" >lim </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >lim </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=P510837\" title=\"show this document on CDLI\" sec=\"P510837 obverse:8\">P510837 obverse:8</a></td><td class=\"tf\"><span class=\"txtp\">{disz}{d}na-bi-um-ma-lik <span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na# </span><span class=\"hlup\" >_a-</span><span class=\"hlup\" >sza3_-</span><span class=\"hl hlup\" >lim</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na# </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >na# </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >_a-</span><span class=\"hlup\" >sza3_-</span><span class=\"hl hlup\" >lim</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >lim</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=P313311\" title=\"show this document on CDLI\" sec=\"P313311 reverse:10\">P313311 reverse:10</a></td><td class=\"tf\"><span class=\"txtp\">um-mi <span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na </span><span class=\"hlup\" >a-</span><span class=\"hl hlup\" >lim </span>is-su2-ha</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >a-</span><span class=\"hl hlup\" >lim </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >lim </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=P275147\" title=\"show this document on CDLI\" sec=\"P275147 obverse:6\">P275147 obverse:6</a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >[na </span><span class=\"hlup\" >e-</span><span class=\"hlup\" >mu-</span><span class=\"hlup\" >ut]-</span><span class=\"hlup\" >ba-</span><span class=\"hl hlup\" >lim </span>ka-li-a</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >[na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >[na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >e-</span><span class=\"hlup\" >mu-</span><span class=\"hlup\" >ut]-</span><span class=\"hlup\" >ba-</span><span class=\"hl hlup\" >lim </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >lim </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": [
"There is an alternative way of matching words. Not by sign, but by using the feature `sym` on words."
]
},
{
"cell_type": "code",
"execution_count": 23,
"metadata": {},
"outputs": [],
"source": [
"query = '''\n",
"line\n",
" word sym=i-na\n",
" <: word sym~im$\n",
"'''"
]
},
{
"cell_type": "code",
"execution_count": 24,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
" 0.19s 306 results\n"
]
}
],
"source": [
"results = A.search(query)"
]
},
{
"cell_type": "code",
"execution_count": 22,
"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><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=P509375\" title=\"show this document on CDLI\" sec=\"P509375 reverse:9\">P509375 reverse:9</a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >i-</span><span class=\"hlup\" >na </span><span class=\"hlup\" >la-</span><span class=\"hlup\" >hi-</span><span class=\"hlup\" >a-</span><span class=\"hlup\" >nim</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >i-</span><span class=\"hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >la-</span><span class=\"hlup\" >hi-</span><span class=\"hlup\" >a-</span><span class=\"hlup\" >nim</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=P510527\" title=\"show this document on CDLI\" sec=\"P510527 obverse:6\">P510527 obverse:6</a></td><td class=\"tf\"><span class=\"txtp\">{disz}ip-qu2-i3-li2-szu _di-ku5_ <span class=\"hlup\" >i-</span><span class=\"hlup\" >na </span><span class=\"hlup\" >pu-</span><span class=\"hlup\" >uh2-</span><span class=\"hlup\" >ri-</span><span class=\"hlup\" >im</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >i-</span><span class=\"hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >pu-</span><span class=\"hlup\" >uh2-</span><span class=\"hlup\" >ri-</span><span class=\"hlup\" >im</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=P510527\" title=\"show this document on CDLI\" sec=\"P510527 obverse:15\">P510527 obverse:15</a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >i-</span><span class=\"hlup\" >na </span><span class=\"hlup\" >pu-</span><span class=\"hlup\" >uh2-</span><span class=\"hlup\" >ri-</span><span class=\"hlup\" >im </span>i-na da-ba-bi-im</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >i-</span><span class=\"hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >pu-</span><span class=\"hlup\" >uh2-</span><span class=\"hlup\" >ri-</span><span class=\"hlup\" >im </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=P510527\" title=\"show this document on CDLI\" sec=\"P510527 obverse:15\">P510527 obverse:15</a></td><td class=\"tf\"><span class=\"txtp\">i-na pu-uh2-ri-im <span class=\"hlup\" >i-</span><span class=\"hlup\" >na </span><span class=\"hlup\" >da-</span><span class=\"hlup\" >ba-</span><span class=\"hlup\" >bi-</span><span class=\"hlup\" >im</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >i-</span><span class=\"hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >da-</span><span class=\"hlup\" >ba-</span><span class=\"hlup\" >bi-</span><span class=\"hlup\" >im</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=P510538\" title=\"show this document on CDLI\" sec=\"P510538 obverse:10\">P510538 obverse:10</a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >i-</span><span class=\"hlup\" >na </span><span class=\"hlup\" >tam-</span><span class=\"hlup\" >li-</span><span class=\"hlup\" >tim</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >i-</span><span class=\"hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >tam-</span><span class=\"hlup\" >li-</span><span class=\"hlup\" >tim</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=P510562\" title=\"show this document on CDLI\" sec=\"P510562 obverse:7\">P510562 obverse:7</a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >i-</span><span class=\"hlup\" >na# </span><span class=\"hlup\" >pa-</span><span class=\"hlup\" >ni-</span><span class=\"hlup\" >tim </span>a-na a-<ma?>-az{ki} ta-al-li-ik-ma#</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >i-</span><span class=\"hlup\" >na# </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >pa-</span><span class=\"hlup\" >ni-</span><span class=\"hlup\" >tim </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=P510567\" title=\"show this document on CDLI\" sec=\"P510567 reverse:7\">P510567 reverse:7</a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >[i-</span><span class=\"hlup\" >na] </span><span class=\"hlup\" >e-</span><span class=\"hlup\" >bu-</span><span class=\"hlup\" >ri-</span><span class=\"hlup\" >im</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >[i-</span><span class=\"hlup\" >na] </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >e-</span><span class=\"hlup\" >bu-</span><span class=\"hlup\" >ri-</span><span class=\"hlup\" >im</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=P510571\" title=\"show this document on CDLI\" sec=\"P510571 reverse:13\">P510571 reverse:13</a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >i-</span><span class=\"hlup\" >na </span><span class=\"hlup\" >an-</span><span class=\"hlup\" >ni-</span><span class=\"hlup\" >tim </span>at-hu-<ut>-ka#</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >i-</span><span class=\"hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >an-</span><span class=\"hlup\" >ni-</span><span class=\"hlup\" >tim </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=P510574\" title=\"show this document on CDLI\" sec=\"P510574 obverse:8\">P510574 obverse:8</a></td><td class=\"tf\"><span class=\"txtp\">tup-pi2 <span class=\"hlup\" >i-</span><span class=\"hlup\" >na </span><span class=\"hlup\" >a-</span><span class=\"hlup\" >ma-</span><span class=\"hlup\" >ri-</span><span class=\"hlup\" >im</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >i-</span><span class=\"hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >a-</span><span class=\"hlup\" >ma-</span><span class=\"hlup\" >ri-</span><span class=\"hlup\" >im</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=P510575\" title=\"show this document on CDLI\" sec=\"P510575 obverse:11\">P510575 obverse:11</a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >[i]-</span><span class=\"hlup\" >na# </span><span class=\"hlup\" >qa-</span><span class=\"hlup\" >tim </span>ta-ki-il-tim</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >[i]-</span><span class=\"hlup\" >na# </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >qa-</span><span class=\"hlup\" >tim </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": [
"It seems that we miss one result in this way. Let's find out which:"
]
},
{
"cell_type": "code",
"execution_count": 27,
"metadata": {},
"outputs": [],
"source": [
"query = '''\n",
"line\n",
" word\n",
" =: sign reading=i\n",
" <: sign reading=na\n",
" :=\n",
" <: word sym~(?<!im)$\n",
" := sign reading~im$\n",
"'''"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Explanation: the piece `(?<!im)` is a negative look-behind assertion. It matches at a point that does not follow immediately on `im`.\n",
"So we look for words whose sym feature does not end in `im`."
]
},
{
"cell_type": "code",
"execution_count": 28,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
" 0.78s 1 result\n"
]
}
],
"source": [
"results = A.search(query)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"That must be the culprit!"
]
},
{
"cell_type": "code",
"execution_count": 29,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<p><b>result</b> <i>1</i></p>"
],
"text/plain": [
"<IPython.core.display.HTML object>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"\n",
"<div class=\"contnr line \" >\n",
" \n",
" <div class=\"lbl line\">\n",
" <a href=\"https://cdli.ucla.edu/search/search_results.php?SearchMode=Text&ObjectID=P386474\" title=\"P386474 obverse:7\" sec=\"P386474 obverse:7\">line <span class=\"txtn\">7</span></a>\n",
" \n",
" </div>\n",
"\n",
" <div class=\"meta\">\n",
" <div class=\"features\"></div>\n",
" </div>\n",
"\n",
"\n",
" <div class=\"children line\">\n",
"\n",
"\n",
"<div class=\"contnr word \" >\n",
" \n",
" <div class=\"lbl word\">\n",
" <span class=\"txtp\">tup-pi2 </span>\n",
" \n",
" </div>\n",
"\n",
" <div class=\"meta\">\n",
" <div class=\"features\"> <span class=\"sym xft\"><span class=\"f\">sym=</span>tup-pi2</span></div>\n",
" </div>\n",
"\n",
"\n",
" <div class=\"children word\">\n",
"\n",
"\n",
"<div class=\"contnr sign \" >\n",
" \n",
" <div class=\"lbl sign\">\n",
" <span class=\"txtp\">tup-</span>\n",
" \n",
" </div>\n",
"\n",
" <div class=\"meta\">\n",
" <div class=\"features\"> <span class=\"reading xft\"><span class=\"f\">reading=</span>tup</span> <span class=\"sym xft\"><span class=\"f\">sym=</span>tup</span></div>\n",
" </div>\n",
"\n",
"\n",
"</div>\n",
"\n",
"\n",
"<div class=\"contnr sign \" >\n",
" \n",
" <div class=\"lbl sign\">\n",
" <span class=\"txtp\">pi2 </span>\n",
" \n",
" </div>\n",
"\n",
" <div class=\"meta\">\n",
" <div class=\"features\"> <span class=\"reading xft\"><span class=\"f\">reading=</span>pi2</span> <span class=\"sym xft\"><span class=\"f\">sym=</span>pi2</span></div>\n",
" </div>\n",
"\n",
"\n",
"</div>\n",
"\n",
"\n",
" </div>\n",
"\n",
"\n",
"</div>\n",
"\n",
"\n",
"<div class=\"contnr word hl\" >\n",
" \n",
" <div class=\"lbl word\">\n",
" <span class=\"txtp\">i-na </span>\n",
" \n",
" </div>\n",
"\n",
" <div class=\"meta\">\n",
" <div class=\"features\"> <span class=\"sym xft\"><span class=\"f\">sym=</span>i-na</span></div>\n",
" </div>\n",
"\n",
"\n",
" <div class=\"children word\">\n",
"\n",
"\n",
"<div class=\"contnr sign hl\" >\n",
" \n",
" <div class=\"lbl sign\">\n",
" <span class=\"txtp\">i-</span>\n",
" \n",
" </div>\n",
"\n",
" <div class=\"meta\">\n",
" <div class=\"features\"> <span class=\"reading xft\"><span class=\"f\">reading=</span>i</span> <span class=\"sym xft\"><span class=\"f\">sym=</span>i</span></div>\n",
" </div>\n",
"\n",
"\n",
"</div>\n",
"\n",
"\n",
"<div class=\"contnr sign hl\" >\n",
" \n",
" <div class=\"lbl sign\">\n",
" <span class=\"txtp\">na </span>\n",
" \n",
" </div>\n",
"\n",
" <div class=\"meta\">\n",
" <div class=\"features\"> <span class=\"reading xft\"><span class=\"f\">reading=</span>na</span> <span class=\"sym xft\"><span class=\"f\">sym=</span>na</span></div>\n",
" </div>\n",
"\n",
"\n",
"</div>\n",
"\n",
"\n",
" </div>\n",
"\n",
"\n",
"</div>\n",
"\n",
"\n",
"<div class=\"contnr word hl\" >\n",
" \n",
" <div class=\"lbl word\">\n",
" <span class=\"txtp\">a-ma-ri-im!(SZI)</span>\n",
" \n",
" </div>\n",
"\n",
" <div class=\"meta\">\n",
" <div class=\"features\"> <span class=\"sym xft\"><span class=\"f\">sym=</span>a-ma-ri-im!SZI</span></div>\n",
" </div>\n",
"\n",
"\n",
" <div class=\"children word\">\n",
"\n",
"\n",
"<div class=\"contnr sign \" >\n",
" \n",
" <div class=\"lbl sign\">\n",
" <span class=\"txtp\">a-</span>\n",
" \n",
" </div>\n",
"\n",
" <div class=\"meta\">\n",
" <div class=\"features\"> <span class=\"reading xft\"><span class=\"f\">reading=</span>a</span> <span class=\"sym xft\"><span class=\"f\">sym=</span>a</span></div>\n",
" </div>\n",
"\n",
"\n",
"</div>\n",
"\n",
"\n",
"<div class=\"contnr sign \" >\n",
" \n",
" <div class=\"lbl sign\">\n",
" <span class=\"txtp\">ma-</span>\n",
" \n",
" </div>\n",
"\n",
" <div class=\"meta\">\n",
" <div class=\"features\"> <span class=\"reading xft\"><span class=\"f\">reading=</span>ma</span> <span class=\"sym xft\"><span class=\"f\">sym=</span>ma</span></div>\n",
" </div>\n",
"\n",
"\n",
"</div>\n",
"\n",
"\n",
"<div class=\"contnr sign \" >\n",
" \n",
" <div class=\"lbl sign\">\n",
" <span class=\"txtp\">ri-</span>\n",
" \n",
" </div>\n",
"\n",
" <div class=\"meta\">\n",
" <div class=\"features\"> <span class=\"reading xft\"><span class=\"f\">reading=</span>ri</span> <span class=\"sym xft\"><span class=\"f\">sym=</span>ri</span></div>\n",
" </div>\n",
"\n",
"\n",
"</div>\n",
"\n",
"\n",
"<div class=\"contnr sign hl\" >\n",
" \n",
" <div class=\"lbl sign\">\n",
" <span class=\"txtp\">im!(SZI)</span>\n",
" \n",
" </div>\n",
"\n",
" <div class=\"meta\">\n",
" <div class=\"features\"> <span class=\"operator\"><span class=\"f\">operator=</span>!</span> <span class=\"grapheme\"><span class=\"f\">grapheme=</span>SZI</span> <span class=\"reading xft\"><span class=\"f\">reading=</span>im</span> <span class=\"sym xft\"><span class=\"f\">sym=</span>im!SZI</span></div>\n",
" </div>\n",
"\n",
"\n",
"</div>\n",
"\n",
"\n",
" </div>\n",
"\n",
"\n",
"</div>\n",
"\n",
"\n",
" </div>\n",
"\n",
"\n",
"</div>\n"
],
"text/plain": [
"<IPython.core.display.HTML object>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"A.show(results)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Ah: the second word does end in `im` reading-wise, but not sym-wise, because the sym feature has `im!SZI`"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Solution\n",
"\n",
"Let's quickly inspect all readings ending in `im`:"
]
},
{
"cell_type": "code",
"execution_count": 33,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"['dim',\n",
" 'erim',\n",
" 'gim',\n",
" 'idim',\n",
" 'im',\n",
" 'inim',\n",
" 'lim',\n",
" 'maszkim',\n",
" 'muhaldim',\n",
" 'nim',\n",
" 'silim',\n",
" 'sim',\n",
" 'szim',\n",
" 'szitim',\n",
" 'tim',\n",
" 'zadim']"
]
},
"execution_count": 33,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"sorted({F.reading.v(s) for s in F.otype.s('sign') if (F.reading.v(s) or '').endswith('im')})"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We do not want to consider readings like `maszkim` and `muhaldim`, just the ones with a single letter in front of the `im`.\n",
"Alas, the `sz` also counts as a single letter.\n",
"\n",
"Lets turn to `symr` instead of `sym`."
]
},
{
"cell_type": "code",
"execution_count": 34,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"['dim',\n",
" 'erim',\n",
" 'gim',\n",
" 'idim',\n",
" 'im',\n",
" 'inim',\n",
" 'lim',\n",
" 'maškim',\n",
" 'muhaldim',\n",
" 'nim',\n",
" 'silim',\n",
" 'sim',\n",
" 'tim',\n",
" 'zadim',\n",
" 'šim',\n",
" 'šitim']"
]
},
"execution_count": 34,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"sorted({F.readingr.v(s) for s in F.otype.s('sign') if (F.readingr.v(s) or '').endswith('im')})"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Now we can state the condition: words where feature symr consists of either `im` or a single letter followed by `im`."
]
},
{
"cell_type": "code",
"execution_count": 38,
"metadata": {},
"outputs": [],
"source": [
"query = '''\n",
"line\n",
" word sym=i-na\n",
" <: word symr~-.?im$\n",
"'''"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Explanation: the dot `.` stands for an arbitrary, single letter. Because of the `?` behind it, that letter is optional."
]
},
{
"cell_type": "code",
"execution_count": 39,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
" 0.18s 306 results\n"
]
}
],
"source": [
"results = A.search(query)"
]
},
{
"cell_type": "code",
"execution_count": 37,
"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><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=P509375\" title=\"show this document on CDLI\" sec=\"P509375 reverse:9\">P509375 reverse:9</a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >i-</span><span class=\"hlup\" >na </span><span class=\"hlup\" >la-</span><span class=\"hlup\" >hi-</span><span class=\"hlup\" >a-</span><span class=\"hlup\" >nim</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >i-</span><span class=\"hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >la-</span><span class=\"hlup\" >hi-</span><span class=\"hlup\" >a-</span><span class=\"hlup\" >nim</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=P510538\" title=\"show this document on CDLI\" sec=\"P510538 obverse:10\">P510538 obverse:10</a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >i-</span><span class=\"hlup\" >na </span><span class=\"hlup\" >tam-</span><span class=\"hlup\" >li-</span><span class=\"hlup\" >tim</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >i-</span><span class=\"hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >tam-</span><span class=\"hlup\" >li-</span><span class=\"hlup\" >tim</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=P510562\" title=\"show this document on CDLI\" sec=\"P510562 obverse:7\">P510562 obverse:7</a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >i-</span><span class=\"hlup\" >na# </span><span class=\"hlup\" >pa-</span><span class=\"hlup\" >ni-</span><span class=\"hlup\" >tim </span>a-na a-<ma?>-az{ki} ta-al-li-ik-ma#</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >i-</span><span class=\"hlup\" >na# </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >pa-</span><span class=\"hlup\" >ni-</span><span class=\"hlup\" >tim </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=P510571\" title=\"show this document on CDLI\" sec=\"P510571 reverse:13\">P510571 reverse:13</a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >i-</span><span class=\"hlup\" >na </span><span class=\"hlup\" >an-</span><span class=\"hlup\" >ni-</span><span class=\"hlup\" >tim </span>at-hu-<ut>-ka#</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >i-</span><span class=\"hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >an-</span><span class=\"hlup\" >ni-</span><span class=\"hlup\" >tim </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=P510575\" title=\"show this document on CDLI\" sec=\"P510575 obverse:11\">P510575 obverse:11</a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >[i]-</span><span class=\"hlup\" >na# </span><span class=\"hlup\" >qa-</span><span class=\"hlup\" >tim </span>ta-ki-il-tim</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >[i]-</span><span class=\"hlup\" >na# </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >qa-</span><span class=\"hlup\" >tim </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=P510593\" title=\"show this document on CDLI\" sec=\"P510593 obverse:8\">P510593 obverse:8</a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >i-</span><span class=\"hlup\" >na </span><span class=\"hlup\" >pa-</span><span class=\"hlup\" >ni-</span><span class=\"hlup\" >tim </span>i-nu-ma a-na tam-li-tim a-na e2-duru5-bi2-sa3{ki#}</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >i-</span><span class=\"hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >pa-</span><span class=\"hlup\" >ni-</span><span class=\"hlup\" >tim </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=P510596\" title=\"show this document on CDLI\" sec=\"P510596 obverse:11\">P510596 obverse:11</a></td><td class=\"tf\"><span class=\"txtp\">ki#-ma ti-du-u2 <span class=\"hlup\" >i-</span><span class=\"hlup\" >na </span><span class=\"hlup\" >a-</span><span class=\"hlup\" >lim </span>ma-ah-ri-ka</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >i-</span><span class=\"hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >a-</span><span class=\"hlup\" >lim </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=P510608\" title=\"show this document on CDLI\" sec=\"P510608 obverse:10\">P510608 obverse:10</a></td><td class=\"tf\"><span class=\"txtp\">u2-lu <span class=\"hlup\" >i-</span><span class=\"hlup\" >na </span><span class=\"hlup\" >a-</span><span class=\"hlup\" >lim </span>e-ma i-ba-asz-szu#-u2</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >i-</span><span class=\"hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >a-</span><span class=\"hlup\" >lim </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=P510643\" title=\"show this document on CDLI\" sec=\"P510643 reverse:6\">P510643 reverse:6</a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >i-</span><span class=\"hlup\" >na </span><span class=\"hlup\" >an-</span><span class=\"hlup\" >ni-</span><span class=\"hlup\" >tim </span>ta-ka-li ta-ma-ar</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >i-</span><span class=\"hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >an-</span><span class=\"hlup\" >ni-</span><span class=\"hlup\" >tim </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=P510659\" title=\"show this document on CDLI\" sec=\"P510659 reverse:10'\">P510659 reverse:10'</a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >i-</span><span class=\"hlup\" >na </span><span class=\"hlup\" >an-</span><span class=\"hlup\" >ni-</span><span class=\"hlup\" >tim </span>at#-[hu-ut-ka]</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >i-</span><span class=\"hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >an-</span><span class=\"hlup\" >ni-</span><span class=\"hlup\" >tim </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": [
"# i-na + ...!im + ...-?im\n",
"\n",
"We look for word triples, of which the first is `i-na`, the second does not end in `im` and the third one ends in `im`.\n",
"In the third word, there may be a single letter before the im of the last sign."
]
},
{
"cell_type": "code",
"execution_count": 40,
"metadata": {},
"outputs": [],
"source": [
"query = '''\n",
"line\n",
" word sym=i-na\n",
" <: word symr~(?<!im)$\n",
" <: word symr~-.?im$\n",
"'''"
]
},
{
"cell_type": "code",
"execution_count": 41,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
" 0.30s 67 results\n"
]
}
],
"source": [
"results = A.search(query)"
]
},
{
"cell_type": "code",
"execution_count": 42,
"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><th>word</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 reverse:11'\">P509373 reverse:11'</a></td><td class=\"tf\"><span class=\"txtp\">a-na ki-ma <span class=\"hlup\" >i-</span><span class=\"hlup\" >[na] </span><span class=\"hlup\" >_dub </span><span class=\"hlup\" >e2-</span><span class=\"hlup\" >gal_-</span><span class=\"hlup\" >lim</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >i-</span><span class=\"hlup\" >[na] </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >_dub </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >e2-</span><span class=\"hlup\" >gal_-</span><span class=\"hlup\" >lim</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=P510573\" title=\"show this document on CDLI\" sec=\"P510573 reverse:1\">P510573 reverse:1</a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >i-</span><span class=\"hlup\" >na </span><span class=\"hlup\" ><<an-</span><span class=\"hlup\" >na>> </span><span class=\"hlup\" >an-</span><span class=\"hlup\" >ni-</span><span class=\"hlup\" >tim </span>a-hu!-ut-ka</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >i-</span><span class=\"hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" ><<an-</span><span class=\"hlup\" >na>> </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >an-</span><span class=\"hlup\" >ni-</span><span class=\"hlup\" >tim </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=P510594\" title=\"show this document on CDLI\" sec=\"P510594 obverse:5'\">P510594 obverse:5'</a></td><td class=\"tf\"><span class=\"txtp\">szum-ma <span class=\"hlup\" >i-</span><span class=\"hlup\" >na </span><span class=\"hlup\" >_{gesz}</span><span class=\"hlup\" >ban2_ </span><span class=\"hlup\" >{d}</span><span class=\"hlup\" >ki-</span><span class=\"hlup\" >it-</span><span class=\"hlup\" >tim</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >i-</span><span class=\"hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >_{gesz}</span><span class=\"hlup\" >ban2_ </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >{d}</span><span class=\"hlup\" >ki-</span><span class=\"hlup\" >it-</span><span class=\"hlup\" >tim</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=P510594\" title=\"show this document on CDLI\" sec=\"P510594 obverse:7'\">P510594 obverse:7'</a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >i-</span><span class=\"hlup\" >na </span><span class=\"hlup\" >_{gesz}</span><span class=\"hlup\" >ban2_ </span><span class=\"hlup\" >{d}</span><span class=\"hlup\" >ki-</span><span class=\"hlup\" >it#-</span><span class=\"hlup\" >tim#</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >i-</span><span class=\"hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >_{gesz}</span><span class=\"hlup\" >ban2_ </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >{d}</span><span class=\"hlup\" >ki-</span><span class=\"hlup\" >it#-</span><span class=\"hlup\" >tim#</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=P510594\" title=\"show this document on CDLI\" sec=\"P510594 reverse:3\">P510594 reverse:3</a></td><td class=\"tf\"><span class=\"txtp\">szum-ma <span class=\"hlup\" >i-</span><span class=\"hlup\" >na </span><span class=\"hlup\" >_{gesz}</span><span class=\"hlup\" >ban2_ </span><span class=\"hlup\" >{d}</span><span class=\"hlup\" >ki-</span><span class=\"hlup\" >it-</span><span class=\"hlup\" >tim</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >i-</span><span class=\"hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >_{gesz}</span><span class=\"hlup\" >ban2_ </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >{d}</span><span class=\"hlup\" >ki-</span><span class=\"hlup\" >it-</span><span class=\"hlup\" >tim</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=P510607\" title=\"show this document on CDLI\" sec=\"P510607 obverse:10\">P510607 obverse:10</a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >i-</span><span class=\"hlup\" >na </span><span class=\"hlup\" >pi2-</span><span class=\"hlup\" >ha-</span><span class=\"hlup\" >at </span><span class=\"hlup\" >a-</span><span class=\"hlup\" >lim</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >i-</span><span class=\"hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >pi2-</span><span class=\"hlup\" >ha-</span><span class=\"hlup\" >at </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >a-</span><span class=\"hlup\" >lim</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=P510677\" title=\"show this document on CDLI\" sec=\"P510677 obverse:2'\">P510677 obverse:2'</a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >[i-</span><span class=\"hlup\" >na </span><span class=\"hlup\" >_e2_ </span><span class=\"hlup\" >a-</span><span class=\"hlup\" >ki-</span><span class=\"hlup\" >tim </span>isz]-sza#-ak#-[ka-an]</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >[i-</span><span class=\"hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >_e2_ </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >a-</span><span class=\"hlup\" >ki-</span><span class=\"hlup\" >tim </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=P510688\" title=\"show this document on CDLI\" sec=\"P510688 obverse:10\">P510688 obverse:10</a></td><td class=\"tf\"><span class=\"txtp\"><<i>> el-qe2 <span class=\"hlup\" >i-</span><span class=\"hlup\" >na </span><span class=\"hlup\" >_a-</span><span class=\"hlup\" >sza3_ </span><span class=\"hlup\" >[x]-</span><span class=\"hlup\" >x-</span><span class=\"hlup\" >lim</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >i-</span><span class=\"hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >_a-</span><span class=\"hlup\" >sza3_ </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >[x]-</span><span class=\"hlup\" >x-</span><span class=\"hlup\" >lim</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=P510712\" title=\"show this document on CDLI\" sec=\"P510712 reverse:17'\">P510712 reverse:17'</a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >[i]-</span><span class=\"hlup\" >na# </span><span class=\"hlup\" >re-</span><span class=\"hlup\" >esz </span><span class=\"hlup\" >ma-</span><span class=\"hlup\" >ak-</span><span class=\"hlup\" >ku-</span><span class=\"hlup\" >ri-</span><span class=\"hlup\" >im#</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >[i]-</span><span class=\"hlup\" >na# </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >re-</span><span class=\"hlup\" >esz </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >ma-</span><span class=\"hlup\" >ak-</span><span class=\"hlup\" >ku-</span><span class=\"hlup\" >ri-</span><span class=\"hlup\" >im#</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=P510722\" title=\"show this document on CDLI\" sec=\"P510722 reverse:8\">P510722 reverse:8</a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >i-</span><span class=\"hlup\" >na </span><span class=\"hlup\" >pi2-</span><span class=\"hlup\" >sza-</span><span class=\"hlup\" >an-</span><span class=\"hlup\" >ni </span><span class=\"hlup\" >ku-</span><span class=\"hlup\" >nu-</span><span class=\"hlup\" >ka-</span><span class=\"hlup\" >tim</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >i-</span><span class=\"hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >pi2-</span><span class=\"hlup\" >sza-</span><span class=\"hlup\" >an-</span><span class=\"hlup\" >ni </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >ku-</span><span class=\"hlup\" >nu-</span><span class=\"hlup\" >ka-</span><span class=\"hlup\" >tim</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 is: we do miss cases where the second word ends in e.g. `-maškim`. Is that bad?\n",
"Let's find the missing cases:"
]
},
{
"cell_type": "code",
"execution_count": 43,
"metadata": {},
"outputs": [],
"source": [
"query = '''\n",
"line\n",
" word sym=i-na\n",
" <: word symr~[^-][^-]im$\n",
" <: word symr~-.?im$\n",
"'''"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"So we actively look for cases where the second word ends in a reading that ends in `im`, preceded by at least two characters\n",
"that are not a hyphen."
]
},
{
"cell_type": "code",
"execution_count": 44,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
" 0.27s 0 results\n"
]
}
],
"source": [
"results = A.search(query)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We do not find any, so we can stick to our initial query for triplet words."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Just in case you like the highlighting of signs, we rewrite this query in the more elaborate, sign based form:"
]
},
{
"cell_type": "code",
"execution_count": 45,
"metadata": {},
"outputs": [],
"source": [
"query = '''\n",
"line\n",
" word\n",
" =: sign reading=i\n",
" <: sign reading=na\n",
" :=\n",
" <: word\n",
" := sign reading~(?<!im)$\n",
" <: word\n",
" := sign readingr~.?im$\n",
"'''"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Note that in the last line we use `readingr` instead of `reading`, because in `readingr` digraphs such as `sz` appear as\n",
"a single letter."
]
},
{
"cell_type": "code",
"execution_count": 46,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
" 1.03s 67 results\n"
]
}
],
"source": [
"results = A.search(query)"
]
},
{
"cell_type": "code",
"execution_count": 47,
"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><th>sign</th><th>sign</th><th>word</th><th>sign</th><th>word</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 reverse:11'\">P509373 reverse:11'</a></td><td class=\"tf\"><span class=\"txtp\">a-na ki-ma <span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >[na] </span><span class=\"hl hlup\" >_dub </span><span class=\"hlup\" >e2-</span><span class=\"hlup\" >gal_-</span><span class=\"hl hlup\" >lim</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >[na] </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span></span></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\" >_dub </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >_dub </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >e2-</span><span class=\"hlup\" >gal_-</span><span class=\"hl hlup\" >lim</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >lim</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=P510573\" title=\"show this document on CDLI\" sec=\"P510573 reverse:1\">P510573 reverse:1</a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na </span><span class=\"hlup\" ><<an-</span><span class=\"hl hlup\" >na>> </span><span class=\"hlup\" >an-</span><span class=\"hlup\" >ni-</span><span class=\"hl hlup\" >tim </span>a-hu!-ut-ka</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" ><<an-</span><span class=\"hl hlup\" >na>> </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >na>> </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >an-</span><span class=\"hlup\" >ni-</span><span class=\"hl hlup\" >tim </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >tim </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=P510594\" title=\"show this document on CDLI\" sec=\"P510594 obverse:5'\">P510594 obverse:5'</a></td><td class=\"tf\"><span class=\"txtp\">szum-ma <span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na </span><span class=\"hlup\" >_{gesz}</span><span class=\"hl hlup\" >ban2_ </span><span class=\"hlup\" >{d}</span><span class=\"hlup\" >ki-</span><span class=\"hlup\" >it-</span><span class=\"hl hlup\" >tim</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >_{gesz}</span><span class=\"hl hlup\" >ban2_ </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >ban2_ </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >{d}</span><span class=\"hlup\" >ki-</span><span class=\"hlup\" >it-</span><span class=\"hl hlup\" >tim</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >tim</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=P510594\" title=\"show this document on CDLI\" sec=\"P510594 obverse:7'\">P510594 obverse:7'</a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na </span><span class=\"hlup\" >_{gesz}</span><span class=\"hl hlup\" >ban2_ </span><span class=\"hlup\" >{d}</span><span class=\"hlup\" >ki-</span><span class=\"hlup\" >it#-</span><span class=\"hl hlup\" >tim#</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >_{gesz}</span><span class=\"hl hlup\" >ban2_ </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >ban2_ </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >{d}</span><span class=\"hlup\" >ki-</span><span class=\"hlup\" >it#-</span><span class=\"hl hlup\" >tim#</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >tim#</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=P510594\" title=\"show this document on CDLI\" sec=\"P510594 reverse:3\">P510594 reverse:3</a></td><td class=\"tf\"><span class=\"txtp\">szum-ma <span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na </span><span class=\"hlup\" >_{gesz}</span><span class=\"hl hlup\" >ban2_ </span><span class=\"hlup\" >{d}</span><span class=\"hlup\" >ki-</span><span class=\"hlup\" >it-</span><span class=\"hl hlup\" >tim</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >_{gesz}</span><span class=\"hl hlup\" >ban2_ </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >ban2_ </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >{d}</span><span class=\"hlup\" >ki-</span><span class=\"hlup\" >it-</span><span class=\"hl hlup\" >tim</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >tim</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=P510607\" title=\"show this document on CDLI\" sec=\"P510607 obverse:10\">P510607 obverse:10</a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na </span><span class=\"hlup\" >pi2-</span><span class=\"hlup\" >ha-</span><span class=\"hl hlup\" >at </span><span class=\"hlup\" >a-</span><span class=\"hl hlup\" >lim</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >pi2-</span><span class=\"hlup\" >ha-</span><span class=\"hl hlup\" >at </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >at </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >a-</span><span class=\"hl hlup\" >lim</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >lim</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=P510677\" title=\"show this document on CDLI\" sec=\"P510677 obverse:2'\">P510677 obverse:2'</a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >[i-</span><span class=\"hl hlup\" >na </span><span class=\"hl hlup\" >_e2_ </span><span class=\"hlup\" >a-</span><span class=\"hlup\" >ki-</span><span class=\"hl hlup\" >tim </span>isz]-sza#-ak#-[ka-an]</span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >[i-</span><span class=\"hl hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >[i-</span></span></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\" >_e2_ </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >_e2_ </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >a-</span><span class=\"hlup\" >ki-</span><span class=\"hl hlup\" >tim </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >tim </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=P510688\" title=\"show this document on CDLI\" sec=\"P510688 obverse:10\">P510688 obverse:10</a></td><td class=\"tf\"><span class=\"txtp\"><<i>> el-qe2 <span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na </span><span class=\"hlup\" >_a-</span><span class=\"hl hlup\" >sza3_ </span><span class=\"hlup\" >[x]-</span><span class=\"hlup\" >x-</span><span class=\"hl hlup\" >lim</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >_a-</span><span class=\"hl hlup\" >sza3_ </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >sza3_ </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >[x]-</span><span class=\"hlup\" >x-</span><span class=\"hl hlup\" >lim</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >lim</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=P510712\" title=\"show this document on CDLI\" sec=\"P510712 reverse:17'\">P510712 reverse:17'</a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >[i]-</span><span class=\"hl hlup\" >na# </span><span class=\"hlup\" >re-</span><span class=\"hl hlup\" >esz </span><span class=\"hlup\" >ma-</span><span class=\"hlup\" >ak-</span><span class=\"hlup\" >ku-</span><span class=\"hlup\" >ri-</span><span class=\"hl hlup\" >im#</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >[i]-</span><span class=\"hl hlup\" >na# </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >[i]-</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >na# </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >re-</span><span class=\"hl hlup\" >esz </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >esz </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >ma-</span><span class=\"hlup\" >ak-</span><span class=\"hlup\" >ku-</span><span class=\"hlup\" >ri-</span><span class=\"hl hlup\" >im#</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >im#</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=P510722\" title=\"show this document on CDLI\" sec=\"P510722 reverse:8\">P510722 reverse:8</a></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na </span><span class=\"hlup\" >pi2-</span><span class=\"hlup\" >sza-</span><span class=\"hlup\" >an-</span><span class=\"hl hlup\" >ni </span><span class=\"hlup\" >ku-</span><span class=\"hlup\" >nu-</span><span class=\"hlup\" >ka-</span><span class=\"hl hlup\" >tim</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span><span class=\"hl hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >i-</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >na </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >pi2-</span><span class=\"hlup\" >sza-</span><span class=\"hlup\" >an-</span><span class=\"hl hlup\" >ni </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >ni </span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hlup\" >ku-</span><span class=\"hlup\" >nu-</span><span class=\"hlup\" >ka-</span><span class=\"hl hlup\" >tim</span></span></td><td class=\"tf\"><span class=\"txtp\"><span class=\"hl hlup\" >tim</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": "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
}