CN117273022A - Method and device for processing data in translation process, electronic equipment and storage medium - Google Patents

Method and device for processing data in translation process, electronic equipment and storage medium Download PDF

Info

Publication number
CN117273022A
CN117273022A CN202311187739.3A CN202311187739A CN117273022A CN 117273022 A CN117273022 A CN 117273022A CN 202311187739 A CN202311187739 A CN 202311187739A CN 117273022 A CN117273022 A CN 117273022A
Authority
CN
China
Prior art keywords
clause
translation
original
manuscript
text
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311187739.3A
Other languages
Chinese (zh)
Inventor
李雅旖
李小梅
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Transn Iol Technology Co ltd
Original Assignee
Transn Iol Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Transn Iol Technology Co ltd filed Critical Transn Iol Technology Co ltd
Priority to CN202311187739.3A priority Critical patent/CN117273022A/en
Publication of CN117273022A publication Critical patent/CN117273022A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/40Processing or translation of natural language
    • G06F40/58Use of machine translation, e.g. for multi-lingual retrieval, for server-side translation for client devices or for real-time translation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/04812Interaction techniques based on cursor appearance or behaviour, e.g. being affected by the presence of displayed objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04842Selection of displayed objects or displayed text elements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/103Formatting, i.e. changing of presentation of documents
    • G06F40/106Display of layout of documents; Previewing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/12Use of codes for handling textual entities
    • G06F40/14Tree-structured documents
    • G06F40/143Markup, e.g. Standard Generalized Markup Language [SGML] or Document Type Definition [DTD]

Abstract

The invention relates to the field of computer-aided translation, and provides a data processing method, a device, electronic equipment and a storage medium in a translation process, wherein the method comprises the following steps: acquiring a manuscript text; sentence dividing processing is carried out on the original text to obtain original sentences of the original text, and the original sentences are displayed in a first area of a translation interface; receiving a first input, taking a clause corresponding to the first input in the original clauses as a first clause, and displaying the first clause and upper and lower Wen Yuangao clauses of the first clause on an original preview interface; and receiving a second input, taking a text corresponding to the second input as a manuscript sentence of the manuscript sentence, and displaying the manuscript sentence in a second area of the translation interface. The data processing method, the device, the electronic equipment and the storage medium in the translation process can realize the preview and positioning functions of manuscript clauses, and help a translator to comprehensively understand the context, thereby improving the translation accuracy and consistency.

Description

