<commit_before>package matcher

import (
	"fmt"
	"regexp"
	"strings"
)

func fuzzify(input string) string {
	chars := strings.Split(input, "")
	fuzzy := ".*" + strings.Join(chars, ".*")
	fmt.Println(fuzzy)
	return fuzzy
}

func Match(input string, list []string) []string {
	pattern := regexp.MustCompile("(?i)" + fuzzify(input))
	matches := new([]string)

	for _, dir := range list {
		match := pattern.MatchString(dir)
		if match {
			matches = append(matches, dir)
		}
	}

	return matches
}
<commit_msg>revert new() string array initialization<commit_after>package matcher

import (
	"fmt"
	"regexp"
	"strings"
)

func fuzzify(input string) string {
	chars := strings.Split(input, "")
	fuzzy := ".*" + strings.Join(chars, ".*")
	fmt.Println(fuzzy)
	return fuzzy
}

func Match(input string, list []string) []string {
	pattern := regexp.MustCompile("(?i)" + fuzzify(input))
	matches := []string{}

	for _, dir := range list {
		match := pattern.MatchString(dir)
		if match {
			matches = append(matches, dir)
		}
	}

	return matches
}

{'fraction_non_alphanumeric': 0.16602316602316602, 'fraction_numerical': 0.0, 'mean_word_length': 4.211055276381909, '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': '1259140', 'n_tokens_mistral': 394, 'n_tokens_neox': 367, 'n_words': 86}