From 02bac8f269615a611bc574aa473b9dc2b18255ef Mon Sep 17 00:00:00 2001 From: Adriane Boyd Date: Thu, 17 Jun 2021 09:11:01 +0200 Subject: [PATCH] Fix non-deterministic deduplication in Greek lemmatizer (#8421) --- spacy/lang/el/lemmatizer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spacy/lang/el/lemmatizer.py b/spacy/lang/el/lemmatizer.py index a049601dc..631848af4 100644 --- a/spacy/lang/el/lemmatizer.py +++ b/spacy/lang/el/lemmatizer.py @@ -57,6 +57,6 @@ class GreekLemmatizer(Lemmatizer): forms.extend(oov_forms) if not forms: forms.append(string) - forms = list(set(forms)) + forms = list(dict.fromkeys(forms)) self.cache[cache_key] = forms return forms