Divide the string into chunks
Posted: Thu Sep 29, 2011 4:43 am
Hello Everybody,
Actually I have been searching and trying to find a way to divide the contents of my text document into parts depend on a sentence. If the sentence appears then the string is automatically divided.
For example, I went to the library to look for a book, which has information on how to use regex, the book which has the information, had been already borrowed.
If we say that book has information is our desired sentence then the code will do
the output will be
I went library look
(this is after removing stop words) and then it deletes all the words after that.
Actually I have been searching and trying to find a way to divide the contents of my text document into parts depend on a sentence. If the sentence appears then the string is automatically divided.
For example, I went to the library to look for a book, which has information on how to use regex, the book which has the information, had been already borrowed.
If we say that book has information is our desired sentence then the code will do
the output will be
I went library look
(this is after removing stop words) and then it deletes all the words after that.