I am segmenting sentences for a text in python using nltk PunktSentenceTokenizer()
. However, there are many long sentences appears in a enumerated way and I need to get the sub sentence in this case.
Example:
The api allows the user to achieve following goals: (a) aXXXXXX ,(b)bXXXX, (c) cXXXXX.
The required output would be :
"The api allows the user to achieve following goals aXXXXX. "
, "The api allows the user to achieve following goals bXXXXX."
and "The api allows the user to achieve following goals cXXXXX. "
How can I achieve this goal?