WIP
This commit is contained in:
parent
a09898c0c5
commit
0bb8650934
26
termmeta.go
26
termmeta.go
@ -189,22 +189,16 @@ func extractEdictTermMeta(edictEntry jmdict.JmdictEntry) []termMetaEntry {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func outputTermMetaJson(dir string, reader io.Reader, flags int) error {
|
func outputTermMetaJson(dir string, reader io.Reader, flags int) error {
|
||||||
// dict, entities, err := jmdict.LoadJmdictNoTransform(reader)
|
dict, entities, err := jmdict.LoadJmdictNoTransform(reader)
|
||||||
// if err != nil {
|
if err != nil {
|
||||||
// return err
|
return err
|
||||||
// }
|
}
|
||||||
|
|
||||||
// meta := make(map[string][]string)
|
var entries []termMetaEntry
|
||||||
// for _, entry := range dict.Entries {
|
for _, jmdictEntry := range dict.Entries {
|
||||||
// }
|
entries = append(entries, extractEdictTermMeta(jmdictEntry)...)
|
||||||
|
}
|
||||||
|
|
||||||
// var entries []termMetaEntry
|
index := newTermMetaIndex(entries, entities)
|
||||||
// for _, entry := range dict.Entries {
|
return index.output(dir, flags&flagPrettyJson == flagPrettyJson)
|
||||||
// // defs = append(defs, convertEdictEntry(e)...)
|
|
||||||
// }
|
|
||||||
|
|
||||||
// index := newTermMetaIndex(entries, entities)
|
|
||||||
// return index.output(dir, flags&flagPrettyJson == flagPrettyJson)
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user