I want to search for a keyword in the text and to extract this sentence which contains the keyword. When extracting the sentence, I want to ignore fullstops in dates and fullstops in some shortenings (‘st’ and ‘numb’)
Example:
keyword = grand
text:
“
. The boy will visit his grandmother tomorrow on 01.02.2024 who lives on Downing st. 10. The following day he will go to school. The day after on 03.02.2014 he will visit his grandfather
”
I expect the two sentences which contain the keyword ‘grand’, where the fullstops in dates and the shortening ‘st’ are ignored:
[“The boy will visit his grandmother tomorrow on 01.02.2024 who lives on Downing st. 10.”,
“The day after on 03.02.2014 he will visit hist grandfather
“]
New contributor