bug fixing query
This commit is contained in:
parent
c0a6dcc86b
commit
c12d94038c
|
@ -44,8 +44,8 @@ $(document).ready(function() {
|
|||
const sparqlGenerator = sparqljs.Generator;
|
||||
const myEngine = new Comunica.QueryEngine();
|
||||
|
||||
//const sparqlEndpoint = "https://hdnlab1.isti.cnr.it/fuseki/commedia/query";
|
||||
const sparqlEndpoint = "https://lida.dantenetwork.it/fuseki/commedia/query";
|
||||
const sparqlEndpoint = "https://hdnlab1.isti.cnr.it/fuseki/commedia/query";
|
||||
//const sparqlEndpoint = "https://lida.dantenetwork.it/fuseki/commedia/query";
|
||||
|
||||
var shownSentenceList = new Set()
|
||||
|
||||
|
@ -512,7 +512,7 @@ $(document).ready(function() {
|
|||
for (var ric of resincontext){
|
||||
if (Array.isArray(ric)){
|
||||
for (var ricel of ric){
|
||||
var telric=ricel.split('-')[0]+' '+ricel.split('-')[1]
|
||||
var telric=ricel.split('-')[0]+' '+ricel.split('-')[1]+' '+ricel.split('-')[2]+' '+ricel.split('-')[3]
|
||||
clausesinrs.push(telric)
|
||||
}
|
||||
}
|
||||
|
@ -540,7 +540,7 @@ $(document).ready(function() {
|
|||
if (listaClausoleRisultato.length) {
|
||||
for (var clsid of clausesinrs) {
|
||||
let tmpid = clsid.split(' ')
|
||||
loadClausola(tmpid[0], tmpid[1], 0, 0)
|
||||
loadClausola(tmpid[0], tmpid[1], tmpid[2], tmpid[3])
|
||||
}
|
||||
/*for (var clsid of listaClausoleRisultato) {
|
||||
let tmpid = clsid.split('-')
|
||||
|
@ -741,7 +741,7 @@ $(document).ready(function() {
|
|||
if (!isPeriodoInCanto(idperiodo, cantoDisplayed) && !(cantoDisplayed.includes('#vistaFrasi')))
|
||||
return
|
||||
|
||||
$(cantoDisplayed).find(' .' + idperiodo + '.' + funzionefrase).each(function() {
|
||||
/*$(cantoDisplayed).find(' .' + idperiodo + '.' + funzionefrase).each(function() {
|
||||
var tpstp = $(this).attr('class').split(" ")[1]
|
||||
$(this).css('color', colorssp(mapsynttypestopalette[tpstp]));
|
||||
|
||||
|
@ -751,9 +751,9 @@ $(document).ready(function() {
|
|||
minim.contents().find(' .' + idperiodo + '.' + funzionefrase).each(function() {
|
||||
var mtpstp = $(this).attr('class').split(" ")[1]
|
||||
$(this).css('color', colorssp(mapsynttypestopalette[mtpstp]));
|
||||
})
|
||||
})*/
|
||||
|
||||
/*$(cantoDisplayed).find(' .' + idperiodo).each(function() {
|
||||
$(cantoDisplayed).find(' .' + idperiodo).each(function() {
|
||||
var vid = parseInt($(this).attr('id').replace('e', ''))
|
||||
if (vid >= parseInt(fromn)
|
||||
&& vid <= parseInt(ton)) {
|
||||
|
@ -763,9 +763,9 @@ $(document).ready(function() {
|
|||
$(this).css('color', colorssp(mapsynttypestopalette[pstp]));
|
||||
}
|
||||
|
||||
})*/
|
||||
})
|
||||
|
||||
/*minim.contents().find(' .' + idperiodo).each(function() {
|
||||
minim.contents().find(' .' + idperiodo).each(function() {
|
||||
var vid = parseInt($(this).attr('id').replace('e', ''))
|
||||
if (vid >= parseInt(fromn)
|
||||
&& vid <= parseInt(ton)) {
|
||||
|
@ -774,7 +774,7 @@ $(document).ready(function() {
|
|||
$(this).css('color', colorssp(mapsynttypestopalette[mpstp]));
|
||||
}
|
||||
|
||||
})*/
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
//query per le simple search con condizioni sulla clausola grammaticale
|
||||
|
||||
var ontoSparqlQuery = `PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||
PREFIX ecrm: <http://erlangen-crm.org/current/>
|
||||
PREFIX ecrm: <https://erlangen-crm.org/current/>
|
||||
PREFIX hdn: <http://dantenetwork.it/data/commedia/>
|
||||
PREFIX lemon: <http://lemon-model.net/lemon#>
|
||||
PREFIX orl: <https://dantenetwork.it/ontology/orl/current/>
|
||||
|
@ -66,7 +66,7 @@ WHERE {
|
|||
//Query generica per advanced search con piu condizioni
|
||||
|
||||
var ontoSparqlQueryMultCond = `PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||
PREFIX ecrm: <http://erlangen-crm.org/current/>
|
||||
PREFIX ecrm: <https://erlangen-crm.org/current/>
|
||||
PREFIX hdn: <http://dantenetwork.it/data/commedia/>
|
||||
PREFIX lemon: <http://lemon-model.net/lemon#>
|
||||
PREFIX orl: <https://dantenetwork.it/ontology/orl/current/>
|
||||
|
@ -113,7 +113,7 @@ WHERE {
|
|||
|
||||
//Query per advanced search con obiettivo = 'Frase'
|
||||
const clausetargetquery = `
|
||||
PREFIX ecrm: <http://erlangen-crm.org/current/>
|
||||
PREFIX ecrm: <https://erlangen-crm.org/current/>
|
||||
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
|
||||
PREFIX olires: <https://dantenetwork.it/ontology/olires/current/>
|
||||
PREFIX syntit: <https://dantenetwork.it/ontology/syntit/current/>
|
||||
|
@ -276,7 +276,7 @@ const clausepos_sy_filter=`
|
|||
|
||||
//Query per advanced search con obiettivo = 'Periodo'
|
||||
const sentencetargetquery = `
|
||||
PREFIX ecrm: <http://erlangen-crm.org/current/>
|
||||
PREFIX ecrm: <https://erlangen-crm.org/current/>
|
||||
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
|
||||
PREFIX olires: <https://dantenetwork.it/ontology/olires/current/>
|
||||
PREFIX syntit: <https://dantenetwork.it/ontology/syntit/current/>
|
||||
|
@ -552,7 +552,7 @@ const occurrenceof_clause = `{"subject": {"termType": "Variable","value": "clocc
|
|||
|
||||
const defaultEditorQuery = `# ESEMPIO: i periodi della Commedia con una frase con tipo sintattico 'Subordinata Causale'
|
||||
|
||||
PREFIX ecrm: <http://erlangen-crm.org/current/>
|
||||
PREFIX ecrm: <https://erlangen-crm.org/current/>
|
||||
PREFIX syntit: <https://dantenetwork.it/ontology/syntit/current/>
|
||||
PREFIX olires: <https://dantenetwork.it/ontology/olires/current/>
|
||||
SELECT ?Cantica ?Canto ?Periodo ?FraseSubordinata
|
||||
|
|
|
@ -57,7 +57,7 @@ var testmm = 0
|
|||
|
||||
|
||||
var ontoSparqlQuerySynt = `
|
||||
PREFIX ecrm: <http://erlangen-crm.org/current/>
|
||||
PREFIX ecrm: <https://erlangen-crm.org/current/>
|
||||
PREFIX orl: <https://dantenetwork.it/ontology/orl/current/>
|
||||
PREFIX ontolex: <http://www.w3.org/ns/lemon/ontolex#>
|
||||
PREFIX olires: <https://dantenetwork.it/ontology/olires/current/>
|
||||
|
@ -1293,11 +1293,6 @@ function buildFilterStatement(target, filter, opzione) {
|
|||
}
|
||||
|
||||
|
||||
//"hasClauseType:Comparativa"
|
||||
//
|
||||
//?cl syntit:hasClauseType ?tipoSint .
|
||||
//?tipoSint rdf:type syntit:ClauseSubType ;
|
||||
// ecrm:P127_has_broader_term syntit:Comparativa .
|
||||
|
||||
function buildMacroSyntType(sttmnt) {
|
||||
var uniontmpms = `{"type": "union", "patterns":[]}`
|
||||
|
@ -1321,19 +1316,9 @@ function buildMacroSyntType(sttmnt) {
|
|||
"predicate": {"termType":"NamedNode"},
|
||||
"object": {"termType": "NamedNode"}}`
|
||||
|
||||
var t1m = `{"subject": {"termType": "Variable","value": "cl"},
|
||||
"predicate": {"termType": "NamedNode", "value": "https://dantenetwork.it/ontology/syntit/current/hasClauseType"},
|
||||
"object": {"termType": "Variable","value": "tipoSint"}}`
|
||||
var t2m = `{"subject": {"termType": "Variable","value": "tipoSint"},
|
||||
"predicate": {"termType": "NamedNode","value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"},
|
||||
"object": {"termType": "NamedNode", "value": "https://dantenetwork.it/ontology/syntit/current/ClauseSubType"}}`
|
||||
var t3m = `{"subject": {"termType": "Variable","value": "tipoSint"},
|
||||
"predicate": {"termType": "NamedNode","value": "http://erlangen-crm.org/current/P127_has_broader_term"},
|
||||
"object": {"termType": "NamedNode"}}`
|
||||
|
||||
var res = []
|
||||
|
||||
|
||||
|
||||
var obj = syntitprefix + (sttmnt.split(':')[1])
|
||||
|
||||
var predicate = syntitprefix + (sttmnt.split(':')[0])
|
||||
|
@ -1350,11 +1335,7 @@ function buildMacroSyntType(sttmnt) {
|
|||
unionst['patterns'].push(grstmt)
|
||||
unionst['patterns'].push(statement)
|
||||
res.push(unionst)
|
||||
//var statement = JSON.parse(t3m)
|
||||
//statement['object']['value'] = obj
|
||||
//res.push(JSON.parse(t1m))
|
||||
//res.push(JSON.parse(t2m))
|
||||
//res.push(statement)
|
||||
|
||||
return res
|
||||
}
|
||||
|
||||
|
@ -1870,7 +1851,7 @@ var funzione_clausola =
|
|||
|
||||
//da completare
|
||||
|
||||
var listaMacroTipiConSubTipo = ['Concessiva', 'Comparativa', 'Ipotetica', 'Interrogativa', 'Iussiva', 'Ottativa', 'Avversativa', 'Relativa']
|
||||
var listaMacroTipiConSubTipo = ['Concessiva', 'Comparativa', 'Ipotetica', 'Interrogativa', 'Iussiva', 'Ottativa', 'Avversativa', 'Relativa', 'Consecutiva']
|
||||
|
||||
var macrotipi_sint =
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue