<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8"></meta>
<link rel="stylesheet"
	href="https://cdn.jsdelivr.net/gh/gitbrent/bootstrap4-toggle@3.6.1/css/bootstrap4-toggle.min.css" />
<link rel="stylesheet"
	href="https://code.jquery.com/ui/1.13.1/themes/base/jquery-ui.css" />
<link rel="stylesheet" id="style2-Boot"
	href="../css/bootstrap.min.lida2.css" />
<link rel="stylesheet" id="style2-Custom" href="../css/custom2_4.3.css" />
<link rel="stylesheet" href="../css/collapsemod.css" />
<link href="yasgui.mio.css" rel="stylesheet" type="text/css" />
<script src="https://code.jquery.com/jquery-3.6.0.js"></script>
<script
	src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.1/dist/js/bootstrap.bundle.min.js"
	integrity="sha384-fQybjgWLrvvRgtW6bFlB7jaZrFsaBXjsOMm/tB9LTS58ONXgqbR9W8oWht/amnpF"
	crossorigin="anonymous"></script>
<script src="https://code.jquery.com/ui/1.13.1/jquery-ui.js" defer></script>
<script
	src="https://cdn.jsdelivr.net/gh/gitbrent/bootstrap4-toggle@3.6.1/js/bootstrap4-toggle.min.js"></script>
<script src="yasgui.min.js"></script>
<script type="text/javascript" src="../js/sparqltemplates.js"></script>
<script>

function writeQuery(query_s){
	
		console.log(yasgui.getTab().yasqe)
		
		yasgui.getTab().yasqe.addPrefixes({ lila: "http://lila-erc.eu/ontologies/lila/" });
		yasgui.getTab().yasqe.setValue(query_s)
		mw=document.getElementById("closeModalQ")
		mw.click();
		
}

</script>
<script>
const defaultQuery=`PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX tresont: <https://itserr.it/ns/tresont/current/>
PREFIX ecrm: <https://erlangen-crm.org/current/>
PREFIX its: <http://itserr.it/data/>
PREFIX lila: <http://lila-erc.eu/ontologies/lila/>	

SELECT * WHERE {
	?sub ?pred ?obj .
} LIMIT 10`
		

const query_1=
	`PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX tresont: <https://itserr.it/ns/tresont/current/>
PREFIX ecrm: <https://erlangen-crm.org/current/>
PREFIX its: <http://itserr.it/data/>
prefix ontolex: <http://www.w3.org/ns/lemon/ontolex#>

# Versetti in cui compare la parola 'mulierem'.

SELECT ?rif ?tt ?versotext
WHERE {
	  FILTER regex(?tt,"^mulierem$","i") .
  	  FILTER(LANGMATCHES(LANG(?ttitle), "en"))
	  ?lf ontolex:writtenRep ?tt ;
       			a ontolex:Form .
      ?lf tresont:isPartOf ?verso.
      ?vero tresont:occurrenceOf ?verso;
            tresont:hasNumber ?verno. 
      ?verso tresont:isPartOf ?chapi.
      ?cha tresont:occurrenceOf ?chapi;
           		tresont:inSequence ?lib;
            	tresont:hasNumber ?chano.
  	?lib ecrm:P102_has_title ?otitle.
  		?otitle rdfs:label  ?ttitle.
    ?verso ecrm:P190_has_symbolic_content ?versotext.
    BIND(concat(str(?ttitle), ".", str(?chano), ".", str(?verno)) AS ?rif) 
} order by ?rif limit 20`
			
const query_2=
	`PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX ecrm: <https://erlangen-crm.org/current/>
PREFIX tresont: <https://itserr.it/ns/tresont/current/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
prefix ontolex: <http://www.w3.org/ns/lemon/ontolex#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>

# Versetti in cui compaiono parole che iniziano con la stringa 'perse'.

SELECT  ?rif (?vt as ?versetto) (?tt as ?parola) (?lemmalab as ?lemma)
WHERE {
	FILTER regex(?tt,"^perse","i") .
    FILTER(LANGMATCHES(LANG(?ttitle), "en"))
	?lf ontolex:writtenRep ?tt ;
       			a ontolex:Form .
    ?lf tresont:isPartOf ?verso.
  	?lexen ontolex:lexicalForm ?lf;
          ontolex:canonicalForm ?cf;
          a ontolex:LexicalEntry.
    ?cf ontolex:writtenRep ?lemmalab.
    ?vero tresont:occurrenceOf ?verso;
            tresont:hasNumber ?verno. 
    ?verso tresont:isPartOf ?chapi;
  		   ecrm:P190_has_symbolic_content ?vt.
    ?cha tresont:occurrenceOf ?chapi;
           		tresont:inSequence ?lib;
            	tresont:hasNumber ?chano.
  	?lib ecrm:P102_has_title ?otitle.
  	?otitle rdfs:label  ?ttitle.
    BIND(concat(str(?ttitle), ".", str(?chano), ".", str(?verno)) AS ?rif)   
} order by ?rif limit 40`

const query_3=
	`PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX ecrm: <https://erlangen-crm.org/current/>
PREFIX tresont: <https://itserr.it/ns/tresont/current/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX ontolex: <http://www.w3.org/ns/lemon/ontolex#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
	
#Versetti che si ripetono piu di 8 volte
	
SELECT   distinct ?t_verso (count(?t_verso) as ?n) (GROUP_CONCAT(DISTINCT ?titolo ;separator=", ")as ?libri)
WHERE {
  ?verso ecrm:P190_has_symbolic_content ?t_verso.
  ?vero tresont:occurrenceOf ?verso ;
  		tresont:inSequence ?bo.  	
  ?bo ecrm:P102_has_title ?titololibro .
  FILTER LANGMATCHES(lANG(?titolo), 'la')
  ?titololibro rdfs:label ?titolo .
} group by ?t_verso having (count(?t_verso) > 8) order by  DESC(?n)`
	
