This commit is contained in:
Alex Yatskov 2016-08-04 23:25:03 -07:00
parent 1f77200199
commit 50ef3680af

View File

@ -45,6 +45,12 @@ type KanjidicCharacter struct {
// for finding a required kanji. The type of code is defined by the
// qc_type attribute.
QueryCode KanjidicQueryCode `xml:"query_code"`
// The readings for the kanji in several languages, and the meanings, also
// in several languages. The readings and meanings are grouped to enable
// the handling of the situation where the meaning is differentiated by
// reading. [T1]
ReadingMeaning KanjidicReadingMeaning `xml:"reading_meaning"`
}
type KanjidicCodepoint struct {
@ -203,3 +209,105 @@ type KanjiDicReference struct {
// See above under "moro".
Page string `xml:"m_page,attr"`
}
type KanjidicQueryCode struct {
// The q_code contains the actual query-code value, according to the
// qc_type attribute.
Values []KanjidicQueryCodeValue `xml:"q_code"`
}
type KanjidicQueryCodeValue struct {
Value string `xml:",chardata"`
// The qc_type attribute defines the type of query code. The current values
// are:
// skip - Halpern's SKIP (System of Kanji Indexing by Patterns)
// code. The format is n-nn-nn. See the KANJIDIC documentation
// for a description of the code and restrictions on the
// commercial use of this data. [P] There are also
// a number of misclassification codes, indicated by the
// "skip_misclass" attribute.
// sh_desc - the descriptor codes for The Kanji Dictionary (Tuttle
// 1996) by Spahn and Hadamitzky. They are in the form nxnn.n,
// e.g. 3k11.2, where the kanji has 3 strokes in the
// identifying radical, it is radical "k" in the SH
// classification system, there are 11 other strokes, and it is
// the 2nd kanji in the 3k11 sequence. (I am very grateful to
// Mark Spahn for providing the list of these descriptor codes
// for the kanji in this file.) [I]
// four_corner - the "Four Corner" code for the kanji. This is a code
// invented by Wang Chen in 1928. See the KANJIDIC documentation
// for an overview of the Four Corner System. [Q]
// deroo - the codes developed by the late Father Joseph De Roo, and
// published in his book "2001 Kanji" (Bonjinsha). Fr De Roo
// gave his permission for these codes to be included. [DR]
// misclass - a possible misclassification of the kanji according
// to one of the code types. (See the "Z" codes in the KANJIDIC
// documentation for more details.)
Type string `xml:"qc_type,attr"`
// The values of this attribute indicate the type if
// misclassification:
// - posn - a mistake in the division of the kanji
// - stroke_count - a mistake in the number of strokes
// - stroke_and_posn - mistakes in both division and strokes
// - stroke_diff - ambiguous stroke counts depending on glyph
Misclassification string `xml:"skip_misclass,attr"`
}
type KanjidicReadingMeaning struct {
ReadingMeaning KandjicReadingMeaningGroup `xml:"rmgroup"`
// Japanese readings that are now only associated with names.
Nanori KanjidicNanori `xml:"nanori"`
}
type KanjidicReadingMeaningGroup struct {
// The reading element contains the reading or pronunciation
// of the kanji.
Readings []KanjidicReading `xml:"reading"`
// The meaning associated with the kanji.
Meanings []KanjidicMeanings `xml:"meanings"`
}
type KanjidicReading struct {
Value string `xml:",chardata"`
// The r_type attribute defines the type of reading in the reading
// element. The current values are:
// pinyin - the modern PinYin romanization of the Chinese reading
// of the kanji. The tones are represented by a concluding
// digit. [Y]
// korean_r - the romanized form of the Korean reading(s) of the
// kanji. The readings are in the (Republic of Korea) Ministry
// of Education style of romanization. [W]
// korean_h - the Korean reading(s) of the kanji in hangul.
// ja_on - the "on" Japanese reading of the kanji, in katakana.
// Another attribute r_status, if present, will indicate with
// a value of "jy" whether the reading is approved for a
// "Jouyou kanji".
// A further attribute on_type, if present, will indicate with
// a value of kan, go, tou or kan'you the type of on-reading.
// ja_kun - the "kun" Japanese reading of the kanji, usually in
// hiragana.
// Where relevant the okurigana is also included separated by a
// ".". Readings associated with prefixes and suffixes are
// marked with a "-". A second attribute r_status, if present,
// will indicate with a value of "jy" whether the reading is
// approved for a "Jouyou kanji".
Type string `xml:"r_type"`
// See under ja_on above.
OnType *string `xml:"on_type"`
// See under ja_on and ja_kun above.
JouyouStatus *string `xml:"r_status"`
}
type KanjidicMeaning struct {
}
type KanjidicNanori struct {
}