diff --git a/JL.Core/Freqs/Freq.cs b/JL.Core/Freqs/Freq.cs index 1a905257..d10a371e 100644 --- a/JL.Core/Freqs/Freq.cs +++ b/JL.Core/Freqs/Freq.cs @@ -17,12 +17,11 @@ public sealed class Freq(FreqType type, string name, string path, bool active, i // ReSharper disable once MemberCanBeInternal public int MaxValue { get; set; } = maxValue; - [JsonIgnore] public bool Ready { get; set; } // = false; + public FreqOptions Options { get; set; } = options; #pragma warning disable CA2227 [JsonIgnore] public IDictionary> Contents { get; set; } = FrozenDictionary>.Empty; #pragma warning restore CA2227 - public FreqOptions Options { get; set; } = options; } diff --git a/JL.Core/WordClass/JmdictWordClass.cs b/JL.Core/WordClass/JmdictWordClass.cs index 1e3bf5da..e011a91b 100644 --- a/JL.Core/WordClass/JmdictWordClass.cs +++ b/JL.Core/WordClass/JmdictWordClass.cs @@ -2,11 +2,9 @@ namespace JL.Core.WordClass; -internal sealed class JmdictWordClass(string spelling, string[]? readings, string[] wordClasses) +internal sealed class JmdictWordClass(string spelling, string[] wordClasses, string[]? readings = null) { [JsonPropertyName("S")] public string Spelling { get; set; } = spelling; - - [JsonPropertyName("R")] public string[]? Readings { get; } = readings; - [JsonPropertyName("C")] public string[] WordClasses { get; } = wordClasses; + [JsonPropertyName("R")] public string[]? Readings { get; } = readings; } diff --git a/JL.Core/WordClass/JmdictWordClassUtils.cs b/JL.Core/WordClass/JmdictWordClassUtils.cs index c20bdd49..51de202e 100644 --- a/JL.Core/WordClass/JmdictWordClassUtils.cs +++ b/JL.Core/WordClass/JmdictWordClassUtils.cs @@ -88,13 +88,13 @@ public static Task Serialize() && ((result.Readings is not null && jmdictRecord.Readings is not null && result.Readings.SequenceEqual(jmdictRecord.Readings)) || (result.Readings is null && jmdictRecord.Readings is null)))) { - results.Add(new JmdictWordClass(jmdictRecord.PrimarySpelling, jmdictRecord.Readings, wordClasses)); + results.Add(new JmdictWordClass(jmdictRecord.PrimarySpelling, wordClasses, jmdictRecord.Readings)); } } else { - jmdictWordClassDictionary[key] = [new JmdictWordClass(jmdictRecord.PrimarySpelling, jmdictRecord.Readings, wordClasses)]; + jmdictWordClassDictionary[key] = [new JmdictWordClass(jmdictRecord.PrimarySpelling, wordClasses, jmdictRecord.Readings)]; } } }