Abstract:
A document processing apparatus which has a keyboard for inputting characters and instructions. The apparatus includes a memory that randomly stores the inputted characters as titles and documents. The memory includes a field associated with each of the titles for storing an evaluation value indicating an order for the sequential display of the titles. The evaluation value is generated by comparing each of the titles to each other to determine the order of the sequential display. The apparatus in response to the inputted instructions sequentially displays the titles in a forward or a reverse sequence.

Description:
This application is a continuation of application Ser. No. 07/825,776, filed Jan. 21, 1992, now abandoned, which is a continuation of application Ser. No. 07/593,282, filed Oct. 5, 1990, now abandoned, which is a continuation of application Ser. No. 07/284,826, filed Dec. 14, 1988, now abandoned, which is a continuation of application Ser. No. 07/139,165, filed Dec. 21, 1987, now abandoned, which is a continuation of application Ser. No. 07/057,742, filed Jun. 3, 1987, now abandoned, which is a continuation of application Ser. No. 06/807,786, filed Dec. 12, 1985, now abandoned, which is a continuation of application Ser. No. 06/538,917, filed Oct. 4, 1983, now abandoned. 
    
    
     BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     The present invention relates to a typewriter, and more particularly to an electronic typewriter. 
     2. Description of the Prior Art 
     The typewriter has advanced from mechanical models to electronic models. The electronic typewriter can handle a large amount of information and store and maintain sentences and information necessary for typing. The information has titles assigned to it by an operator so that it can be readily registered and retrieved. 
     FIG. 1 shows the keyboard of an electronic typewriter. SSW denotes a slide switch which instructs registration of document information into a memory when it is at a rightmost position STR, and instructs retrieval of the document information from the memory when it is at another position. P.sup.. FORM denotes a key used to register or retrieve information for a page format, that is, tabulations and margins for a special format, S.sup.. FORM denotes a key used to register or retrieve information for a stop position format, that is, start position data for records on a specific slip, and TEXT denotes a key used to register or retrieve a document. INDEX denotes a key to instruct line feed, REVINDEX denotes a key to instruct reverse line feed, RTN denotes a key to instruct carriage return, * denotes a key to instruct a punctuation in a series of operations, and REPEAT denotes a key to instruct repetition of a key depressed immediately before. 
     FIG. 2 shows an external view of a display which comprises a 20-digit fluorescent display tube. The display tube of FIG. 2 is usually arranged on the top of the keyboard of FIG. 1 so that an operator can readily watch it. 
     FIG. 3 shows a flow chart for registering a document. In a step 3.1, the slide switch SSW is set to STR to instruct a new registration. In a step 3.2, the TEXT key is depressed, and in a step 3.3, a desired AS title is entered by character keys. In a step 3.4, the * key is depressed and in a step 3.5, the inputting of the document is started. After the document has been input, the TEXT key is again depressed in a step 3.6 to terminate the registration operation. 
     FIG. 4 shows a flow chart for retrieving the document in the prior art system. In a step 4.1, the slide switch SSW is set to a position other than STR to instruct the retrieval of the registered document by generating a document retrieval instruction. In a step 4.2, the TEXT key is depressed, and in a step 4.3, the title of the registered document is entered. It is apparent that the document cannot be retrieved if a correct title is not entered. After the title inputting step 4.3, the * key is depressed in a step 4.4 and in a step 4.5 the registered document is amended or additional data is input, and in a step 4.6, the TEXT key is depressed again to terminate the retrieval operation. 
     A disadvantage in the document retrieval operation described above is that the input title must be identical to the registered one. Thus, the operator must perfectly remember the registered title. This is a substantial burden to the operator when the number of registered documents is large. 
     SUMMARY OF THE INVENTION 
     It is an object of the present invention to provide a retrieving system which is simpler than the prior art retrieving system and can be readily operated. 
     It is another object of the present invention to provide an apparatus which allows the retrieval of a document even if an operator forgets a title of the document, and has a memory for storing an order of titles so that the titles are referenced at a high speed and in sequential order. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 shows a keyboard of the conventional electronic typewriter; 
     FIG. 2 shows a display of the conventional electronic typewriter; 
     FIG. 3 shows document registration steps in the conventional system; 
     FIG. 4 shows document retrieval steps in the prior art system; 
     FIG. 5 shows document retrieval steps in accordance with the present invention; 
     FIG. 6 shows a system configuration of an embodiment of the present invention; and 
     FIGS. 7 and 8 illustrate the relationship between a control unit and a document memory. 
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     A document retrieval method of the present invention is shown in FIG. 5. In a step 5.1, the slide switch SSW is set to any desired position to generate a document retrieval instruction. In a step 5.2, the TEXT key is depressed and in a step 5.3, the RTN key is depressed. Immediately after the depression in the step 5.3, one of the titles of the registered documents is displayed. If more than one document has been registered, the titles of the respective documents are assigned numbers by a given rule in accordance with ASCII codes so that the title having the lowest numerical value is displayed first. If the title displayed is not the one desired by the operator, steps 5.4 and 5.5 are carried out. In the step 5.4, the REVINDEX key is depressed to instruct display of the titles in the reverse sequence to the numeric value sequence, and in the step 5.5, the INDEX key or the RTN key is depressed to instruct the display in the forward sequence. Thus, REVINDEX INDEX and RTN keys all generate a title search instruction. When the desired title is displayed, the * key is depressed in a step 5.7 to produce a selection instruction. Steps 5.8 and 5.9 are similar to the steps 4.5 and 4.6, respectively. 
     A specific embodiment of the present invention is shown in the block diagram of FIG. 6. Numeral 1 denotes a keyboard, numeral 2 denotes a controller, numeral 3 denotes a display, numeral 4 denotes a printer and numeral 5 denotes a document memory. Input information entered by the keyboard 1 is processed by the controller 2 and the processed data are sent to the display 3, the printer 4 and the document memory 5. The controller 2 can also read out the document information from the document memory 5. 
     The document memory 5 is divided into a directory area 5.1 and a memory area 5.2. The directory area 5.1 manages the memory area 5.2. The memory area 5.2 contains the documents or character strings coded in accordance with the ASCII code. The directory area 5.1 also includes managing information for the documents, which comprises a TTL field for storing the titles consisting of character strings, an ADR field for indicating a start address of the document associated with each title, a CNT field for indicating a size of the document and a # field for storing the numerical value of the title. The controller 2 can write into and read from any location in the document memory 5. The relationship between the controller 2 and the document memory 5 which is pertinent to the present invention is explained below. FIG. 7 illustrates the controller 2 and the document memory 5 of the present invention. X denotes an addressing unit for specifying the managing information for each document, Y denotes an addressing unit for specifying one of the fields TTL, ADR, CNT and #, TTLBF denotes a buffer for temporarily storing the title information stored in the TTL field of the document memory, and CMP denotes a comparator. A processor PROC can issue an instruction to either of the addressing units X and Y, the buffer TTLBF and the comparator CMP. Let us assume that the key operation is at the step 5.3 in FIG. 5 and the RTN key is depressed. The controller 2 first clears all of the # fields in the managing information. After the initialization, the processor PROC compares the first managing information 1 with the next managing information 2 by using the addressing units X and Y. Assuming that a title &#34;BOOK&#34; is contained in the TTL field of the first managing information 1 and a title &#34;BOARD&#34; is contained in the TTL field of the next managing information 2, the character information are compared character by character to the right starting from the leftmost character. The character string &#34;BOOK␣&#34; is represented by the ASCII code as &#34;42, 4F, 4F, 4B, 20&#34; as shown in FIG. 8, and the character string &#34;BOARD&#34; is represented as &#34;42, 4F, 41, 52, 44&#34;. 
     At the first character comparison, &#34;42&#34; and &#34;42&#34; are compared and the result of comparison is &#34;equal&#34;. In this case, the next characters must be compared. At the second character comparison, &#34;4F&#34; and &#34;4F&#34; are compared and the result of comparison is also &#34;equal&#34;. Thus, the third characters are compared. At the third character comparison, the result &#34;4F&gt;41&#34; is obtained. The number 2 of the smaller managing information is stored in the processor PROC. Then, the managing information 2 which has just been stored is compared with another managing information. Namely, &#34;BOARD&#34; and &#34;DESK␣&#34; are compared. At the first character comparison, the result &#34;42&lt;44&#34; is obtained. The number 2 of the smaller managing information is then stored again in the processor PROC. Then, &#34;BOARD&#34; and &#34;ALL␣␣&#34; are compared. At the first character comparison, the result &#34;42&gt;41&#34; is obtained. In this manner, it is determined that the smallest managing information is the information 4 &#34;ALL␣␣&#34;, and &#34;1&#34; representing a first order is written in the # field at the address 4 of the memory area 5.1 (2nd). In the next step, the comparison is made for the managing information having &#34;0&#34; in the # field and &#34;2&#34; representing the second order is written in the # field of the managing information 2 (3rd). In a similar manner, the third order and the fourth order are determined. In other words, the order is determined in accordance with a rule used in a language dictionary. Then, the TTL field of the first order managing information is transferred to the buffer TTLBF and then sent to the display 3. 
     For the depression of the INDEX key or the RTN key shown in the step 5.5 of FIG. 5, the TTL field of the next order managing information is displayed. On the other hand, for the depression of the REVINDEX key shown in the step 5.4, the TTL field of the previous order is displayed. The title may be printed out by the printer 4.