pm4py.read.read_dfg#
- pm4py.read.read_dfg(file_path: str, encoding: str = 'utf-8') Tuple[Dict[Tuple[str, str], int], Dict[str, int], Dict[str, int]] [source]#
Reads a DFG object from a .dfg file. The DFG object returned is a triple containing the following objects:
DFG Object, encoded as a
Dict[Tuple[str,str],int]
, s.t.DFG[('a','b')]=k
implies that activity'a'
is directly followed by activity'b'
a total ofk
times in the logStart activity dictionary, encoded as a
Dict[str,int]
, s.t.,S['a']=k
implies that activity'a'
is startingk
traces in the event logEnd activity dictionary, encoded as a
Dict[str,int]
, s.t.,E['z']=k
implies that activity'z'
is endingk
traces in the event log.
- Return type:
Tuple[Dict[Tuple[str,str],int], Dict[str,int], Dict[str,int]]
- Parameters:
file_path (
str
) – file path of the dfg model on diskencoding (
str
) – the encoding to be used (default: utf-8)
import pm4py dfg = pm4py.read_dfg("<path_to_dfg_file>")