Method and device for processing data in translation process, electronic equipment and storage medium
Technical Field
The present invention relates to the field of Computer-aided translation (CAT) technology, and in particular, to a method and apparatus for processing data in a translation process, an electronic device, and a storage medium.
Background
In the context of globalization and cross-language communication, translation work is an important task. To improve the efficiency and quality of translation, computer-aided translation (CAT) technology has evolved. The computer aided translation technology combines the processing capacity of computer with the intelligent artificial translation to provide various aided functions for the translator.
Despite significant advances in computer-aided translation techniques, challenges remain in processing sentence-by-sentence positioning document previews, generating translation previews in real-time, and sentence-by-sentence translation positioning. Conventional computer-aided translation systems often lack accurate positioning and preview functionality for a particular sentence, resulting in the need for a translator to continually review the original to understand context, reducing translation efficiency and accuracy.
Disclosure of Invention
The invention provides a data processing method, a device, electronic equipment and a storage medium in a translation process, which are used for solving the defect that a computer-aided translation system in the prior art lacks of accurate positioning and preview functions on specific sentences, so that translation efficiency and accuracy are low.
The invention provides a data processing method in a translation process, which comprises the following steps:
acquiring a manuscript text;
performing clause processing on the original text to obtain original clauses of the original text, and displaying the original clauses in a first area of a translation interface;
receiving a first input, taking a clause corresponding to the first input in the original clauses as a first clause, and displaying the first clause and upper and lower Wen Yuangao clauses of the first clause on an original preview interface;
and receiving a second input, taking a text corresponding to the second input as a manuscript sentence of the manuscript sentence, and displaying the manuscript sentence in a second area of the translation interface.
According to the method for processing data in translation provided by the invention, the display mode of the first clause on the manuscript preview interface is different from the display mode of the upper and lower Wen Yuangao clauses.
According to the method for processing data in translation provided by the invention, the step of taking the clause corresponding to the first input in the original clause as the first clause includes:
searching a clause matched with the clause identifier in original clauses of the original text based on the clause identifier corresponding to the first input, taking the clause matched with the clause identifier as the first clause, and adding a highlighting pattern to the first clause.
The data processing method in the translation process provided by the invention further comprises the following steps:
and replacing the manuscript clause corresponding to the clause mark in the manuscript text with the manuscript clause based on the clause mark of the manuscript clause to obtain a manuscript text, and displaying the manuscript text on a manuscript preview interface.
According to the data processing method in the translation process provided by the invention, the method for displaying the manuscript text on the manuscript preview interface comprises the following steps:
receiving a third input, and taking a clause corresponding to the third input in the translated manuscript clause as a second clause;
and displaying the second clause on a manuscript translation preview interface in the same page layout as the manuscript text, and displaying the context manuscript translation clause of the second clause in a different mode from the context manuscript translation clause.
According to the method for processing data in translation provided by the invention, the displaying of the first clause on the manuscript preview interface includes:
and generating a hypertext markup language file based on the manuscript text, displaying the hypertext markup language file in a nested mode by adopting an iframe, and scrolling the first clause to a visible area of the manuscript preview interface.
According to the method for processing data in translation provided by the invention, after the first clause is displayed on the manuscript preview interface, the method further comprises the following steps:
monitoring the first input, and displaying the changed first clause on a manuscript preview interface when the clause corresponding to the first input is changed;
or after the second sentence is displayed on the translation preview interface, the method further includes:
and monitoring the third input, and displaying a changed second clause on a manuscript-translation preview interface when the clause corresponding to the third input is changed.
The invention also provides a data processing device in the translation process, which comprises:
a text acquisition unit configured to acquire an original text;
a first display unit, configured to perform clause processing on the original document text, obtain an original clause of the original document text, and display the original clause in a first area of a translation interface;
a second display unit, configured to receive a first input, take a clause corresponding to the first input of the original clauses as a first clause, and display the first clause and upper and lower Wen Yuangao clauses of the first clause on an original preview interface;
and the third display unit is used for receiving a second input, taking a text corresponding to the second input as a translation sentence of the original sentence, and displaying the translation sentence in a second area of the translation interface.
The invention also provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the data processing method in any of the above translation processes when executing the program.
The present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a method of processing data in a translation process as described in any of the above.
The invention also provides a computer program product comprising a computer program which when executed by a processor implements a method of processing data in a translation process as described in any of the above.
According to the data processing method, the device, the electronic equipment and the storage medium in the translation process, through taking the clause corresponding to the first input in the original clause as the first clause and displaying the first clause and the upper and lower Wen Yuangao clauses of the first clause on the original preview interface, the preview and positioning functions of the original clause can be realized, a translator can quickly look up the front and the rear of the current sentence, the translator can comprehensively understand the context, and the translation accuracy and consistency are improved.
Drawings
In order to more clearly illustrate the invention or the technical solutions of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are some embodiments of the invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic flow chart of a data processing method in a translation process according to the present invention;
FIG. 2 is a schematic diagram of an interface of a data processing method in a translation process according to the present invention;
FIG. 3 is a second schematic diagram of an interface of a data processing method in a translation process according to the present invention;
FIG. 4 is a schematic diagram of a data processing device in the translation process according to the present invention;
fig. 5 is a schematic structural diagram of an electronic device provided by the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
To improve the efficiency and quality of translation, computer-aided translation (CAT) technology has evolved. The computer aided translation technology combines the processing capacity of computer with the intelligent artificial translation to provide various aided functions for the translator. The earliest computer-aided translation tools were rule-based machine translation systems, but were of lower translation quality due to the complex and incomplete rules. Subsequently, the advent of statistical machine translation (Statistical Machine Translation, SMT) techniques utilized a large number of parallel corpora to translate, improving translation accuracy. However, SMT still faces the problems of word sense ambiguity, inconsistent structure, etc.
In recent years, with the development of deep learning technology, neural network machine translation (Neural Machine Translation, NMT) has become a mainstream technology in the field of computer-aided translation. NMT uses the whole translation process as an end-to-end learning task through a neural network model, can better process complex language structure and context information, and improves translation quality. Despite significant advances in computer-aided translation techniques, challenges remain in processing sentence-by-sentence positioning document previews, generating translation previews in real-time, and sentence-by-sentence translation positioning.
Conventional computer-aided translation systems often require translation sentence by sentence as long text is processed, however, locating the original text position of a particular sentence or paragraph can be very difficult. In addition, the preview functionality provided by conventional translation systems typically only displays a translation of the entire document, lacking accurate positioning and previewing of a particular sentence. In the real-time translation process of long texts, a translator cannot quickly check the front and the rear, so that insufficient context information is easily caused, and the translation quality is affected.
The following problems exist in conventional computer-aided translation systems:
1) Positioning is difficult: in conventional systems, it is difficult for a translator to quickly find the original text position of a particular sentence or paragraph when processing a long text, resulting in inefficient searches.
2) Insufficient context: in the real-time translation process of long texts, a translator cannot quickly check the front and the rear, and the translation quality is affected due to incomplete context information.
3) Real-time preview missing: the preview function of the traditional system can only display the translation of the whole document, and the translation preview cannot be generated in real time, so that a translator cannot check the translation quality in time.
4) Lack of flexibility: in conventional systems, once a translation is completed, it is difficult to quickly locate a particular sentence in the completed translation for modification or optimization, resulting in a lack of flexibility in the translation process.
Thus, conventional computer-aided translation systems lack accurate positioning and preview functionality for a particular sentence, resulting in the need for a translator to continually review the original to understand context, reducing translation efficiency and accuracy.
Based on the above consideration, in order to improve the translation efficiency and accuracy of the computer aided translation system and help the translator to complete the translation task better, the invention concept of the invention is as follows: the translation editing environment is provided, so that a translator can easily position the manuscript in the sentence-by-sentence translation process, comprehensively understand the context, view the manuscript in real time, timely find and correct translation errors, quickly position specific sentences in the completed manuscript, and modify or optimize the translation. Thus, the shortcomings of the traditional computer-aided translation system are overcome, and more efficient, accurate and intelligent translation experience is provided.
Based on the above inventive concept, the invention provides a data processing method, a device, an electronic device and a storage medium in a translation process, which are applied to an auxiliary translation scene in a computer auxiliary translation technology to improve the translation efficiency and accuracy of a computer auxiliary translation system.
The technical scheme of the present invention will be described in detail with reference to the accompanying drawings. Fig. 1 is a schematic flow chart of a data processing method in a translation process according to the present invention, where an execution body of each step in the method may be a data processing apparatus, and the apparatus may be implemented by software and/or hardware, and the apparatus may be integrated in an electronic device, where the electronic device may be a terminal device (such as a smart phone, a personal computer, a learning machine, etc.), and may also be a server (such as a local server or a cloud server, or a server cluster, etc.), or may also be a processor, or may also be a chip, etc.
As shown in fig. 1, the method may include the steps of:
in step 110, a document text is acquired.
In particular, the implementation environment of embodiments of the present invention may be a translation editor, which may run a translation editor application on a computer device. The application may be a desktop software application or a Web-based online editor. The user may launch the application by double clicking on an icon or opening a Web browser and entering a corresponding URL.
The original text is the source language text to be translated, and after the translation editor is started, the user can select to import the original text to be translated. The manner of importation may be by opening a local file or pasting text content into an input box of an editor. The document text may be directly input by the user, or may be obtained by performing voice transcription on the acquired audio, or may be obtained by acquiring an image through an image acquisition device such as a scanner, a mobile phone, a camera, or the like, and performing OCR (Optical Character Recognition ) on the image, which is not particularly limited in the embodiment of the present invention.
Further, the original text may be natural language text of any language, for example, the original text may be chinese, english, french, or the like.
Step 120, sentence dividing processing is performed on the original text to obtain an original sentence of the original text, and the original sentence is displayed in the first area of the translation interface.
In the translation editor, the user may select a sentence-by-sentence translation function. When the translator starts translation, the system automatically carries out sentence dividing processing on the original text to obtain original sentences of the original text. For clause processing, this may be accomplished using regular expressions, for example, the text may be partitioned according to specified delimiters, which may be periods, exclamation marks, question marks, or the like.
After each document clause is obtained, the document clause may be displayed in the first area of the translation interface. For example, each document clause may be displayed in a list on a first area of the translation interface line by line. The first area here is an area for displaying each document clause.
Step 130, receiving a first input, taking a clause corresponding to the first input in the original clauses as a first clause, and displaying the first clause and a context original clause of the first clause on an original preview interface.
Specifically, the input mode of the first input may be, for example, a cursor displacement mode, a hook, a mouse click, or the like. For example, the user may click on any one or more sentences in the original clause through a mouse, or hook a clause identifier corresponding to the first clause, and so on.
Then, the clause corresponding to the first input from the original clauses is used as the first clause. Here the first clause is the user-selected clause. The determining of the first clause may be determined according to a click position of the mouse, and may also be determined according to a clause identifier of the first clause, which is not specifically limited in the embodiment of the present invention. For example, based on the clause identifier corresponding to the first input, a clause matched with the clause identifier can be searched in the original clause of the original text, and the clause matched with the clause identifier is used as the first clause.
Considering that in the related art, when a translator processes a long text, it is difficult to quickly find the position of a selected clause in original text, so that in the real-time translation process of the long text, the translator cannot quickly check the front and the rear, and the context information is not complete, thereby affecting the translation quality.
In the embodiment of the invention, after the translator selects the first clause, the first clause and the context original clause of the first clause can be displayed on the original preview interface. The context clause of the upper and lower Wen Yuangao clauses, i.e. the context clause of the first clause, may be, for example, the previous clause or the previous paragraph, or may be the next clause or the next paragraph.
The document preview interface and the translation interface may be in the same interface of the translation editor, e.g., the document preview interface may be located below the translation interface.
It can be appreciated that by displaying the first clause and the upper and lower Wen Yuangao clauses of the first clause, the translator can quickly look up the front and rear of the current translated sentence, which is helpful for the translator to comprehensively understand the context, thereby improving the translation accuracy and consistency and reducing errors such as miss-translation and misinterpretation.
And 140, receiving a second input, taking a text corresponding to the second input as a manuscript sentence of the manuscript sentence, and displaying the manuscript sentence in a second area of the translation interface.
Specifically, after displaying the first clause and the context document clause of the first clause on the document preview interface in step 130, the translator may translate the document clause sentence by sentence. The translator may enter the translated text in an editor and edit and modify it as desired. After translation of one sentence is completed, the translator may proceed with translation of the next sentence.
The second input may be translated text entered by the translator or imported text. And then, the text corresponding to the second input is used as a translation sentence of the manuscript sentence, and the translation sentence is displayed in a second area of the translation interface. Here, the second area may be used to display translated manuscript phrases, and each translated manuscript phrase may be in one-to-one correspondence with a manuscript phrase.
According to the method provided by the embodiment of the invention, the clause corresponding to the first input in the original clause is used as the first clause, and the first clause and the upper and lower Wen Yuangao clauses of the first clause are displayed on the original preview interface, so that the preview and positioning functions of the original clause can be realized, a translator can quickly look up the front and rear of the current sentence, the translator can comprehensively understand the context, and the translation accuracy and consistency are improved.
FIG. 2 is a schematic diagram of an interface of a data processing method in a translation process according to the present invention, and as shown in FIG. 2, the upper half of the current interface may be understood as a translation interface, where a translator translates. The left side of the translation interface is a first area for displaying manuscript clauses, and the right side of the translation interface is a second area for displaying manuscript clauses. The lower half of the current interface may be understood as a document preview interface for displaying a first clause selected by the translator and a contextual document clause of the first clause.
Based on the above embodiment, in order to further highlight the first clause selected by the translator, it is convenient for the user to view the specific position of the first clause in the original text, and the display mode of the first clause on the original preview interface is different from the display mode of the upper and lower Wen Yuangao clauses. For example, the first clause may be highlighted, and the upper and lower Wen Yuangao clauses are not highlighted; for another example, the first clause is displayed in a different font size, thickness, or color than the upper and lower Wen Yuangao clauses; an underline or the like may also be added to the first clause, which is not particularly limited in the embodiment of the present invention.
Based on any of the above embodiments, displaying the first clause on the document preview interface in step 130 includes:
step 131, loading the original text to an original preview interface;
step 132, searching for a clause matched with the clause identifier in the manuscript text based on the clause identifier corresponding to the first clause, adding a highlighting pattern for the searched first clause, and scrolling the first clause to a visible area of a manuscript preview interface for display.
Specifically, for displaying a first clause on the original preview interface, the original text may be loaded onto the original preview interface first, then the first clause is located in the original text, a highlighting pattern is added to the first clause, and then the first clause is scrolled to a visible area of the original preview interface for display by using a scrollIntoView method.
The location for the first clause may be determined by a clause identification. Each sentence in the manuscript text has a corresponding sentence ID, i.e. a clause identification. The clause matched with the clause identifier can be searched in the original text based on the clause identifier corresponding to the first clause, and the highlighting pattern is added for the searched first clause, so that the first clause in the original text is positioned.
According to the method provided by the embodiment of the invention, the first clause is positioned in the manuscript text through the clause mark, the highlighting pattern is added, and the first clause is scrolled to the visible area of the manuscript preview interface for display, so that the positioning and preview of the manuscript clause are realized, the comprehensive understanding of the context is facilitated, and the translation accuracy and consistency are improved.
Based on any of the above embodiments, loading the document text into the document preview interface in step 131 specifically includes:
and generating a hypertext markup language file based on the original text, and nesting and displaying the hypertext markup language file by adopting an iframe frame so as to load the original text into an original preview interface.
Specifically, for previewing of the manuscript text, an iframe can be adopted to display a hypertext markup language file (Hyper Text Markup Language, html) file generated in a background in a nested manner in the system, and as the iframe and the current system have a cross-domain problem and the content in the iframe cannot be modified, forwarding is added to an access layer nginx, and html manuscript links can be accessed through the domain name of the current system, so that the problem of cross-domain security restriction is solved.
Based on any one of the above embodiments, the data processing method in the translation process further includes:
based on the clause identification of the translation clause, the original clause corresponding to the clause identification in the original text is replaced by the translation clause to obtain the translation text, and the translation text is displayed on a translation preview interface.
Specifically, the embodiment of the invention can preview and position the manuscript text, and can preview and position the manuscript text.
The clause identification of the translated manuscript clause can be the same as the clause identification of the manuscript clause, namely the two are in one-to-one correspondence. After each translation of a sentence of the original manuscript is completed by the translator to obtain a translated manuscript sentence, the original sentence corresponding to the sentence identification in the original manuscript text can be replaced by the translated manuscript sentence based on the sentence identification. It is understood that no processing is performed for an original clause that has not been translated.
On the basis, the translated manuscript clause which is already translated and the manuscript clause which is not yet translated are spliced to obtain the translated manuscript text. And displaying the manuscript text on a manuscript preview interface, namely previewing the manuscript, and checking whether the manuscript needs to be modified according to the context of the manuscript.
Compared with the preview function of the traditional system, the preview function of the traditional system can only display the translation of the whole document, and the translation preview cannot be generated in real time, so that a translator cannot check the translation quality in time. The method provided by the embodiment of the invention can generate the translation preview in real time, and is beneficial to a translator to discover and correct translation errors in time.
Fig. 3 is a second schematic diagram of an interface of the data processing method in the translation process according to the present invention, as shown in fig. 3, the translation preview interface and the original preview interface may be the same area in the interface, and may be displayed by switching buttons. When clicking the original preview, switching to an original preview interface to display an original text; when the translation preview is clicked, the translation preview interface is switched to display the translation text.
Based on any of the above embodiments, displaying the translation text on the translation preview interface includes:
receiving a third input, and taking the clause corresponding to the third input in the translated manuscript clause as a second clause;
and displaying a second clause on the manuscript interpretation preview interface in the same page layout as the manuscript text, and displaying the context interpretation clause of the second clause in a different manner from the context interpretation clause.
Specifically, the third input may be input in a cursor displacement form, a hook, a mouse click, or the like. For example, the user may click on any one or more of the original clauses or the translated sentence by a mouse, or select a corresponding clause identifier, or the like.
And then, taking the clause corresponding to the third input in the translated manuscript clause as a second clause. The second clause, i.e., the clause selected by the user, may be a document clause or a translation clause.
It is considered that in the related art, once a translation is completed, it is difficult to quickly locate a specific sentence in the completed translation for modification or optimization, resulting in a lack of flexibility in the translation process.
In the embodiment of the invention, after the translator selects the second clause, the second clause can be displayed on the translation preview interface in the same page layout as the original text, and the context translation clause of the second clause is displayed in a different manner from the context translation clause. For example, the second clause may be highlighted in the translation preview interface.
It can be understood that by displaying the second clause and the context translation clause of the second clause, the translation locating function is realized, the flexibility of translation editing can be enhanced, the translator can review and modify the translation at any time, and the translation efficiency is improved.
Based on any one of the above embodiments, after displaying the first clause on the document preview interface, the method further includes:
monitoring a first input, and displaying the changed first clause on a manuscript preview interface when the clause corresponding to the first input is changed;
or after the second sentence is displayed on the translation preview interface, the method further comprises:
and monitoring a third input, and displaying the changed second clause on the manuscript interpretation preview interface when the clause corresponding to the third input is changed.
Specifically, considering that the first clause or the second clause changes at any time, in order to synchronously display the changed sentence on the preview interface, after the first clause is displayed on the original preview interface, the first input may be monitored, and when the clause corresponding to the first input changes, the changed first clause is displayed on the original preview interface. Similarly, after the second clause is displayed on the translation preview interface, a third input may be monitored, and when the clause corresponding to the third input changes, the changed second clause is displayed on the translation preview interface.
Based on any one of the above embodiments, a method for processing data in a translation process is provided, including:
step 1: a translation editor application is launched. A translation editor application is run on a computer device. The application may be a desktop software application or a Web-based online editor. The user may launch the application by double clicking on an icon or opening a Web browser and entering a corresponding URL.
Step 2: the original text is imported. In the editor application, the user may choose to import original text that needs to be translated. The manner of importation may be by opening a local file or pasting text content into an input box of an editor.
Step 3: displaying manuscript sentence-by-sentence positioning preview. The editor application program automatically performs sentence-by-sentence segmentation on the imported manuscript text, and displays the position of the current sentence in the original text in an editor interface, so that sentence-by-sentence positioning manuscript preview is realized.
Original preview: the html file generated by the background is displayed in a nested manner in the system by using the iframe, and because the iframe and the current system have the problem of cross-domain, the content in the iframe cannot be modified, so that forwarding is added to the access layer nginx, the html manuscript link can be accessed through the domain name, and the problem of cross-domain security restriction can be solved.
Original sentence positioning: in order to facilitate the user to check the specific position of the current sentence in the original text, the current sentence needs to be highlighted, each sentence in the original text sentence has a corresponding sentence ID, when clicking the original text, the current sentence ID is searched in the DOM of the original text, a highlighted style is newly added if found, meanwhile, the current sentence is scrolled to a visible area by using a scrollIntoView method, the current line is monitored when clicking the original text is switched, and if the change occurs, the onload is re-carried.
Step 4: sentence-by-sentence translation. The translator may translate the current sentence by sentence starting with the first sentence. In the editor, the translator may directly enter translation text in the corresponding translation area. After completing the translation of a sentence, the translator may press the enter key or click the "next sentence" button to continue the translation of the next sentence.
Step 5: and generating a manuscript preview in real time. Immediately after the translator completes the translation of a sentence, the editor application may generate a translation preview of the current sentence in real-time in the corresponding region. The translator can check the translation quality in time by looking at the preview and make modifications and adjustments as needed.
Step 6: and (5) sentence-by-sentence manuscript interpretation positioning. In the completed translation, the editor application provides a sentence-by-sentence translation location function. The translator may quickly locate a particular sentence in the translated manuscript by clicking on the corresponding button or selecting the particular sentence. This allows the translator to conveniently review, modify or optimize the translation as needed.
And replacing the stored translations in the translation process with original sentences with the same IDs in the original manuscripts according to the sentence IDs, assembling to form real-time translation manuscripts, supporting highlighting and positioning, and scrolling to a visual window for display.
Step 7: and finishing translation and exporting a translation draft. When the translator has completed translation of the entire original text, the export translation may be selected. The exported translation will contain all translated content, including the translation preview generated in real-time.
Step 8: the translation state is saved. During translation, the editor application may provide functionality to save the translation state. The translator may choose to save the current translation progress and status in order to continue translation at a later time.
Step 9: data processing and storage. During the translation process, the editor application may process and store data for the original and the translated document. This includes sentence-by-sentence segmentation and marking positions for the original, and real-time generation and saving of the translated original. The data processing and storage enable the sentence-by-sentence positioning manuscript preview and the real-time generation of the manuscript preview to be realized.
When the treatment method provided by the invention is used, the following beneficial effects are brought:
Translation accuracy and consistency are improved: through the functions of positioning manuscript preview sentence by sentence and generating manuscript preview in real time, a translator can quickly position specific sentences in the original text and instantly check corresponding manuscripts. This helps the translator to understand the context comprehensively, improves translation accuracy and consistency, and reduces mistakes such as missing translations and mistranslations.
Translation efficiency and productivity are improved: the translator can quickly locate a specific sentence in the original text, and the time-consuming process of manual searching is avoided. The translation preview function can quickly display the translation of the current sentence, and avoid the operation of frequently switching interfaces. This results in a significant increase in translation efficiency and productivity for the translator.
The context consistency and the style are kept uniform: the translator can view the translation manuscripts of the context in real time, so that the consistency of the context and the uniformity of the translation style are maintained. The translator can better grasp the overall structure of the text, and ensure that the translation result accords with the overall context.
Improving translation quality control: through the sentence-by-sentence translation positioning function, a translator can conveniently review and modify the completed translation. The translation quality control is more flexible, potential problems can be found and corrected in time, and the translation quality is improved.
Optimizing complex context processing: the invention supports the translation of complex contexts, a translator can position manuscript previews sentence by sentence and generate manuscript previews in real time, understand the context information deeply, accurately process complex contexts such as ambiguity, modifier and the like, and improve the translation quality and accuracy.
User satisfaction is improved: by providing a more efficient and intelligent translation editing environment, user satisfaction can be improved. When the technology of the invention is used, a translator can complete the translation task more easily, the working efficiency is improved, and the trust and preference of a user to a translation editor are enhanced.
Is suitable for multi-field translation: the processing technology is suitable for translation tasks in various languages and fields, and has wide application value. Whether in various fields of literature, science, technology, law, business and the like, the translation system can bring substantial improvement and advantages to translation work.
The in-process data processing device provided by the invention is described below, and the in-process data processing device described below and the in-process data processing method described above can be referred to correspondingly.
Based on the above embodiments, fig. 4 is a schematic structural diagram of a data processing device in a translation process according to the present invention, and as shown in fig. 4, the data processing device in a translation process includes: a text acquisition unit 410, a first display unit 420, a second display unit 430, and a third display unit 440, wherein:
A text acquisition unit 410 for acquiring a document text;
a first display unit 420, configured to perform clause processing on the original text, obtain an original clause of the original text, and display the original clause in a first area of a translation interface;
a second display unit 430, configured to receive a first input, take a clause corresponding to the first input of the original clauses as a first clause, and display the first clause and upper and lower Wen Yuangao clauses of the first clause on an original preview interface;
the third display unit 440 is configured to receive a second input, take a text corresponding to the second input as a translated document clause of the original document clause, and display the translated document clause in a second area of the translation interface.
According to the data processing device in the translation process, provided by the embodiment of the invention, the clauses corresponding to the first input in the original clauses are used as the first clauses, and the first clauses and the upper and lower Wen Yuangao clauses of the first clauses are displayed on the original preview interface, so that the preview and positioning functions of the original clauses can be realized, a translator can quickly look up the front and rear of the current sentence, the translator can comprehensively understand the context, and the translation accuracy and consistency are improved.
Based on the above embodiment, the display manner of the first clause on the original preview interface is different from the display manner of the upper and lower Wen Yuangao clauses.
Based on the above embodiment, the second display unit is further specifically configured to:
loading the original text to the original preview interface;
and searching a clause matched with the clause identifier in the original text based on the clause identifier corresponding to the first clause, adding a highlighting pattern for the searched first clause, and scrolling the first clause to a visible area of the original preview interface for display.
Based on the above embodiment, the second display unit is further specifically configured to:
and generating a hypertext markup language file based on the original text, and displaying the hypertext markup language file in a nested manner by adopting an iframe frame so as to load the original text to the original preview interface.
Based on the above embodiment, the display device further includes a fourth display unit for:
and replacing the manuscript clause corresponding to the clause mark in the manuscript text with the manuscript clause based on the clause mark of the manuscript clause to obtain a manuscript text, and displaying the manuscript text on a manuscript preview interface.
Based on the above embodiments, the fourth display unit is specifically configured to:
receiving a third input, and taking a clause corresponding to the third input in the translated manuscript clause as a second clause;
and displaying the second clause on a manuscript translation preview interface in the same page layout as the manuscript text, and displaying the context manuscript translation clause of the second clause in a different mode from the context manuscript translation clause.
Based on the above embodiment, the data processing device in the translation process further includes a listening unit, configured to:
monitoring the first input, and displaying the changed first clause on a manuscript preview interface when the clause corresponding to the first input is changed;
or monitoring the third input, and displaying the changed second clause on the manuscript-translation preview interface when the clause corresponding to the third input is changed.
Fig. 5 illustrates a physical schematic diagram of an electronic device, as shown in fig. 5, which may include: processor 510, communication interface (Communications Interface) 520, memory 530, and communication bus 540, wherein processor 510, communication interface 520, memory 530 complete communication with each other through communication bus 540. Processor 510 may invoke logic instructions in memory 530 to perform a method of data processing during translation, the method comprising:
Acquiring a manuscript text;
performing clause processing on the original text to obtain original clauses of the original text, and displaying the original clauses in a first area of a translation interface;
receiving a first input, taking a clause corresponding to the first input in the original clauses as a first clause, and displaying the first clause and upper and lower Wen Yuangao clauses of the first clause on an original preview interface;
and receiving a second input, taking a text corresponding to the second input as a manuscript sentence of the manuscript sentence, and displaying the manuscript sentence in a second area of the translation interface.
Further, the logic instructions in the memory 530 described above may be implemented in the form of software functional units and may be stored in a computer-readable storage medium when sold or used as a stand-alone product. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In another aspect, the present invention also provides a computer program product, the computer program product including a computer program, the computer program being storable on a non-transitory computer readable storage medium, the computer program, when executed by a processor, being capable of executing the method of processing data in a translation process provided by the methods described above, the method comprising:
acquiring a manuscript text;
performing clause processing on the original text to obtain original clauses of the original text, and displaying the original clauses in a first area of a translation interface;
receiving a first input, taking a clause corresponding to the first input in the original clauses as a first clause, and displaying the first clause and upper and lower Wen Yuangao clauses of the first clause on an original preview interface;
and receiving a second input, taking a text corresponding to the second input as a manuscript sentence of the manuscript sentence, and displaying the manuscript sentence in a second area of the translation interface.
In yet another aspect, the present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, is implemented to perform the method for processing data in translation provided by the above methods, the method comprising:
Acquiring a manuscript text;
performing clause processing on the original text to obtain original clauses of the original text, and displaying the original clauses in a first area of a translation interface;
receiving a first input, taking a clause corresponding to the first input in the original clauses as a first clause, and displaying the first clause and upper and lower Wen Yuangao clauses of the first clause on an original preview interface;
and receiving a second input, taking a text corresponding to the second input as a manuscript sentence of the manuscript sentence, and displaying the manuscript sentence in a second area of the translation interface.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on this understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the respective embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (10)

1. A method for processing data in a translation process, comprising:
acquiring a manuscript text;
performing clause processing on the original text to obtain original clauses of the original text, and displaying the original clauses in a first area of a translation interface;
receiving a first input, taking a clause corresponding to the first input in the original clauses as a first clause, and displaying the first clause and upper and lower Wen Yuangao clauses of the first clause on an original preview interface;
and receiving a second input, taking a text corresponding to the second input as a manuscript sentence of the manuscript sentence, and displaying the manuscript sentence in a second area of the translation interface.
2. The in-translation data processing method according to claim 1, wherein a display mode of the first clause is different from a display mode of the upper and lower Wen Yuangao clauses on the document preview interface.
3. The in-translation data processing method according to claim 2, wherein displaying the first clause on a document preview interface comprises:
loading the original text to the original preview interface;
and searching a clause matched with the clause identifier in the original text based on the clause identifier corresponding to the first clause, adding a highlighting pattern for the searched first clause, and scrolling the first clause to a visible area of the original preview interface for display.
4. The in-translation data processing method according to claim 3, wherein said loading the original text into the original preview interface includes:
and generating a hypertext markup language file based on the original text, and displaying the hypertext markup language file in a nested manner by adopting an iframe frame so as to load the original text to the original preview interface.
5. The method for processing data in a translation process according to any one of claims 1 to 4, further comprising:
and replacing the manuscript clause corresponding to the clause mark in the manuscript text with the manuscript clause based on the clause mark of the manuscript clause to obtain a manuscript text, and displaying the manuscript text on a manuscript preview interface.
6. The in-translation data processing method according to claim 5, wherein displaying the translation text on a translation preview interface comprises:
receiving a third input, and taking a clause corresponding to the third input in the translated manuscript clause as a second clause;
and displaying the second clause on a manuscript translation preview interface in the same page layout as the manuscript text, and displaying the context manuscript translation clause of the second clause in a different mode from the context manuscript translation clause.
7. The in-translation data processing method according to claim 6, wherein after the first clause is displayed on the document preview interface, further comprising:
monitoring the first input, and displaying the changed first clause on a manuscript preview interface when the clause corresponding to the first input is changed;
or after the second sentence is displayed on the translation preview interface, the method further includes:
and monitoring the third input, and displaying a changed second clause on a manuscript-translation preview interface when the clause corresponding to the third input is changed.
8. An in-translation data processing apparatus, comprising:
a text acquisition unit configured to acquire an original text;
a first display unit, configured to perform clause processing on the original document text, obtain an original clause of the original document text, and display the original clause in a first area of a translation interface;
a second display unit, configured to receive a first input, take a clause corresponding to the first input of the original clauses as a first clause, and display the first clause and upper and lower Wen Yuangao clauses of the first clause on an original preview interface;
And the third display unit is used for receiving a second input, taking a text corresponding to the second input as a translation sentence of the original sentence, and displaying the translation sentence in a second area of the translation interface.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method of processing data in a translation process according to any one of claims 1 to 7 when executing the program.
10. A non-transitory computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when executed by a processor, implements the method of data processing in a translation process according to any one of claims 1 to 7.
CN202311187739.3A 2023-09-12 2023-09-12 Method and device for processing data in translation process, electronic equipment and storage medium Pending CN117273022A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311187739.3A CN117273022A (en) 2023-09-12 2023-09-12 Method and device for processing data in translation process, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311187739.3A CN117273022A (en) 2023-09-12 2023-09-12 Method and device for processing data in translation process, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117273022A true CN117273022A (en) 2023-12-22

