<commit_before>package main

import (
	"regexp"
	"testing"
)

func TestColumnAddressValue(t *testing.T) {
	var tests = []struct {
		inColumn TypedColumn
		outValue string
	}{
		{
			inColumn: ColumnAddressContinent{},
			outValue: "^[a-zA-Z ]+$",
		},
		{
			inColumn: ColumnAddressCountry{},
			outValue: "^[a-zA-Z ,]+$",
		},
		{
			inColumn: ColumnAddressCity{},
			outValue: "^[- a-zA-Z.]+$",
		},
		{
			inColumn: ColumnAddressPhone{},
			outValue: "^[0-9-]+$",
		},
		{
			inColumn: ColumnAddressState{},
			outValue: "^[- a-zA-Z.()]+$",
		},
		{
			inColumn: ColumnAddressStreet{},
			outValue: "^[- a-zA-Z.0-9]+$",
		},
		{
			inColumn: ColumnAddressZip{},
			outValue: "^[0-9]+$",
		},
	}

	for _, test := range tests {
		actual, _ := test.inColumn.Value(nil)
		matched, _ := regexp.MatchString(test.outValue, actual)
		if !matched {
			t.Fatalf("Expected: %v\nActual: %v", test.outValue, actual)
		}
	}
}
<commit_msg>test: fix test regex for column: `address.country` and `address.state`<commit_after>package main

import (
	"regexp"
	"testing"
)

func TestColumnAddressValue(t *testing.T) {
	var tests = []struct {
		inColumn TypedColumn
		outValue string
	}{
		{
			inColumn: ColumnAddressContinent{},
			outValue: "^[a-zA-Z ]+$",
		},
		{
			inColumn: ColumnAddressCountry{},
			outValue: "^[a-zA-Z ,()]+$",
		},
		{
			inColumn: ColumnAddressCity{},
			outValue: "^[- a-zA-Z.]+$",
		},
		{
			inColumn: ColumnAddressPhone{},
			outValue: "^[0-9-]+$",
		},
		{
			inColumn: ColumnAddressState{},
			outValue: "^[- a-zA-Z.]+$",
		},
		{
			inColumn: ColumnAddressStreet{},
			outValue: "^[- a-zA-Z.0-9]+$",
		},
		{
			inColumn: ColumnAddressZip{},
			outValue: "^[0-9]+$",
		},
	}

	for _, test := range tests {
		actual, _ := test.inColumn.Value(nil)
		matched, _ := regexp.MatchString(test.outValue, actual)
		if !matched {
			t.Fatalf("Expected: %v\nActual: %v", test.outValue, actual)
		}
	}
}

{'fraction_non_alphanumeric': 0.20617477760334904, 'fraction_numerical': 0.006279434850863423, 'mean_word_length': 3.2583518930957682, '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': '75561', 'n_tokens_mistral': 887, 'n_tokens_neox': 751, 'n_words': 126}