Let's say I have a sentences that goes like this:
Hi, how are the kids. I will be going to Los Angeles next Friday and will come back the following Monday.
If the date today is October 16 (Wednesday), then next Friday would be October 25th. The sentence later says that the person will come back the following Monday. We know they mean the Monday after next Friday so the 28th of October. If I use the dateutil library, then it would classify both Friday and Monday, but it won't take into account the next before Friday or that we are saying the following Monday.
I was thinking of creating a solution that will split the sentence up into words and then check what comes before actual dates. However, I'd like to capture not only this type of adverb of time, but others as well. For example, next day, this Thursday, 2 days from today, etc. How do I build a framework that will detect these types of date texts and then print out their respective dates?