Commit 73c6a864 authored by Yannick DAYER's avatar Yannick DAYER

Fix the regex matching being anchored at str start

parent 19909ce3
......@@ -197,7 +197,7 @@ def split_csv_pad_per_pai(filename, regexps=[], regexp_column="attack_type"):
continue
# if regexps is not None or empty and is not a Bona-Fide score
for pattern in regexps:
if pattern.match(row[regexp_column]):
if pattern.search(row[regexp_column]):
negs[pattern.pattern].append(row["score"])
break
else: # this else is for the for loop: ``for pattern in regexps:``
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment