<commit_before>package exchange

import (
	"encoding/csv"

	"io"
)

type CSVFile struct {
	lines [][]string
}

func NewCSVFile(r io.Reader) (f *CSVFile, err error) {
	f = new(CSVFile)
	f.lines, err = csv.NewReader(r).ReadAll()
	return
}

func (f *CSVFile) TotalLines() (num int) {
	return len(f.lines)
}

func (f *CSVFile) Line(l int) []string {
	return f[l]
}<commit_msg>exchange: fix csvfile<commit_after>package exchange

import (
	"encoding/csv"

	"io"
)

type CSVFile struct {
	lines [][]string
}

func NewCSVFile(r io.Reader) (f *CSVFile, err error) {
	f = new(CSVFile)
	f.lines, err = csv.NewReader(r).ReadAll()
	return
}

func (f *CSVFile) TotalLines() (num int) {
	return len(f.lines)
}

func (f *CSVFile) Line(l int) []string {
	return f.lines[l]
}
{'fraction_non_alphanumeric': 0.16094986807387862, 'fraction_numerical': 0.0, 'mean_word_length': 4.270833333333333, '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': '724362', 'n_tokens_mistral': 327, 'n_tokens_neox': 317, 'n_words': 80}