Abstract:
A document processing apparatus includes a text processor which compares temporal words and phrases of a first document which is used to generate a second, modified document, with temporal words and phrases in the second, modified document, and with temporal metrics. The result of the comparison operation is used to determine whether any temporal words in the modified document have not been updated or should be changed. The document processing apparatus helps to avoid inadvertent errors or omissions concerning temporal phrases, including dates, made when a new document is created using a pre-existing document.

Description:
BACKGROUND OF THE INVENTION 
     The present invention relates to a document processing apparatus and method, and more particularly, to an aid for editing a document which pays particular attention to the usage of time-related words. 
     In order to quickly prepare a document, parts of existing documents are frequently reused. However, persons editing text often overlook or fail to update time related words, such as today, yesterday or seasonal terms, such as spring. 
     It is an object of the present invention to provide a document processing apparatus and method which avoids an omission or an erroneous correction for a time-related word appearing in a document. 
     SUMMARY OF THE INVENTION 
     Briefly stated, the present invention provides a document processing apparatus for editing document data. The apparatus includes an input unit, a processing unit and an output unit. The input unit receives first document data and second document data. The second document data is a revised version of the first document data. The first and the second document data includes first and second word data related to time, respectively. The processing unit is connected to the input unit, receives the first and the second document data from the input unit and determines whether the second time-related word data is properly updated using the first and the second time-related word data. The output unit outputs the determination result to inform an operator that the second time-related word data has been properly updated. 
     The present invention provides a document processing apparatus for editing document data. The apparatus includes an input unit, a first storage unit, a second storage unit, a display unit, a control unit and a processing unit. The input unit is used by an operator to prepare first document data and permits second document data to be prepared by updating the first document data. The first and the second document data include first and second time-related word data, respectively. The first storage unit stores the first document data. The second storage unit for stores the second document data. The display unit displays the first and second document data. The control unit causes the first document data stored in the first storage unit to be displayed on the display unit before editing the first document data takes place and causes the second document data stored in the second storage unit to be displayed on the display unit after editing the first document data. The processing unit reads the first and the second document data from the first and the second storage unit, respectively and for determines if the second time-related word data has not been properly updated using the first and the second timerelated word data. The control unit controls the display unit so that the improperly updated second time-related word data is displayed on the display unit in a manner identifiable by the operator. 
     The present invention provides a document processing method for editing document data. The method includes the steps of: inputting first document data and second document data, the second document data being an updated version of the first document data, the first and the second document data including first and second time-related word data, respectively, determining whether the second time-related word data is properly updated using the first and the second time-related word data; and outputting a result of determination such that the improperly updated second timerelated word data is recognized by an operator. 
     The present invention provides a document processing method for editing document data. The method includes the steps of: inputting first document data and second document data, the second document data being an updated version of the first document data, the first and the second document data including first and second time-related word data, respectively; storing the first document data in a first storage unit; storing the second document data in a second storage unit; displaying the first document data stored in the first storage unit on a display unit before editing the first document data and displaying the second document data stored in the second storage unit on the display unit after editing the first document data; reading the first and the second document data from the first and the second storage units, respectively; detecting second time-related word data which has not been properly updated using the first and the second time-related word data; and displaying the detected improperly updated second time-related word data on the display unit in a manner identifiable by an operator. 
     The present invention provides a recording medium having stored therein a computer readable program for editing document data. The program executes a method including the steps of: receiving first document data and second document data, the second document data being a revised version of the first document data, the first and the second document data including first and second timerelated word data, respectively; determining whether the second time-related word data has been properly updated using the first and the second time-related word data; and outputting a determination result such that the improperly updated second time-related word data is recognized by an operator. 
     The present invention provides a recording medium having stored therein a computer readable program for editing a document. The program executes a method including the steps of: receiving first document data and second document data, the second document data being a revised version of the first document data, the first and the second document data including first and second time-related word data, respectively; storing the first document data in a first storage unit; storing the second document data in a second storage unit; displaying the first document data stored in the first storage unit on a display unit before editing the first document data and displaying the second document data stored in the second storage unit on the display unit after editing the first document data; reading the first and the second document data from the first and the second storage units, respectively; detecting the second time-related word data which has not been properly updated using the first and the second time-related word data; and displaying the improperly updated second time-related word data on the display unit in a manner identifiable by an operator. 
     Other aspects and advantages of the invention will become apparent from the following description, taken in conjunction with the accompanying drawings, illustrating by way of example the principles of the invention. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     The invention, together with objects and advantages thereof, may best be understood by reference to the following description of the presently preferred embodiment together with the accompanying drawings in which: 
     FIG. 1 is a schematic block diagram of a document processing apparatus according to one embodiment of the present invention; 
     FIG. 2 is a flow chart of an alert operation for temporal word; 
     FIG. 3 is a flow chart of a subroutine of the alert operation of FIG. 2, which prepares a temporal word table; 
     FIG. 4 is a flow chart of a subroutine which prepares a table and detects omissions of correction; 
     FIG. 5 is a word and phrase table for text data in a document before modification; 
     FIG. 6 is the word and phrase table of FIG. 5 after modification; 
     FIG. 7 depicts a text before modification as displayed on a display screen; 
     FIG. 8 depicts a modified text as displayed on the display screen; 
     FIG. 9 depicts another text before modification as displayed on the display screen; 
     FIG. 10 depicts of FIG. 9 after modification as it is displayed on the display screen; 
     FIG. 11 is a word and phrase table for the text data of FIG. 9; 
     FIG. 12 is a word and phrase table for the text data of FIG. 10; 
     FIG. 13 depicts a displayed document containing a substitute candidate for a temporal word was not corrected; 
     FIG. 14 is a flow chart of a subroutine used to display the substitute candidate for the temporal word of FIG. 13; and 
     FIG. 15 shows a list of substitute candidate words and phrases. 
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT 
     Certain words are used in the description for convenience and are not meant to be limiting. Such words includes the word &#34;correction&#34; which, as used herein, refers to a change made to text of a pre-existing document. One embodiment of the present invention will be described below with reference to the drawings. FIG. 1 is a schematic block diagram of a document processing apparatus 10 according to the present invention. The document processing apparatus 10 comprises a central processing unit (CPU) 12, a keyboard 18, a mouse 20, first and second text memories 24, 26, a word and phrase analysis dictionary 30, a word and phrase table 34, a temporal information dictionary 38 and a display unit 42. 
     The CPU 12 operates in accordance with a control program stored in a storage or recording medium 44 to function as a controller 14, an input unit 16, a text processor 22, a word and phrase analyzer 28, a word and phrase processor 32, a location of correction detector 36 and a location of correction alerting unit 40. 
     The input unit 16 receives character string data (hereafter referred to as text data) for a document such as a document 80 shown in FIG. 7, for example, which is entered from an input device, such as the keyboard 18. The keyboard 18 and the mouse 20 operate as understood by those of ordinary skill in the art. For example, the mouse 20 is used to effect a cursor movement or zone designation displayed on the display unit 42 during the preparation of a document. The input unit 16 may also receive data stored on a recording medium, such as a floppy disk (not shown) or a hard disk unit (not shown). 
     The text processor 22 receives text data from the input unit 16 and stores the text data it the first text memory 24 as pre-correction text data. The text processor 22 also stores text data, which is corrected by an operator using the keyboard 18 and/or the mouse 20, into the second text memory 26. FIG. 8 shows a document 82 which corresponds to the document 80, shown in FIG. 7, in which only the timerelated word (hereafter simply referred to as temporal word or phrase) have been corrected or changed. 
     The display unit 42 includes an LCD (liquid crystal) display or CRT display which displays the document 82 by formulating character strings corresponding to the latest version of text data, of course, the display unit 42 displays the document 80 shown in FIG. 7, for example, by formulating character strings corresponding to the pre-correction text data stored in the first text memory 24. As a correction is made in the document, character strings corresponding to the corrected text data, which is stored in the second text memory 26, are formulated, and the document 82 is displayed. 
     The word and phrase analysis dictionary 30 stores an analysis rule for splitting the character string data into parts of speech, morphemes, and punctuation marks, such as commas, periods, spaces. As will be understood by those of ordinary skill in the art, other analysis rules could be used. For instance, a rule which breaks the character strings into phrases, semantemes and punctuation marks could be used. 
     The word and phrase analyzer 28 reads the pre-correction and the corrected text data from the first and second text memories 24, 26, respectively, and splits the character string data corresponding to the pre-correction and the corrected text data into morphemes. The word and phrase analyzer 28 then analyzes the morphemes. 
     As the text data is changed or corrected using the keyboard 18 or the mouse 20, the word and phrase table processor 32 extracts a time-related word or words from among the words obtained by the morpheme analysis of the word and phrase analyzer 28 and stores them in the word and phrase table 34. FIG. 5 shows a word and phrase table 34A formed on the basis of the text data of the document 80 shown in FIG. 7. The word and phrase table 34A includes the extracted temporal words or phrases &#34;Oct. 6, 1996&#34;, &#34;in the season of red leaves &#34; and &#34;yesterday&#34;. FIG. 6 shows a word and phrase table 34B formed on the basis of the text data of the document 82 shown in FIG. 8. The word and phrase table 34B includes extracted temporal words or phrases &#34;Apr. 6, 1997&#34;, &#34;in the season of red leaves&#34; and &#34;yesterday&#34;. 
     The temporal information dictionary 38 stores information representing evaluation metrics which define a permissible interval of use for a temporal word. In the present embodiment, the permissible interval of use is defined by start data and end data, and the interval can be changed at will. For example, start data expressed in Anno Domini includes numeral digits representing the year in four digits, but from which two-leading digits are omitted, periods standing for &#34;year&#34; and &#34;month&#34;, and numeral digits which represent month and day. The word day is omitted. End data expressed in Anno Domini is similar to the start data. Where the mouth and the day are each represented by a single digit X, the digit X is converted into 0X. For the temporal phrase &#34;in the season of red leaves&#34;, the start data includes &#34;* *. 10. 01&#34; and the end data includes &#34;* *.10. 31&#34; where &#34;*&#34; is an arbitrary numeral. The temporal word &#34;yesterday&#34; is not specified with a date, and therefore has no evaluation metrics information associated therewith. 
     On the basis of the temporal information included in the temporal information dictionary 38, the location of correction detector 36 determines the start data and the end data of the evaluation metrics for each temporal word extracted by the word and phrase table processor 32. The start data and end data are stored in the word and phrase tables 34A and 34B. The location of correction detector 36 then compares corresponding temporal words between the word and phrase tables 34A, 34B to confirm whether the temporal word has been modified. A result of confirmation is stored in the word and phrase table 34B. The location of correction detector 36 compares the evaluation metrics of the modified temporal word against the evaluation metrics of each temporal word in the word and phrase table 34B, and identifies if each temporal word is within the permissible interval of use on the basis of a result of the comparison. For a temporal word which is out of the permissible interval of use, an alert flag is activated in the word and phrase table 34B. Specifically, an alert flag is turned ON for a temporal word having evaluation metrics which contradict the evaluation metrics of the temporal word indicated as modified. 
     In order to alert an operator for any omission or mistake of a correction, the location of correction alerting unit 40 displays the temporal word for which the alert flag is turned ON on the display unit 42, preferably using an emphasis display, such as a high luminance or flashing display. 
     The controller 14 controls the input unit 16, the text processor 22, the word and phrase analyzer 28, the word and phrase table processor 32, the location of correction detector 36, the location of correction alerting unit 40 and the display unit 42. 
     The operation of the document processing apparatus 10 will now be described with reference to the flow charts shown in FIGS. 2 through 4. When the text data is input to the input unit 16, the controller 14 controls the text processor 22 to store the text data into the first text memory 24, and also controls the display unit 42 to display a document corresponding to the text data thereon. 
     At step 50, the operator modifies the text data using the keyboard 18 or the mouse 20. A document corresponding to the modified text data (i.e., the changed and unchanged data) is displayed on the display unit 42. 
     At step 52, the word and phrase table 34A which includes evaluation metrics of temporal words in the pre-modification text data and the word and phrase table 34B which includes evaluation metrics of temporal words in the modified text data are prepared. 
     FIG. 3 shows the preparation of the word and phrase tables which takes place at step 52 in detail. Initially, the word and phrase analyzer 28 reads the pre-modification text data from the first memory 24 and then performs a morpheme analysis thereon according to the analysis rule in the word and phrase analysis dictionary 30. 
     At step 62, the word and phrase table processor 32 extracts temporal words from the pre-correction text data which have been subjected to the morpheme analysis. 
     At step 64, the word and phrase analyzer 28 reads the modified text data from the second text memory 26 and performs a morpheme analysis thereon according to the analysis rule in the word and phrase analysis dictionary 30. 
     At step 66, the word and phrase table processor 32 extracts temporal words from the modified text data which have been subjected to the morpheme analysis. 
     At step 68, the word and phrase table processor 32 prepares the word and phrase table 34A based on the temporal words in the pre-modification text data and also prepares the word and phrase table 34B based on the temporal words in the modified text data. 
     Returning to FIG. 2, at step 54, the location of correction detector 36 detects any temporal word which is out of the permissible interval of use based on the word and phrase table prepared at step 52. At step 56, the location of correction alerting unit 40 alerts a user to the occurrence of a temporal word which is out of the permissible interval of use, as detected at step 54, by displaying it. 
     FIG. 4 shows the detail of the preparation of the word and phrase table which takes place at step 52 and the detection of a temporal word which is out of the permissible interval of use. 
     Initially, at step 70, the location of correction detector 36 compares each temporal word in the pre-modification word and phrase table 34A against each temporal word in the modified word and phrase table 34B to evaluate if any one of the corresponding temporal words is modified, and incorporates a result of such evaluation into the modified word and phrase table 34B. 
     At step 72, the location of correction detector 36 determines whether or not a comparison has been completed for the last temporal word in the modified word or phrase table 34B. If not, the operation proceeds to step 74. If yes, the evaluation is completed. 
     At step 74, the location of correction detector 36 compares the evaluation metrics of the temporal word in the modified word and phrase table 34B which is indicated as modified against the evaluation metrics of each temporal word. 
     At step 76, the location of correction detector 36 determines whether or not the evaluation metrics of the modified word or phrase contradicts the evaluation metrics of respective temporal words. If the presence of a contradiction is determined at step 76, the location of correction detector 36 turns ON the alert flag which is associated with the contradicting temporal word at step 78, and then returns to step 72. When no contradiction is found at step 76, the operation also returns to step 72. The location of correction detector 36 repeats the processing loop including steps 74, 76 and 78 until the processing of the last temporal word in the modified word and phrase table 34B is completed. 
     A specific alerting operation concerning a temporal word during editing a document will be described with reference to FIGS. 5 to 8. The text data of the document 80 shown in FIG. 7 is stored in the first text memory 24. The document 80 includes character strings corresponding to temporal phrases &#34;Oct. 6, 1996&#34; and &#34;in the season of red leaves&#34; and the temporal word &#34;yesterday&#34;. The operator generates the document 82 shown in FIG. 8 by using the keyboard 18 or the mouse 20 or any other input device to modify the document 80. In the document 82, only the temporal phrase &#34;Oct. 6, 1996&#34; is modified to &#34;Apr. 6, 1997&#34;. 
     The text data of the document 80 is subject to the morpheme analysis by the word and phrase analyzer 28. The temporal phrases &#34;Oct. 6, 1996&#34; and &#34;in the season of red leaves&#34; and the temporal word &#34;yesterday&#34; are extracted by the word and phrase table processor 32 to prepare the word and phrase table 34A shown in FIG. 5. The updated text data in the document 82 is subjected to the morpheme analysis by the word and phrase analyzer 28. The temporal phrases &#34;Apr. 6, 1997&#34;, and &#34;in the season of red leaves&#34; and the temporal word &#34;yesterday&#34; are extracted by the word and phrase table processor 32 to prepare the word and phrase table 34B shown in FIG. 6. 
     On the basis of temporal information included in the temporal information dictionary 38, start data and end data &#34;96. 10. 06&#34; are established as evaluation metrics for the temporal phrase &#34;Oct. 6, 1996&#34; in the word and phrase table 34A. Similarly, start data &#34;* *. 10. 01&#34; and end data &#34;* *. 10. 31&#34; are established as evaluation metrics for the temporal phrase &#34;in the season of red leaves&#34;. No evaluation metrics are established for &#34;yesterday&#34;. In the word and phrase table 34B, start data and end data &#34;97. 04.06&#34; is established as evaluation metrics for the temporal phrase &#34;Apr. 6, 1997&#34;. Start data &#34;**. 10. 01&#34; and end data &#34;**. 10. 31&#34;, are established as evaluation metrics for the temporal phrase &#34;in the season of red leaves&#34;. No evaluation metric is established for &#34;yesterday&#34;. 
     A comparison is made between each temporal word before the modification and each corresponding temporal word after the modification, and YES or NO is established in the column of modification for each temporal word in the word and the phrase table 34B. Specifically, YES is established in the modification column for the temporal phrase &#34;Apr. 6, 1997&#34; while NO is established in the modification column for the temporal phrase &#34;in the season of red leaves&#34; and temporal word &#34;yesterday&#34; in the word and phrase table 34B. 
     Using the evaluation metrics for the temporal phrase &#34;Apr. 6, 1997&#34;, which is indicated as modified, the evaluation metrics for the temporal phrases &#34;Apr. 6, 1997&#34; and &#34;in the season of red leaves&#34; and temporal word &#34;yesterday&#34; in the word and phrase table 34B are evaluated. Since the evaluation metric for the temporal phrase &#34;Apr. 6, 1997&#34; does not contradict the evaluation metrics for the temporal phrase &#34;Apr. 6, 1997&#34; which is indicated as modified, no alert flag is activated for the temporal phrase &#34;Apr. 6, 1997&#34;. The evaluation metrics &#34;97.04.06&#34; for the temporal phrase &#34;Apr. 6, 1997&#34; is not included between the start data and the end data which define the evaluation metrics for the temporal phrase &#34;in the season of red leaves&#34;, and thus is determined as contradicting, and accordingly, an alert flag is turned ON for the temporal phrase &#34;in the season of red leaves&#34;. The evaluation metrics &#34;97. 04. 06&#34;, for the temporal phrase &#34;Apr. 6, 1997&#34;, contradicts the evaluation metrics for the temporal word &#34;yesterday&#34;, and accordingly, an alert flag is turned ON for the temporal word &#34;yesterday&#34;. 
     The temporal phrase &#34;in the season of red leaves&#34; and temporal word &#34;yesterday&#34; for which the alert flag is turned ON are preferably emphatically displayed on the screen of the display unit 42 by the location of correction alerting unit 40. In FIG. 8, the emphasis display is indicated by the double underlines. In this manner, an operators attention is directed to an omission or a mistake of correction in order to avoid such an omission or a mistake of correction to a temporal word used in the document. In the present embodiment, the emphasis display can be performed by properly identifying the temporal word which is not corrected on the basis of the predetermined permissible interval of use. 
     The present invention is equally applicable to a document 100 as shown in FIG. 9. FIG. 9 shows a pre-correction document 100, and FIG. 10 shows a document 102 in which the temporal phrase &#34;Dec. 10, 1997&#34; appearing in the document 100 of FIG. 9 has been changed to &#34;Jan. 20, 1998&#34;. Based on this correction, the CPU 12 emphatically displays other temporal phrases or word &#34;Dec. 16, 1997&#34;, &#34;Dec. 21, 1997&#34;, &#34;Christmas&#34; and &#34;Dec. 12, 1997&#34; appearing in the document 102 on the screen of the display unit 42 (the emphasis display is indicated in FIG. 10 in double underlines). In this manner, the CPU 12 specifies a temporal word or phrase to be corrected, by using the word and phrase tables 34C and 34D shown in FIGS. 11 and 12, respectively. 
     In addition, the document processing apparatus 10 of the present invention may display one or more alternative or substitute candidates for the temporal word subjected to emphasis display (for example, a substitute candidate for &#34;Christmas&#34; is &#34;Easter&#34;), as illustrated in FIG. 13. When the operator judges that one of the substitute candidates is proper, the mouse 20 or predetermined key stroke or command may be used to select the desired substitute candidate. In response to the substitute operation by the operator, the CPU 12 substitutes the temporal word or phrase. Of course, the operator can also supply a different substitute word or phrase. 
     FIG. 14 is a flow chart of the display operation for a substitute candidate for a temporal word. At step 90, when the operator moves the cursor to a word (which may be &#34;Christmas&#34;, for example) for which the display of a substitute candidate is desired by operating the keyboard 18, the CPU 12 refers to the word and phrase table 34D and retrieves a temporal word which matches the temporal word located at the cursor position. If such a temporal word exists, at step 92, the CPU 12 refers to the word and phrase table 34D to retrieve a reference period (which may be &#34;1998. 01. 20-1998.01.20&#34;, for example) for the substitute candidate. 
     The CPU 12 then refers to a word and phrase list 91 in order to retrieve a substitute candidate having an interval which overlaps the reference period. When the substitute candidate is found to exist, the substitute candidate is displayed on the display unit 42 at step 100. If no substitute candidate exists, a substitute candidate is retrieved at step 98 which has an interval closest to the reference period. In this instance, a substitute candidate &#34;Easter&#34; having an interval &#34;03.01-04.24&#34; is selected. Subsequently, the substitute candidate &#34;Easter&#34; is displayed on the display unit 42 as shown in FIG. 13. 
     It should be apparent to those skilled in the art that the present invention may be embodied in many other specific forms without departing from the spirit or scope of the invention. Therefore, the present examples and embodiments are considered as illustrative and not restrictive and the invention is not to be limited to the details given herein, but may be modified within the scope and equivalence of the appended claims.