const query_4=
		`PREFIX onto: <http://www.ontotext.com/>
PREFIX ont: <http://purl.org/net/ns/ontology-annot#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX ecrm: <https://erlangen-crm.org/current/>
PREFIX tresont: <https://itserr.it/ns/tresont/current/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
prefix ontolex: <http://www.w3.org/ns/lemon/ontolex#>
		
#Cerco nel libro 'Genesis' le forme associate al lemma 'abeo'
	
SELECT  ?rif ?tt ?lett ?vt
WHERE { 
  	FILTER regex(?titolo,"^Genesis","i") .
    FILTER(LANGMATCHES(LANG(?titolo), "en"))
	FILTER regex(?tt,"^abeo$","i") .
	?cf ontolex:writtenRep ?tt ;
     	a ontolex:Form.
  	?lle ontolex:canonicalForm ?cf;
        ontolex:lexicalForm ?lf.
  	?lf ontolex:writtenRep ?lett ;
       tresont:isPartOf ?verso ;
       a ontolex:Form.	
    ?verso ecrm:P190_has_symbolic_content ?vt;
        tresont:isPartOf ?chapi.
    ?vero tresont:occurrenceOf ?verso ;
		tresont:hasNumber ?v_no.	
	?cha tresont:occurrenceOf ?chapi ;
		tresont:hasNumber ?ch_no;
		tresont:inSequence ?bo.
	?bo ecrm:P102_has_title ?libro .
    ?libro rdfs:label ?titolo .
	BIND(concat(str(?titolo), ".", str(?ch_no), ".", str(?v_no)) AS ?rif)
} order by ?ch_no ?v_no limit 40`
		
const query_5=`PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
	PREFIX ecrm: <https://erlangen-crm.org/current/>
	PREFIX tresont: <https://itserr.it/ns/tresont/current/>
	PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
	PREFIX ontolex: <http://www.w3.org/ns/lemon/ontolex#>
				
	#Cerco in tutti i libri le forme associate al lemma "abeo"
					
	SELECT  ?rif (?tt as ?lemma) (?lett as ?forma) ?vt   
		WHERE {
			FILTER regex(?tt,"^abeo$","i") .
		    FILTER(LANGMATCHES(LANG(?titolo), "la"))
			?cf ontolex:writtenRep ?tt ;
	               a ontolex:Form.
	        ?lle a ontolex:LexicalEntry;
	            ontolex:canonicalForm ?cf;
	            ontolex:lexicalForm ?lf.
	        ?lf ontolex:writtenRep ?lett ;
	               a ontolex:Form ;
	               tresont:isPartOf ?verso .
	        ?verso ecrm:P190_has_symbolic_content ?vt;
	               tresont:isPartOf ?chapi.
	        ?vero tresont:occurrenceOf ?verso  ;
	              tresont:hasNumber ?v_no.
	        ?cha tresont:occurrenceOf ?chapi ;
	                tresont:hasNumber ?ch_no;
	                tresont:inSequence ?bo.
	        ?bo ecrm:P102_has_title ?libro .
	        ?libro rdfs:label ?titolo .
			BIND(concat(str(?titolo), ".", str(?ch_no), ".", str(?v_no)) AS ?rif)
		} order by ?libro ?ch_no ?v_no`

const query_6=
	`PREFIX ecrm: <https://erlangen-crm.org/current/>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX tresont: <https://itserr.it/ns/tresont/current/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX ontolex: <http://www.w3.org/ns/lemon/ontolex#>
PREFIX lila: <http://lila-erc.eu/ontologies/lila/>
	    
#Cerco 10 versetti del libro 'Chronicles' in cui la quarta parola abbia categoria grammaticale 'lila:verb'
		
SELECT ?rif (?tt as ?_lemma) (?lett as ?_parola)  (?vt as ?_verso)
		WHERE {
		    FILTER regex(?titolo,"^Chronicles","i") .
	        FILTER(LANGMATCHES(LANG(?titolo), "en"))
	  		?libro rdfs:label ?titolo .
	  		?bo ecrm:P102_has_title ?libro .
	        ?cha tresont:hasStructuralType tresont:chapterType ;
	             tresont:inSequence ?bo;
		         tresont:hasNumber ?ch_no;
           		tresont:occurrenceOf ?chapi.
            ?verso ecrm:P190_has_symbolic_content ?vt;
                   tresont:isPartOf ?chapi.
	        ?vero tresont:occurrenceOf ?verso;
               	  tresont:hasStructuralType tresont:verseType ;
		          tresont:hasNumber ?v_no;	              
	              tresont:hasInterval ?vint.
            ?lf ontolex:writtenRep ?lett;
                tresont:isPartOf ?verso.
	  		?subocc tresont:occurrenceOf ?lf ;
		            tresont:hasPosition ?fvaiif .	    
	  		?lexen ontolex:lexicalForm ?lf;
          			ontolex:canonicalForm ?lcf.	    
	  		?lcf ontolex:writtenRep ?tt ;
	         	 lila:hasPOS lila:verb .	  		
	  		?vint tresont:intervalFrom ?vaiif .  		
	  		FILTER(?vaiif+3 = ?fvaiif) .			  		
		    BIND(concat(str(?titolo), ".", str(?ch_no), ".", str(?v_no)) AS ?rif)
}limit 10`

const query_7=`PREFIX ecrm: <https://erlangen-crm.org/current/>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX tresont: <https://itserr.it/ns/tresont/current/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX ontolex: <http://www.w3.org/ns/lemon/ontolex#>
PREFIX lila: <http://lila-erc.eu/ontologies/lila/>

#Termini con la stessa radice del lemma 'vita', 
#basati sul valore della proprieta lila:hasBase del lemma (Da Verificare se adatta per coradicali/composti)
				
SELECT (?hb as ?_iribase) (?bsa as ?_lmsamebase)(?lett as ?forma) ?rif (?vt as ?_verso)
WHERE {
				{
				SELECT ?sa ?bsa ?lbsa ?posp ?tt ?hb
				WHERE
				{
				  FILTER regex(?tt,"^uita$","i") .
				  ?lcf ontolex:writtenRep ?tt ;
		         	   lila:hasPOS ?posp ;
				       owl:sameAs ?sa.
				  	SERVICE <https://lila-erc.eu/sparql/lila_knowledge_base/sparql> { 
				    	?sa lila:hasBase ?hb. 
				    	?lbsa lila:hasBase ?hb ;
				          	rdfs:label ?bsa. }
					}
				}
				?lemm owl:sameAs ?lbsa;
          			ontolex:writtenRep ?mytt .
				?sub ontolex:canonicalForm ?lemm;
				     ontolex:lexicalForm ?lf.  
	  			?lf ontolex:writtenRep ?lett ;
          			tresont:isPartOf ?verso.
				?verso ecrm:P190_has_symbolic_content ?vt;
           			tresont:isPartOf ?chapi.
				?vero tresont:occurrenceOf ?verso;
          			  tresont:hasNumber ?vno.				
				?cha tresont:occurrenceOf?chapi;
         			tresont:hasStructuralType tresont:chapterType ;
			        tresont:hasNumber ?chno;
				    tresont:inSequence ?bo.
				?bo ecrm:P102_has_title ?libro .
		  		FILTER(LANGMATCHES(LANG(?titolo),"en")).
		  		?libro rdfs:label ?titolo .
				BIND (CONCAT(str(?titolo), '.', str(?chno), '.', str(?vno)) as ?rif)
} order by ?rif limit 100`

