Abstract:
There is disclosd a word processor capable of spelling verifying and correcting function with a limited display space. If a word is misspelled in an entered sentence, plural candidate correct spellings are displayed together with the entered sentence and in a suitable position relative to the sentence, thus facilitating the correction of spelling by the user.

Description:
BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     The present invention relates to a word processor, and more particularly to a spelling verifier and corrector, a new technology for checking the spelling of a word and showing candidates for correct spelling of the word. 
     2. Related Background Art 
     The spelling verifier and corrector, recently employed in word processors for the English language, is used for detecting a misspelling and suggesting candidate correct words for the misspelled word. Usually there are shown plural candidate words for a misspelled word. 
     In the correction of a misspelled word, in word processors with a large display such as a cathode ray tube, the display area is divided to simultaneously display plural candidate correct words estimated from the misspelled word, as well as the associated text being processed. However, in an electronic typewriter as shown in FIG. 1, the capacity of the display unit 4 is limited, for example to 2 rows, and may be less than the number of rows required to display the candidate words. Therefore, the technology for a large display unit cannot be directly utilized in this case. 
     SUMMARY OF THE INVENTION 
     In consideration of the foregoing, an object of the present invention is to eliminate the abovementioned drawbacks. 
     Another object of the present invention is to provide a technology for applying a spelling verifier and corrector capable of generating candidate words of a number larger than the capacity of the display unit, to a word processor, particularly an electronic typewriter. 
     Still another object of the present invention is to provide a word processor allowing the user to easily correct the spelling with reference to the preceding and succeeding words, by displaying candidate correct words for a misspelled word in a position related to a row of words containing that misspelled word. 
     Still another object of the present invention is to provide a word processor capable of displaying a candidate correct word for a misspelled word, in a position corresponding to the misspelled word in a row of words which are being entered or edited, and displacing the succeeding words according to the number of letters of the displayed candidate word. Accordingly, the candidate word is not separated from the row of words. The user, therefore, can easily select the candidate word at its proper position, while referring to the preceding and succeeding words. 
     Still another object of the present invention is to provide an electronic typewriter capable of word processing by displaying at least a part of a row of words, the typewriter comprising generating means for generating candidate correct words for a possibly misspelled word in the row, display means for displaying the row of words, and display control means for displaying plural candidate correct words together with a row of words being edited, by replacing a part of the row with a candidate word on said display means. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 an external view of the electronic typewriter embodying the present invention; 
     FIG. 2 is a block diagram of said electronic typewriter; 
     FIG. 3 is a block diagram of a circuit board for a spelling verifier and corrector; 
     FIG. 4 is a schematic chart showing an example of the order of candidate words; 
     FIG. 5 is a schematic view showing the structure of a first-in-first-out buffer memory; 
     FIG. 6 is a schematic view showing the content of a buffer memory; 
     FIG. 7 is a schematic view of a counter provided in a RAM; 
     FIG. 8 is a flow chart showing a control sequence; and 
     FIG. 9 is a schematic view showing the state of display. 
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     Now the present invention will be explained in detail with reference to an embodiment thereof shown in the appended drawings. 
     FIG. 1 is an external view of an electronic typewriter embodying the present invention, wherein shown are a main body 9; a display unit 4 of one or two lines for displaying a row of entered letters and a candidate word; a keyboard 8; a printer 5; a platen knob 10 for manually rotating a platen P on which a recording sheet S is supported; a key 40 for underlining the entered words or the candidate word, or displaying such words in gothic style, as will be explained later. Since the external appearance is almost same as that of an ordinary electronic typewriter, detailed explanation will be omitted. 
     FIG. 2 is a block diagram of the principal part of said electronic typewriter, wherein shown are a main CPU 1 for controlling the entire apparatus; a read-only memory (ROM) 2; a random access memory (RAM) 3; a display unit 4; a printer 5; a circuit board 6 of a spelling verifier and corrector (SVC); and a text memory 7; all connected to a main bus 12. FIG. 3 is a detailed block diagram of the SVC board 6. 
     Referring to FIG. 3, the SVC board 6 is provided with a program ROM 18 storing a program for selecting candidate words in response to input data from a CPU 16 for SVC control and according to data stored in a dictionary 17. The CPU 16 controls the selection of the candidate words from the dictionary 17 by means of an address decoder 21 and an output port 22 and utilizing the temporary storage of a user RAM 23. The CPU 16, output port 22, dictionary 17, address decoder 21, user RAM 23, and program ROM 18 are interconnected by an address bus 24 and a data bus 25. The address decoder 21 is connected to an input CK of output port 22 by a line 27, and respectively to inputs CS of the dictionary 17, program ROM 18, and user RAM 23 by lines 28, 29, and 30. The CPU 16 also controls data exchange with the CPU 1 through an interface logic 11 and the main bus 12. Control is conducted in the following manner: 
     (1) The CPU 16 receives a word from the main bus 12 through the interface logic 11, verifies whether the word is a correct one, and sends the result of verification back to the main bus 12; 
     (2) The CPU 16 receives a word from the main bus 12, and if apparently misspelled, sends words estimated from said received word, as candidate correct words for the misspelled word, back to the main bus 12. 
     Among these functions, the latter, which is the object of the present invention, provides plural candidate words depending on the input word. As an example, in response to a misspelled word &#34;spel&#34;, candidate words &#34;sped&#34;, &#34;spew&#34; and &#34;spell&#34; are provided in succession as shown in FIG. 4 and sent to the main bus 12. These candidate words sent to the main bus 12 are stored and taken out in first-in-first-out manner by a buffer memory 13 provided in the RAM 3, as shown in FIG. 5. Each unit 13a of the buffer memory 13 is composed, as shown in FIG. 6, of cells 14 of 32 bytes, wherein the first byte is used for indicating the number of letters constituting the word, and the remaining 31 bytes are used to store the word. 
     In case the operator enters a sentence &#34;How do you spel Mississippi?&#34; and then intends to correct the misspelled word &#34;spel&#34;, a cursor 31 (FIGS. 9(a) to 9(j)) is positioned, on the display unit 4, immediately behind the misspelled word &#34;spel&#34; and an instruction for correction is entered by the keyboard 8 through a key, e.g. 26. In response the display changes to &#34;How do you sped Mississippi?&#34;. Since the sentence is still wrong, the operator again enters the instruction for correction, whereupon the display 4 again changes to &#34;How do you spew Mississippi?&#34;. As the sentence is still wrong, the operator again enters the instruction for correction, thus obtaining a correct sentence &#34;How do you spell Mississippi?&#34; on the display unit 4. In the following description there will be explained in detail the process made in the electronic typewriter, on the generation and display of candidate words explained above. 
     According to the present invention, in order to achieve these functions, there is employed a counter DCNT 15, shown in FIG. 7, which is provided in the RAM 3 and utilized as will be explained later. 
     FIG. 8 is a flow chart showing the control sequence of the present invention, and FIG. 9 illustrates an example of display on the display unit 4. It is assumed that the cursor 31 is positioned immediately behind the word &#34;spew&#34;, as shown in FIG. 9(a). As will be explained later, the counter DCNT 15 stores a number &#34;4&#34;, indicating that the word &#34;spew&#34; is composed of 4 letters, and a step S1 stores the content of said counter DCNT 15 in a register REG in the CPU 1. A step S2 inspects the content of the register REG, and, if the content is not zero, indicating that some of the letters of the candidate word &#34;spew&#34; are displayed, a step S3 executes an erase process in the same manner as if an erase key 20 in the keyboard 8 (FIG. 1) is actuated. Thus the display changes to a state shown in FIG. 9(b), and the program proceeds to a step S4, in which the content of the register REG is decreased by one. Then the program returns to the step S2, and, since the content of the register REG is still not zero, the program proceeds to the step S3. In this manner the above-explained loop is repeated until the content of register REG becomes equal to zero. Thus the display changes in succession, from a state shown in FIG. 9(b), through (c) and (d), to (e). When the content of the register REG becomes equal to zero (FIG. 9(e)), the program proceeds from the step S2 to step S5, in which the succeeding candidate word &#34;spell&#34; is taken out from the aforementioned buffer memory 14. In this state, the content of the counter CNT is stored in the counter DCNT 15 and also stored in the register REG in the CPU 1. In this case said content is &#34;5&#34;. Subsequently a step S6 inspects the content of the register REG, and since said content is not zero, a step S7 inserts the first letter &#34;s&#34; in the same manner as the key &#34;s&#34; of the keyboard 8 is actuated. The display obtained in this state is shown in FIG. 9(f). A succeeding step S8 decreases the content of the register REG by one, and the program returns to the step S6, thus achieving a loop control. In this manner the display changes in the order of FIG. 9(g), (h), (i), and (j) to complete the display of a candidate word. Thus the operator can easily understand the replaced word and the position thereof. 
     These operations are repeated to finally display &#34;spell&#34; as shown in FIG. 4. As will be apparent from FIG. 9, as the display undergoes changes from &#34;spew&#34; to &#34;spell&#34; at the position of the correction process, the succeeding word &#34;Mississippi?&#34; is displaced thereby clarifying the relationship of the candidate word and the preceding and succeeding words, and facilitating the correction of spelling. 
     Also as explained before, the erasing or inserting process is conducted in the same manner as the process conducted when a corresponding key erase 20 of the keyboard 8 is actuated, so that the state for example of an underlining switch 40 is reflected in said process. Thus the candidate word can be displayed with an underline, by positioning the switch 40 at the underlining mode prior to the instruction for correction. 
     As explained in the foregoing, the present invention enables easy spelling correction even in an inexpensive word processor with a display capacity of one or several lines. 
     Also the present invention performs the spelling correction process with an extremely simple structure, since the erasing process and the letter entry process employed in the spelling correction are made the same as those instructed from the keyboard 8. 
     Furthermore the present invention provides a word processor of satisfactory operability, since the spelling correction can be achieved while confirming the preceding and succeeding words. 
     Furthermore the present invention allows the display of the condidate words, not in an area separate from the row of words to be edited but in the proper position in the row, and the succeeding letters are suitably displaced according to the number of letters constituting each candidate word, so that the editing and the spelling correction can be made on a real time basis. 
     It is also possible, after the entry of the entire text, to effect spelling verification manually or automatically, then to automatically move the cursor in succession to the words to be corrected, and to display the candidate words in the above-explained display form.