<commit_before>package param

import (
	"html/template"
	"sync"
	"time"
)

func NewMap() *SafeMap {
	return &SafeMap{}
}

type SafeMap struct {
	sync.Map
}

func (s *SafeMap) Set(key, value interface{}) {
	s.Store(key, value)
}

func (s *SafeMap) Get(key interface{}, defaults ...interface{}) interface{} {
	value, ok := s.Load(key)
	if !ok && len(defaults) > 0 {
		if fallback, ok := defaults[0].(func() interface{}); ok {
			return fallback()
		}
		return defaults[0]
	}
	return value
}

func (s *SafeMap) GetOk(key interface{}) (interface{}, bool) {
	return s.Load(key)
}

func (s *SafeMap) Has(key interface{}) bool {
	_, ok := s.Load(key)
	return ok
}

func (s *SafeMap) Delete(key interface{}) {
	s.Delete(key)
}

func (s *SafeMap) Range(f func(key, value interface{}) bool) {
	s.Range(f)
}

func (s *SafeMap) GetOrSet(key, value interface{}) (actual interface{}, loaded bool) {
	return s.LoadOrStore(key, value)
}

func (s *SafeMap) String(key interface{}, defaults ...interface{}) string {
	return AsString(s.Get(key, defaults...))
}

func (s *SafeMap) Split(key interface{}, sep string, limit ...int) StringSlice {
	return Split(s.Get(key), sep, limit...)
}

func (s *SafeMap) Trim(key interface{}, defaults ...interface{}) String {
	return Trim(s.Get(key, defaults...))
}

func (s *SafeMap) HTML(key interface{}, defaults ...interface{}) template.HTML {
	return AsHTML(s.Get(key, defaults...))<commit_msg>Fixed bug<commit_after>package param

import (
	"html/template"
	"sync"
	"time"
)

func NewMap() *SafeMap {
	return &SafeMap{}
}

type SafeMap struct {
	sync.Map
}

func (s *SafeMap) Set(key, value interface{}) {
	s.Store(key, value)
}

func (s *SafeMap) Get(key interface{}, defaults ...interface{}) interface{} {
	value, ok := s.Load(key)
	if !ok && len(defaults) > 0 {
		if fallback, ok := defaults[0].(func() interface{}); ok {
			return fallback()
		}
		return defaults[0]
	}
	return value
}

func (s *SafeMap) GetOk(key interface{}) (interface{}, bool) {
	return s.Load(key)
}

func (s *SafeMap) Has(key interface{}) bool {
	_, ok := s.Load(key)
	return ok
}

func (s *SafeMap) GetOrSet(key, value interface{}) (actual interface{}, loaded bool) {
	return s.LoadOrStore(key, value)
}

func (s *SafeMap) String(key interface{}, defaults ...interface{}) string {
	return AsString(s.Get(key, defaults...))
}

func (s *SafeMap) Split(key interface{}, sep string, limit ...int) StringSlice {
	return Split(s.Get(key), sep, limit...)
}

func (s *SafeMap) Trim(key interface{}, defaults ...interface{}) String {
	return Trim(s.Get(key, defaults...))
}

func (s *SafeMap) HTML(key interface{}, defaults ...interface{}) template.HTML {
	return AsHTML(s.Get(key, defaults...))
{'fraction_non_alphanumeric': 0.18428890543559195, 'fraction_numerical': 0.0022338049143708115, 'mean_word_length': 4.299802761341223, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '4579867', 'n_tokens_mistral': 965, 'n_tokens_neox': 948, 'n_words': 273}