const query_8=
	`PREFIX ecrm: <https://erlangen-crm.org/current/>
PREFIX tresont: <https://itserr.it/ns/tresont/current/>
PREFIX ontolex: <http://www.w3.org/ns/lemon/ontolex#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX lila: <http://lila-erc.eu/ontologies/lila/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
		
#Cerco i verbi presenti nel primo capitolo del libro 'Genesis'
	
SELECT  ?rif (?tt as ?lemma) (?labe as ?inflection) (?lett as ?parola) ?vt (?sa as ?lila_iri)
WHERE {
	FILTER regex(?titolo,"^Genesis$","i") .
    FILTER(LANGMATCHES(LANG(?titolo), "en"))
	FILTER (?ch_no=1) .
    ?libro rdfs:label ?titolo.
	?bo ecrm:P102_has_title ?libro .
	?cha tresont:inSequence ?bo;
      	tresont:hasStructuralType tresont:chapterType ;		
  		tresont:occurrenceOf ?chapi;
  		tresont:hasNumber ?ch_no.
    ?verso ecrm:P190_has_symbolic_content ?vt;
           tresont:isPartOf ?chapi .
	?vero tresont:occurrenceOf ?verso;
		tresont:hasNumber ?v_no .
    ?lf ontolex:writtenRep ?lett ;
        tresont:isPartOf ?verso.
	?sub ontolex:lexicalForm ?lf ;
  		ontolex:canonicalForm ?lcf. 
	?lcf ontolex:writtenRep ?tt ;
        lila:hasPOS lila:verb ;
		owl:sameAs ?sa.
	SERVICE <https://lila-erc.eu/sparql/lila_knowledge_base/sparql> { 
		?sa lila:hasInflectionType ?inty.
		?inty rdfs:label ?labe .
	}
	BIND (CONCAT(str(?titolo), '.', str(?ch_no), '.', str(?v_no)) as ?rif)
} order by ?rif`
		
const query_9=`PREFIX ecrm: <https://erlangen-crm.org/current/>
	PREFIX tresont: <https://itserr.it/ns/tresont/current/>
	PREFIX ontolex: <http://www.w3.org/ns/lemon/ontolex#>
	PREFIX owl: <http://www.w3.org/2002/07/owl#>
	PREFIX lila: <http://lila-erc.eu/ontologies/lila/>
	PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
	PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
	PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
	PREFIX lime: <http://www.w3.org/ns/lemon/lime#>
	PREFIX skos: <http://www.w3.org/2004/02/skos#> 
				
	#Cerco i verbi presenti nel primo capitolo del libro 'Genesis' e per ciascun lemma visualizzo le definizioni nel dizionario Lewis & Short
			
	SELECT  ?rif (?lett as ?forma)  (?tt as ?lemma) (GROUP_CONCAT(?definitionContent; separator='. ') as ?def) ?lexentry 
	WHERE {
		FILTER regex(?title,"^Genesis$","i") .
		FILTER (?ch_no=1) .
	    
		?bo ecrm:P102_has_title ?libro .
  		filter(langmatches(lang(?title), "en")).
  		?libro rdfs:label ?title .
		?cha tresont:inSequence ?bo;
       		tresont:hasStructuralType tresont:chapterType ;
			tresont:hasNumber ?ch_no;
			tresont:occurrenceOf ?chapi.
  		?verso tresont:isPartOf ?chapi.
		?vero tresont:occurrenceOf ?verso ;
        	  tresont:hasStructuralType tresont:verseType ;
			  tresont:hasNumber ?v_no . 
		?lf tresont:isPartOf ?verso;
      		ontolex:writtenRep ?lett .
		?sub a ontolex:LexicalEntry ;
        	ontolex:lexicalForm ?lf;
   			ontolex:canonicalForm ?lcf. 		
		?lcf ontolex:writtenRep ?tt ;
       		lila:hasPOS lila:verb ;
			owl:sameAs ?sa.
		SERVICE <https://lila-erc.eu/sparql/lila_knowledge_base/sparql> { 
			<http://lila-erc.eu/data/lexicalResources/LewisShort/Lexicon> lime:entry ?lexentry .
			?lexentry ontolex:canonicalForm ?sa ;
			  	ontolex:sense ?definition .
			?definition skos:definition ?definitionContent .
		}
		BIND(concat(str(?title), ".", str(?ch_no), ".", str(?v_no)) AS ?rif)
	} group by ?rif ?tt ?lett ?lexentry order by ?rif limit 100`
			
