in reply to Help sorting contents of an essay
The first two things you must do is read the essay and divide it into words. The best way to read it depends on how you plan to divide it. The best way to divide it depends on the format of the essay and your definition of 'word'. You probably think that this is obvious and if there is an occasional problem, you will deal with it later. That is a big mistake. For simplicity, let us assume that the essay consists only of English words (only ASCII letters, no numbers, no hyphenated or foreign words) with standard English punctuation(,.'"?!). I will also assume that the essay is less than 10,000 characters long and that it is divided into lines less than 80 characters long. Lines are separated by newlines. Paragraphs are separated by blank lines. Sentences are separated by two spaces (or a newline). Words are separated by a single space. A program which handles this very well may be extremely difficult to modify, You should let us know which of these assumptions are not true and which are likely to change in the future.
You specify four outputs. Do you really want them all written to the same file? If so, how whould they be identified (or at least separated)?
|
|---|