How to calculate N-Gram (Bigram) of events


I want to get the Bigram of each events.
For example, if the event sequence was as follows;

<e1, e2, e3, e1, e3, e1, e1>

Bigram is the co-occurence of each pair.

e1-e1: 1
e1-e2: 1
e1-e3: 1
e2-e1: 0
e2-e2: 0
e2-e3: 1
e3-e1: 2
e3-e2: 0
e3-e3: 0

Can I somehow calculate co-occurence adjacent events as above by ProM?

If you know proper plugin or method of analysis, very thanksful and I approciate if you let me know the how to.

Best regards,

Sign In or Register to comment.