const query_10=
	`PREFIX tr: <http://www.thomsonreuters.com/>
PREFIX ecrm: <https://erlangen-crm.org/current/>
PREFIX tresont: <https://itserr.it/ns/tresont/current/>
PREFIX ontolex: <http://www.w3.org/ns/lemon/ontolex#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX lila: <http://lila-erc.eu/ontologies/lila/>
PREFIX lilals: <http://lila-erc.eu/data/lexicalResources/LewisShort/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX lime: <http://www.w3.org/ns/lemon/lime#>
PREFIX skos: <http://www.w3.org/2004/02/skos#> 
			
# Cerco nei primi 10 versetti del capitolo 1 del libro 'Genesis' le parole  che hanno 
# la stringa 'life' nella definizione del dizionario Lewis & Short
		
SELECT distinct ?rif (?lett as ?parola) (?tt as ?lemma) (GROUP_CONCAT(?definitionContent; separator=". ") as ?def) ?lexentry
WHERE {
	FILTER regex(?title,"^Genesis$","i") .
	FILTER (?ch_no=1) .
    filter(langmatches(lang(?title), "en")).
  	?libro rdfs:label ?title .
	?bo ecrm:P102_has_title ?libro .
	?cha tresont:inSequence ?bo;
      	 tresont:hasStructuralType tresont:chapterType ;
		 tresont:hasNumber ?ch_no;
	     tresont:occurrenceOf ?chapi.
  	?verso tresont:isPartOf ?chapi.
    FILTER (?v_no<11) .
	?vero tresont:occurrenceOf ?verso ;
       	  tresont:hasStructuralType tresont:verseType ;		
		  tresont:hasNumber ?v_no .
  	?lf tresont:isPartOf ?verso;
       	ontolex:writtenRep ?lett .
	?sub ontolex:lexicalForm ?lf;
     	ontolex:canonicalForm ?lcf.
	?lcf owl:sameAs ?sa.
	SERVICE <https://lila-erc.eu/sparql/lila_knowledge_base/sparql> {
        ?lexentry ontolex:canonicalForm ?sa ;
		  	ontolex:sense ?definition .
       	lilals:Lexicon lime:entry ?lexentry .
    	FILTER regex(?definitionContent, "life", "i")
		?definition skos:definition ?definitionContent .
	}
    ?lcf ontolex:writtenRep ?tt .  	
  BIND(concat(str(?title),'.',str(?ch_no), ".", str(?v_no)) AS ?rif)
}group by ?rif ?lett ?tt ?lexentry limit 10`

const query_11=
	`PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX ecrm: <https://erlangen-crm.org/current/>
PREFIX tresont: <https://itserr.it/ns/tresont/current/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
prefix ontolex: <http://www.w3.org/ns/lemon/ontolex#>
	
#le 10 parole (con più di 4 lettere) più frequenti nel libro 'Exodus'
	
SELECT   (?tt as ?parola) (GROUP_CONCAT(DISTINCT ?ltt ;separator=", ")as ?lemma)(count(?tt) as ?n_occorrenze)
WHERE {
    FILTER regex(?titolo,"^Exodus$","i") .
    FILTER(LANGMATCHES(LANG(?titolo), "en"))
  	?tilibro rdfs:label ?titolo .
    ?book ecrm:P102_has_title ?tilibro .
    ?lese tresont:inSequence ?book ;
          tresont:occurrenceOf ?lf .
  	?lf ontolex:writtenRep ?tt .
    ?lexent ontolex:lexicalForm ?lf;
            ontolex:canonicalForm ?cf.
  	?cf ontolex:writtenRep ?ltt.
	FILTER (STRLEN(?tt)> 4)
} group by ?tt having (count(?tt) > 30)  order by DESC(?n_occorrenze) limit 10`
		
const query_12=
	`PREFIX ecrm: <https://erlangen-crm.org/current/>
PREFIX tresont: <https://itserr.it/ns/tresont/current/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
prefix ontolex: <http://www.w3.org/ns/lemon/ontolex#>
	
#Le parole (> di 4 lettere) più frequenti  nel libro Genesis che non compaiono nel libro Exodus 
	
SELECT   (?tt as ?parola) (count(?tt) as ?n_occorrenze)
WHERE {
     FILTER regex(?titolo,"^genesis$","i") .
     FILTER(LANGMATCHES(LANG(?titolo), "en"))
    ?libro rdfs:label ?titolo .
    ?bo ecrm:P102_has_title ?libro .
    ?lese  tresont:inSequence ?bo ;
           tresont:occurrenceOf ?lf .
     FILTER (STRLEN(?tt)> 4)
        ?lf ontolex:writtenRep ?tt .     
  minus{
    	FILTER regex(?titolo1,"^exodus$","i") .
        FILTER(LANGMATCHES(LANG(?titolo1), "en"))
        ?libro1 rdfs:label ?titolo1 .
    	?bo1 ecrm:P102_has_title ?libro1 .
    	?lese1 tresont:inSequence ?bo1 ;
               tresont:occurrenceOf ?lf1 .
     	FILTER (STRLEN(?tt)> 4)
        ?lf1 ontolex:writtenRep ?tt .
  }
} group by ?tt having (count(?tt) > 20)  order by DESC(?n_occorrenze) limit 10`
		
const query_13=
	`PREFIX ecrm: <https://erlangen-crm.org/current/>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX tresont: <https://itserr.it/ns/tresont/current/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
prefix ontolex: <http://www.w3.org/ns/lemon/ontolex#>
prefix lila: <http://lila-erc.eu/ontologies/lila/>
PREFIX wfl: <http://lila-erc.eu/ontologies/lila/wfl/>
PREFIX lime: <http://www.w3.org/ns/lemon/lime#>
PREFIX lemonVartrans: <http://www.w3.org/ns/lemon/vartrans#>

#Cerca le forme derivate dal lemma "vita" secondo le regole definite dall'ontologia "Word Formation Latin" (WFL)
	
SELECT  DISTINCT (?dtt as ?d_lemma) (?lett as ?forma) (?ruleLabel as ?_rule) ?ruleType ?rif (?vt as ?_verso) 
WHERE {
	   {SELECT ?sa ?lemmaLabel ?mytt ?ruleLabel ?lemma2 ?ruleType 
		WHERE
		{
	  		FILTER regex(?tt,"^uita$","i") .
	   		?lcf ontolex:writtenRep ?tt ;
	        	owl:sameAs ?sa.
	  		SERVICE <https://lila-erc.eu/sparql/lila_knowledge_base/sparql> {
        		?le ontolex:canonicalForm ?sa.
	    		<http://lila-erc.eu/data/lexicalResources/WFL/Lexicon> lime:entry ?le .
  				?wflsourceRel lemonVartrans:source|lemonVartrans:target ?le;
                			wfl:hasWordFormationRule ?rule ;
                			lemonVartrans:target ?le2 ;
                			lemonVartrans:source ?le3 .
  				?le2 ontolex:canonicalForm ?lemma2 .
  				?le3 ontolex:canonicalForm ?lemma3 .
  				?le  ontolex:canonicalForm ?lemma .
  				?rule rdfs:label ?ruleLabel;
        				rdf:type ?ruleType .
  			
              ?lemma rdfs:label ?lemmaLabel.
              ?lemma2 rdfs:label ?mytt.
      			}
		}
	  }
	  ?lemm ontolex:writtenRep ?dtt ;
	        	owl:sameAs ?lemma2 .	    
	  ?sub a ontolex:LexicalEntry ;
         		ontolex:canonicalForm ?lemm;
	      		ontolex:lexicalForm ?lf.
      ?lf ontolex:writtenRep ?lett ;
	       tresont:isPartOf ?verso.
      ?verso ecrm:P190_has_symbolic_content ?vt;
	   		  tresont:isPartOf ?chapi .
	  ?vero tresont:occurrenceOf ?verso ;
        	  tresont:hasNumber ?vno .	     
	  ?cha tresont:occurrenceOf ?chapi;
          	tresont:hasStructuralType tresont:chapterType ;
            tresont:hasNumber ?chno;
	         tresont:inSequence ?bo.
	  ?bo ecrm:P102_has_title ?libro .
  	  FILTER(LANGMATCHES(LANG(?titolo), "en"))
      ?libro rdfs:label ?titolo .
  	  BIND (CONCAT(str(?titolo), '.', str(?chno), '.', str(?vno)) as ?rif)
}order by ?rif limit 100`

