-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
82 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
namespace JL.Core.Dicts.JMdict; | ||
|
||
internal ref struct JmdictEntry() | ||
internal readonly ref struct JmdictEntry(int id, List<KanjiElement> kanjiElements, List<ReadingElement> readingElements, List<Sense> senseList) | ||
{ | ||
public int Id { get; set; } = 0; | ||
public List<KanjiElement> KanjiElements { get; } = []; | ||
public List<ReadingElement> ReadingElements { get; } = []; | ||
public List<Sense> SenseList { get; } = []; | ||
public int Id { get; } = id; | ||
public List<KanjiElement> KanjiElements { get; } = kanjiElements; | ||
public List<ReadingElement> ReadingElements { get; } = readingElements; | ||
public List<Sense> SenseList { get; } = senseList; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
namespace JL.Core.Dicts.JMdict; | ||
|
||
internal sealed class KanjiElement | ||
internal sealed class KanjiElement(string keb, List<string> keInfList) | ||
{ | ||
public string Keb { get; set; } = ""; //e.g. 娘 | ||
public List<string> KeInfList { get; } = []; //e.g. Ateji. | ||
// public List<string> KePriList { get; } = [] // e.g. gai1 | ||
public string Keb { get; } = keb; // e.g. 娘 | ||
public List<string> KeInfList { get; } = keInfList; // e.g. Ateji. | ||
// public List<string> KePriList { get; } // e.g. gai1 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
namespace JL.Core.Dicts.JMdict; | ||
|
||
internal sealed class ReadingElement | ||
internal sealed class ReadingElement(string reb, List<string> reRestrList, List<string> reInfList) | ||
{ | ||
public string Reb { get; set; } = ""; // Reading in kana. e.g. むすめ | ||
public List<string> ReRestrList { get; } = []; // ReRestrList = Keb. The reading is only valid for this specific keb. | ||
public List<string> ReInfList { get; } = []; // e.g. gikun | ||
// public bool ReNokanji { get; set; } // = False; // Is kana insufficient to notate the right spelling? | ||
// public List<string> RePriList { get; } = [] // e.g. ichi1 | ||
public string Reb { get; } = reb; // Reading in kana. e.g. むすめ | ||
public List<string> ReRestrList { get; } = reRestrList; // ReRestrList = Keb. The reading is only valid for this specific keb. | ||
public List<string> ReInfList { get; } = reInfList; // e.g. gikun | ||
// public bool ReNokanji { get; } // Is kana insufficient to notate the right spelling? | ||
// public List<string> RePriList { get; } // e.g. ichi1 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,27 @@ | ||
namespace JL.Core.Dicts.JMdict; | ||
|
||
internal sealed class Sense | ||
internal sealed class Sense( | ||
string? sInf, | ||
List<string> stagKList, | ||
List<string> stagRList, | ||
List<string> posList, | ||
List<string> fieldList, | ||
List<string> miscList, | ||
List<string> dialList, | ||
List<string> glossList, | ||
List<string> xRefList, | ||
List<string> antList, | ||
List<LoanwordSource> lSourceList) | ||
{ | ||
public List<string> StagKList { get; } = []; // Meaning only valid for these kebs. | ||
public List<string> StagRList { get; } = []; // Meaning only valid for these rebs. | ||
public List<string> PosList { get; } = []; // e.g. "noun" | ||
public List<string> FieldList { get; } = []; // e.g. "martial arts" | ||
public List<string> MiscList { get; } = []; // e.g. "abbr" | ||
public string? SInf { get; set; } // = null; // e.g. "often derog" | ||
public List<string> DialList { get; } = []; // e.g. ksb | ||
public List<string> GlossList { get; } = []; // English meaning | ||
public List<string> XRefList { get; } = []; // Related terms | ||
public List<string> AntList { get; } = []; // Antonyms | ||
public List<LoanwordSource> LSourceList { get; } = []; | ||
public List<string> StagKList { get; } = stagKList; // Meaning only valid for these kebs. | ||
public List<string> StagRList { get; } = stagRList; // Meaning only valid for these rebs. | ||
public List<string> PosList { get; } = posList; // e.g. "noun" | ||
public List<string> FieldList { get; } = fieldList; // e.g. "martial arts" | ||
public List<string> MiscList { get; } = miscList; // e.g. "abbr" | ||
public string? SInf { get; set; } = sInf; // e.g. "often derog" | ||
public List<string> DialList { get; } = dialList; // e.g. ksb | ||
public List<string> GlossList { get; } = glossList; // English meaning | ||
public List<string> XRefList { get; } = xRefList; // Related terms | ||
public List<string> AntList { get; } = antList; // Antonyms | ||
public List<LoanwordSource> LSourceList { get; } = lSourceList; | ||
} |