<commit_before>var prohibit = function(table, gender, age) {
	var prohibit_drug = {};
	for (index in reason_type_name) {
		var result = {};
		var items = table.items;
		if (!items || items.length === 0) return result;
		console.info("prohibit, gender=" + gender + ", and age = " + age);
		if (gender == "女" && age > 18 && age <= 35) {
			match(result, {value: ['青年女性(18~35岁)']}, index);
		}
		if (age < 18) {
			match(result, {value: ['儿童及青少年(小于18岁)']}, index);
		}
		for(var i = 0;i < items.length; i++) {
			match(result, items[i], index);
		}
		prohibit_drug[reason_type_name[index]] = result;
		// console.info("prohibit_drug=" + JSON.stringify(prohibit_drug));
    }
    // console.info("prohibit_drug=" + JSON.stringify(prohibit_drug));
    return prohibit_drug;
};
 
var recomm = function(prohibit_list) {
	var rec_drug = [];

	for (var i = 0;i<all_rec_list["抗凝药"].length;i++) {
		var rec_one = all_rec_list["抗凝药"][i];
		console.info("rec_one=>" + rec_one);
		var prohibit_item_list = prohibit_list['抗凝药'];
		console.info("prohibit_item_list=>" + JSON.stringify(prohibit_item_list));
		for (var j = 0; j < prohibit_item_list.length;j++) {
			if (prohibit_item_list[j].contains(rec_one)) {
				rec_one = null;
				break;
			}
		}
		if (rec_one) {
			rec_drug.push(rec_one);
		}
	}
	console.info("drugs=>" + JSON.stringify(rec_drug));<commit_msg>bug fixed<commit_after>var prohibit = function(table, gender, age) {
	var prohibit_drug = {};
	for (index in reason_type_name) {
		var result = {};
		var items = table.items;
		if (!items || items.length === 0) return result;
		console.info("prohibit, gender=" + gender + ", and age = " + age);
		if (gender == "女" && age > 18 && age <= 35) {
			match(result, {value: ['青年女性(18~35岁)']}, index);
		}
		if (age < 18) {
			match(result, {value: ['儿童及青少年(小于18岁)']}, index);
		}
		for(var i = 0;i < items.length; i++) {
			match(result, items[i], index);
		}
		prohibit_drug[reason_type_name[index]] = result;
		// console.info("prohibit_drug=" + JSON.stringify(prohibit_drug));
    }
    // console.info("prohibit_drug=" + JSON.stringify(prohibit_drug));
    return prohibit_drug;
};
 
var recomm = function(prohibit_list) {
	var rec_drug = [];

	for (var i = 0;i<all_rec_list["抗凝药"].length;i++) {
		var rec_one = all_rec_list["抗凝药"][i];
		console.info("rec_one=>" + rec_one);
		var prohibit_item_list = prohibit_list['抗凝药'];
		console.info("prohibit_item_list=>" + JSON.stringify(prohibit_item_list));
		for (var key in prohibit_item_list) {
			var plist = prohibit_item_list[key];
			for (var j = 0; j<plist.length; j++) {
				if (plist[j] === rec_one) {
				rec_one = null;
				break;
				}
			}
		}
		if (rec_one) {
			rec_drug.push(rec_one);
		}
	}
	console.info("drugs=>" + JSON.stringify(rec_drug));
{'fraction_non_alphanumeric': 0.185978932074101, 'fraction_numerical': 0.011623683254631312, 'mean_word_length': 4.025547445255475, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 11, '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': '1419876', 'n_tokens_mistral': 1259, 'n_tokens_neox': 1094, 'n_words': 203}