pm4py.llm.abstract_ocel_features#

pm4py.llm.abstract_ocel_features(ocel: OCEL, obj_type: str, include_header: bool = True, max_len: int = 10000, debug: bool = False, enable_object_lifecycle_paths: bool = True) str[source]#

Obtains the abstraction of an object-centric event log, representing the features and their values in text.

Return type:

str

Parameters:
  • ocel (OCEL) – The object-centric event log to abstract.

  • obj_type (str) – The object type to consider in feature extraction.

  • include_header (bool) – Whether to include a header in the abstraction.

  • max_len (int) – Maximum length of the abstraction (default: constants.OPENAI_MAX_LEN).

  • debug (bool) – Enables debugging mode, providing insights into feature extraction steps.

  • enable_object_lifecycle_paths (bool) – Enables the “lifecycle paths” feature in the abstraction.

Returns:

The OCEL features abstraction as a string.

import pm4py

ocel = pm4py.read_ocel("tests/input_data/ocel/example_log.jsonocel")
print(pm4py.llm.abstract_ocel_features(ocel, obj_type="Resource"))