Skip to content
Open
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
6 changes: 5 additions & 1 deletion lcn/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -892,7 +892,11 @@ def parse_sentence(line: str):
tau = False
if ";" in line:
pos = line.find(";")
tau = bool(line[pos+1:].strip())
tau_str = line[pos+1:].strip()
# Parse "tau=true" or "tau=false" correctly — bool() of any
# non-empty string (including "False") returns True, so we
# must split on "=" to get the actual boolean value.
tau = tau_str.split("=")[1].lower() == 'true'
line = line[:pos]
Comment on lines +895 to 900

# Get the lower and upper bounds
Expand Down