Skip to content

Commit

Permalink
Minor
Browse files Browse the repository at this point in the history
  • Loading branch information
rampaa committed Aug 23, 2024
1 parent 92c80a8 commit f110f3e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion JL.Core/Mining/MiningUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ private static int CalculateHarmonicMean(List<LookupFrequencyResult> lookupFrequ
return pitchAccents.Count > 0 ? pitchAccents : null;
}

private static StringBuilder GetExpressionWithPitchAccent(string expression, byte position)
private static StringBuilder GetExpressionWithPitchAccent(ReadOnlySpan<char> expression, byte position)
{
bool lowPitch = false;
StringBuilder expressionWithPitchAccentStringBuilder = new();
Expand Down
4 changes: 2 additions & 2 deletions JL.Core/Utilities/JapaneseUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public static partial class JapaneseUtils
// CJK Compatibility Forms (FE30–FE4F)
// Halfwidth and Fullwidth Forms (FF00–FFEF)
// Ideographic Symbols and Punctuation (16FE0-16FFF) does not contain any Japanese character, so it's not included in the regex
// Kana Extended-B (1AFF0-1AFFF)
// Kana Extended-B (1AFF0-1AFFF) does not contain any Japanese character, it only includes Taiwanese kana, so it's not included in the regex
// Kana Supplement (1B000-1B0FF)
// Kana Extended-A (1B100-1B12F)
// Small Kana Extension (1B130-1B16F)
Expand All @@ -42,7 +42,7 @@ public static partial class JapaneseUtils
// CJK Compatibility Ideographs Supplement (2F800–2FA1F)
// CJK Unified Ideographs Extension G (30000–3134F)
// CJK Unified Ideographs Extension H (31350–323AF)
[GeneratedRegex(@"[\u00D7\u2000-\u206F\u25A0-\u25FF\u2E80-\u319F\u31C0-\u4DBF\u4E00-\u9FFF\uF900-\uFAFF\uFE30-\uFE4F\uFF00-\uFFEF]|\uD82B[\uDFF0-\uDFFF]|\uD82C[\uDC00-\uDD6F]|\uD83C[\uDE00-\uDEFF]|\uD840[\uDC00-\uDFFF]|[\uD841-\uD868][\uDC00-\uDFFF]|\uD869[\uDC00-\uDEDF]|\uD869[\uDF00-\uDFFF]|[\uD86A-\uD87A][\uDC00-\uDFFF]|\uD87B[\uDC00-\uDE5F]|\uD87E[\uDC00-\uDE1F]|\uD880[\uDC00-\uDFFF]|[\uD881-\uD887][\uDC00-\uDFFF]|\uD888[\uDC00-\uDFAF]", RegexOptions.CultureInvariant)]
[GeneratedRegex(@"[\u00D7\u2000-\u206F\u25A0-\u25FF\u2E80-\u319F\u31C0-\u4DBF\u4E00-\u9FFF\uF900-\uFAFF\uFE30-\uFE4F\uFF00-\uFFEF]|\uD82C[\uDC00-\uDD6F]|\uD83C[\uDE00-\uDEFF]|\uD840[\uDC00-\uDFFF]|[\uD841-\uD868][\uDC00-\uDFFF]|\uD869[\uDC00-\uDEDF]|\uD869[\uDF00-\uDFFF]|[\uD86A-\uD87A][\uDC00-\uDFFF]|\uD87B[\uDC00-\uDE5F]|\uD87E[\uDC00-\uDE1F]|\uD880[\uDC00-\uDFFF]|[\uD881-\uD887][\uDC00-\uDFFF]|\uD888[\uDC00-\uDFAF]", RegexOptions.CultureInvariant)]
public static partial Regex JapaneseRegex();

private static readonly FrozenDictionary<char, string> s_katakanaToHiraganaDict = new Dictionary<char, string>(87)
Expand Down

0 comments on commit f110f3e

Please sign in to comment.