* Fixed searching for katakana in readings.
authorUrban Wallasch <urban.wallasch@freenet.de>
Sat, 26 Jun 2021 11:23:23 +0000 (13:23 +0200)
committerUrban Wallasch <urban.wallasch@freenet.de>
Sat, 26 Jun 2021 11:23:23 +0000 (13:23 +0200)
jiten-pai.py

index 96d2bcce30da9ed318da8392eb441476fefc385e..da4cb6c1d1ceb23cd1d6370ef4d1c2dd7db0cc87 100755 (executable)
@@ -1460,7 +1460,7 @@ def dict_lookup(dict_fname, pattern, mode, limit=0):
                 except Exception as e:
                     eprint('malformed line:', line, ':', str(e))
                     continue
-                if (mode == ScanMode.JAP and (re_pattern.search(hira) or re_pattern.search(kata2hira(term)))) \
+                if (mode == ScanMode.JAP and (re_pattern.search(kata2hira(hira)) or re_pattern.search(kata2hira(term)))) \
                 or (mode == ScanMode.ENG and re_pattern.search(trans)):
                     result.append([term, hira, trans])
                     cnt += 1