WO2019153979A1 - 文本翻译方法、装置、计算机设备和存储介质 - Google Patents

文本翻译方法、装置、计算机设备和存储介质 Download PDF

Info

Publication number
WO2019153979A1
WO2019153979A1 PCT/CN2019/070018 CN2019070018W WO2019153979A1 WO 2019153979 A1 WO2019153979 A1 WO 2019153979A1 CN 2019070018 W CN2019070018 W CN 2019070018W WO 2019153979 A1 WO2019153979 A1 WO 2019153979A1
Authority
WO
WIPO (PCT)
Prior art keywords
text
address
interface
source
translation
Prior art date
Application number
PCT/CN2019/070018
Other languages
English (en)
French (fr)
Inventor
张宏
Original Assignee
深圳壹账通智能科技有限公司
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 深圳壹账通智能科技有限公司 filed Critical 深圳壹账通智能科技有限公司
Publication of WO2019153979A1 publication Critical patent/WO2019153979A1/zh

Links

Images

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
    • G06F40/00Handling natural language data
    • G06F40/40Processing or translation of natural language
    • G06F40/42Data-driven translation

Definitions

  • the present application relates to a text translation method, apparatus, computer device and storage medium.
  • Machine translation is the use of computers to translate one language into another.
  • multi-language web development often requires the translation of the content of a web page into the language of several different countries.
  • the traditional approach is to query the specific content that needs to be translated through the background management system of the text to be translated, and then copy the content that needs to be translated to the first
  • the third-party translation system is used for translation, and the translated text is copied and saved in the background management system of the text to be translated.
  • the inventor realized that, based on the traditional translation method, the operation often involves switching back and forth between multiple browser tags, the operation is prone to confusion, and due to limitations in login timeliness, long-term translation of data is likely to cause process failure. , which leads to data saving failure, resulting in low translation efficiency.
  • a text translation method for example, a text translation method, apparatus, computer device, and storage medium are provided.
  • a text translation method includes: obtaining an address of a source text in a content management system; calling a source text corresponding to the address through a first interface provided by the content management system; and a second interface through a third-party translation system
  • the interface sends the invoked source text to the third-party translation system; through the second interface, receives machine translation text corresponding to the source text fed back by the third-party translation system; and displays a text editing interface, And displaying the machine translated text in an editable state in the text editing interface; and calibrating the displayed machine translated text according to an editing operation acting on the text editing interface.
  • a text translation apparatus includes: an acquisition module, configured to acquire an address of a source text in a content management system; and a calling module, configured to invoke, by using a first interface provided by the content management system, source text corresponding to the address; a sending module, configured to send the invoked source text to the third-party translation system by using a second interface that interfaces with a third-party translation system, and a receiving module, configured to receive the third party by using the second interface a machine translation text corresponding to the source text fed back by the translation system; a display module for displaying a text editing interface, and displaying the machine translated text in an editable state in the text editing interface; and a calibration module for An editing operation that acts on the text editing interface to calibrate the machine translated text displayed.
  • a computer device comprising a memory and one or more processors having stored therein computer readable instructions, the computer readable instructions being executable by the processor to cause the one or more processors to execute The following steps: obtaining an address of the source text in the content management system; calling, by the first interface provided by the content management system, source text corresponding to the address; and calling the second interface through a third interface with the third-party translation system Sending the source text to the third-party translation system; receiving, by the second interface, machine translation text corresponding to the source text fed back by the third-party translation system; displaying a text editing interface, and in the text The machine translation text in an editable state is displayed in the editing interface; and the machine translation text of the display is calibrated according to an editing operation acting on the text editing interface.
  • One or more non-transitory computer readable storage mediums storing computer readable instructions, when executed by one or more processors, cause one or more processors to perform the steps of: acquiring a content management system An address of the source text; the first interface provided by the content management system invokes source text corresponding to the address; and the source text that is called is sent to the second interface through a second interface that interfaces with the third-party translation system a third-party translation system; receiving, by the second interface, machine translation text corresponding to the source text fed back by the third-party translation system; displaying a text editing interface, and displaying in the text editing interface is editable The machine translation text of the state; and the machine translation text of the display is calibrated according to an editing operation acting on the text editing interface.
  • FIG. 1 is an application scenario diagram of a text translation method in accordance with one or more embodiments.
  • FIG. 2 is a flow diagram of a text translation method in accordance with one or more embodiments.
  • FIG. 3 is a flow diagram of the steps of obtaining an address of source text in a content management system in accordance with one or more embodiments.
  • FIG. 4 is a flow diagram of the steps of grammar element unit correction in accordance with one or more embodiments.
  • FIG. 5 is a schematic flow chart of a text translation method in another embodiment.
  • FIG. 6 is a block diagram of a text translation apparatus in accordance with one or more embodiments.
  • Figure 7 is a block diagram of a text translation apparatus in another embodiment.
  • FIG. 8 is a block diagram of a text translation apparatus in accordance with one or more embodiments.
  • FIG. 9 is a block diagram of a computer device in accordance with one or more embodiments.
  • the text translation method provided by the present application can be applied to an application environment as shown in FIG. 1.
  • the terminal 110 communicates with the content management system 120 via an interface, and the terminal 110 communicates with the third party translation system 130 via an interface.
  • the terminal 110 can be, but is not limited to, various personal computers, notebook computers, smart phones, tablets, portable wearable devices, etc., and the content management system 120 can be implemented by a stand-alone server or a server cluster composed of a plurality of servers.
  • a text translation method is provided, which is applied to the terminal in FIG. 1 as an example, and includes the following steps:
  • the content management system is a software system located between the front end of the Web (World Wide Web) and the back-end system or process.
  • the content management system's content library stores various data such as text files, HTML (Hyper Text Markup Language) web pages, Web services, relational databases, and the like.
  • a content management system such as a CMS (Content Management System).
  • the source text is the text to be translated, and may specifically be the text content of the file to be translated in a word, excel or txt format, or the text content stored in the database.
  • an auxiliary translation application can be installed on the terminal. After running the auxiliary translation application, an address input box can be displayed on the display interface of the auxiliary translation application. The terminal can directly obtain the address input into the address input box, where the address is the address of the source text in the content management system.
  • the auxiliary translation application can scan all the files in the content management system by itself.
  • the auxiliary translation application can display a textual identifier representing the different source text on the display interface, the text identifying the address linked to the source text.
  • the terminal can obtain the address of the text identification link by receiving a trigger operation for the text identifier.
  • the terminal can present the first text tag in the assisted translation application.
  • the text label is a label of the text, which can identify the text.
  • the first text label is a text category label.
  • the terminal determines an address included in the address range corresponding to the first text label.
  • the terminal may display a plurality of second text labels that are linked by the address in the address range.
  • the second text label is, for example, a text identifier.
  • the terminal after obtaining the address input from the address input box of the auxiliary translation application, determines a text identifier or a second text label of the source text corresponding to the acquired address, and identifies the text or the second text label.
  • the display interface of the text or text label added to the auxiliary translation application.
  • the interface is a shared boundary for information exchange between two independent components in a computer system.
  • API Application Programming Interface
  • the API is some predefined function, the purpose is to provide the ability of the system to access a set of routines based on a certain software (or hardware) without accessing the source code of the software, or understanding the details of the internal working mechanism of the software.
  • the first interface provided by the content management system may specifically be an API interface.
  • the terminal may invoke the source text corresponding to the acquired address through the auxiliary translation application API through the first interface provided by the content management system, such as an API interface.
  • the source text has N columns, and the number of columns to be translated can be selected on the source text selection interface of the auxiliary translation application to accurately determine the source text to be translated.
  • the terminal may display the source text in a source text display interface of the auxiliary translation application.
  • the terminal may send the invoked source text to the third-party translation system through the second interface that interfaces with the third-party translation system.
  • third-party translation systems such as Netease translation system, Google translation system or Baidu translation system.
  • the terminal may convert the file format of the source text into a file format that matches the third-party translation system, and then convert the file format through a second interface that interfaces with the third-party translation system.
  • the source text is sent to a third-party translation system.
  • the third-party translation system can perform machine translation on the source file.
  • the third-party translation system feeds the machine-translated machine translation text to the terminal.
  • the terminal receives the machine translated text corresponding to the source text fed back by the third-party translation system through the second interface.
  • the machine translated text can be displayed in a translated text display interface in the auxiliary translation application.
  • the source text display interface and the translated text display interface may be displayed side by side in the display interface of the terminal, for example, the left side and the right side of the terminal, so as to compare and view the source text and the translated text.
  • the translated text and the source text may be displayed corresponding to each other in respective display interfaces.
  • the corresponding sentences are displayed corresponding to each other, for example, in units of whole sentences, and the entire sentences corresponding to the translated text and the source text are displayed in corresponding positions in the respective display interfaces.
  • the terminal may display a text editing interface, and display the machine translated text corresponding to the source text fed back by the received third-party translation system in the text editing interface.
  • the machine translation text displayed in the text editing interface is editable.
  • the terminal can receive an editing operation acting on the text editing interface, and calibrate the displayed machine translation text according to the editing operation to obtain the calibrated translated text.
  • the text translation method may directly call the source text corresponding to the address of the source text in the content management system through the first interface provided by the content management system, and then send the source text to the second interface through a second interface that interfaces with the third-party translation system.
  • the three-party translation system can automatically realize the machine translation process of the source text without manually switching back and forth between multiple browser tags, which reduces the manual operation process and improves the translation efficiency. According to the editing operation of the machine translation text and the calibration of the machine translation text, the translation quality can be improved on the basis of improving the translation efficiency.
  • the third-party translation system performs machine translation combined with editing and calibration to translate the source text, which can reduce the manual operation process, reduce the probability of error, and calibrate the machine translation text to ensure the quality of translation, reduce the rework rate, and further improve The efficiency of text translation.
  • step S202 specifically includes:
  • an auxiliary translation application can be installed on the terminal. After running the auxiliary translation application, the first text label can be displayed on the display interface of the auxiliary translation application.
  • the first text label is a text category label.
  • the terminal receives the selected operation applied to the first text label, and determines the address included in the address range corresponding to the first text label according to the first label that is selected by the selected operation.
  • the address is used to locate the source text in the content management system.
  • the terminal may display a plurality of second text labels linked by the address in the address range.
  • the second text label is, for example, a text identifier.
  • the terminal receives the selected operation that acts on the second text label, and determines the address to which the second text label is linked according to the second label that is selected for the operation.
  • the address included in the address range corresponding to the selected first text label is determined, and the second text label linked by the address is displayed. .
  • the second text label is selected to obtain the address linked by the selected second text label, which simplifies the operation of manually inputting the address of the source text, and improves the efficiency of obtaining the source text.
  • the text translation method before the step S210, further includes a step of modifying the syntax element unit, the step specifically comprising:
  • the whole sentence is a complete sentence.
  • the terminal can determine the entire sentence in the machine translated text according to the punctuation marks in the machine translated text, and separate the entire sentence from the machine translated text. For example, the terminal can detect the period in the machine translation text. When the period is detected, the machine translation text after the previous period is detected and the machine translation text before the period is detected as a whole sentence.
  • the machine learning model is a machine learning algorithm model, which is a neural network model.
  • Machine learning English is called Machine Learning, referred to as ML.
  • the trained machine learning model is a machine learning algorithm model that has been trained to have classification capabilities.
  • a grammatical element unit is a grammatical unit that constitutes a grammatical structure of a whole sentence, such as a subject, a predicate, an object, and the like.
  • the machine learning model in this embodiment may specifically be a hidden Markov model or a CRF (conditional random field algorithm) model.
  • the sample data of the machine learning model can be obtained in advance, and the machine learning model is trained by the sample data, so that the trained machine learning model can identify the grammatical element unit of the whole sentence and separate the grammatical element unit from the whole sentence.
  • the terminal can input the entire sentence into the trained machine learning model to obtain a grammatical element unit separated from the entire sentence.
  • S406 Identify, according to a preset grammar constraint condition corresponding to the grammar element unit, a grammatical element unit that is translated incorrectly, and correct the obtained machine translated text.
  • the preset grammar constraint condition is a grammar constraint condition set in advance, and corresponds to the grammar element unit.
  • Presupposition grammar constraints such as the subject are predicates, can not be directly added to the object; there is only one predicate in a whole sentence.
  • the terminal may identify the grammatical element unit of the translation error according to the preset grammar constraint condition corresponding to the grammatical element unit, and automatically correct the erroneous grammatical element unit, such as adjusting the error order of the grammatical element unit, or deleting the redundant grammar. Element unit, etc.
  • the terminal corrects the grammatical element unit of the translation error in the entire sentence in the machine translation text, and obtains the corrected machine translation text.
  • the grammar element unit separated from the whole sentence is obtained, and according to the preset grammar constraint condition, the grammatical element unit of the translation error is identified and Correction can automatically misidentify and correct machine translated text, improving text translation efficiency.
  • the text translation method before step S206, further comprises: converting the file format of the source text into a file format matching the third-party translation system; and step S206 includes: performing a second interface with the third-party translation system The interface sends the source text after converting the file format to the third-party translation system; after step S208, the text translation method further comprises: converting the file format of the received machine-translated text into a file format of the source text.
  • the terminal may convert the file format of the source text into a file format that matches the third-party translation system, and then convert the source of the file format through the second interface that interfaces with the third-party translation system.
  • the text is sent to a third-party translation system.
  • the file format of the received machine translated text is converted into the file format of the source text.
  • the terminal can automatically interface with the third-party system by converting the file format of the source text into a file format matching the third-party translation system, so that the third-party translation system can recognize the source text and perform machine translation.
  • the terminal sends the source text through the second interface and the receiver translates the text, and the machine translated text can be displayed in the file format of the source text in the text editing interface.
  • the text translation method further includes the step of saving the text, the step of saving the text comprising: obtaining a translated text storage address corresponding to the address in the content management system; and performing machine translation of the calibration display according to the translated text storage address The translated text obtained after the text is stored in the content management system.
  • the terminal displays the translated text storage address input box on the display interface of the running auxiliary translation application.
  • the terminal can directly obtain an address input to the translation text storage address input box, where the address is an address corresponding to the source text in the content management system.
  • the terminal stores the translated text obtained by calibrating the displayed machine translation text into a content management system through a third interface provided by the content management system.
  • the terminal displays the translated text storage address selection box on the display interface of the running auxiliary translation application.
  • the translated text storage address selection box can include a plurality of translated text storage addresses in the content management system.
  • the terminal stores the translated text obtained by calibrating the displayed machine translation text into a content management system through a third interface provided by the content management system.
  • the terminal may store the translated text to the specified translated text storage address corresponding to the address of the source text, and when the translated text is needed, the source text and the corresponding translated text may be directly obtained from the content management system. Convenient.
  • the source text is webpage content in a webpage of the first language; the text translation method further includes: acquiring a webpage template of the webpage of the first language; adding and sourceing at a location corresponding to the source text in the webpage template The calibrated translated text corresponding to the text generates a web page in the second language.
  • the web page template is a template that can be used repeatedly in the development process of a multi-language web page.
  • the terminal may acquire a webpage template of a webpage of the first language from the server or the terminal itself.
  • the calibrated translated text corresponding to the source text is loaded and generated, and the webpage of the second language is generated.
  • the source text is the webpage content in the webpage of the first language
  • the terminal may add the corresponding text source corresponding to the source text in the webpage template.
  • the calibrated translated text generates a web page in the second language. In this way, directly obtaining the translated text from the content management system and generating the second language webpage by translating the text improves the efficiency of multi-language webpage development.
  • the text translation method includes the following steps:
  • S524 Identify, according to a preset grammar constraint condition corresponding to the grammar element unit, the grammatical element unit of the translation error and correct the obtained machine translated text.
  • S532 Store the translated text obtained by calibrating the displayed machine translation text into the content management system according to the translated text storage address.
  • S536 Add a calibrated translated text corresponding to the source text at a position corresponding to the source text in the webpage template to generate a webpage of the second language.
  • the text translation method may directly call the source text corresponding to the address of the source text in the content management system through the first interface provided by the content management system, and then send the source text to the second interface through a second interface that interfaces with the third-party translation system.
  • the three-party translation system can automatically realize the machine translation process of the source text without manually switching back and forth between multiple browser tags, which reduces the manual operation process and improves the translation efficiency. According to the editing operation of the machine translation text and the calibration of the machine translation text, the translation quality can be improved on the basis of improving the translation efficiency.
  • the third-party translation system performs machine translation combined with editing and calibration to translate the source text, which can reduce the manual operation process, reduce the probability of error, and calibrate the machine translation text to ensure the quality of translation, reduce the rework rate, and further improve The efficiency of text translation.
  • a text translation apparatus including: an acquisition module 601, a calling module 602, a sending module 603, a receiving module 604, a display module 605, and a calibration module 606, wherein:
  • the obtaining module 601 is configured to obtain an address of the source text in the content management system.
  • the calling module 602 is configured to invoke the source text corresponding to the address through the first interface provided by the content management system.
  • the sending module 603 is configured to send the invoked source text to the third-party translation system through a second interface that interfaces with the third-party translation system.
  • the receiving module 604 is configured to receive the machine translated text corresponding to the source text fed back by the third-party translation system through the second interface.
  • the display module 605 is configured to display a text editing interface and display the machine translated text in an editable state in the text editing interface.
  • the calibration module 606 is configured to calibrate the displayed machine translated text according to an editing operation applied to the text editing interface.
  • the text translation device can directly call the source text corresponding to the address of the source text in the content management system through the first interface provided by the content management system, and then send the source text to the second interface through the second interface that interfaces with the third-party translation system.
  • the three-party translation system can automatically realize the machine translation process of the source text without manually switching back and forth between multiple browser tags, which reduces the manual operation process and improves the translation efficiency. According to the editing operation of the machine translation text and the calibration of the machine translation text, the translation quality can be improved on the basis of improving the translation efficiency.
  • the third-party translation system performs machine translation combined with editing and calibration to translate the source text, which can reduce the manual operation process, reduce the probability of error, and calibrate the machine translation text to ensure the quality of translation, reduce the rework rate, and further improve The efficiency of text translation.
  • the obtaining module 601 is further configured to display the first text label; when detecting the operation of selecting the first text label, determine an address included in the address range corresponding to the first text label; the address is used to locate the content management The source text in the system; displaying the second text label linked by the address; and detecting the operation of selecting the second text label, obtaining the address linked by the selected second text label.
  • the address included in the address range corresponding to the selected first text label is determined, and the second text label linked by the address is displayed. .
  • the second text label is selected to obtain the address linked by the selected second text label, which simplifies the operation of manually inputting the address of the source text, and improves the efficiency of obtaining the source text.
  • the text translation apparatus 600 further includes a separation module 607, an input module 608, and a correction module 609.
  • a separation module 607 is configured to separate the entire sentence from the machine translated text.
  • the input module 608 is configured to input the entire sentence into the trained machine learning model to obtain a grammatical element unit separated from the entire sentence.
  • the correction module 609 is configured to identify the grammatical element unit of the translation error according to the preset grammar constraint condition corresponding to the grammatical element unit and correct the obtained machine translated text.
  • the grammar element unit separated from the whole sentence is obtained, and according to the preset grammar constraint condition, the grammatical element unit of the translation error is identified and Correction can automatically misidentify and correct machine translated text, improving text translation efficiency.
  • the text translation device 600 also includes a format conversion module 610.
  • the format conversion module 610 is configured to convert the file format of the source text into a file format that matches the third-party translation system.
  • the sending module 603 is further configured to send the source text after converting the file format to the third-party translation system by using a second interface that interfaces with the third-party translation system.
  • the format conversion module 610 is further configured to convert the file format of the received machine translated text into a file format of the source text.
  • the terminal can automatically interface with the third-party system by converting the file format of the source text into a file format matching the third-party translation system, so that the third-party translation system can recognize the source text and perform machine translation.
  • the terminal sends the source text through the second interface and the receiver translates the text, and the machine translated text can be displayed in the file format of the source text in the text editing interface.
  • the text translation device 600 further includes a storage module 611.
  • the obtaining module 601 is further configured to obtain a translated text storage address corresponding to the address in the content management system.
  • the storage module 611 is configured to store the translated text obtained by calibrating the displayed machine translation text into the content management system according to the translated text storage address.
  • the terminal may store the translated text to the specified translated text storage address corresponding to the address of the source text, and when the translated text is needed, the source text and the corresponding translated text may be directly obtained from the content management system. Convenient.
  • the source text is web page content in a web page of a first language; the text translation device 600 further includes an add module 612.
  • the obtaining module 601 is further configured to obtain a webpage template of the webpage of the first language.
  • the adding module 612 is configured to add the calibrated translated text corresponding to the source text at a position corresponding to the source text in the webpage template to generate a webpage of the second language.
  • the source text is the webpage content in the webpage of the first language
  • the terminal may add the corresponding text source corresponding to the source text in the webpage template.
  • the calibrated translated text generates a web page in the second language. In this way, directly obtaining the translated text from the content management system and generating the second language webpage by translating the text improves the efficiency of multi-language webpage development.
  • the various modules in the text translation apparatus described above may be implemented in whole or in part by software, hardware, and combinations thereof. Each of the above modules may be embedded in or independent of the processor in the computer device, or may be stored in a memory in the computer device in a software form, so that the processor invokes the operations corresponding to the above modules.
  • a computer device which may be a terminal, and its internal structure diagram may be as shown in FIG.
  • the computer device includes a processor, memory, network interface, display screen, and input device connected by a system bus.
  • the processor of the computer device is used to provide computing and control capabilities.
  • the memory of the computer device includes a non-transitory computer readable storage medium, an internal memory.
  • the non-transitory computer readable storage medium stores an operating system and computer readable instructions.
  • the internal memory provides an environment for the operation of an operating system and computer readable instructions in a non-transitory computer readable storage medium.
  • the network interface of the computer device is used to communicate with an external terminal via a network connection.
  • the computer readable instructions are executed by a processor to implement a text translation method.
  • the display screen of the computer device may be a liquid crystal display or an electronic ink display screen
  • the input device of the computer device may be a touch layer covered on the display screen, or may be a button, a trackball or a touchpad provided on the computer device casing. It can also be an external keyboard, trackpad or mouse.
  • FIG. 9 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation of the computer device to which the solution of the present application is applied.
  • the specific computer device may It includes more or fewer components than those shown in the figures, or some components are combined, or have different component arrangements.
  • a computer apparatus comprising a memory and one or more processors having stored therein computer readable instructions that, when executed by a processor, implement the steps of a text translation method provided in any one of the embodiments of the present application.
  • One or more non-transitory computer readable storage mediums storing computer readable instructions, when executed by one or more processors, cause one or more processors to be implemented in any one embodiment of the present application The steps provided for the text translation method.
  • Non-volatile memory can include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • Volatile memory can include random access memory (RAM) or external cache memory.
  • RAM is available in a variety of formats, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronization chain.
  • SRAM static RAM
  • DRAM dynamic RAM
  • SDRAM synchronous DRAM
  • DDRSDRAM double data rate SDRAM
  • ESDRAM enhanced SDRAM
  • Synchlink DRAM SLDRAM
  • Memory Bus Radbus
  • RDRAM Direct RAM
  • DRAM Direct Memory Bus Dynamic RAM
  • RDRAM Memory Bus Dynamic RAM

