<commit_before>package phrase

import "math/rand"

const (
	DefaultRandChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 -./~"
)

type Rand struct {
	Chars  string
	Length int
}

func (r *Rand) Phrase() string {
	if r.Chars == "" {
		r.Chars = DefaultRandChars
	}
	nChars := len(r.Chars)
	var b []byte
	for i := 0; i < r.Length; i++ {
		b = append(b, r.Chars[rand.Intn(nChars)])<commit_msg>s/nChars/n/ -- more concise<commit_after>package phrase

import "math/rand"

const (
	DefaultRandChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 -./~"
)

type Rand struct {
	Chars  string
	Length int
}

func (r *Rand) Phrase() string {
	if r.Chars == "" {
		r.Chars = DefaultRandChars
	}
	n := len(r.Chars)
	var b []byte
	for i := 0; i < r.Length; i++ {
		b = append(b, r.Chars[rand.Intn(n)])
{'fraction_non_alphanumeric': 0.1461352657004831, 'fraction_numerical': 0.026570048309178744, 'mean_word_length': 3.905325443786982, 'pattern_counts': {'":': 0, '<': 5, '<?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': '7007455', 'n_tokens_mistral': 396, 'n_tokens_neox': 345, 'n_words': 75}