<commit_before>﻿using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using CsvHelper;
using CsvHelper.Configuration;

namespace Hidari0415.UstdCsv2Ju
{
	internal class UstdCsvReader
	{
		public static List<MetricRecord> ReadMetricRecords(string path)
		{
			List<MetricRecord> records;

			using (var reader = new CsvReader(new StreamReader(path, Encoding.Default)))
			{
				reader.Configuration.RegisterClassMap<MetricRecordMap>();
				records = reader.GetRecords<MetricRecord>().ToList();
			}
<commit_msg>staticなクラスに変更<commit_after>﻿using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using CsvHelper;
using CsvHelper.Configuration;

namespace Hidari0415.UstdCsv2Ju
{
	internal static class UstdCsvReader
	{
		/// <summary>
		/// Read Metric data from CSV file.
		/// </summary>
		/// <param name="path">a CSV file path</param>
		/// <returns>All data that read from CSV file</returns>
		public static List<MetricRecord> ReadMetricRecords(string path)
		{
			List<MetricRecord> records;

			using (var reader = new CsvReader(new StreamReader(path, Encoding.Default)))
			{
				reader.Configuration.RegisterClassMap<MetricRecordMap>();
				records = reader.GetRecords<MetricRecord>().ToList();
			}

{'fraction_non_alphanumeric': 0.11294117647058824, 'fraction_numerical': 0.00784313725490196, 'mean_word_length': 4.853211009174312, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, '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': '4862808', 'n_tokens_mistral': 442, 'n_tokens_neox': 395, 'n_words': 89}