Abstract

一种文本翻译方法,包括:获取内容管理系统中源文本的地址;通过所述内容管理系统提供的第一接口调用与所述地址相对应的源文本;通过与第三方翻译系统对接的第二接口,将调用的所述源文本发送至所述第三方翻译系统;通过所述第二接口,接收所述第三方翻译系统反馈的与所述源文本相应的机器翻译文本;展示文本编辑界面,并在所述文本编辑界面中展示处于可编辑状态的机器翻译文本;根据作用于所述文本编辑界面的编辑操作,校准展示的机器翻译文本。

Description

文本翻译方法、装置、计算机设备和存储介质
相关申请的交叉引用
本申请要求于2018年02月07日提交中国专利局,申请号为201810124553.6,申请名称为“文本翻译方法、装置、计算机设备和存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及一种文本翻译方法、装置、计算机设备和存储介质。
背景技术
随着网络技术的发展,出现了机器翻译技术,机器翻译是利用计算机将一种语言翻译成另一种语言。在很多工作领域中,常常会涉及到需要将一种语言的内容翻译成几种不同国家的语言的情况。比如多语言网页开发,常常需要将网页的内容需翻译成几种不同国家的语言呈现的情况。对于需要将一种语言的内容翻译成几种不同国家的语言的文本翻译方法,传统的做法是通过待翻译文本的后台管理系统,查询需要翻译的具体内容,再将需要翻译的内容复制到第三方翻译系统中,通过第三方翻译系统进行翻译,将翻译后的文字复制保存在待翻译文本的后台管理系统。
然而,发明人意识到,基于传统的翻译方法,操作过程中常常涉及在多个浏览器标签间进行来回切换,操作容易发生错乱,并且由于登陆时效性等限制,长时间翻译数据容易导致进程失效,进而导致数据保存失败,导致翻译效率低。
发明内容
根据本申请公开的各种实施例,提供一种文本翻译方法、装置、计算机设备和存储介质。
一种文本翻译方法,包括:获取内容管理系统中源文本的地址;通过所述内容管理系统提供的第一接口调用与所述地址相对应的源文本;通过与第三方翻译系统对接的第二接口,将调用的所述源文本发送至所述第三方翻译系统;通过所述第二接口,接收所述第三方翻译系统反馈的与所述源文本相应的机器翻译文本;展示文本编辑界面,并在所述文本编辑界面中展示处于可编辑状态的机器翻译文本;及根据作用于所述文本编辑界面的编辑操作,校准展示的机器翻译文本。
一种文本翻译装置,包括:获取模块,用于获取内容管理系统中源文本的地址;调用模块,用于通过所述内容管理系统提供的第一接口调用与所述地址相对应的源文本;发送模块,用于通过与第三方翻译系统对接的第二接口,将调用的所述源文本发送至所述第三 方翻译系统;接收模块,用于通过所述第二接口,接收所述第三方翻译系统反馈的与所述源文本相应的机器翻译文本;展示模块,用于展示文本编辑界面,并在所述文本编辑界面中展示处于可编辑状态的机器翻译文本;及校准模块,用于根据作用于所述文本编辑界面的编辑操作,校准展示的机器翻译文本。
一种计算机设备,包括存储器和一个或多个处理器,所述存储器中储存有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述一个或多个处理器执行以下步骤:获取内容管理系统中源文本的地址;通过所述内容管理系统提供的第一接口调用与所述地址相对应的源文本;通过与第三方翻译系统对接的第二接口,将调用的所述源文本发送至所述第三方翻译系统;通过所述第二接口,接收所述第三方翻译系统反馈的与所述源文本相应的机器翻译文本;展示文本编辑界面,并在所述文本编辑界面中展示处于可编辑状态的机器翻译文本;及根据作用于所述文本编辑界面的编辑操作,校准展示的机器翻译文本。
一个或多个存储有计算机可读指令的非易失性计算机可读存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行以下步骤:获取内容管理系统中源文本的地址;通过所述内容管理系统提供的第一接口调用与所述地址相对应的源文本;通过与第三方翻译系统对接的第二接口,将调用的所述源文本发送至所述第三方翻译系统;通过所述第二接口,接收所述第三方翻译系统反馈的与所述源文本相应的机器翻译文本;展示文本编辑界面,并在所述文本编辑界面中展示处于可编辑状态的机器翻译文本;及根据作用于所述文本编辑界面的编辑操作,校准展示的机器翻译文本。
本申请的一个或多个实施例的细节在下面的附图和描述中提出。本申请的其它特征和优点将从说明书、附图以及权利要求书变得明显。
附图说明
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。
图1为根据一个或多个实施例中文本翻译方法的应用场景图。
图2为根据一个或多个实施例中文本翻译方法的流程示意图。
图3为根据一个或多个实施例中获取内容管理系统中源文本的地址的步骤的流程示意图。
图4为根据一个或多个实施例中语法要素单元修正的步骤的流程示意图。
图5为另一个实施例中文本翻译方法的流程示意图。
图6为根据一个或多个实施例中文本翻译装置的框图。
图7为另一个实施例中文本翻译装置的框图。
图8为根据一个或多个实施例中文本翻译装置的框图。
图9为根据一个或多个实施例中计算机设备的框图。
具体实施方式
为了使本申请的技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
本申请提供的文本翻译方法,可以应用于如图1所示的应用环境中。终端110与内容管理系统120通过接口进行通信,终端110与第三方翻译系统130通过接口进行通信。终端110可以但不限于是各种个人计算机、笔记本电脑、智能手机、平板电脑和便携式可穿戴设备等,内容管理系统120可以用独立的服务器或者是多个服务器组成的服务器集群来实现。
在一些实施例中,如图2所示,提供了一种文本翻译方法,以该方法应用于图1中的终端为例进行说明,包括以下步骤:
S202,获取内容管理系统中源文本的地址。
其中,内容管理系统是一种位于Web(World Wide Web,全球广域网)前端和后端系统或流程之间的软件系统。内容管理系统的内容库中存储有各种数据,比如文本文件、HTML(Hyper Text Markup Language,超级文本标记语言)网页、Web服务、关系数据库等的数据。内容管理系统比如CMS(Content Management System,内容管理系统)。源文本是待翻译的文本,具体可以是待翻译的以word、excel或txt等格式存储的文件的文字内容,或者是数据库中存储的文字内容等。
在一些实施例中,终端上可安装有辅助翻译应用。运行辅助翻译应用后,在辅助翻译应用的显示界面上可显示有地址输入框。终端可直接获取输入至地址输入框中的地址,其中,地址是内容管理系统中源文本的地址。
在一些实施例中,终端运行辅助翻译应用后,辅助翻译应用可自行扫描内容管理系统中的所有文件。辅助翻译应用在显示界面上可显示表示不同源文本的文本标识,该文本标识链接至该源文本的地址。终端通过接收针对于文本标识的触发操作,可获取该文本标识链接的地址。
在一些实施例中,终端可在辅助翻译应用中展示第一文本标签。其中,文本标签是文本的标签,可以标识该文本。第一文本标签比如文本类别标签。终端在检测到选中第一文本标签的操作时,确定与第一文本标签相应的地址范围所包括的地址。终端检测到选中第一文本标签的操作后,可展示多个以上述地址范围中的地址为链接的第二文本标签。第二文本标签比如文本标识。终端检测到选中第二文本标签的操作时,获取选中的第二文本标签所链接的地址。
在一些实施例中,终端获取从辅助翻译应用的地址输入框中输入的地址后,确定该获取的地址所对应的源文本的文本标识或者第二文本标签,并将文本标识或者第二文本标签 添加至辅助翻译应用的文本标识或文本标签的显示界面。
S204,通过内容管理系统提供的第一接口调用与地址相对应的源文本。
其中,接口是计算机系统中两个独立的部件进行信息交换的共享边界。比如API(Application Programming Interface,系统编程接口)接口。其中,API是一些预先定义的函数,目的是提供系统基于某软件(或硬件)的访问一组例程的能力,而又无需访问软件的源码,或理解软件的内部工作机制的细节。内容管理系统提供的第一接口具体可以是API接口。
具体地,终端在获取到内容管理系统中源文本的地址后,可通过内容管理系统提供的第一接口,比如API接口,通过辅助翻译应用API调用与获取的地址相对应的源文本。
在一些实施例中,当辅助翻译应用通过API调用源文本时,源文本有N列,可在辅助翻译应用的源文本选择界面上选择需翻译的列数,以精准地确定需翻译的源文本。
在一些实施例中,终端在获取源文本后,可将源文本显示在辅助翻译应用的源文本显示界面中。
S206,通过与第三方翻译系统对接的第二接口,将调用的源文本发送至第三方翻译系统。
具体地,终端在获取源文本后,可通过与第三方翻译系统对接的第二接口,将调用的源文本发送至第三方翻译系统。其中,第三方翻译系统比如网易翻译系统、谷歌翻译系统或百度翻译系统等。
在一些实施例中,终端在获取源文本后,可将源文本的文件格式转换成与第三方翻译系统相匹配的文件格式,再通过与第三方翻译系统对接的第二接口,将转换文件格式后的源文本发送至第三方翻译系统。
S208,通过第二接口,接收第三方翻译系统反馈的与源文本相应的机器翻译文本。
具体地,当终端将源文本发送至第三方翻译系统后,第三方翻译系统可对源文件进行机器翻译。第三方翻译系统将机器翻译后的机器翻译文本反馈给终端。终端通过第二接口,接收第三方翻译系统反馈的与源文本相应的机器翻译文本。
在一些实施例中,终端接收机器翻译文本后,可将机器翻译文本显示在辅助翻译应用中的翻译文本显示界面。其中,源文本显示界面和翻译文本显示界面可并列显示在终端的显示界面中,比如,终端的左侧和右侧,以便于对比查看源文本和翻译文本。进一步地,翻译文本和源文本可在各自的显示界面中相互对应地显示。其中,相互对应地显示,比如以整句为单位,翻译文本和源文本相互对应的整句显示在各自的显示界面中的相应位置。
S210,展示文本编辑界面,并在文本编辑界面中展示处于可编辑状态的机器翻译文本。
具体地,终端可展示文本编辑界面,将接收的第三方翻译系统反馈的与源文本相应的机器翻译文本展示在文本编辑界面中。文本编辑界面中展示的机器翻译文本处于可编辑状态。
S212,根据作用于文本编辑界面的编辑操作,校准展示的机器翻译文本。
具体地,终端可接收作用于文本编辑界面的编辑操作,根据编辑操作对展示的机器翻译文本进行校准,以得到校准后的翻译文本。
上述文本翻译方法,通过内容管理系统提供的第一接口可直接调用与内容管理系统中源文本的地址相对应的源文本,再通过与第三方翻译系统对接的第二接口将源文本发送至第三方翻译系统,可自动实现源文本的机器翻译过程,而无需人工手动在多个浏览器标签中来回切换,减少了手动操作过程,提高了翻译效率。再根据作用于文本编辑界面的,针对于机器翻译文本的编辑操作,校准机器翻译文本,可在提高翻译效率的基础上保障了翻译质量。这样,通过第三方翻译系统进行机器翻译结合编辑校准的方式对源文本进行翻译,可以减少手动操作过程,降低出错概率,并且对机器翻译文本进行校准以保障翻译的质量,降低返工率,进一步提高了文本翻译效率。
在一些实施例中,步骤S202具体包括:
S302,展示第一文本标签。
具体地,终端上可安装有辅助翻译应用。运行辅助翻译应用后,在辅助翻译应用的显示界面上可展示第一文本标签。第一文本标签比如文本类别标签。
S304,检测到选中第一文本标签的操作时,确定与第一文本标签相应的地址范围所包括的地址;地址用于定位内容管理系统中的源文本。
具体地,终端接收作用于第一文本标签的选中操作,根据选中操作作用的第一标签,确定与第一文本标签相应的地址范围所包括的地址。其中,地址用于定位内容管理系统中的源文本。
S306,展示以地址为链接的第二文本标签。
具体地,终端在确定与第一文本标签相应的地址范围所包括的地址后,可展示多个以上述地址范围中的地址为链接的第二文本标签。第二文本标签比如文本标识。
S308,检测到选中第二文本标签的操作时,获取选中的第二文本标签所链接的地址。
具体地,终端接收作用于第二文本标签的选中操作,根据选中操作作用的第二标签,确定第二文本标签所链接的地址。
上述实施例中,通过检测到针对于展示的第一文本标签中的选中操作时,确定与选中的第一文本标签相应的地址范围所包括的地址,展示以上述地址为链接的第二文本标签。这样就可以通过选中第二文本标签来获取选中的第二文本标签所链接的地址,简化了手动输入源文本的地址的操作,提高了源文本的获取效率。
在一些实施例中,步骤S210之前,该文本翻译方法还包括语法要素单元修正的步骤,该步骤具体包括:
S402,从机器翻译文本中分离出整句。
其中,整句是完整的句子。具体地,终端可根据机器翻译文本中的标点符号确定机器翻译文本中的整句,并从机器翻译文本中分离出整句。比如,终端可检测机器翻译文本中的句号,当检测到句号时,将前次检测到句号后的机器翻译文本和当次检测到句号前的机 器翻译文本作为一个整句。
S404,将整句输入已训练的机器学习模型,得到从整句中分离出的语法要素单元。
其中,机器学习模型是机器学习算法模型,是一种神经网络模型。机器学习英文全称为Machine Learning,简称ML。已训练的机器学习模型是经过训练后具有分类能力的机器学习算法模型。语法要素单元是构成整句的以语法结构为单位的语法单元,比如主语、谓语、宾语等。
本实施例中的机器学习模型具体可以是隐马尔科夫模型或CRF(conditional random field algorithm,条件随机场算法)模型等。可预先获取机器学习模型的样本数据,通过样本数据对机器学习模型进行训练,使得已训练的机器学习模型可以对整句进行语法要素单元识别,并从整句中分离出语法要素单元。
具体地,终端可将整句输入已训练的机器学习模型,得到从整句中分离出的语法要素单元。
S406,按照语法要素单元对应的预设语法约束条件,识别翻译错误的语法要素单元并修正,得到修正后的机器翻译文本。
其中,预设语法约束条件是预先设置的语法约束条件,与语法要素单元对应。预设语法约束条件比如主语后是谓语,不可直接加宾语;一个整句中仅有一个谓语等。
具体地,终端可按照语法要素单元对应的预设语法约束条件,识别翻译错误的语法要素单元,并将错误的语法要素单元进行自动修正,比如调整语法要素单元的错误顺序,或删除多余的语法要素单元等。终端对机器翻译文本中的整句中翻译错误的语法要素单元进行修正,得到修正后的机器翻译文本。
上述实施例中,通过将机器翻译文本中的整句输入已训练的机器学习模型,得到从整句中分离出的语法要素单元,再根据预设语法约束条件,识别翻译错误的语法要素单元并修正,可对机器翻译文本自动进行错误识别和修正,提高了文本翻译效率。
在一些实施例中,步骤S206之前,该文本翻译方法还包括:将源文本的文件格式转换成与第三方翻译系统相匹配的文件格式;步骤S206包括:通过与第三方翻译系统对接的第二接口,将转换文件格式后的源文本发送至第三方翻译系统;步骤S208之后,该文本翻译方法还包括:将接收的机器翻译文本的文件格式转换成源文本的文件格式。
具体地,终端在调用源文本后,可将源文本的文件格式转换成与第三方翻译系统相匹配的文件格式,再通过与第三方翻译系统对接的第二接口,将转换文件格式后的源文本发送至第三方翻译系统。在接收第三方翻译系统反馈的与源文本相应的机器翻译文本后,将接收的机器翻译文本的文件格式转换成源文本的文件格式。
上述实施例中,终端通过将源文本的文件格式转换成与第三方翻译系统相匹配的文件格式,可以实现自动与第三方系统进行对接,以使第三方翻译系统能识别源文本并进行机器翻译。终端通过第二接口发送源文本并接收机器翻译文本,可在文本编辑界面中以源文本的文件格式展示机器翻译文本。
在一些实施例中,文本翻译方法还包括文本保存的步骤,该文本保存的步骤包括:获取内容管理系统中与地址相对应的翻译文本存储地址;按照翻译文本存储地址,将校准展示的机器翻译文本后得到的翻译文本存储至内容管理系统中。
在一些实施例中,终端可检测到翻译文本保存指令后,在运行的辅助翻译应用的显示界面上显示翻译文本存储地址输入框。终端可直接获取输入至翻译文本存储地址输入框的地址,其中,地址是内容管理系统中与源文本对应的地址。终端将校准展示的机器翻译文本后得到的翻译文本通过内容管理系统提供的第三接口存储至内容管理系统中。
在一些实施例中,终端可检测到翻译文本保存指令后,在运行的辅助翻译应用的显示界面上显示翻译文本存储地址选择框。翻译文本存储地址选择框可包括内容管理系统中的多个翻译文本存储地址。终端将校准展示的机器翻译文本后得到的翻译文本通过内容管理系统提供的第三接口存储至内容管理系统中。
上述实施例中,终端可将翻译文本存储至指定的与源文本的地址相对应的翻译文本存储地址,在需使用翻译文本时,可直接从内容管理系统中获取源文本和相应的翻译文本,方便快捷。
在一些实施例中,源文本是第一语种的网页中的网页内容;文本翻译方法还包括:获取第一语种的网页的网页模板;在网页模板中与源文本相应的位置处,添加与源文本对应的经过校准得到的翻译文本,生成第二语种的网页。
其中,网页模板是多语言网页开发过程中可供反复使用的模板。具体地,在多语言网页开发中,终端可从服务器或终端自身获取第一语种的网页的网页模板。在网页模板中与源文本相应的位置处,加载渲染与源文本对应的经过校准得到的翻译文本,生成第二语种的网页。
上述实施例中,当文本翻译方法应用于多语言网页开发时,源文本是第一语种的网页中的网页内容,终端可在网页模板中与源文本相应的位置处,添加与源文本对应的经过校准得到的翻译文本,生成第二语种的网页。这样从内容管理系统直接获取翻译文本通过翻译文本生成第二语种的网页,提高了多语言网页开发的效率。
如图5所示,在一个具体的实施例中,文本翻译方法包括以下步骤:
S502,展示第一文本标签。
S504,检测到选中第一文本标签的操作时,确定与第一文本标签相应的地址范围所包括的地址;地址用于定位内容管理系统中的源文本。
S506,展示以地址为链接的第二文本标签。
S508,检测到选中第二文本标签的操作时,获取选中的第二文本标签所链接的地址。
S510,通过内容管理系统提供的第一接口调用与地址相对应的源文本。
S512,将源文本的文件格式转换成与第三方翻译系统相匹配的文件格式。
S514,通过与第三方翻译系统对接的第二接口,将转换文件格式后的源文本发送至第三方翻译系统。
S516,通过第二接口,接收第三方翻译系统反馈的与源文本相应的机器翻译文本。
S518,将接收的机器翻译文本的文件格式转换成源文本的文件格式。
S520,从机器翻译文本中分离出整句。
S522,将整句输入已训练的机器学习模型,得到从整句中分离出的语法要素单元。
S524,按照语法要素单元对应的预设语法约束条件,识别翻译错误的语法要素单元并修正,得到修正后的机器翻译文本。
S526,展示文本编辑界面,并在文本编辑界面中展示处于可编辑状态的机器翻译文本。
S528,根据作用于文本编辑界面的编辑操作,校准展示的机器翻译文本。
S530,获取内容管理系统中与地址相对应的翻译文本存储地址。
S532,按照翻译文本存储地址,将校准展示的机器翻译文本后得到的翻译文本存储至内容管理系统中。
S534,获取第一语种的网页的网页模板。
S536,在网页模板中与源文本相应的位置处,添加与源文本对应的经过校准得到的翻译文本,生成第二语种的网页。
上述文本翻译方法,通过内容管理系统提供的第一接口可直接调用与内容管理系统中源文本的地址相对应的源文本,再通过与第三方翻译系统对接的第二接口将源文本发送至第三方翻译系统,可自动实现源文本的机器翻译过程,而无需人工手动在多个浏览器标签中来回切换,减少了手动操作过程,提高了翻译效率。再根据作用于文本编辑界面的,针对于机器翻译文本的编辑操作,校准机器翻译文本,可在提高翻译效率的基础上保障了翻译质量。这样,通过第三方翻译系统进行机器翻译结合编辑校准的方式对源文本进行翻译,可以减少手动操作过程,降低出错概率,并且对机器翻译文本进行校准以保障翻译的质量,降低返工率,进一步提高了文本翻译效率。
应该理解的是,虽然图2-5的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,图2-5中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些子步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。
在一些实施例中,如图6所示,提供了一种文本翻译装置,包括:获取模块601、调用模块602、发送模块603、接收模块604、展示模块605和校准模块606,其中:
获取模块601,用于获取内容管理系统中源文本的地址。
调用模块602,用于通过内容管理系统提供的第一接口调用与地址相对应的源文本。
发送模块603,用于通过与第三方翻译系统对接的第二接口,将调用的源文本发送至第三方翻译系统。
接收模块604,用于通过第二接口,接收第三方翻译系统反馈的与源文本相应的机器翻译文本。
展示模块605,用于展示文本编辑界面,并在文本编辑界面中展示处于可编辑状态的机器翻译文本。
校准模块606,用于根据作用于文本编辑界面的编辑操作,校准展示的机器翻译文本。
上述文本翻译装置,通过内容管理系统提供的第一接口可直接调用与内容管理系统中源文本的地址相对应的源文本,再通过与第三方翻译系统对接的第二接口将源文本发送至第三方翻译系统,可自动实现源文本的机器翻译过程,而无需人工手动在多个浏览器标签中来回切换,减少了手动操作过程,提高了翻译效率。再根据作用于文本编辑界面的,针对于机器翻译文本的编辑操作,校准机器翻译文本,可在提高翻译效率的基础上保障了翻译质量。这样,通过第三方翻译系统进行机器翻译结合编辑校准的方式对源文本进行翻译,可以减少手动操作过程,降低出错概率,并且对机器翻译文本进行校准以保障翻译的质量,降低返工率,进一步提高了文本翻译效率。
在一些实施例中,获取模块601还用于展示第一文本标签;检测到选中第一文本标签的操作时,确定与第一文本标签相应的地址范围所包括的地址;地址用于定位内容管理系统中的源文本;展示以地址为链接的第二文本标签;检测到选中第二文本标签的操作时,获取选中的第二文本标签所链接的地址。
上述实施例中,通过检测到针对于展示的第一文本标签中的选中操作时,确定与选中的第一文本标签相应的地址范围所包括的地址,展示以上述地址为链接的第二文本标签。这样就可以通过选中第二文本标签来获取选中的第二文本标签所链接的地址,简化了手动输入源文本的地址的操作,提高了源文本的获取效率。
如图7所示,在一些实施例中,该文本翻译装置600还包括:分离模块607、输入模块608和修正模块609。
分离模块607,用于从机器翻译文本中分离出整句。
输入模块608,用于将整句输入已训练的机器学习模型,得到从整句中分离出的语法要素单元。
修正模块609,用于按照语法要素单元对应的预设语法约束条件,识别翻译错误的语法要素单元并修正,得到修正后的机器翻译文本。
上述实施例中,通过将机器翻译文本中的整句输入已训练的机器学习模型,得到从整句中分离出的语法要素单元,再根据预设语法约束条件,识别翻译错误的语法要素单元并修正,可对机器翻译文本自动进行错误识别和修正,提高了文本翻译效率。
在一些实施例中,该文本翻译装置600还包括格式转换模块610。
格式转换模块610,用于将源文本的文件格式转换成与第三方翻译系统相匹配的文件格式。
发送模块603还用于通过与第三方翻译系统对接的第二接口,将转换文件格式后的源文本发送至第三方翻译系统。
格式转换模块610还用于将接收的机器翻译文本的文件格式转换成源文本的文件格式。
上述实施例中,终端通过将源文本的文件格式转换成与第三方翻译系统相匹配的文件格式,可以实现自动与第三方系统进行对接,以使第三方翻译系统能识别源文本并进行机器翻译。终端通过第二接口发送源文本并接收机器翻译文本,可在文本编辑界面中以源文本的文件格式展示机器翻译文本。
在一些实施例中,该文本翻译装置600还包括存储模块611。
获取模块601还用于获取内容管理系统中与地址相对应的翻译文本存储地址。
存储模块611,用于按照翻译文本存储地址,将校准展示的机器翻译文本后得到的翻译文本存储至内容管理系统中。
上述实施例中,终端可将翻译文本存储至指定的与源文本的地址相对应的翻译文本存储地址,在需使用翻译文本时,可直接从内容管理系统中获取源文本和相应的翻译文本,方便快捷。
如图8所示,在一些实施例中,源文本是第一语种的网页中的网页内容;该文本翻译装置600还包括添加模块612。
获取模块601还用于获取第一语种的网页的网页模板。
添加模块612,用于在网页模板中与源文本相应的位置处,添加与源文本对应的经过校准得到的翻译文本,生成第二语种的网页。
上述实施例中,当文本翻译方法应用于多语言网页开发时,源文本是第一语种的网页中的网页内容,终端可在网页模板中与源文本相应的位置处,添加与源文本对应的经过校准得到的翻译文本,生成第二语种的网页。这样从内容管理系统直接获取翻译文本通过翻译文本生成第二语种的网页,提高了多语言网页开发的效率。
关于文本翻译装置的具体限定可以参见上文中对于文本翻译方法的限定,在此不再赘述。上述文本翻译装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。
在一些实施例中,提供了一种计算机设备,该计算机设备可以是终端,其内部结构图可以如图9所示。该计算机设备包括通过系统总线连接的处理器、存储器、网络接口、显示屏和输入装置。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备 的存储器包括非易失性计算机可读存储介质、内存储器。该非易失性计算机可读存储介质存储有操作系统和计算机可读指令。该内存储器为非易失性计算机可读存储介质中的操作系统和计算机可读指令的运行提供环境。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机可读指令被处理器执行时以实现一种文本翻译方法。该计算机设备的显示屏可以是液晶显示屏或者电子墨水显示屏,该计算机设备的输入装置可以是显示屏上覆盖的触摸层,也可以是计算机设备外壳上设置的按键、轨迹球或触控板,还可以是外接的键盘、触控板或鼠标等。
本领域技术人员可以理解,图9中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。
一种计算机设备,包括存储器和一个或多个处理器,存储器中存储有计算机可读指令,计算机可读指令被处理器执行时实现本申请任意一个实施例中提供的文本翻译方法的步骤。
一个或多个存储有计算机可读指令的非易失性计算机可读存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器实现本申请任意一个实施例中提供的文本翻译方法的步骤。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机可读指令来指令相关的硬件来完成,所述的计算机可读指令可存储于一非易失性计算机可读取存储介质中,该计算机可读指令在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。
以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。

Claims (20)

  1. 一种文本翻译方法,包括:
    获取内容管理系统中源文本的地址;
    通过所述内容管理系统提供的第一接口调用与所述地址相对应的源文本;
    通过与第三方翻译系统对接的第二接口,将调用的所述源文本发送至所述第三方翻译系统;
    通过所述第二接口,接收所述第三方翻译系统反馈的与所述源文本相应的机器翻译文本;
    展示文本编辑界面,并在所述文本编辑界面中展示处于可编辑状态的机器翻译文本;及
    根据作用于所述文本编辑界面的编辑操作,校准展示的机器翻译文本。
  2. 根据权利要求1所述的方法,其特征在于,所述获取内容管理系统中源文本的地址,包括:
    展示第一文本标签;
    检测到选中所述第一文本标签的操作时,确定与所述第一文本标签相应的地址范围所包括的地址;所述地址用于定位所述内容管理系统中的源文本;
    展示以所述地址为链接的第二文本标签;及
    检测到选中所述第二文本标签的操作时,获取选中的第二文本标签所链接的地址。
  3. 根据权利要求1所述的方法,其特征在于,所述展示文本编辑界面,并在所述文本编辑界面中展示处于可编辑状态的机器翻译文本之前,所述方法还包括:
    从所述机器翻译文本中分离出整句;
    将所述整句输入已训练的机器学习模型,得到从所述整句中分离出的语法要素单元;及
    按照所述语法要素单元对应的预设语法约束条件,识别翻译错误的语法要素单元并修正,得到修正后的机器翻译文本。
  4. 根据权利要求1所述的方法,其特征在于,所述通过与第三方翻译系统对接的第二接口,将调用的所述源文本发送至所述第三方翻译系统之前,所述方法还包括:
    将所述源文本的文件格式转换成与第三方翻译系统相匹配的文件格式;
    所述通过与第三方翻译系统对接的第二接口,将调用的所述源文本发送至所述第三方翻译系统包括:
    通过与第三方翻译系统对接的第二接口,将转换文件格式后的源文本发送至所述第三方翻译系统;
    所述通过所述第二接口,接收所述第三方翻译系统反馈的与所述源文本相应的机器翻译文本之后,所述方法还包括:
    将接收的所述机器翻译文本的文件格式转换成所述源文本的文件格式。
  5. 根据权利要求1所述的方法,其特征在于,还包括:
    获取所述内容管理系统中与所述地址相对应的翻译文本存储地址;及
    按照所述翻译文本存储地址,将校准所述展示的机器翻译文本后得到的翻译文本存储至所述内容管理系统中。
  6. 根据权利要求1至5任一项所述的方法,其特征在于,所述源文本是第一语种的网页中的网页内容;所述方法还包括:
    获取所述第一语种的网页的网页模板;及
    在所述网页模板中与所述源文本相应的位置处,添加与所述源文本对应的经过校准得到的翻译文本,生成第二语种的网页。
  7. 一种文本翻译装置,包括:
    获取模块,用于获取内容管理系统中源文本的地址;
    调用模块,用于通过所述内容管理系统提供的第一接口调用与所述地址相对应的源文本;
    发送模块,用于通过与第三方翻译系统对接的第二接口,将调用的所述源文本发送至所述第三方翻译系统;
    接收模块,用于通过所述第二接口,接收所述第三方翻译系统反馈的与所述源文本相应的机器翻译文本;
    展示模块,用于展示文本编辑界面,并在所述文本编辑界面中展示处于可编辑状态的机器翻译文本;及
    校准模块,用于根据作用于所述文本编辑界面的编辑操作,校准展示的机器翻译文本。
  8. 根据权利要求7所述的装置,其特征在于,还包括:
    分离模块,用于从所述机器翻译文本中分离出整句;
    输入模块,用于将所述整句输入已训练的机器学习模型,得到从所述整句中分离出的语法要素单元;及
    修正模块,用于按照所述语法要素单元对应的预设语法约束条件,识别翻译错误的语法要素单元并修正,得到修正后的机器翻译文本。
  9. 一种计算机设备,包括存储器和处理器,所述存储器存储有计算机可读指令,所述计算机可读指令被所述一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:
    获取内容管理系统中源文本的地址;
    通过所述内容管理系统提供的第一接口调用与所述地址相对应的源文本;
    通过与第三方翻译系统对接的第二接口,将调用的所述源文本发送至所述第三方翻译系统;
    通过所述第二接口,接收所述第三方翻译系统反馈的与所述源文本相应的机器翻译文本;
    展示文本编辑界面,并在所述文本编辑界面中展示处于可编辑状态的机器翻译文本;及
    根据作用于所述文本编辑界面的编辑操作,校准展示的机器翻译文本。
  10. 根据权利要求9所述的计算机设备,其特征在于,所述计算机可读指令使得所述处理器在执行所述获取内容管理系统中源文本的地址时执行以下步骤:
    展示第一文本标签;
    检测到选中所述第一文本标签的操作时,确定与所述第一文本标签相应的地址范围所包括的地址;所述地址用于定位所述内容管理系统中的源文本;
    展示以所述地址为链接的第二文本标签;及
    检测到选中所述第二文本标签的操作时,获取选中的第二文本标签所链接的地址。
  11. 根据权利要求9所述的计算机设备,其特征在于,所述处理器执行所述计算机可读指令时还执行以下步骤:
    从所述机器翻译文本中分离出整句;
    将所述整句输入已训练的机器学习模型,得到从所述整句中分离出的语法要素单元;及
    按照所述语法要素单元对应的预设语法约束条件,识别翻译错误的语法要素单元并修正,得到修正后的机器翻译文本。
  12. 根据权利要求9所述的计算机设备,其特征在于,所述处理器执行所述计算机可读指令时还执行以下步骤:
    将所述源文本的文件格式转换成与第三方翻译系统相匹配的文件格式;
    所述计算机可读指令使得所述处理器在执行所述通过与第三方翻译系统对接的第二接口,将调用的所述源文本发送至所述第三方翻译系统时执行以下步骤:
    通过与第三方翻译系统对接的第二接口,将转换文件格式后的源文本发送至所述第三方翻译系统;
    所述处理器执行所述计算机可读指令时还执行以下步骤:
    将接收的所述机器翻译文本的文件格式转换成所述源文本的文件格式。
  13. 根据权利要求9所述的计算机设备,其特征在于,所述处理器执行所述计算机可读指令时还执行以下步骤:
    获取所述内容管理系统中与所述地址相对应的翻译文本存储地址;及
    按照所述翻译文本存储地址,将校准所述展示的机器翻译文本后得到的翻译文本存储至所述内容管理系统中。
  14. 根据权利要求9至13任一项所述的计算机设备,其特征在于,所述源文本是第一语种的网页中的网页内容;所述处理器执行所述计算机可读指令时还执行以下步骤:
    获取所述第一语种的网页的网页模板;及
    在所述网页模板中与所述源文本相应的位置处,添加与所述源文本对应的经过校准得 到的翻译文本,生成第二语种的网页。
  15. 一个或多个存储有计算机可读指令的非易失性计算机可读存储介质,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:
    获取内容管理系统中源文本的地址;
    通过所述内容管理系统提供的第一接口调用与所述地址相对应的源文本;
    通过与第三方翻译系统对接的第二接口,将调用的所述源文本发送至所述第三方翻译系统;
    通过所述第二接口,接收所述第三方翻译系统反馈的与所述源文本相应的机器翻译文本;
    展示文本编辑界面,并在所述文本编辑界面中展示处于可编辑状态的机器翻译文本;及
    根据作用于所述文本编辑界面的编辑操作,校准展示的机器翻译文本。
  16. 根据权利要求15所述的存储介质,其特征在于,所述计算机可读指令使得所述处理器在执行所述获取内容管理系统中源文本的地址时执行以下步骤:
    展示第一文本标签;
    检测到选中所述第一文本标签的操作时,确定与所述第一文本标签相应的地址范围所包括的地址;所述地址用于定位所述内容管理系统中的源文本;
    展示以所述地址为链接的第二文本标签;及
    检测到选中所述第二文本标签的操作时,获取选中的第二文本标签所链接的地址。
  17. 根据权利要求15所述的存储介质,其特征在于,所述处理器执行所述计算机可读指令时还执行以下步骤:
    从所述机器翻译文本中分离出整句;
    将所述整句输入已训练的机器学习模型,得到从所述整句中分离出的语法要素单元;及
    按照所述语法要素单元对应的预设语法约束条件,识别翻译错误的语法要素单元并修正,得到修正后的机器翻译文本。
  18. 根据权利要求15所述的存储介质,其特征在于,所述处理器执行所述计算机可读指令时还执行以下步骤:
    将所述源文本的文件格式转换成与第三方翻译系统相匹配的文件格式;
    所述计算机可读指令使得所述处理器在执行所述通过与第三方翻译系统对接的第二接口,将调用的所述源文本发送至所述第三方翻译系统时执行以下步骤:
    通过与第三方翻译系统对接的第二接口,将转换文件格式后的源文本发送至所述第三方翻译系统;
    所述处理器执行所述计算机可读指令时还执行以下步骤:
    将接收的所述机器翻译文本的文件格式转换成所述源文本的文件格式。
  19. 根据权利要求15所述的存储介质,其特征在于,所述处理器执行所述计算机可读指令时还执行以下步骤:
    获取所述内容管理系统中与所述地址相对应的翻译文本存储地址;及
    按照所述翻译文本存储地址,将校准所述展示的机器翻译文本后得到的翻译文本存储至所述内容管理系统中。
  20. 根据权利要求15至19任一项所述的存储介质,其特征在于,所述源文本是第一语种的网页中的网页内容;所述处理器执行所述计算机可读指令时还执行以下步骤:
    获取所述第一语种的网页的网页模板;及
    在所述网页模板中与所述源文本相应的位置处,添加与所述源文本对应的经过校准得到的翻译文本,生成第二语种的网页。
