Commit efea6a63 authored by PkSM3's avatar PkSM3

bigraphs parsing

parent 71907a95
......@@ -29,8 +29,20 @@ var mainfile = ["db.json"];
// var corpusesList = {} // garg exclusive -> corpus comparison
// getUrlParam.file = "data/testgraph.json";
if($("#graphid").length>0) // just Garg
getUrlParam.file = window.location.origin+"/"+$("#graphid").html(); // just Garg
if( isUndef(getUrlParam.field1) && isUndef(getUrlParam.field2) ) {
if($("#graphid").length>0) {
getUrlParam.file = window.location.origin+"/"+$("#graphid").html(); // just Garg
}
} else {
var current_url = window.location.origin+window.location.pathname+window.location.search
getUrlParam.file = current_url.replace(/project(.*?)corpus/g, "api/corpus").replace("explorer?","graph?")
}
// if($("#graphid").length>0) // just Garg
// getUrlParam.file = window.location.origin+"/"+$("#graphid").html(); // just Garg
var corpusesList = {}
var Clusters = [];
......
......@@ -516,7 +516,8 @@ function scanJSON( data ) {
// Level-00
// for {1,2}partite graphs
function dictfyJSON( data , categories ) {
console.clear()
console.log("IN DICTIFY JSON")
var catDict = {}
var catCount = {}
for(var i in categories) catDict[categories[i]] = i;
......@@ -572,7 +573,7 @@ function dictfyJSON( data , categories ) {
edge.weight = weight;
edge.type = type;
if (nodes[source] && nodes[target]) {
if ( (nodes[source] && nodes[target]) ) {
idS=nodes[source].type;
idT=nodes[target].type;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment