I'm trying to categorise phrases into BEFORE or AFTER lunch or another meal.
"Following lunch with a friend" - AFTER
"Before breakfast with a colleague" - BEFORE
"After I ate a meal." - AFTER
"In the morning" - BEFORE (basically because there is nothing here to indicate AFTER)
"Later than breakfast and lunch" - AFTER (and ideally I'd also be able to show that this is after 2 meals, not just 1.
I was trying to do something like use RegEx to match this phrase pattern, but it's not working
((FOLLOWING|AFTER)\s+\w+\s+(LUNCH|DINNER|SUPPER))
This is just the start of the type of analysis I'd like to do in Alteryx and I'm also wondering if now is the time to start learning NLTK in python and using it in Alteryx, but I don't have a lot of time to invest in it...
Any ideas?
I think this might be quite difficult with just regex, but at least I can start you off with an expression that's (semi-)working.
@PhilipMannering Thanks! Useful to see that simpler Regex👍