X-Git-Url: https://git.kaliko.me/?a=blobdiff_plain;f=sima%2Flib%2Fsimastr.py;h=f3e77ee0a34d89f4dc6519ef250b2cb8b0a05c2f;hb=e86c25ed9e97c5dd3e0672d5b17bed01d4a23fdf;hp=3e3c0812fc26dfda7725acf0b94e65d2368bc8d2;hpb=2eb13c85fe72ade75193b589748920615fbb22d2;p=mpd-sima.git diff --git a/sima/lib/simastr.py b/sima/lib/simastr.py index 3e3c081..f3e77ee 100644 --- a/sima/lib/simastr.py +++ b/sima/lib/simastr.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright (c) 2009, 2010, 2013 Jack Kaliko +# Copyright (c) 2009, 2010, 2013, 2021 kaliko # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as @@ -102,6 +102,7 @@ class SimaStr(str): def __init__(self, fuzzstr): """ """ + super().__init__() self.orig = str(fuzzstr) self.stripped = str(fuzzstr.strip()) # fuzzy computation @@ -118,18 +119,15 @@ class SimaStr(str): """ sea = SimaStr.reg_lead.search(self.stripped) if sea: - #print sea.groupdict() self.stripped = sea.group('root0') sea = SimaStr.reg_midl.search(self.stripped) if sea: - #print sea.groupdict() self.stripped = str().join([sea.group('root0'), ' ', sea.group('root1')]) sea = SimaStr.reg_trail.search(self.stripped) if sea: - #print sea.groupdict() self.stripped = sea.group('root0') def remove_diacritics(self):