<commit_before>#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <assert.h>
#include <errno.h>
#include <getopt.h>
#include <limits.h>
#include "nick_map.h"

#define DEF_OUTPUT "stdout"

static int verbose = 0;

static void print_usage(void)
{
	fprintf(stderr, "\n"
			"Usage: bntools align [options] <map_a> [<map_b>]\n"
			"\n"
			"Options:\n"
			"   <map_a/b>   input map file(s), in tsv/cmap/bnx format\n"
			"   -v          show verbose message\n"
			"\n");
}

#define TOLERANCE .1
#define MIN_SCORE 2

struct node {
	int score;
	int delta_i;
	int delta_j;
};

static inline int min(int a, int b) { return (a < b ? a : b); }
static inline int max(int a, int b) { return (a > b ? a : b); }

static int align(const struct fragment *fa, const struct fragment *fb)
{
	struct node *m;
	size_t size, i, j, delta_i, delta_j;
	size_t *result_a, *result_b, result_a_count, result_b_count;
	size_t w = fa->nicks.size;
	size_t h = fb->nicks.size;

	size = sizeof(struct node) * w * h;
	m = malloc(size);
	if (!m) {
		fprintf(stderr, "Error: Failed to allocate memory for DP matrix!\n");
		return -ENOMEM;
	}
	memset(m, 0, size);

	if (verbose) {
		fprintf(stdout, "align between '%s' and '%s'\n", fa->name, fb->name);
	}

	for (j = 1; j < h; ++j) {
		for (i = 1; i < w; ++i) {
			size_t index = j * w + i;

			for (delta_j = 1; delta_j < j; ++j) {
				int frag_b = fb->nicks.data[j].pos - fb->nicks.data[j - delta_j].pos;

				for (delta_i = 1; delta_i < i; ++i) {
					int frag_a = fa->nicks.data[i].pos - fa->nicks.data[i - delta_i].pos;
<commit_msg>Remove unused function.<commit_after>#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <assert.h>
#include <errno.h>
#include <getopt.h>
#include <limits.h>
#include "nick_map.h"

#define DEF_OUTPUT "stdout"

static int verbose = 0;

static void print_usage(void)
{
	fprintf(stderr, "\n"
			"Usage: bntools align [options] <map_a> [<map_b>]\n"
			"\n"
			"Options:\n"
			"   <map_a/b>   input map file(s), in tsv/cmap/bnx format\n"
			"   -v          show verbose message\n"
			"\n");
}

#define TOLERANCE .1
#define MIN_SCORE 2

struct node {
	int score;
	int delta_i;
	int delta_j;
};

static inline int min(int a, int b) { return (a < b ? a : b); }

static int align(const struct fragment *fa, const struct fragment *fb)
{
	struct node *m;
	size_t size, i, j, delta_i, delta_j;
	size_t *result_a, *result_b, result_a_count, result_b_count;
	size_t w = fa->nicks.size;
	size_t h = fb->nicks.size;

	size = sizeof(struct node) * w * h;
	m = malloc(size);
	if (!m) {
		fprintf(stderr, "Error: Failed to allocate memory for DP matrix!\n");
		return -ENOMEM;
	}
	memset(m, 0, size);

	if (verbose) {
		fprintf(stdout, "align between '%s' and '%s'\n", fa->name, fb->name);
	}

	for (j = 1; j < h; ++j) {
		for (i = 1; i < w; ++i) {
			size_t index = j * w + i;

			for (delta_j = 1; delta_j < j; ++j) {
				int frag_b = fb->nicks.data[j].pos - fb->nicks.data[j - delta_j].pos;

				for (delta_i = 1; delta_i < i; ++i) {
					int frag_a = fa->nicks.data[i].pos - fa->nicks.data[i - delta_i].pos;

{'fraction_non_alphanumeric': 0.17501626545217958, 'fraction_numerical': 0.00520494469746259, 'mean_word_length': 3.2181069958847734, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 40, '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': '468542', 'n_tokens_mistral': 1387, 'n_tokens_neox': 1288, 'n_words': 366}