From 382a5a89f81c33597ca246c171732a8972ecc2e9 Mon Sep 17 00:00:00 2001 From: Michael Mayer Date: Sun, 2 Feb 2020 08:29:59 +0100 Subject: [PATCH] Labels: Update rules for more accurate results Signed-off-by: Michael Mayer --- internal/classify/rules.go | 14 +++++++------- internal/classify/rules.yml | 27 +++++++++++++-------------- 2 files changed, 20 insertions(+), 21 deletions(-) diff --git a/internal/classify/rules.go b/internal/classify/rules.go index 4979bad4b..3c530fe1f 100644 --- a/internal/classify/rules.go +++ b/internal/classify/rules.go @@ -141,7 +141,7 @@ var rules = LabelRules{ Categories: []string{"reptile", "animal"}, }, "alp": { - Label: "alpine hut", + Label: "alpine", Threshold: 0.200000, Priority: 0, Categories: []string{"landscape", "mountains"}, @@ -1353,10 +1353,10 @@ var rules = LabelRules{ Categories: []string{}, }, "cliff": { - Label: "", + Label: "landscape", Threshold: 0.200000, Priority: 0, - Categories: []string{"landscape", "rocks"}, + Categories: []string{"water", "rocks"}, }, "cliff dwelling": { Label: "building", @@ -2319,10 +2319,10 @@ var rules = LabelRules{ Categories: []string{"animal"}, }, "geyser": { - Label: "water", + Label: "landscape", Threshold: 0.400000, Priority: 0, - Categories: []string{}, + Categories: []string{"water"}, }, "giant panda": { Label: "panda", @@ -4449,10 +4449,10 @@ var rules = LabelRules{ Categories: []string{}, }, "promontory": { - Label: "rocks", + Label: "landscape", Threshold: 0.200000, Priority: 0, - Categories: []string{"landscape"}, + Categories: []string{"water", "rocks"}, }, "ptarmigan": { Label: "bird", diff --git a/internal/classify/rules.yml b/internal/classify/rules.yml index e70f74c68..7d37ab907 100644 --- a/internal/classify/rules.yml +++ b/internal/classify/rules.yml @@ -2038,6 +2038,9 @@ coffee: categories: - beverage +espresso: + see: coffee + coffee mug: see: coffee @@ -3323,37 +3326,33 @@ pitcher: see: beverage goblet: - label: beverage - threshold: 0.2 - -espresso: - see: coffee + see: beverage eggnog: see: beverage alp: - label: alpine hut + label: alpine threshold: 0.2 categories: - landscape - mountains cliff: + label: landscape threshold: 0.2 categories: - - landscape + - water - rocks -geyser: - label: water - threshold: 0.4 - promontory: - label: rocks - threshold: 0.2 + see: cliff + +geyser: + label: landscape + threshold: 0.4 categories: - - landscape + - water sandbar: label: beach