Skip to content

Commit bf43876

Browse files
committed
Fix edge case where stofn not in ordmyndir in BÍN ("Bandaríkin")
1 parent 7ec7c8a commit bf43876

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/reynir_correct/settings.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,8 @@ def add(self, word: str) -> None:
263263
suffix_rev = self.reverse_capitalization(suffix, split_on_hyphen=split_on_hyphen)
264264
_, m = db.lookup_g(suffix_rev)
265265
# Only consider lemmas
266-
m = [mm for mm in m if mm.stofn == mm.ordmynd]
266+
STOFN_NOT_IN_ORDMYNDIR = ("Bandaríki",)
267+
m = [mm for mm in m if (mm.stofn == mm.ordmynd) or (mm.stofn in STOFN_NOT_IN_ORDMYNDIR)]
267268
if not m:
268269
raise ConfigError(
269270
"No BÍN meaning for '{0}' (from error word '{1}') in capitalization_errors section".format(
@@ -574,7 +575,6 @@ def add(self, word: str, corr: str) -> None:
574575

575576

576577
class Settings:
577-
578578
"""Global settings"""
579579

580580
def __init__(self):

0 commit comments

Comments
 (0)