The San Francisco Fogger
Rate your writing-with 8-bit or ST
BY CHARLES JACKSON, Antic Tchnical Editor
Check the readability of your letters, reports and term papers. The San Francisco Fogger analyzes your text files and measures the clarity of your writing. We've provided both ST and 8-bit versions of the program. The 8-bit version of the program works on Atari computers with at least 32K memory, disk or cassette.
Sometimes, what you write isn't nearly as important as the way you write it. Consider, for example, an introductory BASIC tutorial which can only be understood by advanced BASIC programmers. Such a tutorial is useless to both groups of people. Now, your Atari can help.
Since the 1930s, writers have been constructing readability formulas to gauge the clarity of their writing. Robert Gunning's Fog Index, introduced in 1968, is one of the best-known. A newer variation of the Fog Index is G.H. McLaughlin's Smog Index, developed in 1980.
The Fog and Smog Indexes are mathematical formulas that estimate the number of years of schooling a person needs in order to read your writing easily. Most local newspapers, for example, are written at 8th-grade level, while the Wall Street Journal "fogs" in at about 12th grade.
In 1949, Dr. Rudolf Flesch introduced one of the first readability formulas. Flesch also developed formulas to measure the "human interest" of a text file. The Flesch Index yields a "reading ease" score between 0 (practically unreadable) and 100 (easy).
The San Francisco Fogger, named for Antic's home town, analyzes any text file and determines its Fog Index--as well as its Smog Index and Flesch Score. Fogger also counts the number of sentences and words in your file.
8-Bit Users: Type in Listing 1,FOGGER.BAS, check it with TYPO II and SAVE a copy before you RUN it.
ST Users: Type in Listing 2, FOGGER.C, and compile it with Alcyon C or Megamax C. Antic Disk owners can transfer the FOGGER.PRG file over to their ST, following the instructions in the ST Help file on Side B of the monthly disk.
The San Francisco Fogger is easy to use. Just enter the name of your text file, and the Fogger does the rest. The Fogger is designed to handle standard ASCII text files! You should avoid using it with files containing printer control codes, or with compressed files. Antic has successfully used the Fogger on 8-bit text files created with PaperClip and Atariwriter Plus. On the ST, 1st Word works if files are not saved in "Word Processing" mode, and ST Writer works unly with files that you print to disk.
HOW IT WORKS
Readability formulas usually rely on the average number of words in your sentences, the average number of syllables per word, and the average number of "difficult" words per sentence. Words with three or more syllables are considered difficult by most readability formulas.
The Fogger uses common algorithms to recognize words and sentences in a text file. A sentence is defined as a sequence of words ending in a period (or any other applicable punctuation mark). Words are sequences of letters or numbers not interrupted by a space. The Fogger also corrects for special cases such as "Mr." and "Jr."
The syllable-counting routines, however, are not so simple.
Initially, the progmm counts each occurrence of a vowel followed by a non-vowel. The word "Sanctionable" has four such occurrences (S an cti on ab l e).
Next, the Fogger accounts for special cases, such as words with a "silent e." When the Fogger finds a word with a silent e, it checks to see whether the total syllable count should be reduced. Words like "time," "tile" and "title" all have silent e's. When the Fogger finds such a word, it checks to see if the next-to-last letter is an L. Words which pass this second test, such as "tile" and "title", must go through a third test before the syllable count is correct.
In the third test, the Fogger checks to see if the letter before the L is either a vowel or an R, S, or L (as in quadrille). If the word passes the first two tests, but fails this one, we leave the syllable count alone. Otherwise, we subtract one to account for the silent e.
The Fogger also conducts a similar battery of tests on words which have patterns like es, ed, io, yi and ia. Because of limited publishing space, we could not include less-common patterns in the program.
Occasionally the Fogger will find a word which doesn't fit into any of these rules, and the syllable count will be somewhat inaccurate. Since all three readability formulas rely on average values, small inaccuracies in the overall syllable count will not affect the final Fog, Smog and Flesch values.
If you'd like to see the ST's syllable routines at work, hold down the [ALTERNATE] key while selecting (or double-clicking) the file to be processed. The Fogger will display each word in the file, along with the number of syllables in the word.
Once all of the syllables, words and sentences are counted, the Fogger calculates the Fog, Smog and Flesch Indexes. The formulas appear in the ST listing in the number_crunch( ) function.
By the way, this article has a Fog Index of 8.74, a Smog Index of 11.43 and a Flesch Score of 59.98.
The Art Of Readable Writing by Dr. Rudolf Flech. Harper & Brothers Publishers, 1949.
Would You Put That In Writing? by Dianna Booher. Facts On File, 1983.
Writing Effective Business Letters, Memos, Proposals, & Reports by Samuel Cypert. Contemporary Books, 1983.