Extract sentences from file
Posted on 2006-11-23
Say I have two files, I want to create a third file, by extracting the 5 sentences from file1, adding it to file3, then extracting 5 sentences from file2, and adding it to file3, then going back to file1, doing the same, then file2, doing the same until the end of both files. If either file1 or file2 file runs out then the rest of the other file must be added to file3.
It is safe to presume a sentence ends in a "." and then next one begins after the "."
Can somebody whip up some code to do this?