<commit_before>﻿using UnityEngine;
using UnityEngine.UI;
using System.IO;
using System.Linq;

namespace Baum2.Editor
{
	public static class EditorUtil
	{
		public static readonly string ImportDirectoryPath = "/Baum2/Import/";

		public static string ToUnityPath(string path)
		{
			path = path.Substring(path.IndexOf("Assets/", System.StringComparison.Ordinal));
			if (path.EndsWith("/", System.StringComparison.Ordinal)) return path.Substring(0, path.Length-1);
			return path;
		}

		public static string GetBaumSpritesPath()
		{
			return GetPath("BaumSprites");
		}

		public static string GetBaumPrefabsPath()
		{
			return GetPath("BaumPrefabs");
		}

		public static string GetBaumFontsPath()
		{
			return GetPath("BaumFonts");
		}

		public static string GetPath(string fileName)
		{
			var files = Directory.GetFiles(Application.dataPath, fileName, SearchOption.AllDirectories);
			if (files.Length > 1)
			{
				files = files.Where(x => !x.Contains("Baum2/Sample")).ToArray();
			}
			if (files.Length > 1)
			{
				Debug.LogErrorFormat("{0}ファイルがプロジェクト内に複数個存在します。", fileName);
			}
			string path = files[0];
			return path.Substring(0, path.Length - fileName.Length);
		}<commit_msg>エラーメッセージ追加<commit_after>﻿using UnityEngine;
using UnityEngine.UI;
using System.IO;
using System.Linq;

namespace Baum2.Editor
{
	public static class EditorUtil
	{
		public static readonly string ImportDirectoryPath = "/Baum2/Import/";

		public static string ToUnityPath(string path)
		{
			path = path.Substring(path.IndexOf("Assets/", System.StringComparison.Ordinal));
			if (path.EndsWith("/", System.StringComparison.Ordinal)) return path.Substring(0, path.Length-1);
			return path;
		}

		public static string GetBaumSpritesPath()
		{
			return GetPath("BaumSprites");
		}

		public static string GetBaumPrefabsPath()
		{
			return GetPath("BaumPrefabs");
		}

		public static string GetBaumFontsPath()
		{
			return GetPath("BaumFonts");
		}

		public static string GetPath(string fileName)
		{
			var files = Directory.GetFiles(Application.dataPath, fileName, SearchOption.AllDirectories);
			if (files.Length > 1)
			{
				files = files.Where(x => !x.Contains("Baum2/Sample")).ToArray();
			}
			if (files.Length > 1)
			{
				Debug.LogErrorFormat("{0}ファイルがプロジェクト内に複数個存在します。", fileName);
			}
			if (files.Length == 0)
			{
				throw new System.ApplicationException(string.Format("{0}ファイルがプロジェクト内に存在しません。", fileName));
			}
			string path = files[0];
			return path.Substring(0, path.Length - fileName.Length);
		}
{'fraction_non_alphanumeric': 0.1261904761904762, 'fraction_numerical': 0.00873015873015873, 'mean_word_length': 4.134419551934827, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '2135641', 'n_tokens_mistral': 1011, 'n_tokens_neox': 872, 'n_words': 171}