diff --git a/jupyter/GAapiTutorial.ipynb b/jupyter/GAapiTutorial.ipynb index 3344f4494c97bdb5030692516b8bc813f93140b7..6653592cb4b6cfcfcce7091570a50e400d60688c 100644 --- a/jupyter/GAapiTutorial.ipynb +++ b/jupyter/GAapiTutorial.ipynb @@ -14,7 +14,7 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": 62, "id": "african-automation", "metadata": {}, "outputs": [], @@ -43,7 +43,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 63, "id": "prostate-dietary", "metadata": {}, "outputs": [ @@ -66,7 +66,7 @@ " 'editions': 'https://anthologiagraeca.org/api/editions/?format=json'}" ] }, - "execution_count": 3, + "execution_count": 63, "metadata": {}, "output_type": "execute_result" } @@ -85,7 +85,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 64, "id": "sought-christian", "metadata": {}, "outputs": [], @@ -96,7 +96,7 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 65, "id": "reasonable-cross", "metadata": {}, "outputs": [ @@ -1806,7 +1806,7 @@ " 'media': []}]}" ] }, - "execution_count": 13, + "execution_count": 65, "metadata": {}, "output_type": "execute_result" } @@ -1825,7 +1825,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 66, "id": "champion-disposition", "metadata": {}, "outputs": [ @@ -1835,7 +1835,7 @@ "4134" ] }, - "execution_count": 6, + "execution_count": 66, "metadata": {}, "output_type": "execute_result" } @@ -1856,7 +1856,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 67, "id": "fourth-desperate", "metadata": {}, "outputs": [ @@ -1866,7 +1866,7 @@ "50" ] }, - "execution_count": 7, + "execution_count": 67, "metadata": {}, "output_type": "execute_result" } @@ -1885,7 +1885,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 68, "id": "religious-smart", "metadata": {}, "outputs": [], @@ -1895,7 +1895,7 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": 69, "id": "bacterial-villa", "metadata": {}, "outputs": [], @@ -1905,7 +1905,7 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": 70, "id": "vocational-somerset", "metadata": {}, "outputs": [ @@ -1915,7 +1915,7 @@ "100" ] }, - "execution_count": 10, + "execution_count": 70, "metadata": {}, "output_type": "execute_result" } @@ -1952,7 +1952,7 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": 71, "id": "boolean-binary", "metadata": {}, "outputs": [ @@ -1987,7 +1987,7 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": 72, "id": "peaceful-equality", "metadata": {}, "outputs": [ @@ -1997,7 +1997,7 @@ "'https://anthologiagraeca.org/api/passages/urn:cts:greekLit:tlg7000.tlg001.ag:1.1/?format=json'" ] }, - "execution_count": 12, + "execution_count": 72, "metadata": {}, "output_type": "execute_result" } @@ -2016,7 +2016,7 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 73, "id": "invalid-observer", "metadata": {}, "outputs": [], @@ -2026,7 +2026,7 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 74, "id": "biological-chicken", "metadata": {}, "outputs": [ @@ -2158,7 +2158,7 @@ " 'media': []}" ] }, - "execution_count": 14, + "execution_count": 74, "metadata": {}, "output_type": "execute_result" } @@ -2175,6 +2175,736 @@ "The epigram number is in the key `fragment` and the letter (when it has one) in the key `sub_fragment`)" ] }, + { + "cell_type": "markdown", + "id": "impaired-percentage", + "metadata": {}, + "source": [ + "### Images of the manuscript (Codex Palatinus 23)\n", + "\n", + "For each epigram one can retrieve a list of the IIIf images of the Codex Palatinus 23 (digitalized high quality version avaiable on the Heidelberg Library website) which correspons to the epigram in the key `manuscripts`.\n", + "\n", + "(For more information about the manuscript and its images, cf. the section \"Manuscript Annotation API\" in this document.)" + ] + }, + { + "cell_type": "code", + "execution_count": 75, + "id": "martial-blowing", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "['http://digi.ub.uni-heidelberg.de/iiif/2/cpgraec23%3A142.jpg/pct:10.614886731391586,73.26114119117034,50.355987055016186,4.664723032069971/full/0/default.jpg',\n", + " 'http://digi.ub.uni-heidelberg.de/iiif/2/cpgraec23%3A143.jpg/pct:30.37231055564613,13.349681305818653,51.660362990702126,7.613758509494807/full/0/default.jpg']" + ] + }, + "execution_count": 75, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "ep6_13['manuscripts']" + ] + }, + { + "cell_type": "markdown", + "id": "english-warren", + "metadata": {}, + "source": [ + "### Texts\n", + "\n", + "Each epigram has a list of texts wich are associated to it. These are one or more greek editions of the text and a set of translations:" + ] + }, + { + "cell_type": "code", + "execution_count": 76, + "id": "filled-spencer", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[{'language': 'grc',\n", + " 'text': 'οἱ Ï„Ïισσοί τοι ταῦτα τὰ δίκτυα θῆκαν ὅμαιμοι,\\nἀγÏότα Πάν, ἄλλης ἄλλος ἀπ᾽ ἀγÏεσίης:\\nὧν ἀπὸ μὲν πτηνῶν ΠίγÏης τάδε, ταῦτα δὲ Δᾶμις\\nτετÏαπόδων, ÎšÎ»ÎµÎ¯Ï„Ï‰Ï Î´á¾½ á½ Ï„Ïίτος εἰναλίων.\\nἀνθ᾽ ὧν τῷ μὲν Ï€Îμπε δι᾽ á¼ ÎÏος εὔστοχον ἄγÏην,\\nτῷ δὲ διὰ δÏυμῶν, τῷ δὲ δι᾽ ἠϊόνων. '},\n", + " {'language': 'ita',\n", + " 'text': 'Tre fratelli ti hanno dedicato queste reti,\\nPan cacciatore, ognuna proveniente da una caccia differente.\\nPigre queste di uccelli, Damis queste,\\ndi bestie feroci, Cleitore, il terzo, di animali marini.\\nIn cambio dai una caccia fortunata al primo in aria\\nal secondo nei boschi e al terzo sulle rive.'},\n", + " {'language': 'fra',\n", + " 'text': \"Ces trois frères t'ont dédié ces filets,\\nPan chasseur, chacun issu d'une chasse différente.\\nPigres celles-ci, d'oiseaux, Damis celle-ci,\\nde bêtes féroces, Cléitor, le troisième, d'animaux marins.\\nEn échange donne une bonne chasse au premier dans l'air,\\nau deuxième dans les bois et au troisième sur les rivages.\"},\n", + " {'language': 'fra',\n", + " 'text': \"Les trois frères t'ont consacré, chasseur Pan, ces filets, pris par chacun à son genre de chasse: Pigrès, pour les oiseaux; Damis, pour les quadrupèdes; Cléitor, pour le peuple de la mer. Envoie-leur en échange une bonne chasse à l'un par les airs, au second par les bois, à l'autre par les grèves.\"},\n", + " {'language': 'eng',\n", + " 'text': 'Huntsman Pan, the three brothers dedicated these nets to thee, each from a different chase: Pigres these from fowl, Damis these from beast, and Clitor his from the denizens of the deep. In return for which send them easily caught game, to the first through the air, to the second through the woods, and to the third through the shore-water.'}]" + ] + }, + "execution_count": 76, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "ep6_13['texts']" + ] + }, + { + "cell_type": "markdown", + "id": "induced-range", + "metadata": {}, + "source": [ + "### Authors\n", + "\n", + "All the epigrams in our database should have at least the greek text.\n", + "\n", + "An epigram is almost always associated to one or more authors (it depends on the attributions which are often uncertain):" + ] + }, + { + "cell_type": "code", + "execution_count": 77, + "id": "chronic-giving", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[{'tlg_id': 'tlg-1458',\n", + " 'names': [{'name': 'Leonidas of Tarentum', 'language': 'eng'},\n", + " {'name': 'Λεωνίδας ὠΤαÏαντῖνος', 'language': 'grc'},\n", + " {'name': 'Leonida di Taranto', 'language': 'ita'},\n", + " {'name': 'Λεωνίδας ᾿ΑλεξανδÏεύς', 'language': 'grc'},\n", + " {'name': \"Léonidas d'Alexandrie\", 'language': 'fra'},\n", + " {'name': 'Leonidas of Alexandria', 'language': 'eng'}]}]" + ] + }, + "execution_count": 77, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "ep6_13['authors']" + ] + }, + { + "cell_type": "markdown", + "id": "146f924b", + "metadata": {}, + "source": [ + "### Keywords\n", + "\n", + "Each epigram can be associated with some keywords.\n", + "\n", + "One can have more information about the keywords on its own endpoint, structured as follow : \n", + "\n", + "`https://anthologiagraeca.org/api/keywords/`+keyword_id " + ] + }, + { + "cell_type": "code", + "execution_count": 78, + "id": "f68ced91", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[{'id': 1,\n", + " 'names': [{'name': 'distique élégiaque', 'language': 'fra'},\n", + " {'name': 'distico elegiaco', 'language': 'ita'},\n", + " {'name': 'Elegiac couplet', 'language': 'eng'}],\n", + " 'category': [{'name': 'Formes métriques', 'language': 'fra'},\n", + " {'name': 'Metric forms', 'language': 'eng'},\n", + " {'name': 'Metra', 'language': 'lat'},\n", + " {'name': 'Forme metriche', 'language': 'ita'},\n", + " {'name': 'Formas métricas', 'language': 'por'}]},\n", + " {'id': 4,\n", + " 'names': [{'name': 'époque hellénistique', 'language': 'fra'},\n", + " {'name': 'epoca ellenistica', 'language': 'ita'},\n", + " {'name': 'hellenistic period', 'language': 'eng'}],\n", + " 'category': [{'name': 'Époques', 'language': 'fra'},\n", + " {'name': 'Periods', 'language': 'eng'},\n", + " {'name': 'Tempora', 'language': 'lat'},\n", + " {'name': 'Periodi', 'language': 'ita'},\n", + " {'name': 'Épocas', 'language': 'por'}]},\n", + " {'id': 73,\n", + " 'names': [{'name': 'Validé par William', 'language': 'fra'}],\n", + " 'category': [{'name': 'Validation', 'language': 'fra'},\n", + " {'name': 'Validation', 'language': 'eng'},\n", + " {'name': 'Contralectus', 'language': 'lat'},\n", + " {'name': 'Validazione', 'language': 'ita'},\n", + " {'name': 'Validação', 'language': 'por'}]},\n", + " {'id': 186,\n", + " 'names': [{'name': 'dedicatory', 'language': 'eng'},\n", + " {'name': 'votif (anathématique)', 'language': 'fra'}],\n", + " 'category': [{'name': 'Genres', 'language': 'fra'},\n", + " {'name': 'Genres', 'language': 'eng'},\n", + " {'name': 'Genera', 'language': 'lat'},\n", + " {'name': 'Generi', 'language': 'ita'},\n", + " {'name': 'Gêneros', 'language': 'por'}]},\n", + " {'id': 234,\n", + " 'names': [{'name': 'Damis', 'language': 'eng'}],\n", + " 'category': [{'name': 'Personnes citées', 'language': 'fra'},\n", + " {'name': 'Quoted persons', 'language': 'eng'},\n", + " {'name': 'Homines memorati', 'language': 'lat'},\n", + " {'name': 'Persone citate', 'language': 'ita'},\n", + " {'name': 'Pessoas citadas', 'language': 'por'}]},\n", + " {'id': 270,\n", + " 'names': [{'name': 'Chasse', 'language': 'fra'}],\n", + " 'category': [{'name': 'Motifs', 'language': 'fra'},\n", + " {'name': 'Motifs', 'language': 'eng'},\n", + " {'name': 'Themata', 'language': 'lat'},\n", + " {'name': 'Motivi', 'language': 'ita'},\n", + " {'name': 'Motivos', 'language': 'por'}]},\n", + " {'id': 492,\n", + " 'names': [{'name': 'Pan', 'language': 'eng'}],\n", + " 'category': [{'name': 'Divinités', 'language': 'fra'},\n", + " {'name': 'Deities', 'language': 'eng'},\n", + " {'name': 'Divinitates', 'language': 'lat'},\n", + " {'name': 'Divinità ', 'language': 'ita'},\n", + " {'name': 'Divindades', 'language': 'por'}]},\n", + " {'id': 574,\n", + " 'names': [{'name': 'ΠίγÏης', 'language': 'grc'},\n", + " {'name': 'Pigrès', 'language': 'fra'}],\n", + " 'category': [{'name': 'Personnes citées', 'language': 'fra'},\n", + " {'name': 'Quoted persons', 'language': 'eng'},\n", + " {'name': 'Homines memorati', 'language': 'lat'},\n", + " {'name': 'Persone citate', 'language': 'ita'},\n", + " {'name': 'Pessoas citadas', 'language': 'por'}]},\n", + " {'id': 575,\n", + " 'names': [{'name': 'ΚλείτωÏ', 'language': 'grc'},\n", + " {'name': 'Cléitor', 'language': 'fra'}],\n", + " 'category': [{'name': 'Personnes citées', 'language': 'fra'},\n", + " {'name': 'Quoted persons', 'language': 'eng'},\n", + " {'name': 'Homines memorati', 'language': 'lat'},\n", + " {'name': 'Persone citate', 'language': 'ita'},\n", + " {'name': 'Pessoas citadas', 'language': 'por'}]}]" + ] + }, + "execution_count": 78, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "ep6_13['keywords']" + ] + }, + { + "cell_type": "code", + "execution_count": 79, + "id": "ab6d207f", + "metadata": {}, + "outputs": [], + "source": [ + "keyword_1 = requests.get(\"https://anthologiagraeca.org/api/keywords/1/\").json()" + ] + }, + { + "cell_type": "code", + "execution_count": 80, + "id": "1007c1ab", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'id': 1,\n", + " 'url': 'https://anthologiagraeca.org/api/keywords/1/',\n", + " 'category': {'id': 1,\n", + " 'url': 'https://anthologiagraeca.org/api/keyword_categories/1/',\n", + " 'names': [{'name': 'Formes métriques', 'language': 'fra'},\n", + " {'name': 'Metric forms', 'language': 'eng'},\n", + " {'name': 'Metra', 'language': 'lat'},\n", + " {'name': 'Forme metriche', 'language': 'ita'},\n", + " {'name': 'Formas métricas', 'language': 'por'}]},\n", + " 'names': [{'name': 'distique élégiaque', 'language': 'fra'},\n", + " {'name': 'distico elegiaco', 'language': 'ita'},\n", + " {'name': 'Elegiac couplet', 'language': 'eng'}],\n", + " 'alternative_urns': [{'urn': 'https://www.wikidata.org/wiki/Q2082412'}]}" + ] + }, + "execution_count": 80, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "keyword_1" + ] + }, + { + "cell_type": "markdown", + "id": "contained-christmas", + "metadata": {}, + "source": [ + "keywords are organized in `categories` and each keyword **must** belong to a category.\n", + "\n", + "The list of the categories is here: https://anthologiagraeca.org/api/keyword_categories/" + ] + }, + { + "cell_type": "markdown", + "id": "american-activity", + "metadata": {}, + "source": [ + "### Cities (places)\n", + "\n", + "An epigram can be associated with some places (cities or countries or whatever can have geocoordinates). Epigram 6.13 has no cities associated. Let us look to another epigram:" + ] + }, + { + "cell_type": "code", + "execution_count": 81, + "id": "alike-kazakhstan", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[{'id': 45, 'names': [{'name': 'Lindus', 'language': 'eng'}]},\n", + " {'id': 61,\n", + " 'names': [{'name': 'Atenas', 'language': 'por'},\n", + " {'name': 'Classical Athens', 'language': 'eng'},\n", + " {'name': 'Antigua Atenas', 'language': 'spa'},\n", + " {'name': 'Athènes', 'language': 'fra'},\n", + " {'name': 'Atene', 'language': 'ita'},\n", + " {'name': 'Athenae antiquae', 'language': 'lat'}]},\n", + " {'id': 73,\n", + " 'names': [{'name': 'Sparta', 'language': 'eng'},\n", + " {'name': 'Sparte', 'language': 'fra'},\n", + " {'name': 'Esparta', 'language': 'spa'},\n", + " {'name': 'Sparta', 'language': 'ita'},\n", + " {'name': 'Sparta', 'language': 'lat'},\n", + " {'name': 'Esparta', 'language': 'por'}]},\n", + " {'id': 78,\n", + " 'names': [{'name': 'Antigua Corinto', 'language': 'spa'},\n", + " {'name': 'Ancient Corinth', 'language': 'eng'},\n", + " {'name': 'Corinthe antique', 'language': 'fra'},\n", + " {'name': 'Corinto', 'language': 'ita'}]},\n", + " {'id': 89,\n", + " 'names': [{'name': 'Mytilene', 'language': 'eng'},\n", + " {'name': 'Mytilène', 'language': 'fra'},\n", + " {'name': 'Mitilene', 'language': 'spa'},\n", + " {'name': 'Mitilene', 'language': 'ita'},\n", + " {'name': 'Mytilene', 'language': 'lat'}]},\n", + " {'id': 128,\n", + " 'names': [{'name': 'Milet', 'language': 'fra'},\n", + " {'name': 'Mileto', 'language': 'spa'},\n", + " {'name': 'Mileto', 'language': 'por'},\n", + " {'name': 'Mileto', 'language': 'ita'},\n", + " {'name': 'Miletus', 'language': 'eng'},\n", + " {'name': 'Miletus', 'language': 'lat'},\n", + " {'name': 'Mileto', 'language': 'spa'},\n", + " {'name': 'Mileto', 'language': 'por'},\n", + " {'name': 'Milet', 'language': 'fra'},\n", + " {'name': 'Mileto', 'language': 'ita'},\n", + " {'name': 'Miletus', 'language': 'eng'},\n", + " {'name': 'Miletus', 'language': 'lat'}]},\n", + " {'id': 129,\n", + " 'names': [{'name': 'Priene', 'language': 'eng'},\n", + " {'name': 'Priene', 'language': 'spa'},\n", + " {'name': 'Priène', 'language': 'fra'},\n", + " {'name': 'Priene', 'language': 'ita'},\n", + " {'name': 'Priene', 'language': 'por'},\n", + " {'name': 'Priene', 'language': 'lat'}]}]" + ] + }, + "execution_count": 81, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "ep7_81 = requests.get('https://anthologiagraeca.org/api/passages/urn:cts:greekLit:tlg7000.tlg001.ag:7.81').json()\n", + "ep7_81['cities']" + ] + }, + { + "cell_type": "markdown", + "id": "norman-drilling", + "metadata": {}, + "source": [ + "And let us have a look to one of these cities:" + ] + }, + { + "cell_type": "code", + "execution_count": 82, + "id": "local-assessment", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'url': 'https://anthologiagraeca.org/api/cities/89/',\n", + " 'names': [{'name': 'Mytilene', 'language': 'eng'},\n", + " {'name': 'Mytilène', 'language': 'fra'},\n", + " {'name': 'Mitilene', 'language': 'spa'},\n", + " {'name': 'Mitilene', 'language': 'ita'},\n", + " {'name': 'Mytilene', 'language': 'lat'}],\n", + " 'alternative_urns': ['https://www.wikidata.org/wiki/Q42295059',\n", + " 'https://pleiades.stoa.org/places/550763'],\n", + " 'unique_id': 95,\n", + " 'longitude': None,\n", + " 'latitude': None,\n", + " 'descriptions': [],\n", + " 'created_at': '2021-09-09T19:09:12.954728Z',\n", + " 'updated_at': '2021-09-09T19:09:12.954734Z'}" + ] + }, + "execution_count": 82, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "Mytilene = requests.get('https://anthologiagraeca.org/api/cities/89').json()\n", + "Mytilene" + ] + }, + { + "cell_type": "markdown", + "id": "cooked-purchase", + "metadata": {}, + "source": [ + "### Scholia\n", + "\n", + "Many epigrams are associated with scholia: the scholia on the Codex palatinus 23." + ] + }, + { + "cell_type": "code", + "execution_count": 83, + "id": "noted-singer", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[{'book': 6,\n", + " 'fragment': 13,\n", + " 'sub_fragment': '',\n", + " 'number': 1,\n", + " 'url': '/passages/urn:cts:greekLit:tlg5011.tlg001.sag:6.13.1/'},\n", + " {'book': 6,\n", + " 'fragment': 13,\n", + " 'sub_fragment': '',\n", + " 'number': 2,\n", + " 'url': '/passages/urn:cts:greekLit:tlg5011.tlg001.sag:6.13.2/'}]" + ] + }, + "execution_count": 83, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "ep6_13['scholia']" + ] + }, + { + "cell_type": "markdown", + "id": "aerial-premiere", + "metadata": {}, + "source": [ + "Each scholium is identified by the epigram to which it is a scholium plus a number. For exemple the second scholium of the epigram 6.13 will be the scholium 6.13.2.\n", + "\n", + "The urn of a scholium will be structured as follows:\n", + "\n", + "`/passages/urn:cts:greekLit:tlg5011.tlg001.sag:`+bookNumber.+epigramNumber+epigramLetter`.`+scholiumNumber\n", + "\n", + "For example:\n", + "\n", + "`/passages/urn:cts:greekLit:tlg5011.tlg001.sag:6.13.2/`\n", + "\n", + "A scholium contains very similar information as an epigram: texts in different languages, the picture of the manuscript etc.\n", + "\n", + "**Attention** the texts opening a book have been identified as scholia to the epigram 0 of the book. For example 5.0.1 or 5.0.2 or 12.0.1" + ] + }, + { + "cell_type": "code", + "execution_count": 84, + "id": "expired-miller", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'id': 1999, 'url': 'https://anthologiagraeca.org/api/scholia/urn:cts:greekLit:tlg5011.tlg001.sag:5.0.1/', 'urn': 'urn:cts:greekLit:tlg5011.tlg001.sag:5.0.1', 'web_url': '/passages/urn:cts:greekLit:tlg5011.tlg001.sag:5.0.1/', 'manuscripts': ['http://digi.ub.uni-heidelberg.de/iiif/2/cpgraec23%3A087.jpg/pct:9.335021316210499,67.9883147400695,17.828050776662216,8.264462809917363/full/0/default.jpg'], 'texts': [{'language': 'grc', 'text': 'á¼€Ïχή τῶν á¼Ïωτικὼν á¼Ï€Î¹Î³Ïαμμάτων'}, {'language': 'por', 'text': 'InÃcio dos epigramas eróticos.'}, {'language': 'fra', 'text': 'Le début des épigrammes érotiques.'}], 'cities': [], 'keywords': [], 'passage': {'book': 5, 'fragment': 0, 'sub_fragment': '', 'url': '/passages/urn:cts:greekLit:tlg7000.tlg001.ag:5.0/'}, 'comments': [{'description': ['Lemmatiste: L.'], 'language': ['fra']}], 'media': []}\n", + "{'id': 2000, 'url': 'https://anthologiagraeca.org/api/scholia/urn:cts:greekLit:tlg5011.tlg001.sag:5.0.2/', 'urn': 'urn:cts:greekLit:tlg5011.tlg001.sag:5.0.2', 'web_url': '/passages/urn:cts:greekLit:tlg5011.tlg001.sag:5.0.2/', 'manuscripts': [' http://digi.ub.uni-heidelberg.de/iiif/2/cpgraec23%3A088.jpg/pct:9.57839977186465,5.684292685810079,77.95889161681437,5.6234937070427575/full/0/default.jpg'], 'texts': [{'language': 'grc', 'text': 'á¼€Ïχή τῶν á¼Ïωτικῶν ÎπιγÏαμμάτων - διαφόÏων ποιητῶν'}, {'language': 'por', 'text': 'InÃcio dos epigramas eróticos - de diferentes poetas.'}, {'language': 'fra', 'text': 'Le début des épigrammes érotiques - de différentes auteurs.'}], 'cities': [], 'keywords': [], 'passage': {'book': 5, 'fragment': 0, 'sub_fragment': '', 'url': '/passages/urn:cts:greekLit:tlg7000.tlg001.ag:5.0/'}, 'comments': [], 'media': []}\n", + "{'id': 816, 'url': 'https://anthologiagraeca.org/api/scholia/urn:cts:greekLit:tlg5011.tlg001.sag:12.0.2/', 'urn': 'urn:cts:greekLit:tlg5011.tlg001.sag:12.0.2', 'web_url': '/passages/urn:cts:greekLit:tlg5011.tlg001.sag:12.0.2/', 'manuscripts': ['http://digi.ub.uni-heidelberg.de/iiif/2/cpgraec23%3A569.jpg/pct:12.639237143536691,11.953945008805782,63.97128581066486,12.422816818582767/full/0/default.jpg'], 'texts': [{'language': 'grc', 'text': 'καὶ τίς ἂν εἴην εἰ πάντων σοι τῶν εἰÏημÎνων τὴν γνῶσιν á¼ÎºÎ¸Îμενος τῶν ΣτÏάτωνος τῶν ΣαÏδιανοῦ Παιδικὴν Μοῦσαν á¼Ï€ÎµÎºÏυψάμην, ἣν αá½Ï„ὸς παίζων Ï€Ïὸς τοὺς πλησίον á¼Ï€ÎµÎ´ÎµÎ¯ÎºÎ½Ï…το, Ï„ÎÏψιν οἰκείαν τὴν ἀπαγγελίαν τῶν á¼Ï€Î¹Î³Ïαμμάτων, οὠτὸν νοῦν, ποιοÏμενος. ἔχου τοίνυν τῶν ἑξῆς: á¼Î½ χοÏείαις Î³á½°Ï á¼¥ γε σώφÏων, κατὰ τὸν Ï„Ïαγικόν, οὠδιαφθαÏήσεται.'}, {'language': 'grc', 'text': 'καὶ τίς ἂν εἴην εἰ πάντων σοι τῶν εἰÏημÎνων τὴν γνῶσιν á¼ÎºÎ¸Îμενος τὴν ΣτÏάτωνος τοῦ ΣαÏδιανοῦ Παιδικὴν Μοῦσαν á¼Ï€ÎµÎºÏυψάμην, ἣν αá½Ï„ὸς παίζων Ï€Ïὸς τοὺς πλησίον á¼Ï€ÎµÎ´ÎµÎ¯ÎºÎ½Ï…το, Ï„ÎÏψιν οἰκείαν τὴν ἀπαγγελίαν τῶν á¼Ï€Î¹Î³Ïαμμάτων, οὠτὸν νοῦν, ποιοÏμενος. ἔχου τοίνυν τῶν ἑξῆς: á¼Î½ χοÏείαις Î³á½°Ï á¼¥ γε σώφÏων, κατὰ τὸν Ï„Ïαγικόν, οὠδιαφθαÏήσεται.'}, {'language': 'eng', 'text': 'And what kind of man should I be, reader, if after setting forth all that precedes for thee to study, I were to conceal the Puerile Muse of Strato of Barclis, which he used to recite to those about him in sport, taking personal delight in the diction of the epigrams, not in their meaning. Apply thyself then to what follows, for “in dances,†as the tragic poet says, \"a chaste woman will not be corrupted.â€'}, {'language': 'fra', 'text': \"Et qui serais-je si après t'avoir donné la connaissance de toutes les choses dites, je te cachais la Muse garçonnière de Straton de Sardes, que lui-même en jouant récitait à ceux qui l'entouraient, en se faisant une joie personnelles de la récitation des épigrammes et non de leur sens. Voilà pour toi ce qui suit: dans les danses en effet, comme le dit le poète tragique, une femme chaste ne peut pas être corrompue.\"}], 'cities': [], 'keywords': [], 'passage': {'book': 12, 'fragment': 0, 'sub_fragment': '', 'url': '/passages/urn:cts:greekLit:tlg7000.tlg001.ag:12.0/'}, 'comments': [], 'media': []}\n" + ] + } + ], + "source": [ + "sc5_0_1 = requests.get('https://anthologiagraeca.org/api/scholia/urn:cts:greekLit:tlg5011.tlg001.sag:5.0.1/').json()\n", + "print(sc5_0_1)\n", + "sc5_0_2 = requests.get('https://anthologiagraeca.org/api/scholia/urn:cts:greekLit:tlg5011.tlg001.sag:5.0.2/').json()\n", + "print(sc5_0_2)\n", + "sc12_0_2 = requests.get('https://anthologiagraeca.org/api/scholia/urn:cts:greekLit:tlg5011.tlg001.sag:12.0.2/').json()\n", + "print(sc12_0_2)" + ] + }, + { + "cell_type": "markdown", + "id": "explicit-finland", + "metadata": {}, + "source": [ + "### Comments\n", + "\n", + "An epigram can have comments, a sort of footnotes about the epigram as a whole of some part of it. These comments can be multilingual and they sometimes contain some markdown markup:" + ] + }, + { + "cell_type": "code", + "execution_count": 85, + "id": "detected-extraction", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[{'description': ['# Fresque de Pompéi\\n\\n Cette épigramme est représentée, selon Gutzwiller, dans une fresque de Pompéi'],\n", + " 'language': ['fra']},\n", + " {'description': [\"# Imitations de 6.13\\n\\n C'est vraisemblablement cette pièce de Léonidas qui a inspiré les épigr. 11-16 et 179-187, entre autres 14 (d'Antipater) et 16 (d'Archias), qui n'en sont que des imitations assez serviles. Elle était, en tous cas, une des plus classiques de toute la série; car c'est celle-là qu'on avait gravée sur le mur d'une maison de Pompéi pour servir de légende à une scène où était peinte cette offrande de trois chasseurs; mais il ne subsiste, des trois distiques que comportait l'inscription, que cinq lettres disséminées et les six premières du v. 6; et il a fallu toute la perspicacité de Dilthey pour y reconnaître des fragments de notre épigramme. \\n-P. Waltz \"],\n", + " 'language': ['fra']}]" + ] + }, + "execution_count": 85, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "ep6_13['comments']" + ] + }, + { + "cell_type": "markdown", + "id": "fluid-suite", + "metadata": {}, + "source": [ + "### External references\n", + "\n", + "An epigram can be linked to some external source. The idea of the project is to develop an edition which can take into account some \"weak links\" between the anthological material and some other cultural artefacts. This links are subjective and they do not want to be considered as \"scietific\". They can be link to a pop song, for example.\n", + "\n", + "They are just hyperlinks. For example:" + ] + }, + { + "cell_type": "code", + "execution_count": 86, + "id": "mental-young", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[{'title': 'Jacques Lazure, Le Blaffart (2018)',\n", + " 'url': 'https://opuscules.ca/article-alire?article=202248'},\n", + " {'title': 'Charles Baudelaire, Remords Posthumes (1857)',\n", + " 'url': 'https://poesie.webnet.fr/lesgrandsclassiques/Poemes/charles_baudelaire/remords_posthume'},\n", + " {'title': 'Mylène Farmer, Regrets (1991)',\n", + " 'url': 'https://www.youtube.com/watch?v=ph6piqBnkgU'}]" + ] + }, + "execution_count": 86, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "ep7_710 = requests.get('https://anthologiagraeca.org/api/passages/urn:cts:greekLit:tlg7000.tlg001.ag:7.710').json()\n", + "ep7_710['external_references']" + ] + }, + { + "cell_type": "markdown", + "id": "trained-glasgow", + "metadata": {}, + "source": [ + "### Internal references\n", + "\n", + "Internal references are links to some other epigram of the anthology. The relationship is symmetrical. The link can be of many tipes: an epigram can be the variation of another (and different kind of variation) or just have a vague link.\n", + "\n", + "For the moment the type of internal reference has not been specified - it will probably always be \"default\"." + ] + }, + { + "cell_type": "code", + "execution_count": 87, + "id": "christian-mercury", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[{'to_passage': 'https://anthologiagraeca.org/api/passages/urn:cts:greekLit:tlg7000.tlg001.ag:6.11/',\n", + " 'reference_type': 'Default'},\n", + " {'to_passage': 'https://anthologiagraeca.org/api/passages/urn:cts:greekLit:tlg7000.tlg001.ag:6.14/',\n", + " 'reference_type': 'Default'},\n", + " {'to_passage': 'https://anthologiagraeca.org/api/passages/urn:cts:greekLit:tlg7000.tlg001.ag:6.179/',\n", + " 'reference_type': 'Default'},\n", + " {'to_passage': 'https://anthologiagraeca.org/api/passages/urn:cts:greekLit:tlg7000.tlg001.ag:6.186/',\n", + " 'reference_type': 'Default'},\n", + " {'to_passage': 'https://anthologiagraeca.org/api/passages/urn:cts:greekLit:tlg7000.tlg001.ag:6.187/',\n", + " 'reference_type': 'Default'}]" + ] + }, + "execution_count": 87, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "ep6_13['internal_references']" + ] + }, + { + "cell_type": "markdown", + "id": "hired-search", + "metadata": {}, + "source": [ + "## Wikidata and other identifiers\n", + "\n", + "Almost all the objects in our data are aligned with a wikidata id. It is the case for `authors`, `keywords` and `cities`. The wikidata id can be found in the field `alternative_urns`.\n", + "\n", + "Let us look for an author: " + ] + }, + { + "cell_type": "code", + "execution_count": 88, + "id": "fitting-finding", + "metadata": {}, + "outputs": [], + "source": [ + "meleager = requests.get('https://anthologiagraeca.org/api/authors/1').json()" + ] + }, + { + "cell_type": "code", + "execution_count": 89, + "id": "interracial-battle", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'id': 1,\n", + " 'url': 'https://anthologiagraeca.org/api/authors/1/',\n", + " 'names': [{'name': 'Callimachus', 'language': 'eng'},\n", + " {'name': 'Καλλίμαχος', 'language': 'grc'},\n", + " {'name': 'Callimaque', 'language': 'fra'}],\n", + " 'alternative_urns': ['https://www.wikidata.org/wiki/Q192417',\n", + " 'http://data.perseus.org/catalog/urn:cts:greekLit:tlg0533'],\n", + " 'city_born': {'url': 'https://anthologiagraeca.org/api/cities/1/',\n", + " 'names': [{'name': 'Cyrène', 'language': 'fra'},\n", + " {'name': 'Cirene', 'language': 'spa'},\n", + " {'name': 'Cirene', 'language': 'por'},\n", + " {'name': 'Cyrene', 'language': 'eng'},\n", + " {'name': 'Cyrene', 'language': 'lat'},\n", + " {'name': 'Cirene', 'language': 'ita'}],\n", + " 'alternative_urns': ['https://anthologia.ecrituresnumeriques.ca/api/v1/cities/3',\n", + " 'https://www.wikidata.org/wiki/Q44112',\n", + " 'https://pleiades.stoa.org/places/373778'],\n", + " 'unique_id': 3,\n", + " 'longitude': '32.80799',\n", + " 'latitude': '21.86616',\n", + " 'descriptions': [],\n", + " 'created_at': '2021-04-08T21:27:25.373000Z',\n", + " 'updated_at': '2021-04-08T21:27:25.373000Z'},\n", + " 'city_died': {'url': 'https://anthologiagraeca.org/api/cities/2/',\n", + " 'names': [{'name': 'Alexandrie', 'language': 'fra'},\n", + " {'name': 'Alexandria', 'language': 'eng'},\n", + " {'name': 'ἈλεξάνδÏεια', 'language': 'grc'}],\n", + " 'alternative_urns': ['https://anthologia.ecrituresnumeriques.ca/api/v1/cities/4',\n", + " 'https://www.wikidata.org/wiki/Q87',\n", + " 'https://pleiades.stoa.org/places/727070'],\n", + " 'unique_id': 4,\n", + " 'longitude': '31.20010',\n", + " 'latitude': '29.91857',\n", + " 'descriptions': [],\n", + " 'created_at': '2021-04-08T21:27:25.384000Z',\n", + " 'updated_at': '2021-04-08T21:27:25.384000Z'},\n", + " 'born_range_year_date': None,\n", + " 'died_range_year_date': None,\n", + " 'unique_id': 1,\n", + " 'created_at': '2021-04-08T21:27:25.392000Z',\n", + " 'updated_at': '2021-04-08T21:27:25.392000Z',\n", + " 'validation': 0,\n", + " 'tlg_id': 'tlg-0533',\n", + " 'main_name': 'Callimachus',\n", + " 'descriptions': [],\n", + " 'images': []}" + ] + }, + "execution_count": 89, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "meleager" + ] + }, + { + "cell_type": "code", + "execution_count": 90, + "id": "genuine-happiness", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "['https://www.wikidata.org/wiki/Q192417',\n", + " 'http://data.perseus.org/catalog/urn:cts:greekLit:tlg0533']" + ] + }, + "execution_count": 90, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "meleager['alternative_urns']" + ] + }, + { + "cell_type": "markdown", + "id": "placed-mailing", + "metadata": {}, + "source": [ + "Other identifiers can be found in alternative_urns: for exemple the TLG for authors (look above) and the pleiades id for places:" + ] + }, + { + "cell_type": "code", + "execution_count": 91, + "id": "nearby-vault", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "['https://www.wikidata.org/wiki/Q42295059',\n", + " 'https://pleiades.stoa.org/places/550763']" + ] + }, + "execution_count": 91, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "Mytilene['alternative_urns']" + ] + }, { "cell_type": "markdown", "id": "mechanical-harbor", @@ -2202,7 +2932,7 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": 92, "id": "transsexual-salad", "metadata": {}, "outputs": [], @@ -2229,7 +2959,7 @@ }, { "cell_type": "code", - "execution_count": 16, + "execution_count": 93, "id": "pursuant-helena", "metadata": {}, "outputs": [ @@ -10041,7 +10771,7 @@ " 'created': '2021-09-27T13:06:19.432Z'}]}" ] }, - "execution_count": 16, + "execution_count": 93, "metadata": {}, "output_type": "execute_result" } @@ -10050,237 +10780,18 @@ "getAnnotations(590,599)" ] }, - { - "cell_type": "markdown", - "id": "8897a281", - "metadata": {}, - "source": [ - "For each epigram one can retrieve a list of the IIIf images of the Codex Palatinus 23 which correspons to the epigram in the keymanuscripts." - ] - }, - { - "cell_type": "code", - "execution_count": 17, - "id": "ee7447d2", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "['http://digi.ub.uni-heidelberg.de/iiif/2/cpgraec23%3A142.jpg/pct:10.614886731391586,73.26114119117034,50.355987055016186,4.664723032069971/full/0/default.jpg',\n", - " 'http://digi.ub.uni-heidelberg.de/iiif/2/cpgraec23%3A143.jpg/pct:30.37231055564613,13.349681305818653,51.660362990702126,7.613758509494807/full/0/default.jpg']" - ] - }, - "execution_count": 17, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "ep6_13['manuscripts']" - ] - }, - { - "cell_type": "markdown", - "id": "a1098a33", - "metadata": {}, - "source": [ - "Each epigram has a list of texts wich are associated to it. These are one or more greek editions of the text and a set of translations:" - ] - }, - { - "cell_type": "code", - "execution_count": 18, - "id": "ded7887f", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "[{'language': 'grc',\n", - " 'text': 'οἱ Ï„Ïισσοί τοι ταῦτα τὰ δίκτυα θῆκαν ὅμαιμοι,\\nἀγÏότα Πάν, ἄλλης ἄλλος ἀπ᾽ ἀγÏεσίης:\\nὧν ἀπὸ μὲν πτηνῶν ΠίγÏης τάδε, ταῦτα δὲ Δᾶμις\\nτετÏαπόδων, ÎšÎ»ÎµÎ¯Ï„Ï‰Ï Î´á¾½ á½ Ï„Ïίτος εἰναλίων.\\nἀνθ᾽ ὧν τῷ μὲν Ï€Îμπε δι᾽ á¼ ÎÏος εὔστοχον ἄγÏην,\\nτῷ δὲ διὰ δÏυμῶν, τῷ δὲ δι᾽ ἠϊόνων. '},\n", - " {'language': 'ita',\n", - " 'text': 'Tre fratelli ti hanno dedicato queste reti,\\nPan cacciatore, ognuna proveniente da una caccia differente.\\nPigre queste di uccelli, Damis queste,\\ndi bestie feroci, Cleitore, il terzo, di animali marini.\\nIn cambio dai una caccia fortunata al primo in aria\\nal secondo nei boschi e al terzo sulle rive.'},\n", - " {'language': 'fra',\n", - " 'text': \"Ces trois frères t'ont dédié ces filets,\\nPan chasseur, chacun issu d'une chasse différente.\\nPigres celles-ci, d'oiseaux, Damis celle-ci,\\nde bêtes féroces, Cléitor, le troisième, d'animaux marins.\\nEn échange donne une bonne chasse au premier dans l'air,\\nau deuxième dans les bois et au troisième sur les rivages.\"},\n", - " {'language': 'fra',\n", - " 'text': \"Les trois frères t'ont consacré, chasseur Pan, ces filets, pris par chacun à son genre de chasse: Pigrès, pour les oiseaux; Damis, pour les quadrupèdes; Cléitor, pour le peuple de la mer. Envoie-leur en échange une bonne chasse à l'un par les airs, au second par les bois, à l'autre par les grèves.\"},\n", - " {'language': 'eng',\n", - " 'text': 'Huntsman Pan, the three brothers dedicated these nets to thee, each from a different chase: Pigres these from fowl, Damis these from beast, and Clitor his from the denizens of the deep. In return for which send them easily caught game, to the first through the air, to the second through the woods, and to the third through the shore-water.'}]" - ] - }, - "execution_count": 18, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "ep6_13['texts']" - ] - }, - { - "cell_type": "markdown", - "id": "4fa1df86", - "metadata": {}, - "source": [ - "All the epigrams in our database should have at least the greek text." - ] - }, - { - "cell_type": "markdown", - "id": "4a4002d2", - "metadata": {}, - "source": [ - "Each epigram is associated to a list of keywords : " - ] - }, - { - "cell_type": "code", - "execution_count": 19, - "id": "f68ced91", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "[{'id': 1,\n", - " 'names': [{'name': 'distique élégiaque', 'language': 'fra'},\n", - " {'name': 'distico elegiaco', 'language': 'ita'},\n", - " {'name': 'Elegiac couplet', 'language': 'eng'}],\n", - " 'category': [{'name': 'Formes métriques', 'language': 'fra'},\n", - " {'name': 'Metric forms', 'language': 'eng'},\n", - " {'name': 'Metra', 'language': 'lat'},\n", - " {'name': 'Forme metriche', 'language': 'ita'},\n", - " {'name': 'Formas métricas', 'language': 'por'}]},\n", - " {'id': 4,\n", - " 'names': [{'name': 'époque hellénistique', 'language': 'fra'},\n", - " {'name': 'epoca ellenistica', 'language': 'ita'},\n", - " {'name': 'hellenistic period', 'language': 'eng'}],\n", - " 'category': [{'name': 'Époques', 'language': 'fra'},\n", - " {'name': 'Periods', 'language': 'eng'},\n", - " {'name': 'Tempora', 'language': 'lat'},\n", - " {'name': 'Periodi', 'language': 'ita'},\n", - " {'name': 'Épocas', 'language': 'por'}]},\n", - " {'id': 73,\n", - " 'names': [{'name': 'Validé par William', 'language': 'fra'}],\n", - " 'category': [{'name': 'Validation', 'language': 'fra'},\n", - " {'name': 'Validation', 'language': 'eng'},\n", - " {'name': 'Contralectus', 'language': 'lat'},\n", - " {'name': 'Validazione', 'language': 'ita'},\n", - " {'name': 'Validação', 'language': 'por'}]},\n", - " {'id': 186,\n", - " 'names': [{'name': 'dedicatory', 'language': 'eng'},\n", - " {'name': 'votif (anathématique)', 'language': 'fra'}],\n", - " 'category': [{'name': 'Genres', 'language': 'fra'},\n", - " {'name': 'Genres', 'language': 'eng'},\n", - " {'name': 'Genera', 'language': 'lat'},\n", - " {'name': 'Generi', 'language': 'ita'},\n", - " {'name': 'Gêneros', 'language': 'por'}]},\n", - " {'id': 234,\n", - " 'names': [{'name': 'Damis', 'language': 'eng'}],\n", - " 'category': [{'name': 'Personnes citées', 'language': 'fra'},\n", - " {'name': 'Quoted persons', 'language': 'eng'},\n", - " {'name': 'Homines memorati', 'language': 'lat'},\n", - " {'name': 'Persone citate', 'language': 'ita'},\n", - " {'name': 'Pessoas citadas', 'language': 'por'}]},\n", - " {'id': 270,\n", - " 'names': [{'name': 'Chasse', 'language': 'fra'}],\n", - " 'category': [{'name': 'Motifs', 'language': 'fra'},\n", - " {'name': 'Motifs', 'language': 'eng'},\n", - " {'name': 'Themata', 'language': 'lat'},\n", - " {'name': 'Motivi', 'language': 'ita'},\n", - " {'name': 'Motivos', 'language': 'por'}]},\n", - " {'id': 492,\n", - " 'names': [{'name': 'Pan', 'language': 'eng'}],\n", - " 'category': [{'name': 'Divinités', 'language': 'fra'},\n", - " {'name': 'Deities', 'language': 'eng'},\n", - " {'name': 'Divinitates', 'language': 'lat'},\n", - " {'name': 'Divinità ', 'language': 'ita'},\n", - " {'name': 'Divindades', 'language': 'por'}]},\n", - " {'id': 574,\n", - " 'names': [{'name': 'ΠίγÏης', 'language': 'grc'},\n", - " {'name': 'Pigrès', 'language': 'fra'}],\n", - " 'category': [{'name': 'Personnes citées', 'language': 'fra'},\n", - " {'name': 'Quoted persons', 'language': 'eng'},\n", - " {'name': 'Homines memorati', 'language': 'lat'},\n", - " {'name': 'Persone citate', 'language': 'ita'},\n", - " {'name': 'Pessoas citadas', 'language': 'por'}]},\n", - " {'id': 575,\n", - " 'names': [{'name': 'ΚλείτωÏ', 'language': 'grc'},\n", - " {'name': 'Cléitor', 'language': 'fra'}],\n", - " 'category': [{'name': 'Personnes citées', 'language': 'fra'},\n", - " {'name': 'Quoted persons', 'language': 'eng'},\n", - " {'name': 'Homines memorati', 'language': 'lat'},\n", - " {'name': 'Persone citate', 'language': 'ita'},\n", - " {'name': 'Pessoas citadas', 'language': 'por'}]}]" - ] - }, - "execution_count": 19, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "ep6_13['keywords']" - ] - }, - { - "cell_type": "markdown", - "id": "146f924b", - "metadata": {}, - "source": [ - "One can have more information about the keywords on its own endpoint, structured as follow : \n", - "\n", - "`https://anthologiagraeca.org/api/keywords/`+keyword_id " - ] - }, { "cell_type": "code", - "execution_count": 22, - "id": "ab6d207f", + "execution_count": null, + "id": "d8282b21", "metadata": {}, "outputs": [], - "source": [ - "keyword_1 = requests.get(\"https://anthologiagraeca.org/api/keywords/1/\").json()" - ] - }, - { - "cell_type": "code", - "execution_count": 23, - "id": "1007c1ab", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "{'id': 1,\n", - " 'url': 'https://anthologiagraeca.org/api/keywords/1/',\n", - " 'category': {'id': 1,\n", - " 'url': 'https://anthologiagraeca.org/api/keyword_categories/1/',\n", - " 'names': [{'name': 'Formes métriques', 'language': 'fra'},\n", - " {'name': 'Metric forms', 'language': 'eng'},\n", - " {'name': 'Metra', 'language': 'lat'},\n", - " {'name': 'Forme metriche', 'language': 'ita'},\n", - " {'name': 'Formas métricas', 'language': 'por'}]},\n", - " 'names': [{'name': 'distique élégiaque', 'language': 'fra'},\n", - " {'name': 'distico elegiaco', 'language': 'ita'},\n", - " {'name': 'Elegiac couplet', 'language': 'eng'}],\n", - " 'alternative_urns': [{'urn': 'https://www.wikidata.org/wiki/Q2082412'}]}" - ] - }, - "execution_count": 23, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "keyword_1" - ] + "source": [] }, { "cell_type": "code", "execution_count": null, - "id": "d8282b21", + "id": "tight-mapping", "metadata": {}, "outputs": [], "source": [] @@ -10288,7 +10799,7 @@ ], "metadata": { "kernelspec": { - "display_name": "Python 3 (ipykernel)", + "display_name": "Python 3", "language": "python", "name": "python3" }, @@ -10302,7 +10813,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.10" + "version": "3.9.2" } }, "nbformat": 4,