diff --git a/Progetto_Lett.ipynb b/Progetto_Lett.ipynb index cf4f3e2..6440163 100644 --- a/Progetto_Lett.ipynb +++ b/Progetto_Lett.ipynb @@ -148,7 +148,7 @@ }, { "cell_type": "code", - "execution_count": 36, + "execution_count": 141, "metadata": {}, "outputs": [], "source": [ @@ -264,6 +264,63 @@ " \n", " \n", " return ordr_lms\n", + " \n", + " ##IRI forma flessa\n", + " @property\n", + " def IRIff(self):\n", + " iriffs = []\n", + " i=0\n", + " for div in self.soup.body.find_all(\"div1\"):\n", + " for verso in div.find_all('l'):\n", + " i=i+1;\n", + " j=0;\n", + " for lm in verso.find_all(\"lm\"):\n", + " lstctg=[];\n", + " lstlms=[];\n", + " lstiri=[];\n", + " j=j+1;\n", + " lm_text=elem_to_text(lm).strip();\n", + " #ctg=lm.get('catg');\n", + " if (lm.get('catg')!=None):\n", + " ctg=lm.get('catg');\n", + " else:\n", + " ctg=\"non_spec\";\n", + " \n", + " lstctg.append(\" \".join(ctg.split())); \n", + " \n", + " if (lm.get('lemma')!=None):\n", + " lemma=lm.get('lemma');\n", + " else:\n", + " lemma=\"non_spec\";\n", + " lstlms.append(\" \".join(lemma.split())); \n", + " for parent in lm.parents:\n", + " if (parent.name=='div1'):\n", + " canto = parent.contents[0];\n", + " if (parent.name=='lm1' and iriffs[-1][0]==\" \".join(lm_text.split())):\n", + " j=j-1;\n", + " #lstctg=lstctg+iriffs[-1][1];\n", + " #lstlms=lstlms+iriffs[-1][2];\n", + " iriffs.pop();\n", + " IRIff_text= \"http://hdn.dantenetwork.it/resource/work/commedia/cantica/\"+str(self.idres)+\"/\"+\"/\".join(canto.lower().split())+\"/verso/\"+str(i)+\"#\"+str(j);\n", + " IRIff_text_type= IRIff_text +' rdf:type InflectedForm . '\n", + " IRIff_text_pos= IRIff_text +' isInPosition '+str(j);\n", + " IRIff_text_exp= IRIff_text +' hasExpression '+(\" \".join(lm_text.split()))+\"^^xsd:string . \";\n", + " IRIff_text_oo= IRIff_text +' isOccurrenceOf ulem . ';\n", + " IRIff_text_co= IRIff_text +\" http://erlangen-crm.org/current/P148_is_component_of http://hdn.dantenetwork.it/resource/work/commedia/cantica/\"+str(self.idres)+\"/\"+\"/\".join(canto.lower().split())+\"/verso/\"+str(i);\n", + " lstiri.append(IRIff_text);\n", + " lstiri.append(IRIff_text_type);\n", + " lstiri.append(IRIff_text_co);\n", + " lstiri.append(IRIff_text_pos);\n", + " lstiri.append(IRIff_text_exp);\n", + " lstiri.append(IRIff_text_oo);\n", + " iriffs.append((\" \".join(lm_text.split()), canto.replace('\\n','').strip(), i, j, lstiri));\n", + " \n", + " \n", + " # ordr_lms.append((\" \".join(lm_text.split()), \" \".join(ctg.split()), \" \".join(lemma.split()), canto.replace('\\n','').strip(), i, j, \"hdn:Works/Commedia/Cantica/1/\"+str(i),\n", + " # \"hdn:Works/Commedia/Cantica/1/\"+str(i)+\"/#\"+str(j)));\n", + " \n", + " \n", + " return iriffs\n", " #IRI del verso\n", " @property\n", " def IRIverso(self):\n", @@ -349,7 +406,7 @@ }, { "cell_type": "code", - "execution_count": 29, + "execution_count": 142, "metadata": {}, "outputs": [], "source": [ @@ -357,7 +414,7 @@ " tei = TEIFile(tei_file, idres)\n", " print(f\"Handled {tei_file}\")\n", " base_name = tei_file\n", - " return tei.orderedlemma, tei.IRIverso, tei.categ_lemma, tei.lemma_lemma #, tei.abstract" + " return tei.orderedlemma, tei.IRIverso, tei.IRIff, tei.categ_lemma, tei.lemma_lemma #, tei.abstract" ] }, { @@ -370,7 +427,7 @@ }, { "cell_type": "code", - "execution_count": 30, + "execution_count": 112, "metadata": {}, "outputs": [ { @@ -427,7 +484,7 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": 143, "metadata": {}, "outputs": [ { @@ -444,7 +501,7 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 144, "metadata": {}, "outputs": [ { @@ -459,7 +516,7 @@ "dtype: int64" ] }, - "execution_count": 13, + "execution_count": 144, "metadata": {}, "output_type": "execute_result" } @@ -474,7 +531,7 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 145, "metadata": {}, "outputs": [ { @@ -508,120 +565,120 @@ " \n", " \n", " \n", - " 0\n", - " Nel\n", - " [rdms]\n", - " [il]\n", - " Canto 1\n", - " 1\n", - " 1\n", - " \n", - " \n", - " 1\n", - " mezzo\n", - " [eilaksl]\n", - " [in mezzo di]\n", - " Canto 1\n", - " 1\n", - " 2\n", - " \n", - " \n", - " 2\n", - " del\n", - " [rdms]\n", - " [il]\n", - " Canto 1\n", - " 1\n", - " 3\n", - " \n", - " \n", - " 3\n", - " cammin\n", - " [sm2ms]\n", - " [cammino]\n", - " Canto 1\n", - " 1\n", - " 4\n", - " \n", - " \n", - " 4\n", - " di\n", - " [epskg]\n", - " [di]\n", - " Canto 1\n", - " 1\n", - " 5\n", - " \n", - " \n", - " 5\n", - " nostra\n", - " [as1fs]\n", - " [nostro]\n", - " Canto 1\n", - " 1\n", + " 33390\n", + " un\n", + " [rims]\n", + " [uno]\n", + " Canto 34\n", + " 4720\n", " 6\n", " \n", " \n", - " 6\n", - " vita\n", - " [sf1fs]\n", - " [vita]\n", - " Canto 1\n", - " 1\n", + " 33391\n", + " pertugio\n", + " [sm2ms]\n", + " [pertugio]\n", + " Canto 34\n", + " 4720\n", " 7\n", " \n", " \n", - " 7\n", - " mi\n", - " [pf1sypr]\n", - " [mi]\n", - " Canto 1\n", - " 2\n", + " 33392\n", + " tondo\n", + " [a1ms]\n", + " [tondo]\n", + " Canto 34\n", + " 4720\n", + " 8\n", + " \n", + " \n", + " 33393\n", + " E\n", + " [cscc]\n", + " [e]\n", + " Canto 34\n", + " 4721\n", " 1\n", " \n", " \n", - " 8\n", - " ritrovai\n", - " [vta+1irs1]\n", - " [ritrovare]\n", - " Canto 1\n", - " 2\n", + " 33394\n", + " quindi\n", + " [b]\n", + " [quindi]\n", + " Canto 34\n", + " 4721\n", " 2\n", " \n", " \n", - " 9\n", - " per\n", - " [epskpl]\n", - " [per]\n", - " Canto 1\n", - " 2\n", + " 33395\n", + " uscimmo\n", + " [vi3irp1]\n", + " [uscire]\n", + " Canto 34\n", + " 4721\n", " 3\n", " \n", + " \n", + " 33396\n", + " a\n", + " [epsf]\n", + " [a]\n", + " Canto 34\n", + " 4721\n", + " 4\n", + " \n", + " \n", + " 33397\n", + " riveder\n", + " [vta2fp]\n", + " [rivedere]\n", + " Canto 34\n", + " 4721\n", + " 5\n", + " \n", + " \n", + " 33398\n", + " le\n", + " [rdfp]\n", + " [la]\n", + " Canto 34\n", + " 4721\n", + " 6\n", + " \n", + " \n", + " 33399\n", + " stelle\n", + " [sf1fp]\n", + " [stella]\n", + " Canto 34\n", + " 4721\n", + " 7\n", + " \n", " \n", "\n", "" ], "text/plain": [ - " FormaFlessa Categoria Lemma Canto Verso PosizioneFFNelVerso\n", - "0 Nel [rdms] [il] Canto 1 1 1\n", - "1 mezzo [eilaksl] [in mezzo di] Canto 1 1 2\n", - "2 del [rdms] [il] Canto 1 1 3\n", - "3 cammin [sm2ms] [cammino] Canto 1 1 4\n", - "4 di [epskg] [di] Canto 1 1 5\n", - "5 nostra [as1fs] [nostro] Canto 1 1 6\n", - "6 vita [sf1fs] [vita] Canto 1 1 7\n", - "7 mi [pf1sypr] [mi] Canto 1 2 1\n", - "8 ritrovai [vta+1irs1] [ritrovare] Canto 1 2 2\n", - "9 per [epskpl] [per] Canto 1 2 3" + " FormaFlessa Categoria Lemma Canto Verso PosizioneFFNelVerso\n", + "33390 un [rims] [uno] Canto 34 4720 6\n", + "33391 pertugio [sm2ms] [pertugio] Canto 34 4720 7\n", + "33392 tondo [a1ms] [tondo] Canto 34 4720 8\n", + "33393 E [cscc] [e] Canto 34 4721 1\n", + "33394 quindi [b] [quindi] Canto 34 4721 2\n", + "33395 uscimmo [vi3irp1] [uscire] Canto 34 4721 3\n", + "33396 a [epsf] [a] Canto 34 4721 4\n", + "33397 riveder [vta2fp] [rivedere] Canto 34 4721 5\n", + "33398 le [rdfp] [la] Canto 34 4721 6\n", + "33399 stelle [sf1fp] [stella] Canto 34 4721 7" ] }, - "execution_count": 14, + "execution_count": 145, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "testo_tabella.head(10)" + "testo_tabella.tail(10)" ] }, { @@ -646,7 +703,7 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": 146, "metadata": {}, "outputs": [ { @@ -658,7 +715,7 @@ "dtype: int64" ] }, - "execution_count": 15, + "execution_count": 146, "metadata": {}, "output_type": "execute_result" } @@ -672,21 +729,21 @@ }, { "cell_type": "code", - "execution_count": 16, + "execution_count": 147, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", + " }
NumeroVerso Verso IRIVerso
\n", " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + "
NumeroVerso Verso IRIVerso
01Nel mezzo del cammin di nostra vitahttp://hdn.dantenetwork.it/resource/work/commedia/cantica/1/canto/1/verso/1\n", + " 01Nel mezzo del cammin di nostra vitahttp://hdn.dantenetwork.it/resource/work/commedia/cantica/1/canto/1/verso/1\n", " a efrbroo:F2_Expression ,\n", " rdfs:Resource ; \n", "http://erlangen-crm.org/current/P190_has_symbolic_content \"Nel mezzo del cammin di nostra vita\"^^xsd:string ;\n", @@ -694,10 +751,10 @@ " http://hdn.dantenetwork.it/resource/has_number \"1\"^^xsd:int .
12mi ritrovai per una selva oscurahttp://hdn.dantenetwork.it/resource/work/commedia/cantica/1/canto/1/verso/2\n", + " 12mi ritrovai per una selva oscurahttp://hdn.dantenetwork.it/resource/work/commedia/cantica/1/canto/1/verso/2\n", " a efrbroo:F2_Expression ,\n", " rdfs:Resource ; \n", "http://erlangen-crm.org/current/P190_has_symbolic_content \"mi ritrovai per una selva oscura\"^^xsd:string ;\n", @@ -705,10 +762,10 @@ " http://hdn.dantenetwork.it/resource/has_number \"2\"^^xsd:int .
23ché la diritta via era smarrita.http://hdn.dantenetwork.it/resource/work/commedia/cantica/1/canto/1/verso/3\n", + " 23ché la diritta via era smarrita.http://hdn.dantenetwork.it/resource/work/commedia/cantica/1/canto/1/verso/3\n", " a efrbroo:F2_Expression ,\n", " rdfs:Resource ; \n", "http://erlangen-crm.org/current/P190_has_symbolic_content \"ché la diritta via era smarrita.\"^^xsd:string ;\n", @@ -716,10 +773,10 @@ " http://hdn.dantenetwork.it/resource/has_number \"3\"^^xsd:int .
34Ahi quanto a dir qual era è cosa durahttp://hdn.dantenetwork.it/resource/work/commedia/cantica/1/canto/1/verso/4\n", + " 34Ahi quanto a dir qual era è cosa durahttp://hdn.dantenetwork.it/resource/work/commedia/cantica/1/canto/1/verso/4\n", " a efrbroo:F2_Expression ,\n", " rdfs:Resource ; \n", "http://erlangen-crm.org/current/P190_has_symbolic_content \"Ahi quanto a dir qual era è cosa dura\"^^xsd:string ;\n", @@ -727,10 +784,10 @@ " http://hdn.dantenetwork.it/resource/has_number \"4\"^^xsd:int .
45esta selva selvaggia e aspra e fortehttp://hdn.dantenetwork.it/resource/work/commedia/cantica/1/canto/1/verso/5\n", + " 45esta selva selvaggia e aspra e fortehttp://hdn.dantenetwork.it/resource/work/commedia/cantica/1/canto/1/verso/5\n", " a efrbroo:F2_Expression ,\n", " rdfs:Resource ; \n", "http://erlangen-crm.org/current/P190_has_symbolic_content \"esta selva selvaggia e aspra e forte\"^^xsd:string ;\n", @@ -740,10 +797,10 @@ "
" ], "text/plain": [ - "" + "" ] }, - "execution_count": 16, + "execution_count": 147, "metadata": {}, "output_type": "execute_result" } @@ -752,6 +809,110 @@ "df_IRI_versi_inf.head().style.set_properties(subset=['IRIVerso'], **{'width': '400px'})" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#### Creo una tabella con gli IRI delle FF\n", + "\n", + "Algoritmo definito nella sezione 4 del documento" + ] + }, + { + "cell_type": "code", + "execution_count": 148, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "FormaFlessa 33400\n", + "Canto 33400\n", + "NumeroVerso 33400\n", + "Offset 33400\n", + "IRIFF 33400\n", + "dtype: int64" + ] + }, + "execution_count": 148, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "data_IRI_ff_inf = [mytesto[2]]\n", + "#data_IRI_versi\n", + "df_IRI_ff_inf=pd.DataFrame(data_IRI_ff_inf[0], columns = ['FormaFlessa', 'Canto', 'NumeroVerso', 'Offset' , 'IRIFF']) \n", + "df_IRI_ff_inf.count()" + ] + }, + { + "cell_type": "code", + "execution_count": 149, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
FormaFlessa Canto NumeroVerso Offset IRIFF
0NelCanto 111['http://hdn.dantenetwork.it/resource/work/commedia/cantica/1/canto/1/verso/1#1', 'http://hdn.dantenetwork.it/resource/work/commedia/cantica/1/canto/1/verso/1#1 rdf:type InflectedForm . ', 'http://hdn.dantenetwork.it/resource/work/commedia/cantica/1/canto/1/verso/1#1 http://erlangen-crm.org/current/P148_is_component_of http://hdn.dantenetwork.it/resource/work/commedia/cantica/1/canto/1/verso/1', 'http://hdn.dantenetwork.it/resource/work/commedia/cantica/1/canto/1/verso/1#1 isInPosition 1', 'http://hdn.dantenetwork.it/resource/work/commedia/cantica/1/canto/1/verso/1#1 hasExpression Nel^^xsd:string . ', 'http://hdn.dantenetwork.it/resource/work/commedia/cantica/1/canto/1/verso/1#1 isOccurrenceOf ulem . ']
1mezzoCanto 112['http://hdn.dantenetwork.it/resource/work/commedia/cantica/1/canto/1/verso/1#2', 'http://hdn.dantenetwork.it/resource/work/commedia/cantica/1/canto/1/verso/1#2 rdf:type InflectedForm . ', 'http://hdn.dantenetwork.it/resource/work/commedia/cantica/1/canto/1/verso/1#2 http://erlangen-crm.org/current/P148_is_component_of http://hdn.dantenetwork.it/resource/work/commedia/cantica/1/canto/1/verso/1', 'http://hdn.dantenetwork.it/resource/work/commedia/cantica/1/canto/1/verso/1#2 isInPosition 2', 'http://hdn.dantenetwork.it/resource/work/commedia/cantica/1/canto/1/verso/1#2 hasExpression mezzo^^xsd:string . ', 'http://hdn.dantenetwork.it/resource/work/commedia/cantica/1/canto/1/verso/1#2 isOccurrenceOf ulem . ']
2delCanto 113['http://hdn.dantenetwork.it/resource/work/commedia/cantica/1/canto/1/verso/1#3', 'http://hdn.dantenetwork.it/resource/work/commedia/cantica/1/canto/1/verso/1#3 rdf:type InflectedForm . ', 'http://hdn.dantenetwork.it/resource/work/commedia/cantica/1/canto/1/verso/1#3 http://erlangen-crm.org/current/P148_is_component_of http://hdn.dantenetwork.it/resource/work/commedia/cantica/1/canto/1/verso/1', 'http://hdn.dantenetwork.it/resource/work/commedia/cantica/1/canto/1/verso/1#3 isInPosition 3', 'http://hdn.dantenetwork.it/resource/work/commedia/cantica/1/canto/1/verso/1#3 hasExpression del^^xsd:string . ', 'http://hdn.dantenetwork.it/resource/work/commedia/cantica/1/canto/1/verso/1#3 isOccurrenceOf ulem . ']
3camminCanto 114['http://hdn.dantenetwork.it/resource/work/commedia/cantica/1/canto/1/verso/1#4', 'http://hdn.dantenetwork.it/resource/work/commedia/cantica/1/canto/1/verso/1#4 rdf:type InflectedForm . ', 'http://hdn.dantenetwork.it/resource/work/commedia/cantica/1/canto/1/verso/1#4 http://erlangen-crm.org/current/P148_is_component_of http://hdn.dantenetwork.it/resource/work/commedia/cantica/1/canto/1/verso/1', 'http://hdn.dantenetwork.it/resource/work/commedia/cantica/1/canto/1/verso/1#4 isInPosition 4', 'http://hdn.dantenetwork.it/resource/work/commedia/cantica/1/canto/1/verso/1#4 hasExpression cammin^^xsd:string . ', 'http://hdn.dantenetwork.it/resource/work/commedia/cantica/1/canto/1/verso/1#4 isOccurrenceOf ulem . ']
4diCanto 115['http://hdn.dantenetwork.it/resource/work/commedia/cantica/1/canto/1/verso/1#5', 'http://hdn.dantenetwork.it/resource/work/commedia/cantica/1/canto/1/verso/1#5 rdf:type InflectedForm . ', 'http://hdn.dantenetwork.it/resource/work/commedia/cantica/1/canto/1/verso/1#5 http://erlangen-crm.org/current/P148_is_component_of http://hdn.dantenetwork.it/resource/work/commedia/cantica/1/canto/1/verso/1', 'http://hdn.dantenetwork.it/resource/work/commedia/cantica/1/canto/1/verso/1#5 isInPosition 5', 'http://hdn.dantenetwork.it/resource/work/commedia/cantica/1/canto/1/verso/1#5 hasExpression di^^xsd:string . ', 'http://hdn.dantenetwork.it/resource/work/commedia/cantica/1/canto/1/verso/1#5 isOccurrenceOf ulem . ']
" + ], + "text/plain": [ + "" + ] + }, + "execution_count": 149, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df_IRI_ff_inf.head().style.set_properties(subset=['IRIFF'], **{'width': '400px'})" + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -762,7 +923,7 @@ }, { "cell_type": "code", - "execution_count": 17, + "execution_count": 62, "metadata": {}, "outputs": [], "source": [ @@ -778,7 +939,7 @@ }, { "cell_type": "code", - "execution_count": 18, + "execution_count": 157, "metadata": {}, "outputs": [ { @@ -795,7 +956,7 @@ }, { "cell_type": "code", - "execution_count": 19, + "execution_count": 158, "metadata": {}, "outputs": [ { @@ -810,7 +971,7 @@ "dtype: int64" ] }, - "execution_count": 19, + "execution_count": 158, "metadata": {}, "output_type": "execute_result" } @@ -824,7 +985,7 @@ }, { "cell_type": "code", - "execution_count": 20, + "execution_count": 159, "metadata": {}, "outputs": [ { @@ -922,7 +1083,7 @@ "33244 7 " ] }, - "execution_count": 20, + "execution_count": 159, "metadata": {}, "output_type": "execute_result" } @@ -942,7 +1103,7 @@ }, { "cell_type": "code", - "execution_count": 21, + "execution_count": 160, "metadata": {}, "outputs": [ { @@ -954,7 +1115,7 @@ "dtype: int64" ] }, - "execution_count": 21, + "execution_count": 160, "metadata": {}, "output_type": "execute_result" } @@ -968,21 +1129,21 @@ }, { "cell_type": "code", - "execution_count": 22, + "execution_count": 161, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", + " }
NumeroVerso Verso IRIVerso
\n", " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", " \n", "
NumeroVerso Verso IRIVerso
01Per correr miglior acque alza le velehttp://hdn.dantenetwork.it/resource/work/commedia/cantica/2/canto/1/verso/1\n", + " 01Per correr miglior acque alza le velehttp://hdn.dantenetwork.it/resource/work/commedia/cantica/2/canto/1/verso/1\n", " a efrbroo:F2_Expression ,\n", " rdfs:Resource ; \n", "http://erlangen-crm.org/current/P190_has_symbolic_content \"Per correr miglior acque alza le vele\"^^xsd:string ;\n", @@ -990,10 +1151,10 @@ " http://hdn.dantenetwork.it/resource/has_number \"1\"^^xsd:int .
12omai la navicella del mio ingegno,http://hdn.dantenetwork.it/resource/work/commedia/cantica/2/canto/1/verso/2\n", + " 12omai la navicella del mio ingegno,http://hdn.dantenetwork.it/resource/work/commedia/cantica/2/canto/1/verso/2\n", " a efrbroo:F2_Expression ,\n", " rdfs:Resource ; \n", "http://erlangen-crm.org/current/P190_has_symbolic_content \"omai la navicella del mio ingegno,\"^^xsd:string ;\n", @@ -1001,10 +1162,10 @@ " http://hdn.dantenetwork.it/resource/has_number \"2\"^^xsd:int .
23che lascia dietro a sé mar sì crudele;http://hdn.dantenetwork.it/resource/work/commedia/cantica/2/canto/1/verso/3\n", + " 23che lascia dietro a sé mar sì crudele;http://hdn.dantenetwork.it/resource/work/commedia/cantica/2/canto/1/verso/3\n", " a efrbroo:F2_Expression ,\n", " rdfs:Resource ; \n", "http://erlangen-crm.org/current/P190_has_symbolic_content \"che lascia dietro a sé mar sì crudele;\"^^xsd:string ;\n", @@ -1012,10 +1173,10 @@ " http://hdn.dantenetwork.it/resource/has_number \"3\"^^xsd:int .
34e canterò di quel secondo regnohttp://hdn.dantenetwork.it/resource/work/commedia/cantica/2/canto/1/verso/4\n", + " 34e canterò di quel secondo regnohttp://hdn.dantenetwork.it/resource/work/commedia/cantica/2/canto/1/verso/4\n", " a efrbroo:F2_Expression ,\n", " rdfs:Resource ; \n", "http://erlangen-crm.org/current/P190_has_symbolic_content \"e canterò di quel secondo regno\"^^xsd:string ;\n", @@ -1023,23 +1184,23 @@ " http://hdn.dantenetwork.it/resource/has_number \"4\"^^xsd:int .
45dove l' umano spirito si purgahttp://hdn.dantenetwork.it/resource/work/commedia/cantica/2/canto/1/verso/5\n", + " 45dove l'umano spirito si purgahttp://hdn.dantenetwork.it/resource/work/commedia/cantica/2/canto/1/verso/5\n", " a efrbroo:F2_Expression ,\n", " rdfs:Resource ; \n", - "http://erlangen-crm.org/current/P190_has_symbolic_content \"dove l' umano spirito si purga\"^^xsd:string ;\n", + "http://erlangen-crm.org/current/P190_has_symbolic_content \"dove l'umano spirito si purga\"^^xsd:string ;\n", " http://erlangen-crm.org/current/P3_has_note \"5\"^^xsd:int ;\n", " http://hdn.dantenetwork.it/resource/has_number \"5\"^^xsd:int .
" ], "text/plain": [ - "" + "" ] }, - "execution_count": 22, + "execution_count": 161, "metadata": {}, "output_type": "execute_result" } @@ -1048,6 +1209,101 @@ "df_IRI_versi_pur.head().style.set_properties(subset=['IRIVerso'], **{'width': '400px'})" ] }, + { + "cell_type": "code", + "execution_count": 162, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "FormaFlessa 33245\n", + "Canto 33245\n", + "NumeroVerso 33245\n", + "Offset 33245\n", + "IRIFF 33245\n", + "dtype: int64" + ] + }, + "execution_count": 162, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "data_IRI_ff_pur = [parsed_purgatorio[2]]\n", + "#data_IRI_versi\n", + "df_IRI_ff_pur=pd.DataFrame(data_IRI_ff_pur[0], columns = ['FormaFlessa', 'Canto', 'NumeroVerso', 'Offset' , 'IRIFF']) \n", + "df_IRI_ff_pur.count()" + ] + }, + { + "cell_type": "code", + "execution_count": 163, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
FormaFlessa Canto NumeroVerso Offset IRIFF
33240dispostoCanto 3347553['http://hdn.dantenetwork.it/resource/work/commedia/cantica/2/canto/33/verso/4755#3', 'http://hdn.dantenetwork.it/resource/work/commedia/cantica/2/canto/33/verso/4755#3 rdf:type InflectedForm . ', 'http://hdn.dantenetwork.it/resource/work/commedia/cantica/2/canto/33/verso/4755#3 http://erlangen-crm.org/current/P148_is_component_of http://hdn.dantenetwork.it/resource/work/commedia/cantica/2/canto/33/verso/4755', 'http://hdn.dantenetwork.it/resource/work/commedia/cantica/2/canto/33/verso/4755#3 isInPosition 3', 'http://hdn.dantenetwork.it/resource/work/commedia/cantica/2/canto/33/verso/4755#3 hasExpression disposto^^xsd:string . ', 'http://hdn.dantenetwork.it/resource/work/commedia/cantica/2/canto/33/verso/4755#3 isOccurrenceOf ulem . ']
33241aCanto 3347554['http://hdn.dantenetwork.it/resource/work/commedia/cantica/2/canto/33/verso/4755#4', 'http://hdn.dantenetwork.it/resource/work/commedia/cantica/2/canto/33/verso/4755#4 rdf:type InflectedForm . ', 'http://hdn.dantenetwork.it/resource/work/commedia/cantica/2/canto/33/verso/4755#4 http://erlangen-crm.org/current/P148_is_component_of http://hdn.dantenetwork.it/resource/work/commedia/cantica/2/canto/33/verso/4755', 'http://hdn.dantenetwork.it/resource/work/commedia/cantica/2/canto/33/verso/4755#4 isInPosition 4', 'http://hdn.dantenetwork.it/resource/work/commedia/cantica/2/canto/33/verso/4755#4 hasExpression a^^xsd:string . ', 'http://hdn.dantenetwork.it/resource/work/commedia/cantica/2/canto/33/verso/4755#4 isOccurrenceOf ulem . ']
33242salireCanto 3347555['http://hdn.dantenetwork.it/resource/work/commedia/cantica/2/canto/33/verso/4755#5', 'http://hdn.dantenetwork.it/resource/work/commedia/cantica/2/canto/33/verso/4755#5 rdf:type InflectedForm . ', 'http://hdn.dantenetwork.it/resource/work/commedia/cantica/2/canto/33/verso/4755#5 http://erlangen-crm.org/current/P148_is_component_of http://hdn.dantenetwork.it/resource/work/commedia/cantica/2/canto/33/verso/4755', 'http://hdn.dantenetwork.it/resource/work/commedia/cantica/2/canto/33/verso/4755#5 isInPosition 5', 'http://hdn.dantenetwork.it/resource/work/commedia/cantica/2/canto/33/verso/4755#5 hasExpression salire^^xsd:string . ', 'http://hdn.dantenetwork.it/resource/work/commedia/cantica/2/canto/33/verso/4755#5 isOccurrenceOf ulem . ']
33243alleCanto 3347556['http://hdn.dantenetwork.it/resource/work/commedia/cantica/2/canto/33/verso/4755#6', 'http://hdn.dantenetwork.it/resource/work/commedia/cantica/2/canto/33/verso/4755#6 rdf:type InflectedForm . ', 'http://hdn.dantenetwork.it/resource/work/commedia/cantica/2/canto/33/verso/4755#6 http://erlangen-crm.org/current/P148_is_component_of http://hdn.dantenetwork.it/resource/work/commedia/cantica/2/canto/33/verso/4755', 'http://hdn.dantenetwork.it/resource/work/commedia/cantica/2/canto/33/verso/4755#6 isInPosition 6', 'http://hdn.dantenetwork.it/resource/work/commedia/cantica/2/canto/33/verso/4755#6 hasExpression alle^^xsd:string . ', 'http://hdn.dantenetwork.it/resource/work/commedia/cantica/2/canto/33/verso/4755#6 isOccurrenceOf ulem . ']
33244stelleCanto 3347557['http://hdn.dantenetwork.it/resource/work/commedia/cantica/2/canto/33/verso/4755#7', 'http://hdn.dantenetwork.it/resource/work/commedia/cantica/2/canto/33/verso/4755#7 rdf:type InflectedForm . ', 'http://hdn.dantenetwork.it/resource/work/commedia/cantica/2/canto/33/verso/4755#7 http://erlangen-crm.org/current/P148_is_component_of http://hdn.dantenetwork.it/resource/work/commedia/cantica/2/canto/33/verso/4755', 'http://hdn.dantenetwork.it/resource/work/commedia/cantica/2/canto/33/verso/4755#7 isInPosition 7', 'http://hdn.dantenetwork.it/resource/work/commedia/cantica/2/canto/33/verso/4755#7 hasExpression stelle^^xsd:string . ', 'http://hdn.dantenetwork.it/resource/work/commedia/cantica/2/canto/33/verso/4755#7 isOccurrenceOf ulem . ']
" + ], + "text/plain": [ + "" + ] + }, + "execution_count": 163, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df_IRI_ff_pur.tail().style.set_properties(subset=['IRIFF'], **{'width': '400px'})" + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -1058,7 +1314,7 @@ }, { "cell_type": "code", - "execution_count": 37, + "execution_count": 68, "metadata": {}, "outputs": [ { @@ -1075,7 +1331,7 @@ }, { "cell_type": "code", - "execution_count": 38, + "execution_count": 69, "metadata": {}, "outputs": [ { @@ -1090,7 +1346,7 @@ "dtype: int64" ] }, - "execution_count": 38, + "execution_count": 69, "metadata": {}, "output_type": "execute_result" } @@ -1103,7 +1359,7 @@ }, { "cell_type": "code", - "execution_count": 39, + "execution_count": 70, "metadata": {}, "outputs": [ { @@ -1377,7 +1633,7 @@ "20 1 " ] }, - "execution_count": 39, + "execution_count": 70, "metadata": {}, "output_type": "execute_result" } @@ -1396,7 +1652,7 @@ }, { "cell_type": "code", - "execution_count": 40, + "execution_count": 71, "metadata": {}, "outputs": [ { @@ -1408,7 +1664,7 @@ "dtype: int64" ] }, - "execution_count": 40, + "execution_count": 71, "metadata": {}, "output_type": "execute_result" } @@ -1422,78 +1678,78 @@ }, { "cell_type": "code", - "execution_count": 41, + "execution_count": 72, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", + " }
NumeroVerso Verso IRIVerso
\n", " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \"La gloria di colui che tutto move\"^^xsd:string ;\n", + " \"1\"^^xsd:int ;\n", + " \"1\"^^xsd:int .\n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \"per l'universo penetra, e risplende\"^^xsd:string ;\n", + " \"2\"^^xsd:int ;\n", + " \"2\"^^xsd:int .\n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \"in una parte più e meno altrove.\"^^xsd:string ;\n", + " \"3\"^^xsd:int ;\n", + " \"3\"^^xsd:int .\n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \"Nel ciel che più de la sua luce prende\"^^xsd:string ;\n", + " \"4\"^^xsd:int ;\n", + " \"4\"^^xsd:int .\n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \"fu' io, e vidi cose che ridire\"^^xsd:string ;\n", + " \"5\"^^xsd:int ;\n", + " \"5\"^^xsd:int .\n", " \n", "
NumeroVerso Verso IRIVerso
01La gloria di colui che tutto movehttp://hdn.dantenetwork.it/resource/work/commedia/cantica/3/canto/1/verso/1\n", + " 01La gloria di colui che tutto move\n", " a efrbroo:F2_Expression ,\n", " rdfs:Resource ; \n", - "http://erlangen-crm.org/current/P190_has_symbolic_content \"La gloria di colui che tutto move\"^^xsd:string ;\n", - " http://erlangen-crm.org/current/P3_has_note \"1\"^^xsd:int ;\n", - " http://hdn.dantenetwork.it/resource/has_number \"1\"^^xsd:int .
12per l'universo penetra, e risplendehttp://hdn.dantenetwork.it/resource/work/commedia/cantica/3/canto/1/verso/2\n", + " 12per l'universo penetra, e risplende\n", " a efrbroo:F2_Expression ,\n", " rdfs:Resource ; \n", - "http://erlangen-crm.org/current/P190_has_symbolic_content \"per l'universo penetra, e risplende\"^^xsd:string ;\n", - " http://erlangen-crm.org/current/P3_has_note \"2\"^^xsd:int ;\n", - " http://hdn.dantenetwork.it/resource/has_number \"2\"^^xsd:int .
23in una parte più e meno altrove.http://hdn.dantenetwork.it/resource/work/commedia/cantica/3/canto/1/verso/3\n", + " 23in una parte più e meno altrove.\n", " a efrbroo:F2_Expression ,\n", " rdfs:Resource ; \n", - "http://erlangen-crm.org/current/P190_has_symbolic_content \"in una parte più e meno altrove.\"^^xsd:string ;\n", - " http://erlangen-crm.org/current/P3_has_note \"3\"^^xsd:int ;\n", - " http://hdn.dantenetwork.it/resource/has_number \"3\"^^xsd:int .
34Nel ciel che più de la sua luce prendehttp://hdn.dantenetwork.it/resource/work/commedia/cantica/3/canto/1/verso/4\n", + " 34Nel ciel che più de la sua luce prende\n", " a efrbroo:F2_Expression ,\n", " rdfs:Resource ; \n", - "http://erlangen-crm.org/current/P190_has_symbolic_content \"Nel ciel che più de la sua luce prende\"^^xsd:string ;\n", - " http://erlangen-crm.org/current/P3_has_note \"4\"^^xsd:int ;\n", - " http://hdn.dantenetwork.it/resource/has_number \"4\"^^xsd:int .
45fu' io, e vidi cose che ridirehttp://hdn.dantenetwork.it/resource/work/commedia/cantica/3/canto/1/verso/5\n", + " 45fu' io, e vidi cose che ridire\n", " a efrbroo:F2_Expression ,\n", " rdfs:Resource ; \n", - "http://erlangen-crm.org/current/P190_has_symbolic_content \"fu' io, e vidi cose che ridire\"^^xsd:string ;\n", - " http://erlangen-crm.org/current/P3_has_note \"5\"^^xsd:int ;\n", - " http://hdn.dantenetwork.it/resource/has_number \"5\"^^xsd:int .
" ], "text/plain": [ - "" + "" ] }, - "execution_count": 41, + "execution_count": 72, "metadata": {}, "output_type": "execute_result" }