Bachelorarbeit: "Ein Tool zur Erklärung von Datenschutzrichtlinien"
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
/**
|
|
|
|
* These Scripts are the "connectors" to the server
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* *
|
|
|
|
* This function checks if the nlp-server is running
|
|
|
|
*/
|
|
|
|
|
|
|
|
function checkServerStatus(){
|
|
|
|
$.getJSON('http://jt-info.de:5000/info', {
|
|
|
|
}, function(data){
|
|
|
|
return true;
|
|
|
|
}).fail(function() {
|
|
|
|
return false;
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* *
|
|
|
|
* This function sends the policy to the nlp-server and returns the nlp-strukture
|
|
|
|
*
|
|
|
|
* @param contexts json
|
|
|
|
* @return result from the server
|
|
|
|
* */
|
|
|
|
function getSummaryFromServer(contexts){
|
|
|
|
let result = "failed";
|
|
|
|
let err = "error";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
console.log(contexts);
|
|
|
|
$.ajax({
|
|
|
|
type: "GET",
|
|
|
|
url: 'http://jt-info.de:5000/tryspacy',
|
|
|
|
dataType: "json",
|
|
|
|
data: "a="+contexts,
|
|
|
|
async: false,
|
|
|
|
success: function(json){
|
|
|
|
//console.log(json);
|
|
|
|
result = json.answer;
|
|
|
|
} ,
|
|
|
|
error: function(a){
|
|
|
|
return err;
|
|
|
|
}
|
|
|
|
});
|
|
|
|
/*$.ajax({
|
|
|
|
type: "GET",
|
|
|
|
url: 'http://touch.se.uni-hannover.de:443/tryspacy',
|
|
|
|
dataType: "json",
|
|
|
|
data: "a="+contexts,
|
|
|
|
async: false,
|
|
|
|
success: function(json){
|
|
|
|
//console.log(json);
|
|
|
|
result = json.answer;
|
|
|
|
} ,
|
|
|
|
error: function(a){
|
|
|
|
return err;
|
|
|
|
}
|
|
|
|
});*/
|
|
|
|
|
|
|
|
/*$.ajax({
|
|
|
|
type: "GET",
|
|
|
|
url: 'https://touch.se.uni-hannover.de:443/tryspacy',
|
|
|
|
dataType: "json",
|
|
|
|
data: "a="+contexts,
|
|
|
|
async: false,
|
|
|
|
success: function(json){
|
|
|
|
//console.log(json);
|
|
|
|
result = json.answer;
|
|
|
|
} ,
|
|
|
|
error: function(a){
|
|
|
|
return err;
|
|
|
|
}
|
|
|
|
});*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
}
|