<commit_before><commit_msg>extract table from ndef<commit_after>/* extract table from ndef */
const fs=require("fs");
const ndef=fs.readFileSync("ndef.txt","utf8");
var previd,prev;
var tablecount=0;
const parseNdef=function(id,body){
	if (!body.match(/[└┌┴┬]/))return;
	tablecount++;
	const ref=[];
	const m=body.replace(/(@y[A-Z]+\d+p\d+)/g,function(m,m1){
		ref.push(m);
	});
	if (ref.length==0) {
		//console.log("NO @y",id)
	} else {
		console.log(id+"="+ref.join(","));
	}
	
}
ndef.replace(/(\#\d+\.\d+)/g,function(m,nid,idx){
	if (prev) {
		const body=ndef.substring(prev,idx);
		parseNdef(previd,body);
	}
	previd=nid;
	prev=idx+m.length;
})
console.log(tablecount)
{'fraction_non_alphanumeric': 0.2451708766716196, 'fraction_numerical': 0.005943536404160475, 'mean_word_length': 5.3584905660377355, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6157878', 'n_tokens_mistral': 293, 'n_tokens_neox': 293, 'n_words': 41}