const query_14=`PREFIX ecrm: <https://erlangen-crm.org/current/>
	PREFIX owl: <http://www.w3.org/2002/07/owl#>
	PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
	PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
	PREFIX tresont: <https://itserr.it/ns/tresont/current/>
	PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
	PREFIX ontolex: <http://www.w3.org/ns/lemon/ontolex#>
	PREFIX lila: <http://lila-erc.eu/ontologies/lila/>
				    
	#Cerco 10 versetti del libro 'Genesis' in cui compaiano due parole consecutive che hanno 
	#rispettivamente categoria 'lila:verb' e 'lila:noun'
					
	SELECT ?rif (?tt as ?_lemma_v) (?lett as ?_verbo)  (?tt1 as ?_lemma_n) (?lett1 as ?_nome)(?vt as ?_verso)
	WHERE {
					    FILTER regex(?titolo,"^Genesis","i") .
				        FILTER(LANGMATCHES(LANG(?titolo), "en"))
				  		?libro rdfs:label ?titolo .
				  		?bo ecrm:P102_has_title ?libro .
				        ?cha tresont:inSequence ?bo;
							 tresont:hasStructuralType tresont:chapterType ;
				             tresont:occurrenceOf ?chapi;
					         tresont:hasNumber ?ch_no.
	  					?verso tresont:isPartOf ?chapi;
	              			   ecrm:P190_has_symbolic_content ?vt.
				        ?vero tresont:occurrenceOf ?verso ;
	                 		 tresont:hasStructuralType tresont:verseType ;
					          tresont:hasNumber ?v_no.
	                    ?lf tresont:isPartOf ?verso;
	                        ontolex:writtenRep ?lett .
				  		?subocc tresont:occurrenceOf ?lf ;
					            tresont:hasPosition ?fvaiif .
					    ?lexen a ontolex:LexicalEntry ;
	                            ontolex:lexicalForm ?lf;
			              		ontolex:canonicalForm ?lcf.
				  		?lcf lila:hasPOS lila:verb ;
				  				ontolex:writtenRep ?tt .
		                ?lf1 tresont:isPartOf ?verso;
	                      	 ontolex:writtenRep ?lett1 .                 
				   		?subocc1 tresont:occurrenceOf ?lf1 ;
					            tresont:hasPosition ?fvaiif1 .
  						FILTER(?fvaiif1-1 = ?fvaiif) .
					    ?sub1 a ontolex:LexicalEntry ;
	                			ontolex:lexicalForm ?lf1;
			              		ontolex:canonicalForm ?lcf1.
				  		?lcf1 lila:hasPOS lila:noun ;
				           	  ontolex:writtenRep ?tt1 .	  					  		
					    BIND(concat(str(?titolo), ".", str(?ch_no), ".", str(?v_no)) AS ?rif)    
	} limit 20`
	
	const query_15=
		`PREFIX ecrm: <https://erlangen-crm.org/current/>
PREFIX tresont: <https://itserr.it/ns/tresont/current/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
prefix ontolex: <http://www.w3.org/ns/lemon/ontolex#>

#Le parole (> di 4 lettere) più frequenti che compaiono in due libri

SELECT ?parola ?n_occorrenzeL1 ?n_occorrenzeL2
WHERE
{
{
SELECT  (?tt as ?parola) (count(?tt) as ?n_occorrenzeL1)
WHERE {
     FILTER regex(?titolo,"^exodus$","i") .
     FILTER(LANGMATCHES(LANG(?titolo), "en"))
    ?libro rdfs:label ?titolo .  
    ?book ecrm:P102_has_title ?libro .
    ?lese tresont:inSequence ?book;
          tresont:occurrenceOf ?lf .
     FILTER (STRLEN(?tt)> 4)
     ?lf ontolex:writtenRep ?tt .
} group by ?tt having (count(?tt) > 2)  limit 40
}
  {
    SELECT   (?tt as ?parola) (count(?tt) as ?n_occorrenzeL2)
WHERE {
     FILTER regex(?titolo1,"^genesis$","i") .
     FILTER(LANGMATCHES(LANG(?titolo1), "en"))
    ?libro1 rdfs:label ?titolo1 .  
    ?book1 ecrm:P102_has_title ?libro1 .
    ?lese1 tresont:inSequence ?book1 ;
           tresont:occurrenceOf ?lf1 .
     FILTER (STRLEN(?tt)> 4)
    ?lf1 ontolex:writtenRep ?tt .
} group by ?tt  having (count(?tt) > 2)   limit 40
}
}order by DESC(?n_occorrenzeL1)  limit 20`

