<commit_before>#include "map.h"
#include <stdio.h>
#include <stdlib.h>

int main()
{
	map m;
	int items_number = 10;
	map_item items[items_number];

	char *keys[] = {"<KEY>"};
	char *values[] = {"foo", "bar", "toto", "tata", "something", "10", "truc", "3.14", "moi", "vous"};

	int i;
	for (i = 0; i < items_number; ++i) {
		//~items[i] = (map_item) calloc(1, sizeof(map_item));
		items[i].index = i;
		items[i].key = keys[i];
		items[i].item = values[i];
	}

	//~m = (map) calloc(1, sizeof(map));
	m.items = items;
	m.items_number = items_number;

	printf("%s\n", (char *) map_get_entry("aaa", &m));
	printf("%s %s\n", m.items[0].key, (char *) m.items[0].item);
	printf("%s\n", (char *) map_get_entry("bbb", &m));
	printf("%s\n", (char *) map_get_entry("uuu", &m));

	return 0;
}<commit_msg>tests added for an unexisting value<commit_after>#include "map.h"
#include <stdio.h>
#include <stdlib.h>

int main()
{
	map m;
	int items_number = 10;
	map_item items[items_number];
	char *unknown;

	char *keys[] = {"<KEY>"};
	char *values[] = {"foo", "bar", "toto", "tata", "something", "10", "truc", "3.14", "moi", "vous"};

	int i;
	for (i = 0; i < items_number; ++i) {
		//~items[i] = (map_item) calloc(1, sizeof(map_item));
		items[i].index = i;
		items[i].key = keys[i];
		items[i].item = values[i];
	}

	//~m = (map) calloc(1, sizeof(map));
	m.items = items;
	m.items_number = items_number;

	printf("%s\n", (char *) map_get_entry("aaa", &m));
	printf("%s\n", (char *) map_get_entry("iii", &m));
	unknown = (char *) map_get_entry("uuu", &m);
	if (unknown != NULL) {
		printf("%s\n", unknown);
	}
	else {
		printf("'uuu' is not in the map\n");
	}

	return 0;
}
{'fraction_non_alphanumeric': 0.2503015681544029, 'fraction_numerical': 0.014475271411338963, 'mean_word_length': 4.2834394904458595, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 9, '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': '3640677', 'n_tokens_mistral': 757, 'n_tokens_neox': 714, 'n_words': 164}