diff --git a/pkg/iplibrary/template.go b/pkg/iplibrary/template.go index 01fae7a..c90f338 100644 --- a/pkg/iplibrary/template.go +++ b/pkg/iplibrary/template.go @@ -70,6 +70,11 @@ func (this *Template) Extract(text string, emptyValues []string) (values map[str } } + // 自动修复省略的城市名 + if len(values["city"]) == 0 && len(values["province"]) > 0 && len(values["town"]) > 0 { + values["city"] = values["province"] + } + ok = true return }