Hi,
I have a dataset consisting of chat conversations between a company and their customers. A chat conversation is stored in one string, in this example we call the customer C112233 and the employee from the company Amalie. A conversation could look like this:
-------------------------------------------
(Amalie): Hi my name is Amalie, how can I help you?
(C112233): I have lost my keys for the house, how can I get a new one?
(Amalie): Let me tell you blablabla..
(C112233): Thank you so much.
(Amalie): No problem, that's what I'm here for, have a nice day.
(C112233): You too
-------------------------------------------
I wish to count the number of messages that the employee writes in some chat conversation with a customers. I have tried something with the Regex tool, e.g: (\(\w+\)):\s in order to find the messages that the employee writes. Any idea of how I can sum this number of occurences, i.e. how can I sum the number of times that (Amalie) occures in the string? It is important for me to emphasize that the company has several employees, not only Amalie, and I want this to work with any employee name.
Thank you in advance!
Solved! Go to Solution.
Thanks for a quick reply. I solved the counting issue like you suggested:
REGEX_CountMatches([Chart], "\(\D+\)").
Now that I have the number of messages from the employee, do you have any suggestion to how I can count the total number of words written by the employee? Let's say I got a total of 3 messages by the above formula, and say that each message contains 10 words. How to I accumulate this and get the total of 30 words written?
Thanks!
As a solution solve...
Hopefully this solves the thread.
Thanks,
Mark