<commit_before>package main

import (
	"fmt"
	"strings"
)

var defaultFuncs = map[string]interface{}{
	"str": String,
	"dec": Decimal,
	"eq":  Equal,
}

func String(v interface{}) string {
	switch x := v.(type) {
	case string:
		x = strings.Replace(x, `\`, `\\`, -1)
		x = strings.Replace(x, `"`, `\"`, -1)
		return fmt.Sprintf("\"%s\"", x)
	case float64:
		return fmt.Sprintf("\"%f\"", x)
	}
	return ""
}

func Decimal(dec int, v interface{}) string {
	if f, ok := v.(float64); ok {
		fmtstr := fmt.Sprintf("%%.%df", dec)
		return fmt.Sprintf(fmtstr, f)
	}
	return ""
}

func Equal(v1, v2 interface{}) interface{} {
	if v1 == v2 {
		return v1
	}
	return nil
}<commit_msg>Add function for string compare ignoring case<commit_after>package main

import (
	"fmt"
	"strings"
)

var defaultFuncs = map[string]interface{}{
	"str":        String,
	"dec":        Decimal,
	"eq":         Equal,
	"eq_igncase": EqualIgnoreCase,
}

func String(v interface{}) string {
	switch x := v.(type) {
	case string:
		x = strings.Replace(x, `\`, `\\`, -1)
		x = strings.Replace(x, `"`, `\"`, -1)
		return fmt.Sprintf("\"%s\"", x)
	case float64:
		return fmt.Sprintf("\"%f\"", x)
	}
	return ""
}

func Decimal(dec int, v interface{}) string {
	if f, ok := v.(float64); ok {
		fmtstr := fmt.Sprintf("%%.%df", dec)
		return fmt.Sprintf(fmtstr, f)
	}
	return ""
}

func Equal(v1, v2 interface{}) interface{} {
	if v1 == v2 {
		return v1
	}
	return nil
}

func EqualIgnoreCase(s1, s2 string) string {
	if strings.ToLower(s1) == strings.ToLower(s2) {
		return s1
	}
	return ""
}
{'fraction_non_alphanumeric': 0.19909793814432988, 'fraction_numerical': 0.017396907216494846, 'mean_word_length': 3.3623595505617976, 'pattern_counts': {'":': 7, '<': 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': '6968857', 'n_tokens_mistral': 643, 'n_tokens_neox': 613, 'n_words': 155}