From b77b2f92fdb660aea53338c550ed1811698025c1 Mon Sep 17 00:00:00 2001 From: Stephen Kraus <8003332+stephenmk@users.noreply.github.com> Date: Thu, 24 Mar 2022 17:27:19 -0500 Subject: [PATCH 1/2] Add glossary attribute "g_type" for jmdict Rev 1.09 --- jmdict.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/jmdict.go b/jmdict.go index 5207374..1557924 100644 --- a/jmdict.go +++ b/jmdict.go @@ -170,6 +170,13 @@ type JmdictGlossary struct { // a noun in the target language. When absent, the gender is either // not relevant or has yet to be provided. Gender *string `xml:"g_gend"` + + // g_type attribute added in jmdict Rev 1.09 + // At present the values used are "lit", "fig" and "expl". It is + // proposed to add a "descr" value to indicate a gloss which is a + // description of the Japanese term rather than a translation or an + // explanation of the meaning. + Type *string `xml:"g_type,attr"` } type JmdictSense struct { From 3a04f83b51f65216886043822c3cb66e9280619a Mon Sep 17 00:00:00 2001 From: Stephen Kraus <8003332+stephenmk@users.noreply.github.com> Date: Sat, 26 Mar 2022 20:36:55 -0500 Subject: [PATCH 2/2] Clarify currently used values for xml attribute g_type --- jmdict.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jmdict.go b/jmdict.go index 1557924..fe88ea7 100644 --- a/jmdict.go +++ b/jmdict.go @@ -172,7 +172,7 @@ type JmdictGlossary struct { Gender *string `xml:"g_gend"` // g_type attribute added in jmdict Rev 1.09 - // At present the values used are "lit", "fig" and "expl". It is + // At present the values used are "lit", "fig", "expl" and "tm". It is // proposed to add a "descr" value to indicate a gloss which is a // description of the Japanese term rather than a translation or an // explanation of the meaning.