Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
adbar committed Nov 6, 2024
1 parent fac72b5 commit 38c85f1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion simplemma/strategies/defaultrules/lv.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

def apply_lv(token: str) -> Optional[str]:
"Apply pre-defined rules for Latvian."
if len(token) < 4:
if len(token) < 5:
return None

return apply_rules(token, DEFAULT_RULES)
1 change: 1 addition & 0 deletions tests/test_dictionary_pickler.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ def test_logic() -> None:
# log warning
mydict = dictionary_pickler._read_dict(testfile, "zz", silent=False)
assert len(mydict) == 3

# different length
mydict = dictionary_pickler._read_dict(testfile, "en", silent=True)
assert len(mydict) == 5
Expand Down
2 changes: 1 addition & 1 deletion training/dictionary_pickler.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

LOGGER = logging.getLogger(__name__)

INPUT_PUNCT = re.compile(r"[,:*/\+_]|.+-$|.+-\t")
INPUT_PUNCT = re.compile(r"[,:*/\+_]|.+-$|.+-\t|^-.+")
SAFE_LIMIT = {
"cs",
"da",
Expand Down

0 comments on commit 38c85f1

Please sign in to comment.