Spaces:
Runtime error
Runtime error
Download pm4py/examples/declare_simple.py from linpershey/process_mining: direct link, hf CLI and curl.
- Browser
- Download file 731 Bytes
-
https://huggingface.co/spaces/linpershey/process_mining/resolve/main/pm4py/examples/declare_simple.py
- Command line
-
hf download hf://spaces/linpershey/process_mining/pm4py/examples/declare_simple.py
-
curl -L -o declare_simple.py https://huggingface.co/spaces/linpershey/process_mining/resolve/main/pm4py/examples/declare_simple.py
731 Bytes
| import pm4py | |
| def execute_script(): | |
| """ | |
| Example script to discover a DECLARE model from an event log, | |
| obtain its textual (LLM) abstraction, and perform conformance checking. | |
| """ | |
| log = pm4py.read_xes("../tests/input_data/receipt.xes") | |
| declare_model = pm4py.discover_declare(log) | |
| print(declare_model) | |
| # prints a textual abstraction of the declare model that can be provided to GPT | |
| text_abstr = pm4py.llm.abstract_declare(declare_model) | |
| print(text_abstr) | |
| # provides conformance checking based on the DECLARE model | |
| conf_result = pm4py.conformance_declare(log, declare_model, return_diagnostics_dataframe=True) | |
| print(conf_result) | |
| if __name__ == "__main__": | |
| execute_script() | |