const query_16=`PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
	PREFIX ecrm: <https://erlangen-crm.org/current/>
	PREFIX owl: <http://www.w3.org/2002/07/owl#>
	PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
	PREFIX tresont: <https://itserr.it/ns/tresont/current/>
	PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
	PREFIX ontolex: <http://www.w3.org/ns/lemon/ontolex#>
	PREFIX lila: <http://lila-erc.eu/ontologies/lila/>

	#TEST cerca le forme associate ai lemmi appartenenti ai SynSet del lemma "vita"
	#nella risorsa Latin WordNet pubblicata su LiLa

	SELECT  DISTINCT (?dtt as ?syn_lemma) (?def as ?definizione) (?lett as ?parola)  ?rif (?vt as ?_verso)
	WHERE {
			{SELECT ?lemma ?base ?syn ?sa ?dtt ?base_label ?def
				    WHERE {
				    	   	FILTER regex(?tt,"^uita$","i") .
				               ?lcf ontolex:writtenRep ?tt ;
				               owl:sameAs ?sa.
							SERVICE <https://lila-erc.eu/sparql/lila_knowledge_base/sparql> 
				    	   	{
				            	?le ontolex:canonicalForm ?sa ;
									ontolex:evokes ?syn .
				                ?le1  ontolex:evokes ?syn;
	                         		  ontolex:canonicalForm ?lemma.
		        				?syn skos:definition ?def .
				                ?lemma rdfs:label ?dtt ;
				                       lila:hasBase ?base .
				        		?base rdfs:label ?base_label .
							}
				        }
				   	}
				    ?lemm owl:sameAs ?lemma .
				    ?sub a ontolex:LexicalEntry ;
						   ontolex:canonicalForm ?lemm;
						   ontolex:lexicalForm ?lf.
				    ?lf ontolex:writtenRep ?lett;
	           			tresont:isPartOf ?verso.
				    ?verso ecrm:P190_has_symbolic_content ?vt;
	              			tresont:isPartOf ?chapi.
				    ?vero tresont:occurrenceOf ?verso;
				          tresont:hasNumber ?vno.			     
				     ?cha tresont:occurrenceOf ?chapi;
				          tresont:hasNumber ?chno;
				          tresont:inSequence ?bo.
				     ?bo ecrm:P102_has_title ?libro .
				     FILTER(LANGMATCHES(LANG(?titolo), "la"))
				     ?libro rdfs:label ?titolo .
				     BIND (CONCAT(str(?titolo), '.', str(?chno), '.', str(?vno)) as ?rif) 
	} order by ?rif`

const query_17=`PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX ecrm: <https://erlangen-crm.org/current/>
PREFIX tresont: <https://itserr.it/ns/tresont/current/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX ontolex: <http://www.w3.org/ns/lemon/ontolex#>
PREFIX lila: <http://lila-erc.eu/ontologies/lila/>
			
#i 10 verbi più frequenti nel libro 'Genesis'

SELECT ?lemma ?inflection ?parole ?n_occorrenze
WHERE{
	  {
		SELECT   (?ltt as ?lemma) ?sa (GROUP_CONCAT(DISTINCT ?tt ;separator=", ")as ?parole) (count(?tt) as ?n_occorrenze)
		WHERE {
		    FILTER regex(?titolo,"^Genesis$","i") .
		    FILTER(LANGMATCHES(LANG(?titolo), "en"))
		  	?tilibro rdfs:label ?titolo .
		    ?book ecrm:P102_has_title ?tilibro .
		    ?lese tresont:inSequence ?book ;
		          tresont:occurrenceOf ?lf .
		  	?lf ontolex:writtenRep ?tt .
		    ?lexent ontolex:lexicalForm ?lf;
		            ontolex:canonicalForm ?cf.
		  	?cf ontolex:writtenRep ?ltt;
		        lila:hasPOS lila:verb;
		        owl:sameAs ?sa.
		} group by ?ltt ?sa having (count(?ltt) > 10)  order by DESC(?n_occorrenze) limit 10
		}
	  	service<https://lila-erc.eu/sparql/lila_knowledge_base/sparql>{
	    ?sa lila:hasInflectionType ?inty.
	    ?inty rdfs:label ?inflection .
	  }
}`
const query_18=`PREFIX ecrm: <https://erlangen-crm.org/current/>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX tresont: <https://itserr.it/ns/tresont/current/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX ontolex: <http://www.w3.org/ns/lemon/ontolex#>
PREFIX lila: <http://lila-erc.eu/ontologies/lila/>

# Le occorrennze delle categorie verbali (lila:POS)  delle sequenze di 4 parole nei versetti del libro 'Genesis'.
# (è un test, tempo di esecuzione molto lungo)

SELECT DISTINCT  ?rif (count(?rif) as ?occo)
WHERE {
	FILTER(?fvaiif1 = ?fvaiif+1) .
	FILTER(?fvaiif2 = ?fvaiif+2) .
	FILTER(?fvaiif3 = ?fvaiif+3) .
	FILTER regex(?titolo,"^Genesis","i") .
	FILTER(LANGMATCHES(LANG(?titolo), "en"))
	?libro rdfs:label ?titolo .
	?bo ecrm:P102_has_title ?libro.
	?cha tresont:inSequence ?bo;
		tresont:hasStructuralType tresont:chapterType;
		tresont:occurrenceOf ?chapi.
	?verso tresont:isPartOf ?chapi.
	?vero tresont:occurrenceOf ?verso ;
		tresont:hasStructuralType tresont:verseType .
	?lf tresont:isPartOf ?verso.
	?subocc tresont:occurrenceOf ?lf;
		tresont:hasPosition ?fvaiif .
	?lexen ontolex:lexicalForm ?lf;
		ontolex:canonicalForm ?lcf.
	?lf1 tresont:isPartOf ?verso.
	?subocc1 tresont:occurrenceOf ?lf1 ;
		tresont:hasPosition ?fvaiif1 .
	?sub1 ontolex:lexicalForm ?lf1;
		ontolex:canonicalForm ?lcf1.
	?lf2 tresont:isPartOf ?verso.
	?subocc2 tresont:occurrenceOf ?lf2 ;
		tresont:hasPosition ?fvaiif2 .
	?sub2 ontolex:lexicalForm ?lf2;
		ontolex:canonicalForm ?lcf2.
	?lf3 tresont:isPartOf ?verso.
	?subocc3 tresont:occurrenceOf ?lf3 ;
		tresont:hasPosition ?fvaiif3 .
	?sub3 ontolex:lexicalForm ?lf3;
		ontolex:canonicalForm ?lcf3.
	?lcf lila:hasPOS ?pos1.
	?lcf1 lila:hasPOS ?pos2.
	?lcf2 lila:hasPOS ?pos3.
	?lcf3 lila:hasPOS ?pos4.
	BIND(concat(replace (str(?pos1), "http://lila-erc.eu/ontologies/lila/", ""), ", ", replace (str(?pos2), "http://lila-erc.eu/ontologies/lila/", ""), 
	      			", ", replace (str(?pos3), "http://lila-erc.eu/ontologies/lila/", ""), ", ", replace (str(?pos4), "http://lila-erc.eu/ontologies/lila/", "")) AS ?rif)
} group by  ?rif order by DESC(?occo) limit 20`

const query_19=
`PREFIX ecrm: <https://erlangen-crm.org/current/>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX tresont: <https://itserr.it/ns/tresont/current/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX ontolex: <http://www.w3.org/ns/lemon/ontolex#>
PREFIX lila: <http://lila-erc.eu/ontologies/lila/>

# Le occorrenze delle categorie verbali (lila:POS) delle prime 4 parole dei versetti del libro 'Genesis'.

SELECT DISTINCT  ?sequenza_POS (count(?sequenza_POS) as ?occorrenze) (GROUP_CONCAT(DISTINCT ?rif ;separator=", ")as ?versetti) 
WHERE {
	FILTER(?fvaiif1 = ?fvaiif+1) .
	FILTER(?fvaiif2 = ?fvaiif+2) .
	FILTER(?fvaiif3 = ?fvaiif+3) .
	FILTER regex(?titolo,"^Genesis","i") .
	FILTER(LANGMATCHES(LANG(?titolo), "en"))
	?libro rdfs:label ?titolo .
	?bo ecrm:P102_has_title ?libro.
	?cha tresont:inSequence ?bo;
		tresont:hasStructuralType tresont:chapterType;
  		tresont:hasNumber ?chno;
		tresont:occurrenceOf ?chapi.
	?verso tresont:isPartOf ?chapi.
	?vero tresont:occurrenceOf ?verso ;
       tresont:hasNumber ?vno;
       	tresont:hasInterval ?vint;
		tresont:hasStructuralType tresont:verseType .
  	?vint tresont:intervalFrom ?fvaiif .
	?lf tresont:isPartOf ?verso.
	?subocc tresont:occurrenceOf ?lf;
		tresont:hasPosition ?fvaiif .
	?lexen ontolex:lexicalForm ?lf;
		ontolex:canonicalForm ?lcf.
	?lf1 tresont:isPartOf ?verso.
	?subocc1 tresont:occurrenceOf ?lf1 ;
		tresont:hasPosition ?fvaiif1 .
	?sub1 ontolex:lexicalForm ?lf1;
		ontolex:canonicalForm ?lcf1.
	?lf2 tresont:isPartOf ?verso.
	?subocc2 tresont:occurrenceOf ?lf2 ;
		tresont:hasPosition ?fvaiif2 .
	?sub2 ontolex:lexicalForm ?lf2;
		ontolex:canonicalForm ?lcf2.
	?lf3 tresont:isPartOf ?verso.
	?subocc3 tresont:occurrenceOf ?lf3 ;
		tresont:hasPosition ?fvaiif3 .
	?sub3 ontolex:lexicalForm ?lf3;
		ontolex:canonicalForm ?lcf3.
	?lcf lila:hasPOS ?pos1.
	?lcf1 lila:hasPOS ?pos2.
	?lcf2 lila:hasPOS ?pos3.
	?lcf3 lila:hasPOS ?pos4.
    bind (concat(str(?chno), ".", str(?vno)) as ?rif)
	BIND(concat(replace (str(?pos1), "http://lila-erc.eu/ontologies/lila/", ""), ", ", replace (str(?pos2), "http://lila-erc.eu/ontologies/lila/", ""), 
	      			", ", replace (str(?pos3), "http://lila-erc.eu/ontologies/lila/", ""), ", ", replace (str(?pos4), "http://lila-erc.eu/ontologies/lila/", "")) AS ?sequenza_POS)
} group by  ?sequenza_POS order by DESC(?occorrenze) ?chno limit 20`
</script>
<style>
.yasgui .autocompleteWrapper {
	display: none !important;
}
</style>
<title>ITSERR SPARQL Editor</title>
</head>
<body class="body-vis">

	<div class="h-100 container-fluid">
		<div>
			<nav
				class="navbar border navbar-expand-lg navbar-light bg-light justify-content-between fixed-top">
			<button class="navbar-toggler" type="button" data-toggle="collapse"
				data-target="#bs-example-navbar-collapse-1"
				aria-controls="bs-example-navbar-collapse-1" aria-expanded="false"
				aria-label="Toggle navigation">
				<span class="navbar-toggler-icon"></span>
			</button>
			<a class="navbar-brand font-weight-bold" href="#">ITSERR</a>
			<div class="collapse navbar-collapse"
				id="bs-example-navbar-collapse-1">
				<ul class="navbar-nav">
					<li class="nav-item"><a class="nav-link disabled" href="#">
							- SPARQL query editor - </a></li>
				</ul>
				<ul class="navbar-nav">
					<li class="nav-item">
						<button type="button" class="btn btn-primary" data-toggle="modal"
							data-target="#esempi_queries">Esempi</button>
					</li>
				</ul>
				<ul class="navbar-nav ml-md-auto">
					<li class="nav-item dropdown pt-1"><a
						class="nav-link dropdown-toggle" href="#" id="navbarDropdown"
						role="button" data-toggle="dropdown" aria-haspopup="true"
						aria-expanded="false"> Info </a>
						<div class="dropdown-menu" aria-labelledby="navbarDropdown">
							<a class="dropdown-item disabled" href="#" id="visAiuto">Aiuto</a>
							<a class="dropdown-item" href="#" id="visAbout"
								data-toggle="modal" data-target="#aboutModal">About</a>
						</div></li>
				</ul>
			</div>


			</nav>
		</div>
		<!-- https://lida.dantenetwork.it/fuseki/itserr/query -->
		<div id="rigaContenuti" class="row no-gutters">

			<div class="d-table w-100 tableMain">
				<div id="colVisualizza"
					class="d-table-cell tableVis bg-lida-vis border-right border-bottom border-left align-top">
					<div class="distanziatore">&nbsp;</div>
					<div id="yasgui"></div>
					<script>
						
						const yasgui = new Yasgui(
								document.getElementById("yasgui"),
								{
									yasqe : {
										value: defaultQuery
									},
									requestConfig : {
										endpoint:"https://hdnlab1.isti.cnr.it/fuseki/vulgata/query"
										//endpoint : "https://lida.dantenetwork.it/fuseki/itserr/query"
									},
									copyEndpointOnNewTab : true,
									resizeable : true,
									
								});
						const yasqe=  yasgui.getTab().yasqe
						const yasr=  yasgui.getTab().yasr
						yasqe.addPrefixes({ lila: "http://lila-erc.eu/ontologies/lila/", tresont:"https://itserr.it/ns/tresont/current/",
											its: "http://itserr.it/data/"});
						//console.log(yasgui.config);
						
						
						
						
					</script>
				</div>
			</div>

		</div>
	</div>

	<div class="modal fade" id="esempi_queries" tabindex="-1" role="dialog"
		aria-labelledby="exampleModalLongTitle" aria-hidden="true">
		<div class="modal-dialog" role="document">
			<div class="modal-content">
				<div class="modal-header">
					<h5 class="modal-title" id="exampleModalLongTitle">Esempi di
						query SPARQL</h5>
					<button type="button" class="close" data-dismiss="modal"
						aria-label="Chiudi">
						<span aria-hidden="true">&times;</span>
					</button>
				</div>
				<div class="modal-body">
					<p>
						<h5>Esempi di query sulla struttura</h5>
					</p>
					<p>
						<a href="#" class="link-info" onClick='writeQuery(query_1)'>
							Versetti in cui compare una forma.</a>
					</p>
					<p>
						<a href="#" class="link-info" onClick='writeQuery(query_2)'>Versetti
							in cui compaiono parole che iniziano con una stringa.</a>
					</p>
					<p>
						<a href="#" class="link-info" onClick='writeQuery(query_11)'>Le
							parole più frequenti in un libro.</a>
					</p>
					<p>
						<a href="#" class="link-info" onClick='writeQuery(query_3)'>Versetti
							che si ripetono più volte.</a>
					</p>
					<p>
						<a href="#" class="link-info" onClick='writeQuery(query_15)'>Le
							parole che compaiono in due libri, con il numero di occorrenze.</a>
					</p>
					<p>
						<a href="#" class="link-info" onClick='writeQuery(query_12)'>Le
							parole di un libro, che non compaiono in un altro libro.</a>
					</p>
					<p>
						<h5>Esempi di query sul 'livello linguistico'</h5>
					</p>
					<p>
						<a href="#" class="link-info" onClick='writeQuery(query_4)'>Cerco
							in un libro le forme associate ad un lemma.</a>
					</p>
					<p>
						<a href="#" class="link-info" onClick='writeQuery(query_5)'>Cerco
							in tutta l'opera le forme associate ad un lemma.</a>
					</p>
					<p>
						<a href="#" class="link-info" onClick='writeQuery(query_8)'>Cerco
							i verbi (lila:verb) presenti in un libro.</a>
					</p>
					<p>
						<a href="#" class="link-info" onClick='writeQuery(query_17)'>I verbi più frequenti in un libro.</a>
					</p>
					<p>
						<a href="#" class="link-danger" onClick='writeQuery(query_6)'>Cerco
							i versetti di un libro in cui una parola in una specifica
							posizione abbia categoria grammaticale 'lila:verb' (query
							distribuita sul dataset di LiLa).</a>
					</p>
					<p>
						<a href="#" class="link-danger" onClick='writeQuery(query_14)'>Cerco
							i versetti di un libro in cui compaiano due parole consecutive
							che hanno rispettivamente categoria grammaticale 'lila:verb' e
							'lila:noun'</a>
					</p>
					<p>
						<a href="#" class="link-danger" onClick='writeQuery(query_19)'>
						Le occorrenze delle categorie verbali (lila:POS) delle prime 4 parole dei versetti del libro 'Genesis'.
						</a>
					</p>
					<p>
							<a href="#" class="link-danger" onClick='writeQuery(query_18)'>
							TEST! Le occorrenze delle categorie verbali (lila:POS)  nelle sequenze di 4 parole nei versetti del libro 'Genesi'. 
							</a>
					</p>
					<p>
						<a href="#" class="link-danger" onClick='writeQuery(query_13)'>Cerco
							le forme derivate da un lemma secondo le regole definite
							dall'ontologia "Word Formation Latin" (WFL)</a>
					</p>
					<p>
						<a href="#" class="link-danger" onClick='writeQuery(query_7)'>Termini
							con la stessa radice basati sulla proprieta lila:hasBase del
							lemma cercato.</a>
					</p>
					<p>
						<a href="#" class="link-danger" onClick='writeQuery(query_16)'>Cerca
							le forme associate ai lemmi appartenenti ad un SynSet della
							risorsa Latin WordNet pubblicata su LiLa</a>
					</p>
					<p>
						<a href="#" class="link-danger" onClick='writeQuery(query_9)'>Cerco
							i verbi (lila:Verb) presenti in un libro e per ciascun lemma
							visualizzo la definizione nel dizionario Lewis &amp; Short.</a>
					</p>
					<p>
						<a href="#" class="link-danger" onClick='writeQuery(query_10)'>Cerco
							in un capitolo di un libro le forme che hanno una particolare
							stringa nella definizione del dizionario Lewis & Short.</a>
					</p>

				</div>
				<div class="modal-footer">
					<button id="closeModalQ" type="button" class="btn btn-secondary"
						data-dismiss="modal">Close</button>
					<!-- <button type="button" class="btn btn-primary">Save changes</button> -->
				</div>
			</div>
		</div>
	</div>



	<div class="modal fade" id="aboutModal" tabindex="-1" role="dialog"
		aria-labelledby="exampleModalLabel" aria-hidden="true">
		<div class="modal-dialog" role="document">
			<div class="modal-content">
				<div class="modal-header">
					<h5 class="modal-title" id="exampleModalLabel">About</h5>
					<button type="button" class="close" data-dismiss="modal"
						aria-label="Close">
						<span aria-hidden="true">&times;</span>
					</button>
				</div>
				<div class="modal-body">
					<p>SPARQL editor per il grafo RDF della Vulgata, realizzato per
						il gruppo di lavoro del WP8 del progetto ITSERR.</p>
					<p>Realizzato da Cesare Concordia e Carlo Meghini, ISTI-CNR.</p>
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-secondary"
						data-dismiss="modal">Close</button>
				</div>
			</div>
		</div>
	</div>
	<!-- <div id="yasgui"></div> -->

</body>
</html>