modficato db
This commit is contained in:
parent
3c359a6c03
commit
38351f08f6
|
@ -29,8 +29,8 @@ $(document).ready(function() {
|
|||
|
||||
const sparqlGenerator = sparqljs.Generator;
|
||||
const myEngine = new Comunica.QueryEngine();
|
||||
const sparqlEndpoint = "https://hdnlab1.isti.cnr.it/fuseki/commediaontosintgra/query";
|
||||
//const sparqlEndpoint = "https://hdnlab1.isti.cnr.it/fuseki/CommediaReasoningTest/query";
|
||||
//const sparqlEndpoint = "https://hdnlab1.isti.cnr.it/fuseki/commediaontosintgra/query";
|
||||
const sparqlEndpoint = "https://hdnlab1.isti.cnr.it/fuseki/commedia/query";
|
||||
|
||||
var shownSentenceList = new Set()
|
||||
|
||||
|
@ -1408,7 +1408,7 @@ function resetFrasi(){
|
|||
alert('Digitare una stringa da cercare')
|
||||
return
|
||||
}
|
||||
if (jsonQuery['Clausola0']['lemma_forma'] == 'testo' && jsonQuery['Clausola0']['Attiva'] == 1) {
|
||||
if (jsonQuery['Clausola0']['lemma_forma'] == 'testo' && jsonQuery['Clausola0']['Attiva'] == 1 && jsonQuery['QueryAvanzata'] == 0) {
|
||||
searchwords = jsonQuery['Clausola0']['queryText'].trim().split(' ')
|
||||
var contesto = JSON.parse(jsonQuery['Clausola0']['contesto'])
|
||||
var inf = []
|
||||
|
@ -1482,19 +1482,7 @@ function resetFrasi(){
|
|||
tmpa.push(itm)
|
||||
}
|
||||
fnd=(testo.join(' ').toLowerCase()===tmpa.join(' ') || tmpa.join(' ').startsWith(testo.join(' ').toLowerCase()))
|
||||
/*
|
||||
//console.log(JSON.stringify(testo)+' - '+JSON.stringify(tmpa))
|
||||
fnd= (JSON.stringify(testo)==JSON.stringify(tmpa));
|
||||
*/
|
||||
/*
|
||||
for (var frind=0; frind<testo.length; frind++){
|
||||
var targetSt=forme[ip+frind].split('_')[0].toLowerCase().replace(/[.,\/#!$%\^&\*;:{}=\-_`~()]/g,"")
|
||||
if (testo[frind].toLowerCase()!==targetSt){
|
||||
fnd=false;
|
||||
break
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
if (fnd){
|
||||
//console.log('ipfound: '+forme[ip].split('_')[2]+' - '+forme[(ip+testo.length-1)].split('_')[2])
|
||||
|
||||
|
@ -1955,7 +1943,7 @@ function resetFrasi(){
|
|||
var totResultN=showBadgeInCantica(resultsInCantica)
|
||||
|
||||
//aggiunge badge con totale risultati nel bottone lista risultati
|
||||
var listIcon = '<ion-icon name="list-outline"></ion-icon>';
|
||||
var listIcon = ' <ion-icon name="list-outline"></ion-icon>';
|
||||
if (totResultN>0){
|
||||
$("#headingZero").closest('.card').attr('style', 'display: d-flex;')
|
||||
var spanbadgelista = $('<span />');
|
||||
|
|
14
js/utils.js
14
js/utils.js
|
@ -54,14 +54,14 @@ WHERE {
|
|||
?lent ontolex:lexicalForm ?form;
|
||||
ontolex:canonicalForm ?cf.
|
||||
?cf ontolex:writtenRep ?lm.
|
||||
?fa orl:occurrenceOf ?form;
|
||||
?fa olires:occurrenceOf ?form;
|
||||
olires:OccursInRegion ?reg .
|
||||
?reg olires:fragmentRegionFrom ?pos .
|
||||
}
|
||||
###end
|
||||
###condizioni sintattiche
|
||||
{
|
||||
?clocc orl:occurrenceOf ?cl ;
|
||||
?clocc olires:occurrenceOf ?cl ;
|
||||
ecrm:P148_has_component ?fa ; #condizione join grammaticale sintattica
|
||||
olires:occursInRegion ?frag .
|
||||
|
||||
|
@ -112,7 +112,7 @@ WHERE {
|
|||
###condizioni end
|
||||
###condizioni sintattiche
|
||||
{
|
||||
?clocc orl:occurrenceOf ?cl ;
|
||||
?clocc olires:occurrenceOf ?cl ;
|
||||
ecrm:P148_has_component ?fa ; # join grammaticale sintattica
|
||||
olires:occursInRegion ?frag .
|
||||
|
||||
|
@ -145,12 +145,12 @@ WHERE {
|
|||
?lent ontolex:lexicalForm ?cat; #remove if query_text==''
|
||||
ontolex:canonicalForm ?cf. #remove if query_text==''
|
||||
?cf ontolex:writtenRep ?lm. #remove if query_text==''
|
||||
?fa orl:occurrenceOf ?cat . #remove if query_text==''
|
||||
?fa olires:occurrenceOf ?cat . #remove if query_text==''
|
||||
?clocc ecrm:P148_has_component ?fa . #remove if query_text==''
|
||||
?cl syntit:hasClauseType ?clatype;
|
||||
ecrm:P190_has_symbolic_content ?cltext;
|
||||
syntit:hasClauseFunction ?clafunction.
|
||||
?clocc orl:occurrenceOf ?cl;
|
||||
?clocc olires:occurrenceOf ?cl;
|
||||
olires:occursInRegion ?frag.
|
||||
?frag olires:fragmentRegionFrom ?clfr;
|
||||
olires:fragmentRegionTo ?clto.
|
||||
|
@ -1649,7 +1649,7 @@ var morphgroup = `{"type": "group",
|
|||
"predicate": {"termType": "NamedNode","value": "http://www.w3.org/ns/lemon/ontolex#writtenRep"},
|
||||
"object": {"termType": "Variable","value": "lm"}},
|
||||
{"subject": {"termType": "Variable","value": "fa"},
|
||||
"predicate": {"termType": "NamedNode","value": "https://dantenetwork.it/ontology/orl/current/occurrenceOf"},
|
||||
"predicate": {"termType": "NamedNode","value": "https://dantenetwork.it/ontology/olires/current/occurrenceOf"},
|
||||
"object": {"termType": "Variable","value": "form"}},
|
||||
{"subject": {"termType": "Variable","value": "fa"},
|
||||
"predicate": {"termType": "NamedNode","value": "https://dantenetwork.it/ontology/olires/current/OccursInRegion"},
|
||||
|
@ -1669,7 +1669,7 @@ var syntgroup = ` {
|
|||
"type": "bgp",
|
||||
"triples": [
|
||||
{"subject": {"termType": "Variable","value": "clocc"},
|
||||
"predicate": {"termType": "NamedNode","value": "https://dantenetwork.it/ontology/orl/current/occurrenceOf"},
|
||||
"predicate": {"termType": "NamedNode","value": "https://dantenetwork.it/ontology/olires/current/occurrenceOf"},
|
||||
"object": {"termType": "Variable","value": "cl"}},
|
||||
{"subject": {"termType": "Variable","value": "clocc"},
|
||||
"predicate": {"termType": "NamedNode","value": "http://erlangen-crm.org/current/P148_has_component"},
|
||||
|
|
Loading…
Reference in New Issue