correzione bug lista risultati con clausola sintattica, in progress
This commit is contained in:
parent
3ff138362d
commit
42f84e3b29
|
@ -315,9 +315,10 @@ $(document).ready(function() {
|
|||
continue;
|
||||
}
|
||||
numeroRisultati = numeroRisultati + 1;
|
||||
var versiContesto = getFormaContext(risultato, contextLength);
|
||||
/*var versiContesto = getFormaContext(risultato, contextLength);
|
||||
var ultimaForma = versiContesto.slice(-1)
|
||||
ultimaPosizione = ultimaForma[0].posizione
|
||||
ultimaPosizione = ultimaForma[0].posizione*/
|
||||
ultimaPosizione=getContextLastPosition(risultato, contextLength);
|
||||
}
|
||||
console.log('N. contesti: ' + numeroRisultati)
|
||||
numeroContesti = numeroRisultati
|
||||
|
@ -326,8 +327,11 @@ $(document).ready(function() {
|
|||
|
||||
function getResInPage(startcont, endcont) {
|
||||
var res = [];
|
||||
var tempr=new Set()
|
||||
var ultimaPosizione = -1;
|
||||
var contaContesti = 0
|
||||
console.log(listaClausoleRisultato)
|
||||
if (listarisultati.length) {
|
||||
for (risultato of listarisultati) {
|
||||
if (risultato <= parseInt(ultimaPosizione)) {
|
||||
continue;
|
||||
|
@ -338,14 +342,36 @@ $(document).ready(function() {
|
|||
}
|
||||
if (contaContesti > endcont)
|
||||
break;
|
||||
var versiContesto = getFormaContext(risultato, contextLength);
|
||||
/*var versiContesto = getFormaContext(risultato, contextLength);
|
||||
var ultimaForma = versiContesto.slice(-1)
|
||||
ultimaPosizione = ultimaForma[0].posizione
|
||||
ultimaPosizione = ultimaForma[0].posizione*/
|
||||
ultimaPosizione=getContextLastPosition(risultato, contextLength);
|
||||
}
|
||||
//ordino la lista dei risultati
|
||||
res.sort(function(a, b) { return a - b });
|
||||
return (res)
|
||||
}
|
||||
if (listaClausoleRisultato.length) {
|
||||
for (singleres of listaClausoleRisultato) {
|
||||
tempr.add (singleres.split('-')[0])
|
||||
}
|
||||
var myRis=[]
|
||||
|
||||
tempr.forEach( y => myRis.push(listaClausoleRisultato.filter(x => (x.split('-')[0]==y) && x.split('-').length>1)))
|
||||
|
||||
for (risultato of myRis) {
|
||||
contaContesti = contaContesti + 1;
|
||||
if (contaContesti >= startcont && contaContesti < endcont) {
|
||||
res.push(risultato)
|
||||
}
|
||||
if (contaContesti > endcont)
|
||||
break;
|
||||
}
|
||||
res.sort(function(a, b) { puno=a[0].split('-')[3]; pdue=b[0].split('-')[3]; return parseInt(puno) - parseInt(pdue) });
|
||||
return (res)
|
||||
}
|
||||
return (res)
|
||||
}
|
||||
|
||||
function showFrasi(start, offset = showOffset) {
|
||||
var canto, numeroCantica;
|
||||
|
@ -356,18 +382,26 @@ $(document).ready(function() {
|
|||
var numeroRisultato = 0;
|
||||
var ultimaPosizione = 0;
|
||||
var numeroVersi;
|
||||
const intsup = Math.min(start + offset, listarisultati.length)
|
||||
//const intsup = Math.min(start + offset, listarisultati.length)
|
||||
var resincontext = getResInPage(start, start + offset)
|
||||
//for (let i=start; i<intsup; i++){
|
||||
for (let i = 0; i < resincontext.length; i++) {
|
||||
//risultato = listarisultati[i];
|
||||
risultato = resincontext[i];
|
||||
numeroRisultato++;
|
||||
risultato = parseInt(risultato)
|
||||
if (risultato <= parseInt(ultimaPosizione)) {
|
||||
|
||||
|
||||
if (!risultato.toString().includes('-') && risultato <= parseInt(ultimaPosizione)) {
|
||||
continue;
|
||||
}
|
||||
var versiContesto = getFormaContext(risultato, contextLength);
|
||||
var versiContesto=''
|
||||
if (!Array.isArray(risultato)){
|
||||
risultato = parseInt(risultato)
|
||||
versiContesto = getFormaContext(risultato, contextLength);
|
||||
}
|
||||
else
|
||||
versiContesto = getFraseContext(risultato, contextLength);
|
||||
|
||||
var setVersicontesto = new Set()
|
||||
divVerso = ''
|
||||
numeroCantica = 0
|
||||
|
@ -842,42 +876,10 @@ $(document).ready(function() {
|
|||
|
||||
// commentsArray = getVersiConCitazioni(cantica, canto)
|
||||
commentsJson = getVersiConCitazioniJson(cantica, canto)
|
||||
// commentsArray.forEach(removeHtmlTags2)
|
||||
/*
|
||||
var numVerso1;
|
||||
var numVerso2;
|
||||
var versoCitazione;
|
||||
|
||||
commentsArray.sort((p1, p2) => {
|
||||
numVerso1 = p1.verso;
|
||||
numVerso2 = p2.verso;
|
||||
versoCitazione = (p1.VersoCitazione).replaceAll("-", "");
|
||||
numVerso1 = numVerso1 + versoCitazione;
|
||||
versoCitazione = (p2.VersoCitazione).replaceAll("-", "");
|
||||
numVerso2 = numVerso2 + versoCitazione;
|
||||
numVerso2 = parseInt(numVerso2.replaceAll("_", ""));
|
||||
numVerso1 = parseInt(numVerso1.replaceAll("_", ""));
|
||||
if (numVerso1 < numVerso2) return -1;
|
||||
if (numVerso1 > numVerso2) return 1;
|
||||
return 0;
|
||||
});*/
|
||||
}
|
||||
|
||||
/* Luca: removeHtmlTags2 e' la versione compatta di removeHtmlTags*/
|
||||
/*function removeHtmlTags2(value) {
|
||||
var text = ""
|
||||
for (const key in value) {
|
||||
text = `${value[key]}`
|
||||
if (text != null) {
|
||||
text = text.replace(/<(.|\n)*?>/g, '');
|
||||
text = text.replace("«", "");
|
||||
text = text.replace("»", "");
|
||||
text = text.replace(/[\r\n]+/gm, ' ');
|
||||
value[`${key}`] = text;
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
function removeHtmlTags(value) {
|
||||
var text = value;
|
||||
|
@ -2030,6 +2032,10 @@ $(document).ready(function() {
|
|||
for (const india in dialoghi) {
|
||||
var diaclass = dialoghi[india]['Cnt'].replace('_so', '')
|
||||
if (testf==diaclass){
|
||||
listaPeriodiRisultato.push(fraseItems[0].toString())
|
||||
loadPeriodo(fraseItems[0].toString())
|
||||
loadClausola(fraseItems[0].toString(), fraseItems[3].toString(), fraseItems[1], fraseItems[2])
|
||||
//resSent.add(fraseItems[0] + '-' + fraseItems[3] + '-' + fraseItems[1] + '-' + fraseItems[2]);
|
||||
if (!resSent.has(fraseItems[0])) {
|
||||
resSent.add(fraseItems[0]);
|
||||
resultsInCantica.push(fraseItems[4]);
|
||||
|
@ -2058,7 +2064,12 @@ $(document).ready(function() {
|
|||
|
||||
//ordino la lista dei risultati
|
||||
listarisultati.sort(function(a, b) { return a - b });
|
||||
|
||||
// ordino la lista delle clausole del risultato
|
||||
listaClausoleRisultato.sort(function(a, b) {
|
||||
var valA=a.split('-')[2]
|
||||
var valB=b.split('-')[2]
|
||||
return valA - valB
|
||||
});
|
||||
//aggiunge badge con totale risultati accanto alle cantiche
|
||||
|
||||
var totResultN = showBadgeInCantica(resultsInCantica)
|
||||
|
@ -2078,7 +2089,7 @@ $(document).ready(function() {
|
|||
|
||||
console.log('badge end...')
|
||||
//calcolo numero dei contesti
|
||||
countResultContexts()
|
||||
/countResultContexts()
|
||||
$("#loader").fadeOut(300);
|
||||
// mostra lista risultati
|
||||
$.manageResultList(0,showOffset);
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
/**
|
||||
*
|
||||
*/
|
||||
import {Runtime, Library, Inspector} from "https://hdnlab1.isti.cnr.it/d3search/node_modules/commarcdiag/runtime.js";
|
||||
import commarc from "https://hdnlab1.isti.cnr.it/d3search/node_modules/commarcdiag/index.js";
|
||||
/*import {Runtime, Library, Inspector} from "https://lida.dantenetwork.it/node_modules/commarcdiag/runtime.js";
|
||||
import commarc from "https://lida.dantenetwork.it/node_modules/commarcdiag/index.js";*/
|
||||
/*import {Runtime, Library, Inspector} from "https://hdnlab1.isti.cnr.it/d3search/node_modules/commarcdiag/runtime.js";
|
||||
import commarc from "https://hdnlab1.isti.cnr.it/d3search/node_modules/commarcdiag/index.js";*/
|
||||
import {Runtime, Library, Inspector} from "https://lida.dantenetwork.it/node_modules/commarcdiag/runtime.js";
|
||||
import commarc from "https://lida.dantenetwork.it/node_modules/commarcdiag/index.js";
|
||||
|
||||
const iframe = document.getElementsByClassName("minimap__content");
|
||||
const runtime1 = new Runtime(new Library(name => {
|
||||
|
|
475
js/utilsMgr.js
475
js/utilsMgr.js
|
@ -101,10 +101,122 @@ var orlprefix = 'https://dantenetwork.it/ontology/orl/current/'
|
|||
|
||||
var syntitprefix = 'https://dantenetwork.it/ontology/syntit/current/'
|
||||
|
||||
//var stringInSparql= false;
|
||||
|
||||
function getFraseContext(fraseids, numversi = 3) {
|
||||
var context = []
|
||||
var listaforme = formeprima;
|
||||
var fraseid = fraseids[0]
|
||||
|
||||
var mainid = fraseid.split('-')[0]
|
||||
var cantica = mainid.split('_')[0]
|
||||
var offset = parseInt(fraseid.split('-')[2]);
|
||||
if (cantica == '2') {
|
||||
offset = parseInt(fraseid.split('-')[2]) - 33374
|
||||
listaforme = formeseconda;
|
||||
}
|
||||
|
||||
if (cantica == '3') {
|
||||
offset = parseInt(fraseid.split('-')[2]) - 66588
|
||||
listaforme = formeterza;
|
||||
}
|
||||
maxpos = listaforme.length - 1
|
||||
var pos = 0
|
||||
var startindex = Math.max(0, (offset - 10))
|
||||
|
||||
for (i = startindex; i < listaforme.length; i++) {
|
||||
var tmpos = listaforme[i].split('_')[2]
|
||||
if (tmpos == parseInt(fraseid.split('-')[2])) {
|
||||
pos = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
var pos2 = pos
|
||||
|
||||
if (fraseids.length > 1)
|
||||
lastfraseid = fraseids[fraseids.length - 1]
|
||||
else
|
||||
lastfraseid = fraseids[0]
|
||||
|
||||
for (j = pos; i < listaforme.length; j++) {
|
||||
var tmpos2 = listaforme[j].split('_')[2]
|
||||
if (tmpos2 == parseInt(lastfraseid.split('-')[3])) {
|
||||
pos2 = j;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
var minpos = 0;
|
||||
var limitv = Math.max((numversi), 3)
|
||||
var item = listaforme[pos].split('_');
|
||||
var numverso = item[3]
|
||||
var spannum = (4 * limitv)
|
||||
|
||||
var contextinf = Math.max(minpos, parseInt(pos) - spannum)
|
||||
var contextsup = Math.min(maxpos, parseInt(pos2) + spannum)
|
||||
|
||||
/*var contextinf = parseInt(fraseid.split('-')[2])
|
||||
var contextsup = parseInt(fraseid.split('-')[3])*/
|
||||
for (j = contextinf; j < contextsup + 1; j++) {
|
||||
var tmpform = listaforme[j].split('_');
|
||||
if ((tmpform[3] > parseInt(numverso) - limitv) && (tmpform[3] < parseInt(numverso) + limitv)) {
|
||||
var contextitem = {}
|
||||
contextitem['testo'] = tmpform[0];
|
||||
contextitem['verso'] = tmpform[3];
|
||||
contextitem['canto'] = tmpform[1];
|
||||
contextitem['cantica'] = cantica - 1;
|
||||
contextitem['posizione'] = tmpform[2];
|
||||
contextitem['catg'] = tmpform[4];
|
||||
contextitem['periodo'] = cantica + '_' + tmpform[1] + '_s_' + tmpform[5];
|
||||
contextitem['funzperiodo'] = tmpform[6];
|
||||
context.push(contextitem);
|
||||
}
|
||||
|
||||
}
|
||||
return context;
|
||||
}
|
||||
|
||||
function getContextLastPosition(formaid, numversi = 3){
|
||||
|
||||
var listaforme = formeprima;
|
||||
|
||||
var limitv = Math.max((numversi), 3)
|
||||
var maxpos = 0;
|
||||
var offset = parseInt(formaid);
|
||||
|
||||
if (parseInt(formaid) > 33373 && parseInt(formaid) < 66588) {
|
||||
listaforme = formeseconda;
|
||||
cantica = 1;
|
||||
offset = parseInt(formaid) - 33374
|
||||
|
||||
}
|
||||
if (parseInt(formaid) > 66587 && parseInt(formaid) < 99314) {
|
||||
listaforme = formeterza;
|
||||
cantica = 2;
|
||||
offset = parseInt(formaid) - 66588
|
||||
|
||||
}
|
||||
maxpos = listaforme.length - 1
|
||||
var pos = 0
|
||||
var startindex = Math.max(0, (offset - 25))
|
||||
|
||||
//console.log('Forma id: '+formaid+' startindex '+ startindex+' offset '+offset+' ('+cantica+')')
|
||||
for (i = startindex; i < listaforme.length; i++) {
|
||||
var tmpos = listaforme[i].split('_')[2]
|
||||
if (tmpos == formaid) {
|
||||
pos = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
var spannum = (11 * limitv)
|
||||
|
||||
var contextsup = Math.min(maxpos, parseInt(pos) + spannum)
|
||||
var tmpform = listaforme[contextsup].split('_');
|
||||
return(tmpform[2])
|
||||
|
||||
|
||||
}
|
||||
function getFormaContext(formaid, numversi = 3) {
|
||||
var context = []
|
||||
var cantica = 0;
|
||||
|
@ -112,12 +224,12 @@ function getFormaContext(formaid, numversi = 3) {
|
|||
var minpos = 0;
|
||||
var limitv = Math.max((numversi), 3)
|
||||
var maxpos = 0;
|
||||
var offset = 0;
|
||||
var offset = parseInt(formaid);
|
||||
|
||||
|
||||
if (parseInt(formaid) < 33373) {
|
||||
/*if (parseInt(formaid) < 33373) {
|
||||
offset = parseInt(formaid)
|
||||
}
|
||||
}*/
|
||||
|
||||
if (parseInt(formaid) > 33373 && parseInt(formaid) < 66588) {
|
||||
listaforme = formeseconda;
|
||||
|
@ -151,14 +263,7 @@ function getFormaContext(formaid, numversi = 3) {
|
|||
}
|
||||
}
|
||||
|
||||
/*for (const [index, element] of listaforme.entries()) {
|
||||
if(element.split('_')[2]==formaid){
|
||||
pos=index;
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
*/
|
||||
var item = listaforme[pos].split('_');
|
||||
var numverso = item[3]
|
||||
var spannum = (11 * limitv)
|
||||
|
@ -232,9 +337,9 @@ function getStatements() {
|
|||
|
||||
var theguiQ = ''
|
||||
var multipleCondSpQuery = ''
|
||||
var bindConcatStatement=''
|
||||
var occBindConcatStatement=''
|
||||
var posBindConcatStatement=''
|
||||
var bindConcatStatement = ''
|
||||
var occBindConcatStatement = ''
|
||||
var posBindConcatStatement = ''
|
||||
|
||||
var conditions = []
|
||||
var filters = []
|
||||
|
@ -286,11 +391,11 @@ function buildSPQuery(guiquery) {
|
|||
theguiQ = guiquery;
|
||||
var SparqlParser = sparqljs.Parser;
|
||||
var spqparser = new SparqlParser();
|
||||
if (theguiQ['unitaRicerca']=='periodo') {//Multiple Conditions UR=Periodo
|
||||
if (theguiQ['unitaRicerca'] == 'periodo') {//Multiple Conditions UR=Periodo
|
||||
multipleCondSpQuery = spqparser.parse(sentencetargetquery);
|
||||
bindConcatStatement=JSON.parse(sentencetarget_functionbind);
|
||||
occBindConcatStatement=JSON.parse(sentencetarget_occbind);
|
||||
posBindConcatStatement=JSON.parse(sentencetarget_posbind);
|
||||
bindConcatStatement = JSON.parse(sentencetarget_functionbind);
|
||||
occBindConcatStatement = JSON.parse(sentencetarget_occbind);
|
||||
posBindConcatStatement = JSON.parse(sentencetarget_posbind);
|
||||
|
||||
}
|
||||
else
|
||||
|
@ -306,11 +411,11 @@ function buildSPQuery(guiquery) {
|
|||
parseJsonClause(ck, jsonclauses[ck], multipleCondSpQuery.where)
|
||||
|
||||
}
|
||||
if (theguiQ['unitaRicerca']=='periodo') {
|
||||
if (theguiQ['unitaRicerca'] == 'periodo') {
|
||||
multipleCondSpQuery.where.push(bindConcatStatement)
|
||||
multipleCondSpQuery.where.push(occBindConcatStatement)
|
||||
|
||||
if (posBindConcatStatement['expression']['args'].length){
|
||||
if (posBindConcatStatement['expression']['args'].length) {
|
||||
multipleCondSpQuery.where.push(posBindConcatStatement)
|
||||
multipleCondSpQuery.variables.push(JSON.parse(sentencetarget_posVariable))
|
||||
//multipleCondSpQuery.where.push(sentencetargetstatement_posCoalesce)
|
||||
|
@ -341,12 +446,12 @@ function buildSQ(stquery) {
|
|||
if (stquery['QueryAvanzata'] == 1 && stquery['EsprLogica'] != null && stquery['EsprLogica'] != '' && stquery['EsprLogica'].length == 1) {
|
||||
clause = stquery['EsprLogica']
|
||||
|
||||
filtroContesto=getFiltroContestoJson(JSON.parse(stquery[clause[0]]['contesto']))
|
||||
filtroContesto = getFiltroContestoJson(JSON.parse(stquery[clause[0]]['contesto']))
|
||||
if (stquery[clause]['TipoClausola'] == 'Sintattico') {
|
||||
parsedquery = parser.parse(ontoSparqlQuerySynt);
|
||||
var tempsyntquery=buildSintacticClause(stquery[clause], parsedquery, 2)
|
||||
if (filtroContesto.length>0){
|
||||
for (tmpc of filtroContesto){
|
||||
var tempsyntquery = buildSintacticClause(stquery[clause], parsedquery, 2)
|
||||
if (filtroContesto.length > 0) {
|
||||
for (tmpc of filtroContesto) {
|
||||
|
||||
tempsyntquery.where.splice(0, 0, tmpc)
|
||||
}
|
||||
|
@ -355,8 +460,8 @@ function buildSQ(stquery) {
|
|||
}
|
||||
|
||||
myquery = buildClause(stquery[clause], parsedquery, 2)
|
||||
if (filtroContesto.length>0){
|
||||
for (tmpc of filtroContesto){
|
||||
if (filtroContesto.length > 0) {
|
||||
for (tmpc of filtroContesto) {
|
||||
console.log(filtroContesto[0])
|
||||
myquery.where.splice(1, 0, tmpc)
|
||||
}
|
||||
|
@ -374,9 +479,9 @@ function buildSQ(stquery) {
|
|||
}
|
||||
//Simple query
|
||||
|
||||
filtroContestoJson=getFiltroContestoJson(JSON.parse(stquery['Clausola0']['contesto']))
|
||||
if (filtroContestoJson.length>0){
|
||||
for (tmpc of filtroContestoJson){
|
||||
filtroContestoJson = getFiltroContestoJson(JSON.parse(stquery['Clausola0']['contesto']))
|
||||
if (filtroContestoJson.length > 0) {
|
||||
for (tmpc of filtroContestoJson) {
|
||||
//console.log(filtroContesto[0])
|
||||
parsedquery.where.splice(1, 0, tmpc)
|
||||
}
|
||||
|
@ -405,10 +510,10 @@ function buildSQ(stquery) {
|
|||
|
||||
|
||||
parsedquery.where[0].expression.args[1].value = strval;
|
||||
if (stquery['Clausola0']['lemma_forma'] == 'lemma'){
|
||||
if (stquery['Clausola0']['lemma_forma'] == 'lemma') {
|
||||
parsedquery.where[0].expression.args[0].value = "lm";
|
||||
parsedquery.where.splice(1, 1)
|
||||
parsedquery.where[1].patterns[0].triples.splice(0,1)
|
||||
parsedquery.where[1].patterns[0].triples.splice(0, 1)
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -428,25 +533,25 @@ function buildSQ(stquery) {
|
|||
|
||||
function getFiltroContestoJson(datiContesto) {
|
||||
var cantica = 0;
|
||||
var canticheids= new Set ()
|
||||
var canticheids = new Set()
|
||||
for (contestoCantica of datiContesto) {
|
||||
var contextids=[]
|
||||
var contextids = []
|
||||
cantica++;
|
||||
for (const [index, element] of contestoCantica.entries()) {
|
||||
if (element == 1){
|
||||
if (element == 1) {
|
||||
//console.log('Cantica ' + cantica + ', Canto ' + (parseInt(index) + 1));
|
||||
contextids.push (parseInt(index) + 1)
|
||||
contextids.push(parseInt(index) + 1)
|
||||
}
|
||||
}
|
||||
if (contextids.length>0){
|
||||
canticheids[cantica]=contextids
|
||||
if (contextids.length > 0) {
|
||||
canticheids[cantica] = contextids
|
||||
}
|
||||
}
|
||||
|
||||
if (Object.keys(canticheids).length > 0){
|
||||
if (Object.keys(canticheids).length > 0) {
|
||||
|
||||
//console.log(JSON.stringify(canticheids))
|
||||
var test=buildFilterContextJson (canticheids)
|
||||
var test = buildFilterContextJson(canticheids)
|
||||
|
||||
return (test)
|
||||
}
|
||||
|
@ -456,16 +561,16 @@ function getFiltroContestoJson(datiContesto) {
|
|||
|
||||
function buildStatementClause(clause, parsedquery, whereind, theplace, token) {
|
||||
//
|
||||
var tmpgroup=''
|
||||
var tmpgroup = ''
|
||||
if (clause['TipoClausola'] == "Sintattico") {
|
||||
if (theguiQ['unitaRicerca']=='periodo')
|
||||
tmpgroup=JSON.parse(sentencetarget_syntgroup)
|
||||
if (theguiQ['unitaRicerca'] == 'periodo')
|
||||
tmpgroup = JSON.parse(sentencetarget_syntgroup)
|
||||
else
|
||||
tmpgroup = JSON.parse(syntgroup)
|
||||
}
|
||||
if (clause['TipoClausola'] == "Grammaticale") {
|
||||
if (theguiQ['unitaRicerca']=='periodo'){
|
||||
tmpgroup=JSON.parse(sentencetarget_morphgroup_short)
|
||||
if (theguiQ['unitaRicerca'] == 'periodo') {
|
||||
tmpgroup = JSON.parse(sentencetarget_morphgroup_short)
|
||||
}
|
||||
|
||||
else
|
||||
|
@ -480,12 +585,12 @@ function buildStatementClause(clause, parsedquery, whereind, theplace, token) {
|
|||
tmpgroup.patterns.unshift(stmt)
|
||||
//tmpgroup.patterns.push(JSON.parse(unionop)['bgp']);
|
||||
tmpgroup.patterns.splice(1, 0, JSON.parse(unionop)['bgp']);
|
||||
if(clause['lemma_forma']=='lemma'){
|
||||
if (clause['lemma_forma'] == 'lemma') {
|
||||
tmpgroup.patterns.at(-1).triples.push(JSON.parse(lemma_lexicalform))
|
||||
tmpgroup.patterns.at(-1).triples.push(JSON.parse(lemma_canonicalform))
|
||||
tmpgroup.patterns.at(-1).triples.push(JSON.parse(lemma_writtenrepresentation))
|
||||
}
|
||||
else{
|
||||
else {
|
||||
tmpgroup.patterns[1].triples.push(JSON.parse(writtenrepresentation))
|
||||
//tmpgroup.patterns.at(-1).triples.push(JSON.parse(writtenrepresentation))
|
||||
}
|
||||
|
@ -522,33 +627,33 @@ function buildStatementClause(clause, parsedquery, whereind, theplace, token) {
|
|||
}
|
||||
}
|
||||
|
||||
if (clause['TipoClausola']=='Grammaticale'){
|
||||
if (theguiQ['unitaRicerca']=='periodo'){
|
||||
var tmpg=JSON.stringify(tmpgroup)
|
||||
tmpg=tmpg.replaceAll('"Rappresentazione"', '"Rappresentazione'+token+'"')
|
||||
tmpg=tmpg.replaceAll('"form"', '"form'+token+'"')
|
||||
tmpg=tmpg.replaceAll('"lent"', '"lent'+token+'"')
|
||||
tmpg=tmpg.replaceAll('"cf"', '"cf'+token+'"')
|
||||
tmpg=tmpg.replaceAll('"fa"', '"fa'+token+'"')
|
||||
tmpg=tmpg.replaceAll('"pos"', '"pos'+token+'"')
|
||||
tmpg=tmpg.replaceAll('"lm"', '"lm'+token+'"')
|
||||
tmpg=tmpg.replaceAll('"reg"', '"reg'+token+'"')
|
||||
tmpg=tmpg.replaceAll('"clg"', '"clg'+token+'"')
|
||||
tmpg=tmpg.replaceAll('"cloccte"', '"cloccte'+token+'"')
|
||||
tmpgroup=JSON.parse(tmpg)
|
||||
var tmppos=`{
|
||||
if (clause['TipoClausola'] == 'Grammaticale') {
|
||||
if (theguiQ['unitaRicerca'] == 'periodo') {
|
||||
var tmpg = JSON.stringify(tmpgroup)
|
||||
tmpg = tmpg.replaceAll('"Rappresentazione"', '"Rappresentazione' + token + '"')
|
||||
tmpg = tmpg.replaceAll('"form"', '"form' + token + '"')
|
||||
tmpg = tmpg.replaceAll('"lent"', '"lent' + token + '"')
|
||||
tmpg = tmpg.replaceAll('"cf"', '"cf' + token + '"')
|
||||
tmpg = tmpg.replaceAll('"fa"', '"fa' + token + '"')
|
||||
tmpg = tmpg.replaceAll('"pos"', '"pos' + token + '"')
|
||||
tmpg = tmpg.replaceAll('"lm"', '"lm' + token + '"')
|
||||
tmpg = tmpg.replaceAll('"reg"', '"reg' + token + '"')
|
||||
tmpg = tmpg.replaceAll('"clg"', '"clg' + token + '"')
|
||||
tmpg = tmpg.replaceAll('"cloccte"', '"cloccte' + token + '"')
|
||||
tmpgroup = JSON.parse(tmpg)
|
||||
var tmppos = `{
|
||||
"type": "operation",
|
||||
"operator": "str",
|
||||
"args": [
|
||||
{
|
||||
"termType": "Variable",
|
||||
"value": "pos`+token+`"
|
||||
"value": "pos`+ token + `"
|
||||
}
|
||||
]
|
||||
}
|
||||
`
|
||||
posBindConcatStatement['expression']['args'].push(JSON.parse(tmppos))
|
||||
tmppos=`{
|
||||
tmppos = `{
|
||||
"termType": "Literal",
|
||||
"value": ";",
|
||||
"language": "",
|
||||
|
@ -577,7 +682,7 @@ function buildStatementClause(clause, parsedquery, whereind, theplace, token) {
|
|||
var functS = clause['functionSyntax'];
|
||||
var typeS = clause['typeSyntax0']
|
||||
console.log(functS + ' ' + typeS)
|
||||
var myf =''
|
||||
var myf = ''
|
||||
if (functS != null && functS != ".+") {
|
||||
myf = buildsyntClause(funzione_clausola[functS])
|
||||
if (myf != '')
|
||||
|
@ -585,18 +690,18 @@ function buildStatementClause(clause, parsedquery, whereind, theplace, token) {
|
|||
}
|
||||
if (typeS != null && typeS != ".+") {
|
||||
var alltipi = Object.assign(macrotipi_sint, tipi_sint);
|
||||
let mymt=alltipi[typeS]
|
||||
let mymt = alltipi[typeS]
|
||||
|
||||
if(listaMacroTipiConSubTipo.includes(mymt.split(':')[1])){
|
||||
let myfa=buildMacroSyntType(mymt)
|
||||
for (fa in myfa){
|
||||
if (listaMacroTipiConSubTipo.includes(mymt.split(':')[1])) {
|
||||
let myfa = buildMacroSyntType(mymt)
|
||||
for (fa in myfa) {
|
||||
//tmpgroup.patterns.at(-1).triples.push(myfa[fa])
|
||||
tmpgroup.patterns.push(myfa[fa])
|
||||
}
|
||||
}
|
||||
else{
|
||||
var tmptr=alltipi[typeS].split(';')
|
||||
for (indttr in tmptr){
|
||||
else {
|
||||
var tmptr = alltipi[typeS].split(';')
|
||||
for (indttr in tmptr) {
|
||||
myf = buildsyntClause(tmptr[indttr])
|
||||
if (myf != '')
|
||||
tmpgroup.patterns.at(-1).triples.push(myf)
|
||||
|
@ -605,40 +710,40 @@ function buildStatementClause(clause, parsedquery, whereind, theplace, token) {
|
|||
}
|
||||
|
||||
}
|
||||
if (theguiQ['unitaRicerca']=='periodo'){
|
||||
mytest=JSON.stringify(tmpgroup)
|
||||
mytest=mytest.replaceAll(':"cl"', ':"cl'+token+'"')
|
||||
mytest=mytest.replaceAll(':"clatype"', ':"clatype'+token+'"')
|
||||
mytest=mytest.replaceAll(':"clafunction"', ':"clafunction'+token+'"')
|
||||
mytest=mytest.replaceAll(':"cloccu"', ':"cloccu'+token+'"')
|
||||
mytest=mytest.replaceAll(':"fa"', ':"fa'+token+'"')
|
||||
mytest=mytest.replaceAll(':"form"', ':"form'+token+'"')
|
||||
mytest=mytest.replaceAll(':"Rappresentazione"', ':"Rappresentazione'+token+'"')
|
||||
var mystrb=`{
|
||||
if (theguiQ['unitaRicerca'] == 'periodo') {
|
||||
mytest = JSON.stringify(tmpgroup)
|
||||
mytest = mytest.replaceAll(':"cl"', ':"cl' + token + '"')
|
||||
mytest = mytest.replaceAll(':"clatype"', ':"clatype' + token + '"')
|
||||
mytest = mytest.replaceAll(':"clafunction"', ':"clafunction' + token + '"')
|
||||
mytest = mytest.replaceAll(':"cloccu"', ':"cloccu' + token + '"')
|
||||
mytest = mytest.replaceAll(':"fa"', ':"fa' + token + '"')
|
||||
mytest = mytest.replaceAll(':"form"', ':"form' + token + '"')
|
||||
mytest = mytest.replaceAll(':"Rappresentazione"', ':"Rappresentazione' + token + '"')
|
||||
var mystrb = `{
|
||||
"type": "operation",
|
||||
"operator": "str",
|
||||
"args": [
|
||||
{
|
||||
"termType": "Variable",
|
||||
"value": "clafunction`+token+`"
|
||||
"value": "clafunction`+ token + `"
|
||||
}
|
||||
]
|
||||
}
|
||||
`
|
||||
bindConcatStatement['expression']['args'].push(JSON.parse(mystrb))
|
||||
mystrb=`{
|
||||
mystrb = `{
|
||||
"type": "operation",
|
||||
"operator": "str",
|
||||
"args": [
|
||||
{
|
||||
"termType": "Variable",
|
||||
"value": "cl`+token+`"
|
||||
"value": "cl`+ token + `"
|
||||
}
|
||||
]
|
||||
}
|
||||
`
|
||||
occBindConcatStatement['expression']['args'].push(JSON.parse(mystrb))
|
||||
mystrb=`{
|
||||
mystrb = `{
|
||||
"termType": "Literal",
|
||||
"value": ";",
|
||||
"language": "",
|
||||
|
@ -649,7 +754,7 @@ function buildStatementClause(clause, parsedquery, whereind, theplace, token) {
|
|||
}`
|
||||
bindConcatStatement['expression']['args'].push(JSON.parse(mystrb))
|
||||
occBindConcatStatement['expression']['args'].push(JSON.parse(mystrb))
|
||||
tmpgroup=JSON.parse(mytest)
|
||||
tmpgroup = JSON.parse(mytest)
|
||||
|
||||
|
||||
}
|
||||
|
@ -700,18 +805,18 @@ function buildSintacticClause(clause, parsedquery, whereind) {
|
|||
}
|
||||
if (typeS != null && typeS != ".+") {
|
||||
var alltipi = Object.assign(macrotipi_sint, tipi_sint);
|
||||
let mymt=alltipi[typeS]
|
||||
if(listaMacroTipiConSubTipo.includes(mymt.split(':')[1])){
|
||||
let myfa=buildMacroSyntType(mymt)
|
||||
for (fa in myfa){
|
||||
let mymt = alltipi[typeS]
|
||||
if (listaMacroTipiConSubTipo.includes(mymt.split(':')[1])) {
|
||||
let myfa = buildMacroSyntType(mymt)
|
||||
for (fa in myfa) {
|
||||
//parsedquery.where.at(-1).triples.push(myfa[fa])
|
||||
parsedquery.where.push(myfa[fa])
|
||||
}
|
||||
}
|
||||
else{
|
||||
else {
|
||||
|
||||
var tmptr=macrotipi_sint[typeS].split(';')
|
||||
for (indttr in tmptr){
|
||||
var tmptr = macrotipi_sint[typeS].split(';')
|
||||
for (indttr in tmptr) {
|
||||
myf = buildsyntClause(tmptr[indttr])
|
||||
if (myf != '')
|
||||
parsedquery.where.at(-1).triples.push(myf)
|
||||
|
@ -802,8 +907,8 @@ function getStringFilter(filter, opzione) {
|
|||
//costruzione filtri per query
|
||||
|
||||
//filtri contesto
|
||||
function buildFilterContextJson( contextcantiche) {
|
||||
var resfilters=[]
|
||||
function buildFilterContextJson(contextcantiche) {
|
||||
var resfilters = []
|
||||
|
||||
var contextgroup = ` {
|
||||
"type": "group",
|
||||
|
@ -866,7 +971,7 @@ function buildFilterContextJson( contextcantiche) {
|
|||
"value": "http://www.w3.org/2001/XMLSchema#short"
|
||||
}
|
||||
}`
|
||||
var canticacontexttemplate= `
|
||||
var canticacontexttemplate = `
|
||||
{
|
||||
"termType": "Literal",
|
||||
"value": "na",
|
||||
|
@ -878,52 +983,52 @@ function buildFilterContextJson( contextcantiche) {
|
|||
}`
|
||||
|
||||
|
||||
var canticheliteral=['Inferno', 'Purgatorio', 'Paradiso']
|
||||
var canticheliteral = ['Inferno', 'Purgatorio', 'Paradiso']
|
||||
|
||||
for (var ky in contextcantiche){
|
||||
var contextfilter=[]
|
||||
var cantichecontextfilter=[]
|
||||
var cgroup=JSON.parse(contextgroup)
|
||||
if(contextcantiche.hasOwnProperty(ky)){
|
||||
for (var ky in contextcantiche) {
|
||||
var contextfilter = []
|
||||
var cantichecontextfilter = []
|
||||
var cgroup = JSON.parse(contextgroup)
|
||||
if (contextcantiche.hasOwnProperty(ky)) {
|
||||
///console.log(`test ${ky} : ${contextcantiche[ky]}`)
|
||||
|
||||
var cfilter=JSON.parse(canticacontexttemplate);
|
||||
var cfilter = JSON.parse(canticacontexttemplate);
|
||||
|
||||
cfilter['value']=canticheliteral[ky-1]
|
||||
cfilter['value'] = canticheliteral[ky - 1]
|
||||
cantichecontextfilter.push(cfilter)
|
||||
for (var kval in contextcantiche[ky]){
|
||||
for (var kval in contextcantiche[ky]) {
|
||||
//console.log(contextcantiche[ky][kval])
|
||||
var myfilter= JSON.parse(itemcontexttemplate);
|
||||
myfilter['value']=contextcantiche[ky][kval].toString()
|
||||
var myfilter = JSON.parse(itemcontexttemplate);
|
||||
myfilter['value'] = contextcantiche[ky][kval].toString()
|
||||
contextfilter.push(myfilter)
|
||||
}
|
||||
}
|
||||
if (contextfilter.length>0){
|
||||
var filters=JSON.parse(filtercontexttemplate)
|
||||
var cantichefilters=JSON.parse(filtercontextcantichetemplate)
|
||||
if (contextfilter.length > 0) {
|
||||
var filters = JSON.parse(filtercontexttemplate)
|
||||
var cantichefilters = JSON.parse(filtercontextcantichetemplate)
|
||||
filters['expression']['args'].push(contextfilter)
|
||||
|
||||
//resfilters.push(filters)
|
||||
cgroup.patterns.splice(0,0,filters)
|
||||
cgroup.patterns.splice(0, 0, filters)
|
||||
cantichefilters['expression']['args'].push(cantichecontextfilter)
|
||||
|
||||
cgroup.patterns.splice(0,0, cantichefilters)
|
||||
cgroup.patterns.splice(0, 0, cantichefilters)
|
||||
resfilters.push(cgroup)
|
||||
}
|
||||
|
||||
}
|
||||
var uniontmp=`{"type": "union", "patterns":[]}`
|
||||
var tmpres=[]
|
||||
jsunion=JSON.parse(uniontmp)
|
||||
if (resfilters.length>1){
|
||||
var uniontmp = `{"type": "union", "patterns":[]}`
|
||||
var tmpres = []
|
||||
jsunion = JSON.parse(uniontmp)
|
||||
if (resfilters.length > 1) {
|
||||
|
||||
for (filter in resfilters){
|
||||
for (filter in resfilters) {
|
||||
jsunion.patterns.push(resfilters[filter])
|
||||
}
|
||||
tmpres.push(jsunion)
|
||||
return (tmpres)
|
||||
}
|
||||
if (resfilters.length>0){
|
||||
if (resfilters.length > 0) {
|
||||
|
||||
tmpres.push(resfilters[0].patterns[1])
|
||||
tmpres.push(resfilters[0].patterns[0])
|
||||
|
@ -985,15 +1090,15 @@ function buildFilterStatement(target, filter, opzione) {
|
|||
}
|
||||
|
||||
|
||||
//"hasClauseType:Comparativa"
|
||||
//
|
||||
//?cl syntit:hasClauseType ?tipoSint .
|
||||
//?tipoSint rdf:type syntit:ClauseSubType ;
|
||||
// ecrm:P127_has_broader_term syntit:Comparativa .
|
||||
//"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":[]}`
|
||||
var trm1=`{
|
||||
function buildMacroSyntType(sttmnt) {
|
||||
var uniontmpms = `{"type": "union", "patterns":[]}`
|
||||
var trm1 = `{
|
||||
"type": "bgp",
|
||||
"triples":
|
||||
[
|
||||
|
@ -1013,16 +1118,16 @@ function buildMacroSyntType(sttmnt){
|
|||
"predicate": {"termType":"NamedNode"},
|
||||
"object": {"termType": "NamedNode"}}`
|
||||
|
||||
var t1m= `{"subject": {"termType": "Variable","value": "cl"},
|
||||
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"},
|
||||
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"},
|
||||
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 res = []
|
||||
|
||||
|
||||
|
||||
|
@ -1035,10 +1140,10 @@ function buildMacroSyntType(sttmnt){
|
|||
statement['predicate']['value'] = predicate
|
||||
statement['object']['value'] = obj
|
||||
|
||||
var grstmt=JSON.parse(trm1)
|
||||
grstmt['triples'][2]['object']['value']=obj
|
||||
var grstmt = JSON.parse(trm1)
|
||||
grstmt['triples'][2]['object']['value'] = obj
|
||||
|
||||
var unionst=JSON.parse(uniontmpms)
|
||||
var unionst = JSON.parse(uniontmpms)
|
||||
unionst['patterns'].push(grstmt)
|
||||
unionst['patterns'].push(statement)
|
||||
res.push(unionst)
|
||||
|
@ -1091,22 +1196,22 @@ function buildsubcategoryClause(sttmnt) {
|
|||
}
|
||||
//GESTIONE CITAZIONI/COMMENTI
|
||||
//return JSON object
|
||||
function getVersiConCitazioniJson(canticapar='', cantopar=''){
|
||||
let citcantiche=['Inferno','Purgatorio','Paradiso']
|
||||
if (canticapar==''){
|
||||
function getVersiConCitazioniJson(canticapar = '', cantopar = '') {
|
||||
let citcantiche = ['Inferno', 'Purgatorio', 'Paradiso']
|
||||
if (canticapar == '') {
|
||||
citazioni.map(function(item) {
|
||||
console.log(item['Cantica']+', '+item['Canto']+', '+item['Verso'].split('-')[0]);
|
||||
console.log(item['Cantica'] + ', ' + item['Canto'] + ', ' + item['Verso'].split('-')[0]);
|
||||
})
|
||||
return
|
||||
}
|
||||
var citazionitemp={}
|
||||
var citazionitemp = {}
|
||||
citazioni.map(function(item) {
|
||||
if (item['Cantica']==canticapar && item['Canto']==cantopar){
|
||||
if (item['Cantica'] == canticapar && item['Canto'] == cantopar) {
|
||||
|
||||
let tca=item['Canto']
|
||||
let tca = item['Canto']
|
||||
if (tca.startsWith('0'))
|
||||
tca=tca.replace('0','')
|
||||
let citid=(citcantiche.indexOf(item['Cantica'])+1).toString()+'_'+tca+'_'+item['Verso']//.split('-')[0]
|
||||
tca = tca.replace('0', '')
|
||||
let citid = (citcantiche.indexOf(item['Cantica']) + 1).toString() + '_' + tca + '_' + item['Verso']//.split('-')[0]
|
||||
//console.log(citid)
|
||||
var commentsItem = {}
|
||||
commentsItem['verso'] = citid;
|
||||
|
@ -1126,67 +1231,67 @@ function getVersiConCitazioniJson(canticapar='', cantopar=''){
|
|||
commentsItem['TitoloFonteCitazione'] = item['TiFo'];
|
||||
commentsItem['VersoCitazione'] = item['Verso'];
|
||||
|
||||
if (item['AC']==''){
|
||||
commentsItem['AutoreCitazione'] ='autore'
|
||||
if (item['AC'] == '') {
|
||||
commentsItem['AutoreCitazione'] = 'autore'
|
||||
}
|
||||
|
||||
if (item['TiCi']=='no'){
|
||||
commentsItem['TipoCitazione'] =''
|
||||
if (item['TiCi'] == 'no') {
|
||||
commentsItem['TipoCitazione'] = ''
|
||||
}
|
||||
else{
|
||||
commentsItem['TipoCitazione'] =item['TiCi']
|
||||
else {
|
||||
commentsItem['TipoCitazione'] = item['TiCi']
|
||||
}
|
||||
//'CEP', 'CIM', 'CTE', 'CMO', 'CST', 'CTO'
|
||||
|
||||
if (item['CEP']=='no'){
|
||||
commentsItem['CitEpisodi'] =''
|
||||
if (item['CEP'] == 'no') {
|
||||
commentsItem['CitEpisodi'] = ''
|
||||
}
|
||||
else{
|
||||
commentsItem['CitEpisodi'] =item['CEP']
|
||||
else {
|
||||
commentsItem['CitEpisodi'] = item['CEP']
|
||||
}
|
||||
|
||||
if (item['CIM']=='no'){
|
||||
commentsItem['CitImmagini'] =''
|
||||
if (item['CIM'] == 'no') {
|
||||
commentsItem['CitImmagini'] = ''
|
||||
}
|
||||
else{
|
||||
commentsItem['CitImmagini'] =item['CIM']
|
||||
else {
|
||||
commentsItem['CitImmagini'] = item['CIM']
|
||||
}
|
||||
|
||||
if (item['CTE']=='no'){
|
||||
commentsItem['CitTeorie'] =''
|
||||
if (item['CTE'] == 'no') {
|
||||
commentsItem['CitTeorie'] = ''
|
||||
}
|
||||
else{
|
||||
commentsItem['CitTeorie'] =item['CTE']
|
||||
else {
|
||||
commentsItem['CitTeorie'] = item['CTE']
|
||||
}
|
||||
|
||||
if (item['CMO']=='no'){
|
||||
commentsItem['CitMotivi'] =''
|
||||
if (item['CMO'] == 'no') {
|
||||
commentsItem['CitMotivi'] = ''
|
||||
}
|
||||
else{
|
||||
commentsItem['CitMotivi'] =item['CMO']
|
||||
else {
|
||||
commentsItem['CitMotivi'] = item['CMO']
|
||||
}
|
||||
|
||||
if (item['CST']=='no'){
|
||||
commentsItem['CitStilemi'] =''
|
||||
if (item['CST'] == 'no') {
|
||||
commentsItem['CitStilemi'] = ''
|
||||
}
|
||||
else{
|
||||
commentsItem['CitStilemi'] =item['CST']
|
||||
else {
|
||||
commentsItem['CitStilemi'] = item['CST']
|
||||
}
|
||||
|
||||
if (item['CTO']=='no'){
|
||||
commentsItem['CitTopografie'] =''
|
||||
if (item['CTO'] == 'no') {
|
||||
commentsItem['CitTopografie'] = ''
|
||||
}
|
||||
else{
|
||||
commentsItem['CitTopografie'] =item['CTO']
|
||||
else {
|
||||
commentsItem['CitTopografie'] = item['CTO']
|
||||
}
|
||||
|
||||
if (citazionitemp.hasOwnProperty(citid)){
|
||||
if (citazionitemp.hasOwnProperty(citid)) {
|
||||
citazionitemp[citid].push(commentsItem)
|
||||
}
|
||||
else{
|
||||
var tmpar=[]
|
||||
else {
|
||||
var tmpar = []
|
||||
tmpar.push(commentsItem)
|
||||
citazionitemp[citid]=tmpar
|
||||
citazionitemp[citid] = tmpar
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1306,12 +1411,12 @@ function getVersiConCitazioniJson(canticapar='', cantopar=''){
|
|||
|
||||
//TEMPORANEAMENTE: gestione del grafo quando viene chiusa la finestra dal bottone, dovebbe essere spostato
|
||||
const myiframe = document.getElementsByClassName("minimap__content");
|
||||
function resetGraphStruct(){
|
||||
function resetGraphStruct() {
|
||||
|
||||
var periodograph=document.getElementById("periodograph");
|
||||
if (periodograph!=null){
|
||||
let showngr=document.getElementById("periodograph").getAttribute('name').split("_")
|
||||
var tmpsent=showngr[0]+"_"+showngr[1]+"_s_"+showngr[2]
|
||||
var periodograph = document.getElementById("periodograph");
|
||||
if (periodograph != null) {
|
||||
let showngr = document.getElementById("periodograph").getAttribute('name').split("_")
|
||||
var tmpsent = showngr[0] + "_" + showngr[1] + "_s_" + showngr[2]
|
||||
periodograph.parentNode.removeChild(periodograph);
|
||||
|
||||
//var sentence = document.getElementsByClassName(lsentid);
|
||||
|
@ -1320,7 +1425,7 @@ function resetGraphStruct(){
|
|||
for (let i = 0; i < sentence.length; i++) {
|
||||
//var matches = listaClausoleRisultato.filter(s => s.includes(sentence[i].classList[0]));
|
||||
sentence[i].classList.remove('font-italic');
|
||||
if (selectedVista!='frasi' && !listaPeriodiRisultato.includes(tmpsent))
|
||||
if (selectedVista != 'frasi' && !listaPeriodiRisultato.includes(tmpsent))
|
||||
sentence[i].style.removeProperty('color');
|
||||
|
||||
sentence[i].classList.remove('font-weight-normal');
|
||||
|
@ -1336,7 +1441,7 @@ function resetGraphStruct(){
|
|||
var iframeSentence = iframeDocument.getElementsByClassName(tmpsent);
|
||||
for (let i = 0; i < iframeSentence.length; i++) {
|
||||
iframeSentence[i].classList.remove('font-italic');
|
||||
if (selectedVista!='frasi')
|
||||
if (selectedVista != 'frasi')
|
||||
iframeSentence[i].style.removeProperty('color');
|
||||
|
||||
iframeSentence[i].classList.remove('font-weight-normal');
|
||||
|
@ -1344,7 +1449,7 @@ function resetGraphStruct(){
|
|||
|
||||
emptyStructCard()
|
||||
|
||||
if (tmpsent==lsentid){
|
||||
if (tmpsent == lsentid) {
|
||||
|
||||
return true
|
||||
}
|
||||
|
@ -1774,7 +1879,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']
|
||||
|
||||
var macrotipi_sint =
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue