diff --git a/pm4py/algo/querying/llm/abstractions/declare_to_descr.py b/pm4py/algo/querying/llm/abstractions/declare_to_descr.py index 3f85daeee..2c26663eb 100644 --- a/pm4py/algo/querying/llm/abstractions/declare_to_descr.py +++ b/pm4py/algo/querying/llm/abstractions/declare_to_descr.py @@ -52,6 +52,15 @@ def get_model_description(): return "".join(ret) +def get_model_implementation(): + implementation = "A DECLARE model in pm4py is expressed as a Python dictionary containing the following keys:\n" + implementation += "'" + "', '".join([EXISTENCE, ABSENCE, EXACTLY_ONE, INIT, RESPONDED_EXISTENCE, COEXISTENCE, RESPONSE, PRECEDENCE, SUCCESSION, ALTRESPONSE, ALTPRECEDENCE, ALTSUCCESSION, CHAINRESPONSE, CHAINPRECEDENCE, CHAINSUCCESSION, NONCOEXISTENCE, NONSUCCESSION, NONCHAINSUCCESSION]) + "'\n" + implementation += "For the keys {'"+"', '".join([EXISTENCE, ABSENCE, EXACTLY_ONE, INIT])+"'}, the value is a dictionary containing as keys the activities and as corresponding value the support (please set it to 1.0) and confidence of the declarative rule.\n" + implementation += "For the keys {'"+"', '".join([RESPONDED_EXISTENCE, COEXISTENCE, RESPONSE, PRECEDENCE, SUCCESSION, ALTRESPONSE, ALTPRECEDENCE, ALTSUCCESSION, CHAINRESPONSE, CHAINPRECEDENCE, CHAINSUCCESSION, NONCOEXISTENCE, NONSUCCESSION, NONCHAINSUCCESSION])+"'}, the value is a dictionary containing as keys the activities and as corresponding value the support (please set it to 1.0) and confidence of the declarative rule.\n" + + return implementation + + def apply(declare: Dict[str, Dict[Any, Dict[str, int]]], parameters: Optional[Dict[Any, Any]] = None) -> str: """ Gets a textual abstraction of a DECLARE model diff --git a/pm4py/algo/querying/llm/abstractions/logske_to_descr.py b/pm4py/algo/querying/llm/abstractions/logske_to_descr.py index 9a77547fd..ee8d16c57 100644 --- a/pm4py/algo/querying/llm/abstractions/logske_to_descr.py +++ b/pm4py/algo/querying/llm/abstractions/logske_to_descr.py @@ -37,6 +37,14 @@ def get_model_description(): return description +def get_model_implementation(): + implementation = "The Log Skeleton is expressed as a Python dictionary containing the keys: 'equivalence', 'always_before', 'always_after', 'never_together', 'activ_freq', 'directly_follows'.\n" + implementation += "The values associated to 'equivalence', 'always_before', 'always_after', 'never_together', 'directly_follows' are sets containing the couples of activities satisfying the constraints.\n" + implementation += "The value associated to 'activ_freq' is a dictionary whose keys are the activities, and the values are the allowed number of occurrences for the given activity. For example, {'A': {0, 1}, 'B': {1, 2}} tells that A could occur 0 or 1 time inside a case, while B could occur 1 or 2 times.\n" + + return implementation + + def apply(lsk: Dict[str, Any], parameters: Optional[Dict[Any, Any]] = None) -> str: if parameters is None: parameters = {} diff --git a/pm4py/algo/querying/llm/abstractions/tempprofile_to_descr.py b/pm4py/algo/querying/llm/abstractions/tempprofile_to_descr.py index 117d69ff6..0d97389f7 100644 --- a/pm4py/algo/querying/llm/abstractions/tempprofile_to_descr.py +++ b/pm4py/algo/querying/llm/abstractions/tempprofile_to_descr.py @@ -28,6 +28,11 @@ def get_model_description(): return description +def get_model_implementation(): + implementation = "The temporal profile is expressed as a Python dictionary associating to some couples of activities the average and the standard deviation of the times. Example: {('A', 'B'): (86400, 3600), ('B', 'C'): (3600, 3600)} indicates that the average time between A and B is 1 day, while the standard deviation is 1 hour. On the other hand, the average time between B and C is 1 hour, while the standard deviation is 1 hour." + return implementation + + def apply(temporal_profile: Dict[Tuple[str, str], Tuple[float, float]], parameters: Optional[Dict[Any, Any]] = None) -> str: """