I want to split a text into subsentence. How can I do that?
For example:
text = "Hi, this is an apple. Hi, that is pineapple."
The result should be:
['Hi,',
'this is an apple.',
'Hi,',
'that is pineapple.']
(P.S. I tried with the string.split(r'[,.]')
, but it will remove the separators.)