Data processor

Abstract: The invention provides a data processor comprising a receiving device for receiving data from a network, a memory for storing the data received by the receiving device, an output device for outputting the data stored in the memory, and a translator for translating an original text written in a first language into a translated text written in a desired second language. Text data in the received data written in the first language is translated into the second language by the translator upon receipt of the data from the receiving device, the text data translated into he second language is stored in the memory, and the text data translated into the second language by the translator is output by the output device.

Description: BACKGROUND OF THE INVENTION 1.Field of the Invention The present invention relates to a data processor for translating data and more particularly a data processor for automatically translating data received from networks. 2.Description of Related Art Conventionally, for translating a string of characters or using a dictionary function to look for the meaning of a word when one uses an application, it is necessary to follow the procedure described below. First, an application is started up for inputting a set of character strings and then the set of character strings is input. Then character strings in the set to be translated are selected and stored in a file. Next, a translation application or a dictionary application is activated to start a desired processing, i.e., translation of the character strings or consultation of the dictionary. Then, the obtained result is displayed. In the above-described conventional procedure, all the steps except the last output of the obtained result must be operated by a user, including the indication of what part of the input character strings to translate. JP-4-80101 discloses a technique for translating original text data read by an optical reading device and printing the translation result. In this technique, however, the reading operation serves as an instruction key for the start of translation. Further, since original data must conventionally be stored in a file before translation, it is impossible to start translation of a document having character strings and drawings together before all data for the document is collected (in the case of the optical reading device, all data is read), because such a document cannot be stored in a file before all data becomes ready. In the International Patent Application WO 89/02131, a method of operating a computer system to provide customized I/O information, and primarily foreign language translation of system-supplied screen displays is disclosed. User-customisation including language translation is effected without the need to modify underlying system source code. A translation environment includes an autonomous processor interposed between a host system and access devices. Information transmitted between the host and access device is diverted to the processor for intermediate processing. One phase of this processing generates a translation file which stores a mapping relationship between a first language screen and its second language counterpart. This translation file is invoked during the second processing phase to effect a translation from the first-to-second language upon a host response and from the second-to-first language upon a host request. In the European Patent Application EP 0449230, a translation method and system for communication between speakers of different languages is disclosed. A terminal of a speaker of a first language is connected to a terminal of a speaker of a second language for a communication there between. A sentence represented in the first language is read in to the terminal of the first language speaker, the first-language sentence is translated into the second language, and the translated sentence of the second language is output from the terminal of the speaker of the second language. Vice versa, a sentence of the second language is read in to the second-language speaker's terminal, the sentence of the second language is translated into the first language, and the translated sentence of the first language is output from the terminal of the speaker of the first language. Words appearing in sentences input from the second-language terminal are memorized so that the memorized words are preferentially selected when determining equivalents in later translation of sentences input from the first-language terminal. In case translation is achieved in bi-directional manner between the terminals, words appearing in sentences input from the first-language terminal are also memorized so that the memorized words are preferentially selected when determining equivalents in later translation of sentences input from the second-language terminal. Thus, an appropriate equivalent is selected at a high probability and terms are used in a consistent manner between a transmitted sentence and a received sentence. SUMMARY OF THE INVENTION In order to cope with the above problems, the present invention, as claimed, is to provide a data processor for translating information and an electric mail received from a network automatically upon receipt of the information and the electric mail. One object of the present invention is to provide a data processor to, when the same data is received twice or more, output a first translation in order to avoid repeated translation of the data. Another object of the present invention is to provide a data processor for translating received data in the background while displaying the received data. A further object of the present invention is to provide a data processor to, when a part of received data is identical with previously translated data, translate the received data except the identical part in order to shorten the time for translation. Still another object of the present invention is to provide a data processor to accept cancellation of the automatic translation in order to prevent trouble during the automatic translation. A further object of the present invention is to provide a data processor to, when environment for translation is changed, translate data again in accordance with the translation environment after the change. A still further object of the present invention is to provide a data processor to provide a user with option of choosing the automatic translation or manually instructed translation. As mentioned above, according to the present invention, the translation of data can be started without a user's special instruction and therefore the user does not need to discontinue a current operation or interrupt the display of the data to initiate the translation. Also, when the translation of data is canceled during the course and the same data is again received, only untranslated part of the data is translated since the part of the data translated before the cancellation is stored. Further, when the translation of data is canceled during the course, conformity is kept between the translation before the cancellation and that after the cancellation. Therefore, the present invention provides a data processor comprising receiving means for receiving data from a network, a memory for storing the data received by the receiving means, output means for outputting the data stored in the memory, and translation means for translating an original text written in a first language into a translated text written in a desired second language, wherein text data in the received data written in the first language is translated into the second language by the translation means upon receipt of the data from the receiving means, the text data translated into the second language is stored in the memory, and the text data translated into the second language by the translation means is output by the output means. The data processor of the present invention includes comparison means for comparing the data received by the receiving means with the data stored in the memory and, when the data received by the receiving means is identical with the data stored in the memory, the received data is not translated and the data stored in the memory is output by the output means. Thus, when the same data is received twice or more, a first translated data is displayed and therefore repeated translation can be prevented. The translation result can be output immediately. BRIEF DESCRIPTION OF THE DRAWINGS Fig. 1 is a block diagram illustrating an exemplary construction of an embodiment of the data processor in accordance with the present invention; Fig. 2 illustrates inner buffers in the WWW browser in an embodiment of the data processor in accordance with the present invention; Fig. 3 illustrates inner buffers in an embodiment of the data processor in accordance with the present invention; Fig. 4 is a flowchart explaining process of a WWW browser in an embodiment the data processor in accordance with the present invention; Fig. 5 is a flowchart explaining entry process for input in an embodiment of the data processor in accordance with the present invention; Fig. 6 is a flowchart explaining the selection process of a translation mode in an embodiment of the data processor in accordance with the present invention; Fig. 7 is a flowchart explaining storage process in a translated text buffer in an embodiment of the data processor in accordance with the present invention; Fig. 8 is a flowchart explaining judgment process on input in an embodiment of the data processor in accordance with the present invention; Fig. 9 is a flowchart explaining a process of judgment on input data in an embodiment of the data processor in accordance with the present invention; and Fig. 10 is a flowchart explaining a translation process in an embodiment of the data processor in accordance with the present invention. DESCRIPTION OF THE PREFERRED EMBODIMENTS In a preferred embodiment of the invention, the received data except the text data is output by the output means, and subsequently the text data translated into the second language by the translation means is output by the output means. Preferably, when the comparison means judges that a part of the data received by the receiving means is already stored in the memory, the translation means translates only the other part of the received data. The data processor of the present invention preferably includes translation cancel means for canceling translation during the translation process by the translation means. The data processor of the present invention preferably includes a translation environment memory for storing the translation environment for the data stored in the memory, the current translation environment is compared with the translation environment stored in the translation environment memory, and the data is translated again by the translation means when the above two translation environments are not identical. The data processor of the present invention preferably includes translation mode setting means for selectively setting manually instructed translation or the automatic translation in which, upon receipt of the data from the receiving means, the text data written in the first language is translated into the second language by the translation means and the obtained translation is stored in the memory. The present invention will hereinafter be described in detail by way of examples thereof, which are not intended to limit the scope of the invention, as shown in the attached drawings. Here, as one embodiment of the present invention, an apparatus provided with a "WWW browser" receiving and displaying data on Ethernet as an application with a further addition of a translator is taken for example. Referring to Fig. 1 illustrating an exemplary construction of an embodiment of the present invention, an input section 1 receives an input by a user and a network controller 2 receives data from dial-up lines or from Ethernet. The WWW browser 3 receives the input by the user from the input section 1, takes internet data from the network controller 2 in accordance with the user's direction and displays the internet data on an output section 5. A translator 4 translates the original text received from the WWW browser and the output section 5 displays the original text or the translated text in accordance with a direction from the WWW browser 3. A disk device 6 keeps a file for the text translated by the translator 4. The apparatus with the WWW browser 3, receiving the two kinds of inputs as shown in this embodiment (the input from the input section and from the network controller), performs the following functions like conventional apparatus: (1) To receive a direction input by the user at the input section 1 and perform an operation required by the input direction. When it receives an alphanumeric string (Fig. 4 - 13 & 14), the input alphanumeric string is stored in a buffer [URL (Uniform Resource Location) buffer] within the WWW browser 3 (Fig. 4 - 16) and also displayed on the output section (Fig. 4 - 15). Fig. 2 - 7 shows an example of the contents stored in the URL buffer. When an input distinguished from an alphanumerics such as an input via a function key (Fig. 4 - 13 & 14) is received, data designated by the content of the URL buffer is demanded from the network controller 2 (Fig. 5 - 22). (2) To receive the internet data from the network controller 2 (Fig. 4 - 13 & 14) and store the internet data in a buffer (original text buffer) within the WWW browser (Fig. 5 - 24). (3) To display the content in the original text buffer on the output section (Fig. 4 - 15). (4) To store the internet data within the WWW browser in the disk device when the user wants translation of the internet data (Fig. 5 - 24). (5) To translate the content in the disk device by the translator, store the obtained translation within the translator and output the translation on the output section. To the above described functions, the following functions are added in the embodiment of the present invention. (1) To output the original text of the internet data to the translator 4 at a time appropriate for translation, for example, at any time when internet data is received (Fig. 5 - 20 & 21). (2) The translator 4 is constructed so as to receive an input from the WWW browser 3 (Fig. 8 - 36), translate the received original text sentence by sentence (Fig. 10 - 43 & 52) and output the obtained translation to the WWW browser 3 (Fig. 10 - 59). (3) The WWW browser 3 receives the input from the translator and outputs the obtained translation on the output section (Fig. 4 - 15). Since the WWW browser 3 and the translator 4 are independent of each other, the WWW browser 3 can continue to receive inputs from the input section 1 and the network controller 2 without waiting for the output by the translator 4. For this purpose, according to the present invention, an input port of the WWW browser 3 which receives the input from the input section 1 and the network controller performs an additional function to receive the output by the translator 4 (Fig. 4 - 13, 14, 18). Next, the cancel of translation will be explained. In the embodiment, the translator 4 operates in the background of the WWW browser 3 and does not receive an input from the user. If the translator is constructed so as to receive an input via the input section, such a cancel function as disclosed in the present invention is not necessary, but the user.must consciously discriminate the input to the WWW browser from that to the translator 4. To avoid such complication, in this embodiment, the WWW browser 3 has a function to receive an instruction to cancel the translation (Fig. 5 - 23). The translator 4 receives the cancel instruction from the WWW browser 3 (Fig. 9 - 38 & 40 and Fig. 10 - 45), keeps the cancel instruction as a flag (Fig. 9 - 40 and Fig. 10 - 48), check the flag at the beginning of a loop for every sentence (Fig. 10 - 44) and skips over the input of the sentence when the flag is set (Fig. 10 - 47). In this embodiment, this cancel flag is checked for every sentence and the process goes to the next sentence. However, since the flag remains set till the last sentence is input, all the sentences after the setting of the flag is set are skipped, as a result. For optimizing the system, such an exceptional step should be introduced as allows exit from the loop and abandonment of all the input. Next, a cache function in the present invention will be explained. The translator 4 stores the obtained translation on the disk. At this time, the obtained translation is related to URL of the original text. For this purpose, the translator is provided with a translation result management table therein (Fig. 3 - 11). The translation result management table has URLs and file names for storing translated texts for a plurality of original texts. In addition to that, the translation result management table has flags representing current validity or invalidity of the translation results as well as data as to the number of translated sentences in the original texts, for the purposes described below. For this translation result management table, URL data for the original texts is required and the URL data is sent from the WWW browser to the translator preceding the output of the original text (Fig. 6 - 29). The translator receives the output of the URL data (Fig. 9 - 38 & 39) and stores the URL data in a URL data buffer for current process within the translator (Fig. - 38 & 39). After the completion of the translation, the translation result management buffer contains "URL data of the original text," "file name for storing the translated text," "the translation being valid (Fig. 10 - 57)" and "0 (= the whole text being translated)". Using these data, the translation result is retrieved from the file without repeating translation when the same URL is directed. Thus the translation result can be output immediately. Thus, the caching of the translated text is performed. Usually, the cached data needs no amendment unless the original text is changed. When the translation environment is changed, however, retranslation is required. The Change in the translation environment includes, for example, registration of a new word in the dictionary and change in style from "desu-masu style" to "dearu style" as often made by the user. For such cases, a cache control section for controlling the caching of translated texts stores flags indicative of validity or invalidity of the translation results in cache files to store the translation results. When the translation environment is changed, the translation results are all voided and translation is done over again. As previously discussed, an already translated text is output promptly by indicating the same URL. In some cases, however, after translation is canceled during the course, it becomes necessary to resume the translation. According to the present invention, since the part already translated before the cancellation is stored, the part is able to be utilized as it is. Thus, the time period to the output of the translation result can be shortened. For realizing this, the data about the number of the already translated sentences is stored in the translator in connection with URL data. When the translation instruction is received again, the URL data, which is delivered preceding the original text data, is compared with the stored URL data to obtain information about what the number of the already translated sentences and the translation of the already translated sentences in the newly input original text are skipped (Fig. 10 - 50 & 51). Then, the rest part of the original text is translated (Fig. 10 - 52 to 55), and the obtained translation is stored in addition to the already stored translation in the file to be output. Although the above explanation is given for the automatic translation mode, it is possible to translate only the data designated by URL specified by the user by stopping the automatic translation and manually instructing the translation of the intended data. For this purpose, a translation mode buffer is provided within the WWW browser 3. And the translation mode is set to the automatic when the value of the translation mode buffer is 0 and to the manual when the value of the translation mode buffer is 1, for example. When the switch of translation mode is input to the input means, the content in the translation mode buffer is toggled, that is to say, it will be switched to the automatic if the current translation mode is manual, and it will be switched to the manual if the current translation mode is automatic. When the manually instructed translation is selected by the switching of mode, translation is never started without the instruction by the user. For this purpose, a logic which interprets the start of translation is added in the WWW browser 3. When the translation instruction is input to the input means, URL data (Fig. 5 - 24) and the original text (Fig. 5 - 25) are output from the URL buffer and the original text buffer to the translator in the same manner as described with respect to the automatic translation. According to the present invention, the data processor starts translation automatically in response to the receiving means. Thus, the received data is automatically translated without any translation instruction by a user. Further, according to the present invention, the data processor performs the translation by the translation means with showing display by the display means. Thus the received data is translated in the background while the original text thereof is displayed. In the data processor of the present invention, the translation can be canceled during the course by giving an instruction of stopping the translation performed by the translation means in order that troubles in the automatic translation are prevented. In the data processor of the present invention, the data received by the receiving means is compared with the data stored in the memory so that, when the data received by the receiving means is identical with the data stored in the memory, the data stored in the memory is displayed without the received data translated. Thus, when the same.data is received twice or more, a first translated data is displayed and therefore repeated translation can be prevented. In the data processor of the present invention, when a part of the received data is already translated and stored in the memory, only other part of the received data is translated. Therefore, when a part of the received data is identical with previously translated data, the time required for translation can be shortened. The data processor of the present invention retains the translation environment for the translated data stored in the memory so that, when there is a change in translation environment, the data stored in the memory can be translated again in according with the new translation environment. In the data processor of the present invention, the user can choose between the automatic translation mode and the manually instructed translation mode depending on the received data. As discussed above, according to the present invention, when the user is using an application for reading a text in English, the translation is performed in the background without any specific operation by the user. Therefore operations by the user are simplified. Also, the translation is expected to be already completed when the user needs translation. For avoiding potential troubles caused by the automatic translation which requires no intentional operations by the user, the translation can be canceled. Further, since the translation before the cancellation is stored, the translated data can be utilized when the translation is needed again after the cancellation, so that the required time for the translation can be optimized. Such a cancel - restart process may provide the user with free control but the process can be troublesome when the user repeats the process. Therefore, in the data processor of the present invention, the automatic translation mode itself can be stopped optionally. When the automatic translation is stopped and then the translation needs to be restarted, the translation mode may be switched to the automatic if continuous translation is required. If only a single text needs translation, the intended text can be translated with the translation mode remaining switched to the manual. In addition, according to the present invention, since the translation and dictionary-consulting are started just after a sentence is received from a network, even the translation of a document having text data and drawings together, received from a network, can be started much earlier than by conventional translation applications and therefore the translation result thereof can be obtained much earlier. For, in general, a drawing has a larger amount of data than a text and therefore more time is required for obtaining the data of the drawing from a network than for obtaining the data of a text. By use of the correspondence table for an input and its translation result, when the same information as received in the past is received, the translation is omitted and the translation result obtained previously is displayed swiftly. Also, when the translation of a text is once interrupted and then restarted, only the untranslated sentences are translated without the already translated sentences translated again, and thus the time for the completion of translation is shortened. In this case, when the translation environment is changed after the interruption, there was inconsistency between translation results before and after the interruption in prior arts. According to the present invention, however, consistent translation results in accordance with the current translation environment can be obtained by providing the correspondence table with the data indicative of the validity/invalidity of the translation results.