Family

ID=89205492

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311187739.3A Pending CN117273022A (en) 2023-09-12 2023-09-12 Method and device for processing data in translation process, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117273022A (en)

Similar Documents

Publication Publication Date Title
US11294968B2 (en) Combining website characteristics in an automatically generated website
JP4344693B2 (en) System and method for browser document editing
CN105824787B (en) A kind of control method and system of html template dynamic configuration
US10691875B2 (en) Populating visual designs with web content
CN110717317B (en) On-line artificial Chinese text marking system
US20060015571A1 (en) Computer evaluation of contents of interest
KR101950126B1 (en) Mathematical formula processing method, device, apparatus and computer storage medium
US20120102390A1 (en) Method and apparatus for generating widget
US10437914B2 (en) Creating HTML layouts based on client input and processing
US20190205363A1 (en) Method for creating html layouts based on visual input
KR20210037705A (en) Patent document writing device, method, computer program, computer-readable recording medium, server and system
US20170109442A1 (en) Customizing a website string content specific to an industry
CN112115252A (en) Intelligent auxiliary writing processing method and device, electronic equipment and storage medium
CN116468009A (en) Article generation method, apparatus, electronic device and storage medium
CN103365640A (en) Cascading style sheet style transformation method and device
CN110162301B (en) Form rendering method, form rendering device and storage medium
CN117273022A (en) Method and device for processing data in translation process, electronic equipment and storage medium
CN115481643A (en) Method for highly reducing document style of translation draft in Internet online translation tool
JP7246795B1 (en) Information processing device, method, program, and system
CN102880606B (en) A kind of computer implemented method and apparatus for optimizing marking language text
Trubnikov et al. Implementation of a helper program for comics creation using text processing methodS
CN117494665A (en) Document conversion method, device, electronic equipment and storage medium
CN117369771A (en) Method and device for generating specific layout webpage by using language model tree
CN117032666A (en) Page editing method and device based on editor, terminal equipment and storage medium
CN114791987A (en) Webpage translation method and related equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination