Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 2 additions & 12 deletions gen-test-data/gen_test_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,8 @@


def parse_lm_pairs(lm_str: str) -> Tuple[float]:
"""
Regular expression to capture pairs of floats within parentheses
( : Matches the opening parenthesis
-? : Optionally matches a minus sign (for negative numbers)
\d+ : Matches one or more digits
\. : Matches the literal dot (for decimal numbers)
\d* : Matches zero or more digits after the decimal point
, : Matches the comma separator
\s* : Matches zero or more whitespace characters
) : Matches the closing parenthesis
"""
pattern = re.compile(r"\(([-]?\d+\.?\d*),\s*([-]?\d+\.?\d*)\)")
# Regular expression to capture pairs of floats within comma-separated parentheses
pattern = re.compile(r"\((.*?),\s*(.*?)\)")

lm = []

Expand Down