<commit_before>#include <pthread.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>

#include "consumer.h"
#include "kmp.h"
#include "queue.h"
#include "producer.h"

int
main(int argc, char **argv)
{
	char str[] = "char *";

	struct kmp_table table = alloc_table(str);
	fill_table(table);

	struct queue q = alloc_queue(20);

	char str2[] = ".";

	struct produce_arg parg = {&q, str2, 1};
	struct consume_arg carg = {&q, &table};
	
	pthread_t t1;
	pthread_t t2;

	pthread_create(&t1, NULL, &produce, &parg);
	pthread_create(&t2, NULL, &consume, &carg);

	pthread_join(t1, NULL);
	pthread_join(t2, NULL);

	free_queue(&q);
	free_table(table);

	return 0;
}
<commit_msg>Sort of usable main.<commit_after>#include <pthread.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>

#include "consumer.h"
#include "kmp.h"
#include "queue.h"
#include "producer.h"

int
main(int argc, char **argv)
{
	if (argc < 3) {
		return 1;
	}

	struct kmp_table table = alloc_table(argv[1]);
	fill_table(table);

	struct queue q = alloc_queue(20);

	struct produce_arg parg = {&q, argv[2], 1};
	struct consume_arg carg = {&q, &table};
	
	pthread_t t1;
	pthread_t t2;

	pthread_create(&t1, NULL, &produce, &parg);
	pthread_create(&t2, NULL, &consume, &carg);

	pthread_join(t1, NULL);
	pthread_join(t2, NULL);

	free_queue(&q);
	free_table(table);

	return 0;
}

{'fraction_non_alphanumeric': 0.16997792494481237, 'fraction_numerical': 0.01913171449595291, 'mean_word_length': 4.913043478260869, 'pattern_counts': {'":': 0, '<': 12, '<?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': '6446778', 'n_tokens_mistral': 608, 'n_tokens_neox': 573, 'n_words': 135}