pm4py.llm.abstract_case#
- pm4py.llm.abstract_case(case: Trace, include_case_attributes: bool = True, include_event_attributes: bool = True, include_timestamp: bool = True, include_header: bool = True, activity_key: str = 'concept:name', timestamp_key: str = 'time:timestamp') str [source]#
Textually abstracts a single case from an event log.
- Return type:
str
- Parameters:
case (
Trace
) – The case object to abstract.include_case_attributes (
bool
) – Whether to include attributes at the case level.include_event_attributes (
bool
) – Whether to include attributes at the event level.include_timestamp (
bool
) – Whether to include event timestamps in the abstraction.include_header (
bool
) – Whether to include a header in the abstraction.activity_key (
str
) – The column name to be used as activity.timestamp_key (
str
) – The column name to be used as timestamp.
- Returns:
The case abstraction as a string.
import pm4py log = pm4py.read_xes("tests/input_data/roadtraffic100traces.xes", return_legacy_log_object=True) print(pm4py.llm.abstract_case(log[0]))