Claims: A data processor comprising: - receiving means for receiving data from a network; - a memory for storing the data received by the receiving means; - output means (5) for outputting the data stored in the memory; and - translation means (4) for translating an original text written in a first language into a translated text written in a desired second language, wherein text data in the received data written in the first language is translated into the second language by the translation means (4) upon receipt of the data from the receiving means, the text data translated into the second language is stored in the memory, and the text data translated into the second language by the translation means (4) is output by the output means (5); characterized by comparison means for comparing data received by the receiving means with data stored in the memory, wherein, when the data received by the receiving means is identical with the data stored in the memory, the received data is not translated and the data stored in the memory is output by the output means (5). The data processor according to claim 1, wherein the received data except the text data is output by the output means (5), and subsequently the text data translated into the second language by the translation means (4) is output by the output means (5). The data processor according to claim 1 or claim 2, wherein, when the comparison means judges that a part of the data received by the receiving means is already stored in the memory, the translation means (4) translates the received data except the stored part. The data processor according to any of the preceding claims, further comprising translation cancel means for cancelling translation during the translation process by the translation means (4). The data processor according to any of the preceding claims, further comprising a translation environment memory for storing translation environment for data stored in the memory, wherein current translation environment is compared with the translation environment stored in the translation environment memory and, when the translation environments are not identical, the translation means (4) translates the data again. The data-processor according to any of the preceding claims, further comprising translation mode setting means for selectively prohibiting the translation of text data written in the first language into the second language by the translation means (4) upon receipt of input of the data by the receiving means. The data processor according to any of the preceding claims, comprising a WWW browser (3) for receiving and displaying internet data. The data processor according to claim 7, wherein the WWW browser (3) receives the translated text and outputs the translated text by the output means (5). The data processor according to claim 7 or claim 8, further comprising a translation result management table (11) for relating the translated text to the URL of the original text. The data processor according to claim 9, wherein the translated text is retrieved without repeating translation when the same URL is directed.

Inventors: HIRAI TOKUYUKI, NISHIURA KAZUO, HIRAI, TOKUYUKI, NISHIURA, KAZUO
Applicants: SHARP KK, SHARP KABUSHIKI KAISHA
Application year: 1997
Main classification: G06F17
IPC codes: G06F17, G06F13