PCT/CN2019/070018 2018-02-07 2019-01-02 文本翻译方法、装置、计算机设备和存储介质 WO2019153979A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810124553.6 2018-02-07
CN201810124553.6A CN108399166B (zh) 2018-02-07 2018-02-07 文本翻译方法、装置、计算机设备和存储介质

Publications (1)

Publication Number Publication Date
WO2019153979A1 true WO2019153979A1 (zh) 2019-08-15

Family

ID=63095431

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/070018 WO2019153979A1 (zh) 2018-02-07 2019-01-02 文本翻译方法、装置、计算机设备和存储介质

Country Status (2)

Country Link
CN (1) CN108399166B (zh)
WO (1) WO2019153979A1 (zh)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108399166B (zh) * 2018-02-07 2021-03-30 深圳壹账通智能科技有限公司 文本翻译方法、装置、计算机设备和存储介质
CN110047488B (zh) * 2019-03-01 2022-04-12 北京彩云环太平洋科技有限公司 语音翻译方法、装置、设备及控制设备
CN110134586A (zh) * 2019-04-12 2019-08-16 深圳壹账通智能科技有限公司 代码片段纠正方法、装置、计算机设备和存储介质
CN111428523B (zh) * 2020-03-23 2023-09-01 腾讯科技(深圳)有限公司 翻译语料生成方法、装置、计算机设备及存储介质
CN111857906B (zh) * 2020-06-03 2022-02-01 北京旷视科技有限公司 终端的文本显示方法、装置、系统和存储介质
CN114091483B (zh) * 2021-10-27 2023-02-28 北京百度网讯科技有限公司 翻译处理方法、装置、电子设备及存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1573741A (zh) * 2003-06-20 2005-02-02 微软公司 自适应性机器翻译
CN102193912A (zh) * 2010-03-12 2011-09-21 富士通株式会社 短语划分模型建立方法、统计机器翻译方法以及解码器
CN104391839A (zh) * 2014-11-13 2015-03-04 百度在线网络技术(北京)有限公司 机器翻译方法和装置
CN105912534A (zh) * 2016-05-09 2016-08-31 珠海市魅族科技有限公司 一种翻译方法和装置
CN106326213A (zh) * 2015-06-19 2017-01-11 北京京东尚科信息技术有限公司 一种对web站点进行翻译的方法及装置
CN108399166A (zh) * 2018-02-07 2018-08-14 深圳壹账通智能科技有限公司 文本翻译方法、装置、计算机设备和存储介质

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101086731A (zh) * 2006-06-05 2007-12-12 李钢 基于服务器的多国即时在线翻译系统
US7801721B2 (en) * 2006-10-02 2010-09-21 Google Inc. Displaying original text in a user interface with translated text
US7974832B2 (en) * 2007-12-12 2011-07-05 Microsoft Corporation Web translation provider
BRPI0924401B1 (pt) * 2009-03-18 2020-05-19 Google Inc métodos, sistemas e meios não-transitórios de armazenamento para tradução de web com substituição de exibição
CN106557467A (zh) * 2015-09-28 2017-04-05 四川省科技交流中心 基于桥梁语的机器翻译系统及翻译方法
CN107301176A (zh) * 2017-06-30 2017-10-27 广东欧珀移动通信有限公司 一种翻译方法、装置及存储介质、电子设备

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1573741A (zh) * 2003-06-20 2005-02-02 微软公司 自适应性机器翻译
CN102193912A (zh) * 2010-03-12 2011-09-21 富士通株式会社 短语划分模型建立方法、统计机器翻译方法以及解码器
CN104391839A (zh) * 2014-11-13 2015-03-04 百度在线网络技术(北京)有限公司 机器翻译方法和装置
CN106326213A (zh) * 2015-06-19 2017-01-11 北京京东尚科信息技术有限公司 一种对web站点进行翻译的方法及装置
CN105912534A (zh) * 2016-05-09 2016-08-31 珠海市魅族科技有限公司 一种翻译方法和装置
CN108399166A (zh) * 2018-02-07 2018-08-14 深圳壹账通智能科技有限公司 文本翻译方法、装置、计算机设备和存储介质

Also Published As

Publication number Publication date
CN108399166B (zh) 2021-03-30
CN108399166A (zh) 2018-08-14

Similar Documents

Publication Publication Date Title
WO2019153979A1 (zh) 文本翻译方法、装置、计算机设备和存储介质
CN111680634B (zh) 公文文件处理方法、装置、计算机设备及存储介质
CN111176996A (zh) 测试用例生成方法、装置、计算机设备及存储介质
US11321956B1 (en) Sectionizing documents based on visual and language models
AU2018226399A1 (en) Detecting style breaches in multi-author content or collaborative writing
CN110955608B (zh) 测试数据处理方法、装置、计算机设备和存储介质
CN111144210B (zh) 图像的结构化处理方法及装置、存储介质及电子设备
CN112306620B (zh) 自定义表单控件的多语言加载方法及装置
WO2022134577A1 (zh) 翻译错误识别方法、装置、计算机设备及可读存储介质
CN112783482A (zh) 一种可视化表单生成方法、装置、设备及存储介质
CN110321529B (zh) 框架文字显示方法、装置、计算机设备及存储介质
CN104536769A (zh) 一种国际化文档实现方法
US11907656B2 (en) Machine based expansion of contractions in text in digital media
US20180314683A1 (en) Method and device for processing natural language
WO2019148797A1 (zh) 自然语言处理方法、装置、计算机设备和存储介质
US11687735B2 (en) Method, apparatus, device and storage medium for outputting information
CN117095422B (zh) 文档信息解析方法、装置、计算机设备、存储介质
US11914943B1 (en) Generating an electronic document with a consistent text ordering
WO2019019674A1 (zh) 网页错误信息处理方法、装置、计算机设备和存储介质
CN115116060B (zh) 键值文件处理方法、装置、设备、介质
CN111279350B (zh) 用于在服务管理应用接口中提供全球化特征的系统和方法
CN115686520A (zh) 存储代码转换方法、装置、计算机设备及存储介质
TW202223725A (zh) 一種用於資料處理之系統及方法
CN116894443A (zh) 智能翻译系统
Castro Mamani et al. Allin Qillqay! A Free Online Web Spell Checking Service for Quechua

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19751790

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 03.12.2020)

122 Ep: pct application non-entry in european phase

Ref document number: 19751790

Country of ref document: EP

Kind code of ref document: A1