Extracting anything(Words, numbers or special characters) as entity after a word

Is there a way we can extract anything after a word as an entity; for eg:

I want to extract anything after about or go to or learn as an entity.

intent:navigate

regex:topic

  • ^[A-Za-z0-9 :_ -][A-Za-z0-9 :_ -][A-Za-z0-9 :_ -]$

You could do this with regex, but I wouldn’t recommend it. There are a lot of irrelevant things someone might say after the word about. You’re better off adding more training data and doing this with the CRFEntityExtractor.

@erohmensing what about if I want to extract long (possibly even multiple sentences [including punctuation]) from the text after certain words. Would you still recommend using the CRFEntityExtractor/DIETClassifier.

For example:

Send text message to [Sarah](person) that says [hello there. how are you today. what are you up to?](text)
Please text [Sarah](person) that [what's going on?](text).

ALSO, how would I get the punctuation to show in the entity?