From 1367f10890ba9644f0499d2e346c906d928d2d2c Mon Sep 17 00:00:00 2001 From: stovag <44883047+stovag@users.noreply.github.com> Date: Mon, 22 Nov 2021 10:57:45 +0200 Subject: [PATCH] Fixed loading issues with yaml files --- greek_stemmer/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/greek_stemmer/__init__.py b/greek_stemmer/__init__.py index f198cd8..f5d2e29 100644 --- a/greek_stemmer/__init__.py +++ b/greek_stemmer/__init__.py @@ -336,8 +336,8 @@ def ends_on_vowel2(self, word): def load_settings(self): custom_rules = "" with open(os.path.join( - os.path.dirname(__file__), 'stemmer.yml'), 'r') as f: - custom_rules = yaml.load(f.read()) + os.path.dirname(__file__), 'stemmer.yml'), 'r', encoding='utf8') as f: + custom_rules = yaml.load(f.read(), Loader=yaml.FullLoader) return custom_rules def long_stem_list(self, word):