IUP Computer Science
COSC 300     Spring 2008

Project #3
(Revised Spelling)
(Due  1 April 2008)

There is a well-known "plan" to revise the spelling of English words.  It has been attributed to Mark Twain and to M.J. Shields (a writer for The Economist).  The plan is stated very briefly as follows:

        For example, in Year 1 that useless letter "c" would be dropped to be replased either by "k" or "s", and likewise "x" would no longer be part of the alphabet.  The only kase in which "c" would be retained would be the "ch" formation, which will be dealt with later.  Year 2 might reform "w" spelling, so that "which" and "one" would take the same konsonant, wile Year 3 might well abolish "y" replasing it with "i" and Iear 4 might fiks the "g/j" anomali wonse and for all.
        Jenerally, then, the improvement would kontinue iear bai iear with Iear 5 doing awai with useless double konsonants, and Iears 6-12 or so modifaiing vowlz and the rimeining voist and unvoist konsonants.  Bai Iear 15 or sou, it wud fainali bi posibl tu meik ius ov thi ridandant letez "c", "y" and "x" -- bai now jast a memori in the maindz ov ould doderez -- tu riplais "ch", "sh", and "th" rispektivli.
        Fainali, xen, aafte sam 20 iers ov orxogrefkl riform, wi wud hev a lojikl, kohirnt speling in ius xrewawt xe Ingliy-spiking werld.

The purpose of project #3 is to implement some of this plan by translating ordinary English text (using normal spelling rules) into English that utilizes some of the plan described above.  In the file English-sample.txt, I have provided a sequence of byte declarations for some text that I  want your program to process.  Your program is required to display the text before and after conversion to the new spelling.  Following are the list of spelling changes your program must make.

  1. Replace the letter 'c' with 's' if the 'c' is followed by 'e' or 'i'.  Replace the pair of letters 'ch' with a 'c' alone.  Replace all other occurrences of 'c' with 'k'.
  2. Replace the letter 'y' with 'i'.
  3. Replace the letter 'x' with 'ks'.
  4. Replace the pair of letters 'ph' with 'f'.
  5. Replace the pair of letters 'ou' with 'u'.
  6. Delete the pair of letters 'gh' wherever it appears.
  7. Replace the pair of letters 'sh' with 'y'.
  8. Replace the pair of letters 'wh' with 'w'.
  9. Replace the pair of letters 'th' with 'x'.
  10. Finally, wherever two consecutive characters are the same letter, such as 'ss' or 'tt', eliminate one of the two letters.  There are two exceptions; allow the occurrence of 'ii' and 'uu' to remain as is - these may result from the use of the other replacement rules.
The file English-sample.txt is on the I: drive at I:\jlwolfe\300\spring08\English-sample.txt   Note:  the sample text contains both upper and lower case letters.  It is recommended that you have your program convert all letters to lower case prior to dealing with the letter replacements.  It is expected that the text displayed after the spelling conversion will contain only lower case letters.  Not all of the recommendations in the plan are being implemented and a couple of substitutions are being made in too general a way.  Consequently, some words in the new spelling are seriously distorted

Hand in a printout of the .ASM file; be sure to have plenty of comments to explain the instructions. Also, hand in a copy of what is displayed in the Output window when the program is assembled - I need proof that your program assembled without errors.  Finally, hand in  the program's output  which should show the original sample text and the converted text.  You may do a cut and paste from the output window and the execution window to an editor, such as NotePad; then print out the output. Note: when you print the .ASM file, do NOT do so with a word processor(unless you maintain Courier font and fixed spacing); instead, use an editor like NotePad and make sure the lines do NOT wrap - you may want to use 10pt type and print in landscape format.  You may also print from Visual Studio; this may be a better way to handle it.
 

You must name the .ASM file after yourself (use your last name). Then, copy the .ASM file to the handin folder on the P: drive for COSC 300.