generated from Hochfrequenz/python_template_repository
-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Only write those expressions to machine-readable AHBs, that are actually valid expressions #444
Comments
from ahbicht.expressions.ahb_expression_parser import parse_ahb_expression_to_single_requirement_indicator_expressions
@lru_cache(maxsize=2**15) # there are ~18k expressions over all AHBs as of 2024-09-11; So they all fit in 2**15
def is_wellformed_expression(expression: str) -> bool:
"""
returns true iff the expression string is parseable by ahbicht
"""
try:
_ = parse_ahb_expression_to_single_requirement_indicator_expressions(expression)
return True
except (SyntaxError, VisitError):
return False |
We try to ^^ In AHB Tabellen I would like to see even the wrong conditions. |
It's not urgent then. We implemented the above filter on Entscheidungsbaum side already ;) |
ggf. braucht der ahbicht bald auch ein LLM um diese Texte interpretieren zu können :D |
nice. einmal mit profis arbeiten.🙃 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ja, gerne :) da müsste halt kohlrahbi eine dependency auf ahbicht haben und nur diejenigen expressions schreiben, die auch well-formed sind. gerne ein issue da aufmachen ;) ich wäre mir nur unsicher, ob das out-of-scope ist.
Originally posted by @hf-kklein in https://github.com/Hochfrequenz/ahbicht-functions/issues/294#issuecomment-2345523263
The text was updated successfully, but these errors were encountered: