Upload
linda-a-morris
View
212
Download
0
Embed Size (px)
Citation preview
Behavior Research Methods & Instrumentation1976, Vol. 8 (4),401·402
A generalized computer programfor editing narrative text
JOHN D. MORRIS and LINDA A. MORRISGeorgia Southern College
Statesboro, Georgia 30458
Some attention and effort have been devoted to thecomputer storage and retrieval of narrative informationfor purposes ranging from the production of outputdiagnostic of a subject's score profile on attitudinal orpersonality measures (Myers, 1962; Guertin, Litcher,Hedges, & Wilson, 1975) to storing clinical interviewmaterial in narrative form (Danskin, Unger, & Kennedy,1970). In the former case, the narrative data must bestored in memory and, upon consideration of eachcomponent of a subject's score vector, appropriatediagnostic narrative paragraphs can be retrieved and output. This procedure has the advantage of a standardizedinterpretation by a clinical specialist (usually the testauthor and/or those consorting with the author). Withonly the score profile and scale names, the interpretingcounselor or the subject may make vast interpretiveerrors. Accordingly, the purpose of this paper is todescribe a computer program which will read in alphameric narrative text and edit it to a specified left- andright-justified line length and also code and punchFORTRAN "DATA" statements containing the editedoutput. The narrative text could then be compiled bya scoring program and sections would be selected andoutput diagnostic of a subject's score profile. Alternatively, scoring could be accomplished independently anda purely interpretive program could be built based onthese DATA statements.
Program procedure. The narrative text is read fromthe desired input unit with a desired record length. Rightjustification is accomplished by inserting blanks intopositions selected by the following algorithm settingposition priorities. If there is a period in the line withonly one blank after it, a blank is first inserted after thatperiod. If no period is found, a blank is inserted afterany comma with only one blank following it. In orderto facilitate readability and appearance, remainingblanks are inserted between words, beginning from theend of the line, with the most nonblank characters.After extra blanks are inserted between all the words inthe line, the "character density" is recalculated and theblank insertion begins from the appropriate end of theline. When the line is right justified, the algorithm stopsand edits a new line. In addition, the program providesfor a character to signify the premature end of an inputrecord. This is necessary in inserting records or parts
This study was supported in part by a Georgia SouthernCollege Faculty Research Grant.
of records into the input me. A paragraph end characteris input which signals the algorithm to bypass rightjustification, ending the paragraph in normal text form.A character can be entered which insures the occurrenceof a blank. This is useful in paragraph indentation orcentering headings. Also, the user can enter a charactersignifying a possible syllabication split. This is useful ifthe text contains large words and is to be output inrelatively short lines. Whenever a word appears to beso long that it might cause excessive blanks in rightjustification, the syllabication character can be enteredbetween syllables. The algorithm will split the wordwith a hyphen if it appears at the end of an edited lineand the split is necessary; otherwise, the syllabicationcharacters are deleted.
FORTRAN DATA statements are coded andpunched, manifesting the edited text. These statementsare output in a continuous stream of 680 four-characterword vectors (constituting the allowable FORTRAN 19continuation statements). The names of the vectors arean input alphabetic character plus the sequential vectornumber. Noting where the diagnostic segments of thetext begin and end, the user can compile these vectorsinto a large matrix and select the appropriate segmentsthrough the indices of the words.
Input. The user must enter a variable format forreading alphameric text records, the number of recordsto be edited, the number of characters per record, theline length desired for output (must be a multiple offour), the character the user wishes to specify a prematurely ending input record, the character enteredwhen a blank is specifically desired, the charactersignifying the end of a paragraph, and the characterdesired for the alphameric portion of the output DATAstatement vector's name. If a blank is entered, no DATAstatements will be generated, with the program yieldingonly the edited printed text.
Output. The left- and right-justified text is printedalong with the line numbers and serial number of thefour character words contained on each line. It has beenfound advantageous to iteratively refme the narrativedescriptions through a jury method before actuallypunching the DATA statements. Also of use at thispoint is the premature end of a record character, allowing the user to change, insert, or delete sections of textwithout affecting adjacent portions of the text.
After satisfaction with the text has been achieved,the user can produce FORTRAN DATA statementswhich would be compiled into the narrative text whenincorporated into a scoring or interpretive program. TheDATA statements are each composed of 680 fourcharacter words coded in a Hollerith format, with thevector name being composed of the desired alphacharacter and the sequential number of the vector.
Computer and Language. This FORTRAN IV pro-
401
402 MORRIS AND MORRIS
gram is in use both on a CDC CYBER 74, in both batchand interactive modes, and on an IBM 370/165.
Availability. The program, with complete documentation and sample input and output illustrating theoptions described, is available at no cost on requestfrom the senior author at the Department of SchoolServices, Box 8143, Georgia Southern College,Statesboro, Georgia 30458.
REFERENCES
DANSKlN. D. G.. UNGER. B.. & KENNEDY. C. E. Adapting thecomputer for narrative material: A progress report. Journalq( Counseling Psychology. 1970. 17. 63-66.
GUERTlN. W. H •• LITCHER. J. H •• HEDGES, W. D.• & WILSON.J. T. Multidimensional assessment ofphilosophy of education.Gainesville, F1: Parauniversity Resources. 1975.
MYERS. I. B. Manual: The Myers-Briggs type indicator.Princeton: Educational Testing Service. 1962.