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']]);