From 406067eeddf50c1a105234bd4ff34594d2ed90fe Mon Sep 17 00:00:00 2001 From: stephenmk Date: Tue, 24 Jan 2023 13:02:50 -0600 Subject: [PATCH] Include entity tags in standalone forms dictionary --- jmdictForms.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/jmdictForms.go b/jmdictForms.go index 032291d..9d21ac4 100644 --- a/jmdictForms.go +++ b/jmdictForms.go @@ -205,7 +205,7 @@ func formsExportDb(inputPath, outputPath, languageName, title string, stride int } defer reader.Close() - dictionary, _, err := jmdict.LoadJmdictNoTransform(reader) + dictionary, entities, err := jmdict.LoadJmdictNoTransform(reader) if err != nil { return err } @@ -231,13 +231,18 @@ func formsExportDb(inputPath, outputPath, languageName, title string, stride int } } + tags := dbTagList{} + tags = append(tags, entityTags(entities)...) + tags = append(tags, newsFrequencyTags()...) + tags = append(tags, customDbTags()...) + if title == "" { title = "JMdict Forms" } recordData := map[string]dbRecordList{ "term": terms.crush(), - "tag": dbRecordList{}, + "tag": tags.crush(), } jmdictDate := jmdictPublicationDate(dictionary)