<commit_before>package util

import (
	"os"
	"time"

	"github.com/briandowns/spinner"
)

var (
	SpinnerSymbol int = 14
)

type Spinner struct {
	*spinner.Spinner

	Text string
}

func NewSpinner(text string) *Spinner {
	return &Spinner{
		Spinner: spinner.New(spinner.CharSets[SpinnerSymbol], 100*time.Millisecond),
		Text:    text,
	}
}

func (s *Spinner) Start() {
	s.Spinner.Writer = os.Stderr
	if len(s.Text) > 0 {
		s.Suffix = " " + s.Text
	}
	s.Spinner.Start()
}

func (s *Spinner) Stop() {
	s.Spinner.Stop()
}<commit_msg>Add \r to spinner prefix<commit_after>package util

import (
	"os"
	"time"

	"github.com/briandowns/spinner"
)

var (
	SpinnerSymbol int = 14
)

type Spinner struct {
	*spinner.Spinner

	Text string
}

func NewSpinner(text string) *Spinner {
	return &Spinner{
		Spinner: spinner.New(spinner.CharSets[SpinnerSymbol], 100*time.Millisecond),
		Text:    text,
	}
}

func (s *Spinner) Start() {
	s.Spinner.Writer = os.Stderr
	s.Spinner.Prefix = "\r"
	if len(s.Text) > 0 {
		s.Suffix = " " + s.Text
	}
	s.Spinner.Start()
}

func (s *Spinner) Stop() {
	s.Spinner.Stop()
}
{'fraction_non_alphanumeric': 0.15293040293040294, 'fraction_numerical': 0.01098901098901099, 'mean_word_length': 3.611814345991561, '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': '3776894', 'n_tokens_mistral': 489, 'n_tokens_neox': 465, 'n_words': 94}