Skip to content

Commit

Permalink
Fix CI Errors
Browse files Browse the repository at this point in the history
  • Loading branch information
qubixes authored Sep 9, 2024
1 parent 2cfa963 commit 90eb8a8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion regexmodel/regexclass.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ def get_candidates(cls, series: pl.Series,
else:
score_sub = 0
regex = cls()
next_series_sub = next_series_full

if score_full >= score_sub:
if score_full > 0:
Expand Down Expand Up @@ -324,7 +325,7 @@ def score(series: pl.Series, regex: BaseRegex, count_thres: int,
fraction_match = next_not_null/cur_not_null
fraction_cover = n_unique/regex.n_possible

expected_finish = fraction_match**avg_len_next*next_not_null
expected_finish = fraction_match**avg_len_next*next_not_null # type: ignore
expected_finish = max(1e-12, expected_finish)
split_penalty = 1/(1 + count_thres/expected_finish)
cur_score = regex.subrange_penalty*split_penalty*fraction_cover*fraction_match
Expand Down

0 comments on commit 90eb8a8

Please sign in to comment.