Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/hotfixes' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
fit-alessandro-berti committed Mar 28, 2024
2 parents 7060bdd + 0980ac4 commit 7e96cbf
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
10 changes: 8 additions & 2 deletions pm4py/objects/ocel/util/names_stripping.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,14 @@
match = re.compile(r'[^0-9a-zA-Z]+')


def apply(x: str, max_len: int = 100) -> str:
stru = match.sub('', x)
def apply(X: str, max_len: int = 100) -> str:
X = X.split(" ")
i = 0
while i < len(X):
X[i] = X[i].capitalize()
i = i + 1
X = "".join(X)
stru = match.sub('', X).strip()
if len(stru) > max_len:
stru = stru[:100]
return stru
4 changes: 4 additions & 0 deletions pm4py/ocel.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ def ocel_flattening(ocel: OCEL, object_type: str) -> pd.DataFrame:
Flattens the object-centric event log to a traditional event log with the choice of an object type.
In the flattened log, the objects of a given object type are the cases, and each case
contains the set of events related to the object.
The flattened log follows the XES notations for case identifier, activity, and timestamp. In particular:
- "case:concept:name" is the column used for the case ID.
- "concept:name" is the column used for the activity.
- "time:timestamp" is the column used for the timestamp.
:param ocel: object-centric event log
:param object_type: object type
Expand Down

0 comments on commit 7e96cbf

Please sign in to comment.