From f7c955053f65df2450544b5c5681b3d77ddb64fc Mon Sep 17 00:00:00 2001 From: Michael Mayer Date: Tue, 7 Jul 2020 15:24:57 +0200 Subject: [PATCH] Backend: Update short and small words list in txt package Signed-off-by: Michael Mayer --- pkg/txt/file_title_test.go | 4 ++++ pkg/txt/shortwords.go | 14 ++++++++++++++ pkg/txt/smallwords.go | 1 + 3 files changed, 19 insertions(+) diff --git a/pkg/txt/file_title_test.go b/pkg/txt/file_title_test.go index 7b84591bb..f8d54df7d 100644 --- a/pkg/txt/file_title_test.go +++ b/pkg/txt/file_title_test.go @@ -70,4 +70,8 @@ func TestFileTitle(t *testing.T) { t.Run("IQVG4929", func(t *testing.T) { assert.Equal(t, "", FileTitle("IQVG4929.jpg")) }) + + t.Run("du,-ich,-er, Sie und es", func(t *testing.T) { + assert.Equal(t, "Du, Ich, Er, Sie und Es", FileTitle("du,-ich,-er, Sie und es")) + }) } diff --git a/pkg/txt/shortwords.go b/pkg/txt/shortwords.go index 0ce7f75e6..2583fd956 100644 --- a/pkg/txt/shortwords.go +++ b/pkg/txt/shortwords.go @@ -500,6 +500,7 @@ var ShortWords = map[string]bool{ "dev": true, "dew": true, "dex": true, + "dez": true, "dft": true, "dg": true, "dha": true, @@ -574,6 +575,7 @@ var ShortWords = map[string]bool{ "dup": true, "dur": true, "dux": true, + "duz": true, "dwt": true, "dx": true, "dz": true, @@ -711,6 +713,7 @@ var ShortWords = map[string]bool{ "fee": true, "feh": true, "fei": true, + "fex": true, "fey": true, "fem": true, "fen": true, @@ -1197,6 +1200,7 @@ var ShortWords = map[string]bool{ "jnt": true, "jo": true, "job": true, + "jod": true, "joe": true, "jog": true, "joy": true, @@ -1215,6 +1219,7 @@ var ShortWords = map[string]bool{ "jus": true, "jut": true, "juv": true, + "jux": true, "k": true, "ka": true, "kab": true, @@ -1288,6 +1293,7 @@ var ShortWords = map[string]bool{ "kua": true, "kue": true, "kui": true, + "kux": true, "kv": true, "kw": true, "l": true, @@ -1513,6 +1519,7 @@ var ShortWords = map[string]bool{ "mot": true, "mou": true, "mow": true, + "mox": true, "mp": true, "mpb": true, "mpg": true, @@ -1787,6 +1794,7 @@ var ShortWords = map[string]bool{ "phu": true, "pi": true, "pia": true, + "piz": true, "pya": true, "pic": true, "pie": true, @@ -2359,6 +2367,7 @@ var ShortWords = map[string]bool{ "una": true, "unb": true, "unc": true, + "und": true, "ung": true, "uni": true, "unl": true, @@ -2575,7 +2584,11 @@ var ShortWords = map[string]bool{ "zen": true, "zep": true, "zer": true, + "zeh": true, "zho": true, + "zum": true, + "zug": true, + "zog": true, "zig": true, "zip": true, "zit": true, @@ -2585,4 +2598,5 @@ var ShortWords = map[string]bool{ "zod": true, "zoo": true, "zs": true, + "zwo": true, } diff --git a/pkg/txt/smallwords.go b/pkg/txt/smallwords.go index 6e1f51cdf..c84440bf5 100644 --- a/pkg/txt/smallwords.go +++ b/pkg/txt/smallwords.go @@ -19,4 +19,5 @@ var SmallWords = map[string]bool{ "the": true, "from": true, "with": true, + "und": true, }