<commit_before>window.onload = function(){  
  //load all known languages
// //   Object.keys(lgs).forEach(function(lg) { 
// //                   s = '<option value="'+lg+'">'+lg+'</option>' 
// //       $('#lgselector').append(s)
// //   });

  //set table to first language in selection
//   v = $('#lgselector').children()[0].value 
  updatetable('apc','deu','arabtrans')
}

 

function updatetable(src,target,phon){ 
    var data = json2jsdatatables(src,target,phon)    
//     console.log(data)
    $('#transtable').DataTable( {
    destroy: true,
    data:data,
    language:{ "url": "../assets/notext.json"},       
    pageLength:100, 
    lengthMenu:[10, 25, 50, 75, 100, 500],
    columns: [
        { data: 'ID' },
        { data: 'source' },
	{ data: 'target' },
	{ data: 'phonetic' },
	{ data: 'domain' }
      ]
    } ); 
    } 
    
function json2jsdatatables(source,target,trans){
//  console.log(source,target,trans)
    //return array of arrays [ID, src,target,phonetic, domain]
  var lexemesjson = $.getJSON("/rpb/data/lexemes.json");
  alert(7)
//   console.log(1)
//   console.log(lexemesjson.responseText)
//   console.log(2)<commit_msg>fix paht<commit_after>window.onload = function(){  
  //load all known languages
// //   Object.keys(lgs).forEach(function(lg) { 
// //                   s = '<option value="'+lg+'">'+lg+'</option>' 
// //       $('#lgselector').append(s)
// //   });

  //set table to first language in selection
//   v = $('#lgselector').children()[0].value 
  updatetable('apc','deu','arabtrans')
}

 

function updatetable(src,target,phon){ 
    var data = json2jsdatatables(src,target,phon)    
//     console.log(data)
    $('#transtable').DataTable( {
    destroy: true,
    data:data,
    language:{ "url": "../assets/notext.json"},       
    pageLength:100, 
    lengthMenu:[10, 25, 50, 75, 100, 500],
    columns: [
        { data: 'ID' },
        { data: 'source' },
	{ data: 'target' },
	{ data: 'phonetic' },
	{ data: 'domain' }
      ]
    } ); 
    } 
    
function json2jsdatatables(source,target,trans){
//  console.log(source,target,trans)
    //return array of arrays [ID, src,target,phonetic, domain]
  var lexemesjson = $.getJSON("./data/lexemes.json");
  alert(7)
//   console.log(1)
//   console.log(lexemesjson.responseText)
//   console.log(2)
{'fraction_non_alphanumeric': 0.20069204152249134, 'fraction_numerical': 0.019896193771626297, 'mean_word_length': 2.6714285714285713, 'pattern_counts': {'":': 2, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3332551', 'n_tokens_mistral': 863, 'n_tokens_neox': 801, 'n_words': 138}