From 1b86cb12d61db083691b7da93472bd3f8720b0b7 Mon Sep 17 00:00:00 2001 From: cesare Date: Tue, 21 May 2024 10:27:07 +0200 Subject: [PATCH] queries periodi, in progress --- js/utilsMgr.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/js/utilsMgr.js b/js/utilsMgr.js index 6765f25..9c45844 100644 --- a/js/utilsMgr.js +++ b/js/utilsMgr.js @@ -309,6 +309,7 @@ function buildSPQuery(guiquery) { if (theguiQ['unitaRicerca']=='periodo') { multipleCondSpQuery.where.push(bindConcatStatement) multipleCondSpQuery.where.push(occBindConcatStatement) + if (posBindConcatStatement['expression']['args'].length){ multipleCondSpQuery.where.push(posBindConcatStatement) multipleCondSpQuery.variables.push(JSON.parse(sentencetarget_posVariable)) @@ -473,13 +474,22 @@ function buildStatementClause(clause, parsedquery, whereind, theplace, token) { if (clause['queryText'] != null && clause['queryText'].trim() != "") { - //theplace.push(JSON.parse(unionop)['group']); + var stmt = buildFilterStatement(clause['lemma_forma'], clause['queryText'].trim(), clause['opzioni_testo']) tmpgroup.patterns.push(stmt) tmpgroup.patterns.push(JSON.parse(unionop)['bgp']); - tmpgroup.patterns.at(-1).triples.push(JSON.parse(writtenrepresentation)) + 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{ + tmpgroup.patterns.at(-1).triples.push(JSON.parse(writtenrepresentation)) + } + } + if (clause['typeGramm0'] != null && clause['typeGramm0'] != "all") if (whereind > -1) parsedquery.where[whereind].triples.push(JSON.parse(data21)[clause['typeGramm0']]);