Translation method and device, electronic equipment and readable storage medium

文档序号:1567776 发布日期:2020-01-24 浏览:22次 中文

阅读说明:本技术 翻译方法、装置、电子设备及可读存储介质 (Translation method and device, electronic equipment and readable storage medium ) 是由 王海峰 吴华 何中军 熊皓 于 2019-12-19 设计创作,主要内容包括:本申请公开了一种翻译方法、装置、电子设备及可读存储介质,涉及翻译技术。本申请实施例通过根据待翻译内容的关联信息,获得至少一个知识内容,所述至少一个知识内容中各知识内容包括第一语言类型的内容和第二语言类型的内容,使得能够利用所述至少一个知识内容,获得所述待翻译内容的翻译结果,由于将预先获得的至少一个知识内容作为本次翻译任务的全局信息,使得能够保证同一待翻译内容,其翻译结果前后一致,从而提高了翻译结果的质量。(The application discloses a translation method, a translation device, electronic equipment and a readable storage medium, and relates to the translation technology. According to the method and the device for translating the content, at least one knowledge content is obtained according to the associated information of the content to be translated, each knowledge content in the at least one knowledge content comprises a first language type content and a second language type content, so that the translation result of the content to be translated can be obtained by utilizing the at least one knowledge content, and the same content to be translated can be ensured due to the fact that the at least one knowledge content obtained in advance is used as the global information of the translation task, the translation result is consistent, and the quality of the translation result is improved.)

1. A method of translation, comprising:

obtaining at least one knowledge content according to the associated information of the content to be translated, wherein each knowledge content in the at least one knowledge content comprises a content of a first language type and a content of a second language type; the content of the second language type is one of a plurality of contents corresponding to the content of the first language type in the second language type;

and obtaining a translation result of the content to be translated by utilizing the at least one knowledge content.

2. The method according to claim 1, wherein the information associated with the content to be translated comprises at least one of the following information:

the language type corresponding to the content to be translated and the language type corresponding to the translation result of the content to be translated;

the title information of the content to be translated;

author information of the content to be translated; and

and the domain information of the content to be translated.

3. The method according to claim 1, wherein the obtaining at least one knowledge content according to the associated information of the content to be translated comprises:

acquiring the associated information of the content to be translated;

obtaining a search result according to the associated information of the content to be translated;

and performing information extraction processing on the search result to obtain the at least one knowledge content.

4. The method of claim 1, wherein each knowledge content further comprises a flag indicating a language type included in the knowledge content.

5. The method according to claim 1, wherein the obtaining a translation result of the content to be translated by using the at least one knowledge content comprises:

and performing restricted decoding processing on the content to be translated by utilizing the at least one knowledge content to obtain a translation result of the content to be translated.

6. The method according to claim 5, wherein the performing, by using the at least one knowledge content, a restricted decoding process on the content to be translated to obtain a translation result of the content to be translated comprises:

replacing a part of the content to be translated, which is matched with the content of the first language type in the at least one knowledge content, with a special character to obtain a converted content;

obtaining a translation result of the conversion content;

and restoring the special symbol in the translation result of the conversion content into the content of the second language type corresponding to the special symbol so as to obtain the translation result of the content to be translated.

7. The method according to claim 5, wherein the performing, by using the at least one knowledge content, a restricted decoding process on the content to be translated to obtain a translation result of the content to be translated comprises:

adding the at least one knowledge content into a translation model, and performing model training of the translation model;

and obtaining a translation result of the content to be translated by using the translation model.

8. The method according to claim 5, wherein the performing, by using the at least one knowledge content, a restricted decoding process on the content to be translated to obtain a translation result of the content to be translated comprises:

taking the at least one knowledge content as newly added training data of a translation model, and carrying out model training on the translation model;

and obtaining a translation result of the content to be translated by using the translation model.

9. The method according to any one of claims 1-8, wherein before obtaining the translation result of the content to be translated by using the at least one knowledge content, the method further comprises:

and correcting the content to be translated by using the at least one knowledge content.

10. The method according to claim 9, wherein the content modification of the content to be translated by using the at least one knowledge content comprises:

and replacing the part of the content to be translated, which is matched with the content of the first language type in the at least one knowledge content, with the content of the first language type to obtain the correct content to be translated.

11. A translation apparatus, comprising:

the device comprises a preparation unit, a translation unit and a translation unit, wherein the preparation unit is used for obtaining at least one knowledge content according to the associated information of the content to be translated, and each knowledge content in the at least one knowledge content comprises a content of a first language type and a content of a second language type; the content of the second language type is one of a plurality of contents corresponding to the content of the first language type in the second language type;

and the translation unit is used for obtaining a translation result of the content to be translated by utilizing the at least one knowledge content.

12. The apparatus according to claim 11, wherein the information associated with the content to be translated includes at least one of the following information:

the language type corresponding to the content to be translated and the language type corresponding to the translation result of the content to be translated;

the title information of the content to be translated;

author information of the content to be translated; and

and the domain information of the content to be translated.

13. Device according to claim 11, characterized in that the preparation unit, in particular for

Acquiring the associated information of the content to be translated;

obtaining a search result according to the associated information of the content to be translated; and

and performing information extraction processing on the search result to obtain the at least one knowledge content.

14. The apparatus of claim 11, wherein each knowledge content further comprises a flag indicating a language type included in the knowledge content.

15. Device according to claim 11, characterized in that the translation unit, in particular for

And performing restricted decoding processing on the content to be translated by utilizing the at least one knowledge content to obtain a translation result of the content to be translated.

16. Device according to claim 15, characterized in that the translation unit, in particular for

Replacing a part of the content to be translated, which is matched with the content of the first language type in the at least one knowledge content, with a special character to obtain a converted content;

obtaining a translation result of the conversion content; and

and restoring the special symbol in the translation result of the conversion content into the content of the second language type corresponding to the special symbol so as to obtain the translation result of the content to be translated.

17. Device according to claim 15, characterized in that the translation unit, in particular for

Adding the at least one knowledge content into a translation model, and performing model training of the translation model; and

and obtaining a translation result of the content to be translated by using the translation model.

18. Device according to claim 15, characterized in that the translation unit, in particular for

Taking the at least one knowledge content as newly added training data of a translation model, and carrying out model training on the translation model; and

and obtaining a translation result of the content to be translated by using the translation model.

19. The apparatus according to any of claims 11-18, wherein said translation unit is further configured to translate

And correcting the content to be translated by using the at least one knowledge content.

20. The apparatus according to claim 19, wherein the translation unit is specifically configured to translate

And replacing the part of the content to be translated, which is matched with the content of the first language type in the at least one knowledge content, with the content of the first language type to obtain the correct content to be translated.

21. An electronic device, comprising:

at least one processor; and

a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,

the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-10.

22. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-10.

Technical Field

The present disclosure relates to computer technologies, and in particular, to a translation method and apparatus, an electronic device, and a readable storage medium.

Background

In the conventional machine translation, a sentence is used as a translation unit to perform translation processing.

Then, because the translation processing is performed by using the sentence as the translation unit, the sentences are independent from each other, and the same content to be translated may occur, and the translation results are inconsistent, thereby reducing the intelligibility of the translation results.

Disclosure of Invention

Aspects of the present disclosure provide a translation method, a translation apparatus, an electronic device, and a readable storage medium, so as to improve quality of a translation result.

In one aspect of the present application, a translation method is provided, including:

obtaining at least one knowledge content according to the associated information of the content to be translated, wherein each knowledge content in the at least one knowledge content comprises a content of a first language type and a content of a second language type; the content of the second language type is one of a plurality of contents corresponding to the content of the first language type in the second language type;

and obtaining a translation result of the content to be translated by utilizing the at least one knowledge content.

The above-mentioned aspect and any possible implementation manner further provide an implementation manner, where the information related to the content to be translated includes at least one of the following information:

the language type corresponding to the content to be translated and the language type corresponding to the translation result of the content to be translated;

the title information of the content to be translated;

author information of the content to be translated; and

and the domain information of the content to be translated.

The above-described aspect and any possible implementation manner further provide an implementation manner, where the obtaining at least one knowledge content according to the associated information of the content to be translated includes:

acquiring the associated information of the content to be translated;

obtaining a search result according to the associated information of the content to be translated;

and performing information extraction processing on the search result to obtain the at least one knowledge content.

The above-described aspect and any possible implementation manner further provide an implementation manner, and each knowledge content further includes a flag bit for indicating a language type included in the knowledge content.

The above-mentioned aspect and any possible implementation manner further provide an implementation manner, where obtaining a translation result of the content to be translated by using the at least one knowledge content includes:

and performing restricted decoding processing on the content to be translated by utilizing the at least one knowledge content to obtain a translation result of the content to be translated.

The above-mentioned aspect and any possible implementation manner further provide an implementation manner, where the performing, by using the at least one knowledge content, a restricted decoding process on the content to be translated to obtain a translation result of the content to be translated includes:

replacing a part of the content to be translated, which is matched with the content of the first language type in the at least one knowledge content, with a special character to obtain a converted content;

obtaining a translation result of the conversion content;

and restoring the special symbol in the translation result of the conversion content into the content of the second language type corresponding to the special symbol so as to obtain the translation result of the content to be translated.

The above-mentioned aspect and any possible implementation manner further provide an implementation manner, where the performing, by using the at least one knowledge content, a restricted decoding process on the content to be translated to obtain a translation result of the content to be translated includes:

adding the at least one knowledge content into a translation model, and performing model training of the translation model;

and obtaining a translation result of the content to be translated by using the translation model.

The above-mentioned aspect and any possible implementation manner further provide an implementation manner, where the performing, by using the at least one knowledge content, a restricted decoding process on the content to be translated to obtain a translation result of the content to be translated includes:

taking the at least one knowledge content as newly added training data of a translation model, and carrying out model training on the translation model;

and obtaining a translation result of the content to be translated by using the translation model.

The above-described aspect and any possible implementation further provide an implementation in which the content to be translated includes at least one of text input content and a speech recognition result.

The above-mentioned aspect and any possible implementation manner further provide an implementation manner, before obtaining a translation result of the content to be translated by using the at least one knowledge content, further including:

and correcting the content to be translated by using the at least one knowledge content.

The above-mentioned aspect and any possible implementation manner further provide an implementation manner, where performing content modification on the content to be translated by using the at least one knowledge content includes:

and replacing the part of the content to be translated, which is matched with the content of the first language type in the at least one knowledge content, with the content of the first language type to obtain the correct content to be translated.

In another aspect of the present application, there is provided a translation apparatus including:

the device comprises a preparation unit, a translation unit and a translation unit, wherein the preparation unit is used for obtaining at least one knowledge content according to the associated information of the content to be translated, and each knowledge content in the at least one knowledge content comprises a content of a first language type and a content of a second language type; the content of the second language type is one of a plurality of contents corresponding to the content of the first language type in the second language type;

and the translation unit is used for obtaining a translation result of the content to be translated by utilizing the at least one knowledge content.

The above-mentioned aspect and any possible implementation manner further provide an implementation manner, where the information related to the content to be translated includes at least one of the following information:

the language type corresponding to the content to be translated and the language type corresponding to the translation result of the content to be translated;

the title information of the content to be translated;

author information of the content to be translated; and

and the domain information of the content to be translated.

The above aspect and any possible implementation further provide an implementation of the preparation unit, and the preparation unit is specifically configured to

Acquiring the associated information of the content to be translated;

obtaining a search result according to the associated information of the content to be translated; and

and performing information extraction processing on the search result to obtain the at least one knowledge content.

The above-described aspect and any possible implementation manner further provide an implementation manner, and each knowledge content further includes a flag bit for indicating a language type included in the knowledge content.

The above-described aspects and any possible implementation further provide an implementation of the translation unit, the translation unit being specifically configured to

And performing restricted decoding processing on the content to be translated by utilizing the at least one knowledge content to obtain a translation result of the content to be translated.

The above-described aspects and any possible implementation further provide an implementation of the translation unit, the translation unit being specifically configured to

Replacing a part of the content to be translated, which is matched with the content of the first language type in the at least one knowledge content, with a special character to obtain a converted content;

obtaining a translation result of the conversion content; and

and restoring the special symbol in the translation result of the conversion content into the content of the second language type corresponding to the special symbol so as to obtain the translation result of the content to be translated.

The above-described aspects and any possible implementation further provide an implementation of the translation unit, the translation unit being specifically configured to

Adding the at least one knowledge content into a translation model, and performing model training of the translation model; and

and obtaining a translation result of the content to be translated by using the translation model.

The above-described aspects and any possible implementation further provide an implementation of the translation unit, the translation unit being specifically configured to

Taking the at least one knowledge content as newly added training data of a translation model, and carrying out model training on the translation model; and

and obtaining a translation result of the content to be translated by using the translation model.

The above-described aspect and any possible implementation further provide an implementation in which the content to be translated includes at least one of text input content and a speech recognition result.

The above-mentioned aspects and any possible implementation further provide an implementation, and the translation unit is further configured to

And correcting the content to be translated by using the at least one knowledge content.

In another aspect of the present invention, an electronic device is provided, including:

at least one processor; and

a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,

the memory stores instructions executable by the at least one processor to cause the at least one processor to perform the method of the aspects and any possible implementation described above.

In another aspect of the invention, there is provided a non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of the above described aspects and any possible implementation.

According to the technical scheme, at least one knowledge content is obtained according to the associated information of the content to be translated, each knowledge content in the at least one knowledge content comprises a first language type content and a second language type content, so that the translation result of the content to be translated can be obtained by using the at least one knowledge content, and the same content to be translated can be ensured due to the fact that the at least one knowledge content obtained in advance is used as the global information of the translation task, the translation result is consistent, and the quality of the translation result is improved.

In addition, according to the technical scheme provided by the application, the language type corresponding to the content to be translated and the associated information of the content to be translated, which is at least one of the language type corresponding to the translation result of the content to be translated, the title information of the content to be translated, the author information and the field information, are used as the basis for constructing the global information of the translation task, so that the constructed global information can more comprehensively assist the translation task, and the reliability of the translation result can be effectively improved.

In addition, by adopting the technical scheme provided by the application, each knowledge content further comprises a flag bit for indicating the language type included in the knowledge content, so that whether the knowledge content contains bilingual content can be indicated, and the use efficiency of the knowledge content can be effectively improved.

In addition, by adopting the technical scheme provided by the application, the limited decoding processing is carried out on the content to be translated by utilizing the at least one knowledge content, so that the translation result of the content to be translated can be obtained, the operation is simple, and the translation efficiency can be effectively improved.

In addition, by adopting the technical scheme provided by the application, model training of the translation model is carried out by utilizing the at least one knowledge content, and then the translation model can be utilized to obtain the translation result of the content to be translated.

In addition, by adopting the technical scheme provided by the application, the content of the content to be translated is corrected by utilizing the at least one knowledge content, and particularly in a speech translation scene in which a speech recognition result is used as the content to be translated, an error speech recognition result can be corrected in time before translation, so that a correct translation result is obtained, and the reliability of the translation result can be effectively improved.

In addition, by adopting the technical scheme provided by the application, the user experience can be effectively improved.

Further effects of the above aspects or possible implementations will be described below in connection with specific embodiments.

Drawings

In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present application, and those skilled in the art can also obtain other drawings according to the drawings without inventive labor. The drawings are only for the purpose of illustrating the present invention and are not to be construed as limiting the present application. Wherein:

fig. 1 is a schematic flowchart of a translation method according to an embodiment of the present application;

fig. 2 is a schematic structural diagram of a translation apparatus according to another embodiment of the present application;

fig. 3 is a schematic view of an electronic device for implementing the translation method provided in the embodiment of the present application.

Detailed Description

The following description of the exemplary embodiments of the present application, taken in conjunction with the accompanying drawings, includes various details of the embodiments of the application for the understanding of the same, which are to be considered exemplary only. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present application. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.

It is to be understood that the embodiments described are only a few embodiments of the present application and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.

It should be noted that the terminal involved in the embodiments of the present application may include, but is not limited to, a mobile phone, a Personal Digital Assistant (PDA), a wireless handheld device, a Tablet Computer (Tablet Computer), a Personal Computer (PC), an MP3 player, an MP4 player, a wearable device (e.g., smart glasses, smart watch, smart bracelet, etc.), and the like.

In addition, the term "and/or" herein is only one kind of association relationship describing an associated object, and means that there may be three kinds of relationships, for example, a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.

Fig. 1 is a schematic flowchart of a translation method according to an embodiment of the present application, as shown in fig. 1.

101. And obtaining at least one knowledge content according to the associated information of the content to be translated, wherein each knowledge content in the at least one knowledge content comprises a content of a first language type and a content of a second language type.

The content of the second language type is one of a plurality of contents corresponding to the content of the first language type in the second language type.

The first language type and the second language type refer to two different language types, which can respectively represent the language type of the content to be translated and the language type of the translation result. For example, the first language type is chinese and the second language type is english; alternatively, for another example, the first language type is French, the second language type is Chinese, and so on.

102. And obtaining a translation result of the content to be translated by utilizing the at least one knowledge content.

The content to be translated refers to the content to be translated in the translation task, and the voice type corresponding to the content is the first language type or the second language type.

It should be noted that, part or all of the execution main body of 101 ~ 102 may be an application located at the local terminal, or may also be a functional unit such as a plug-in or Software Development Kit (SDK) set in the application located at the local terminal, or may also be a processing engine located in a server on the network side, or may also be a distributed system located on the network side, for example, a processing engine or a distributed system in a test platform on the network side, and the like, which is not particularly limited in this embodiment.

It is to be understood that the application may be a native app (native app) installed on the terminal, or may also be a web page program (webApp) of a browser on the terminal, which is not limited in this embodiment.

Therefore, at least one knowledge content is obtained according to the associated information of the content to be translated, each knowledge content in the at least one knowledge content comprises the content of the first language type and the content of the second language type, so that the translation result of the content to be translated can be obtained by utilizing the at least one knowledge content, and the at least one knowledge content obtained in advance is used as the global information of the translation task at this time, so that the same content to be translated can be ensured, the translation result is consistent, and the quality of the translation result is improved.

The translation method provided by the application is suitable for any translation scene, such as a scientific and technical literature translation scene, a thesis translation scene, a simultaneous interpretation scene in a lecture and the like.

Optionally, in a possible implementation manner of this embodiment, the information related to the content to be translated may include, but is not limited to, at least one of the following information:

the language type corresponding to the content to be translated and the language type corresponding to the translation result of the content to be translated;

the title information of the content to be translated;

author information of the content to be translated; and

and the domain information of the content to be translated.

Taking the simultaneous interpretation scene in the speech as an example, before interpreting the content to be interpreted, i.e. the speech content, the speech related information such as the speech language type, the language type after interpretation, the speech subject, the name of the speaker, the speaker unit, the speech field, etc. can be determined.

Optionally, in a possible implementation manner of this embodiment, in 101, the associated information of the content to be translated may be specifically obtained, and then, the search result may be obtained according to the associated information of the content to be translated. Then, information extraction processing may be performed on the search result to obtain the at least one knowledge content.

Specifically, the information associated with the content to be translated may be utilized to perform a whole network information search, and generate a document library. Thus, the document library contains the material related to the content to be translated. Further, information extraction processing can be further performed on the document library to obtain the at least one knowledge content, so that a translation knowledge library is formed and used as global information of the translation task.

The information extraction process may include, but is not limited to, a natural language processing technical process such as a word segmentation process, a noise filtering process, a keyword recognition process (terms, named entities, etc.), and this embodiment is not particularly limited thereto. The bilingual information can be retained for the bilingual information, namely the content of the first language type and the content of the second language type, which can extract the language type containing the content to be translated and the language type of the translation result.

Optionally, in a possible implementation manner of this embodiment, each knowledge content obtained in 101 may further include a flag bit for indicating a language type included in the knowledge content. Thus, each knowledge content is a triplet < flag bit, content in the first language type, content in the second language type >. For example, 1 represents two language types, i.e., bilingual information; 0 represents a language type, i.e., a language type of the contents to be translated.

In the implementation mode, the flag bit in each knowledge content can indicate whether the knowledge content contains bilingual content, and whether the knowledge content contains the translation result can be quickly determined by using the flag bit, so that the use efficiency of the knowledge content can be effectively improved.

Optionally, in a possible implementation manner of this embodiment, in 102, the at least one knowledge content may be specifically utilized to perform restricted decoding processing on the content to be translated, so as to obtain a translation result of the content to be translated.

In a specific implementation process, it may be specifically determined whether there is a portion of the content to be translated that matches the first language type in the at least one knowledge content. If the content to be translated has a part matching the content of the first language type in the at least one knowledge content, further judging whether the knowledge content has the content of the second language type corresponding to the content of the first language type in the at least one matched knowledge content.

If the matched at least one knowledge content has a content of a second language type corresponding to the content of the first language type, a part of the content to be translated, which is matched with the content of the first language type in the at least one knowledge content, can be replaced by special characters to obtain converted content.

Further, the corresponding relationship between the special character and the content of the second language type corresponding to the content of the first language type in the at least one matched knowledge content can be further recorded.

If the matched at least one knowledge content does not have the content of the second language type corresponding to the content of the first language type, the replacement processing of the special characters is not carried out, and the translation result of the content to be translated can be directly obtained by adopting the existing translation method; or still replacing a part of the content to be translated, which is matched with the content of the first language type in the at least one knowledge content, with a special character to obtain a converted content, and further recording the corresponding relation of the special symbol as none or other preset marks, so that corresponding measures can be adopted during the subsequent restoration processing of the special symbol.

After the conversion content replacing the special character is obtained, the existing translation method can be adopted to obtain the translation result of the conversion content. The translation method may be any method, and this embodiment does not limit this.

After the translation result of the conversion content is obtained, the special symbol in the translation result of the conversion content can be further restored to the content of the second language type corresponding to the special symbol according to the recorded corresponding relationship, so as to obtain the translation result of the content to be translated.

For example, the content to be translated is [ new product of our company "wisdom secretary ], and if the existing translation method is adopted, the content to be translated is [ new product of our company" wisdom secretary "] [ wisdom secretary ], the content to be translated is [ intelligentsectionary ]. This results in the translation result not being easily understood, thereby degrading translation quality.

Then, by adopting the technical scheme provided by the application, in the identification process of the content to be translated [ a new product "intelligent secretary" of our company ], by searching a translation knowledge base obtained in advance, if the content to be translated [ the new product "intelligent secretary" of our company ] is matched with the intelligent secretary in the at least one knowledge content, and the matched at least one knowledge content has the corresponding "xiaozhi", the content to be translated [ the new product "intelligent secretary" of our company ] can be replaced by the special character < KW > to obtain the conversion content [ the new product < KW > of our company ]. After obtaining the translation result of the conversion content (new product < KW > of our company), the < KW > can be restored to the corresponding "xiaozhi".

After obtaining the translation result of the converted content, if the recorded corresponding relationship of the special symbol is none or other preset marks, it needs to adopt corresponding measures to perform reduction processing of the special symbol, for example, directly adopt the transliteration result of the content of the first language type corresponding to the special symbol to perform reduction processing, etc., utilize the content of the first language type corresponding to the special symbol to search the emergency vocabulary table of the present translation task to perform reduction processing, etc.

In another specific implementation process, the at least one knowledge content may be specifically utilized to perform model training of a translation model, and then, a translation result of the content to be translated may be obtained by utilizing the translation model.

A so-called translation model for converting content of one language type into content of another language type. Specifically, a pre-specified training sample set may be used for training to construct a translation model for converting content of one language type into content of another language type. The training samples contained in the training sample set can be labeled known samples, so that the known samples can be directly used for training to construct a translation model; or one part of the known samples can be marked, and the other part of the unknown samples can be not marked, then the known samples can be firstly used for training to construct an initial translation model, then, the unknown sample is evaluated by using the initial translation model to obtain the recognition result, and further, according to the recognition result of the unknown sample, labeling the unknown sample to form a known sample, as a newly added known sample, utilizing the newly added known sample, and the original known sample is retrained to construct a new translation model until the constructed translation model or the known sample meets the cutoff condition of the translation model, the present embodiment is not particularly limited, for example, the recognition accuracy is greater than or equal to a preset accuracy threshold, or the number of known samples is greater than or equal to a preset number threshold.

For example, the at least one knowledge content may be specifically added to the translation model, and model training of the translation model may be performed.

Or, for another example, the at least one knowledge content may be specifically used as new training data of the translation model to perform model training of the translation model.

In the newly added training data, a part of the newly added training data may be labeled known samples, that is, the at least one knowledge content includes two language types, that is, the first language type content and each knowledge content of the second language type content, and another part of the newly added training data may be unlabeled unknown samples, that is, the at least one knowledge content includes only one language type, that is, the first language type content or each knowledge content of the second language type content, and the model training of the translation model is performed by using the model training method.

In an implementation mode, model training of a translation model is performed by using the at least one knowledge content, and then a translation result of the content to be translated can be obtained by using the translation model.

Optionally, in a possible implementation manner of this embodiment, the content to be translated may be a text input content, or may also be a speech recognition result, or may also be a text input content and a speech recognition result, which is not particularly limited in this embodiment.

In the case that the content to be translated is a speech recognition result, before 102, the content of the content to be translated may be further modified by using the at least one knowledge content.

Specifically, a part of the content to be translated, which matches the content of the first language type in the at least one knowledge content, may be replaced with the content of the first language type, so as to obtain a correct content to be translated.

For example, in a speech scene, when speech recognition processing is performed on speech content of a speaker, the speech recognition result is [ the topic of our speech today is "artificial intelligence, make the future ]. If the translation content is not corrected, the translation content is directly used as the content to be translated, and wrong content to be translated can be obtained [ the topic of our speech today is artificial intelligence, and the future is made ].

Then, by adopting the technical scheme provided by the application, in the recognition process of a voice recognition result (the topic of the present day's speech is' artificial intelligence, future of manufacturing '), through searching a translation knowledge base obtained in advance, the voice recognition result (the topic of the present day's speech is 'artificial intelligence, future of manufacturing') 'is corrected to be' intelligent manufacturing ', so that correct contents to be translated (the topic of the present day's speech is 'artificial intelligence, future of intelligent manufacturing') are obtained.

In an implementation manner, content correction is performed on the content to be translated by using the at least one knowledge content, and particularly in a speech translation scene in which a speech recognition result is used as the content to be translated, an erroneous speech recognition result can be corrected in time before translation, so that a correct translation result is obtained, and the reliability of the translation result can be effectively improved.

The code detection method provided by the application ensures the stability of the test code and has the following advantages:

1. the speech recognition result can be corrected by utilizing a pre-obtained translation knowledge base (namely the global information of the translation task);

2. the translation result can be corrected by utilizing a pre-obtained translation knowledge base (namely the global information of the translation task);

3. the front-back consistency of the translation result can be ensured, and the intelligibility of the translation result is improved.

In this embodiment, at least one knowledge content is obtained according to the associated information of the content to be translated, where each knowledge content in the at least one knowledge content includes a content of a first language type and a content of a second language type, so that the translation result of the content to be translated can be obtained by using the at least one knowledge content.

In addition, according to the technical scheme provided by the application, the language type corresponding to the content to be translated and the associated information of the content to be translated, which is at least one of the language type corresponding to the translation result of the content to be translated, the title information of the content to be translated, the author information and the field information, are used as the basis for constructing the global information of the translation task, so that the constructed global information can more comprehensively assist the translation task, and the reliability of the translation result can be effectively improved.

In addition, by adopting the technical scheme provided by the application, each knowledge content further comprises a flag bit for indicating the language type included in the knowledge content, so that whether the knowledge content contains bilingual content can be indicated, and the use efficiency of the knowledge content can be effectively improved.

In addition, by adopting the technical scheme provided by the application, the limited decoding processing is carried out on the content to be translated by utilizing the at least one knowledge content, so that the translation result of the content to be translated can be obtained, the operation is simple, and the translation efficiency can be effectively improved.

In addition, by adopting the technical scheme provided by the application, model training of the translation model is carried out by utilizing the at least one knowledge content, and then the translation model can be utilized to obtain the translation result of the content to be translated.

In addition, by adopting the technical scheme provided by the application, the content of the content to be translated is corrected by utilizing the at least one knowledge content, and particularly in a speech translation scene in which a speech recognition result is used as the content to be translated, an error speech recognition result can be corrected in time before translation, so that a correct translation result is obtained, and the reliability of the translation result can be effectively improved.

In addition, by adopting the technical scheme provided by the application, the user experience can be effectively improved.

It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.

In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.

Fig. 2 is a schematic structural diagram of a translation apparatus according to another embodiment of the present application, as shown in fig. 2. The translation apparatus 200 of the present embodiment may include a type preparation unit 201 and a translation unit 202. The preparation unit 201 is configured to obtain at least one knowledge content according to the associated information of the content to be translated, where each knowledge content in the at least one knowledge content includes a content in a first language type and a content in a second language type; the content of the second language type is one of a plurality of contents corresponding to the content of the first language type in the second language type; a translating unit 202, configured to obtain a translation result of the content to be translated by using the at least one knowledge content.

It should be noted that, part or all of the execution main body of the translation apparatus provided in this embodiment may be an application located at the local terminal, or may also be a functional unit such as a plug-in or Software Development Kit (SDK) set in the application located at the local terminal, or may also be a processing engine located in a server on the network side, or may also be a distributed system located on the network side, for example, a processing engine or a distributed system in a test platform on the network side, and this embodiment is not particularly limited in this respect.

It is to be understood that the application may be a native app (native app) installed on the terminal, or may also be a web page program (webApp) of a browser on the terminal, which is not limited in this embodiment.

Optionally, in a possible implementation manner of this embodiment, the information related to the content to be translated may include, but is not limited to, at least one of the following information:

the language type corresponding to the content to be translated and the language type corresponding to the translation result of the content to be translated;

the title information of the content to be translated;

author information of the content to be translated; and

and the domain information of the content to be translated.

Optionally, in a possible implementation manner of this embodiment, the preparing unit 201 may be specifically configured to obtain the associated information of the content to be translated; obtaining a search result according to the associated information of the content to be translated; and performing information extraction processing on the search result to obtain the at least one knowledge content.

Optionally, in a possible implementation manner of this embodiment, each knowledge content obtained by the preparation unit 201 may further include a flag bit, which is used to indicate a language type included in the knowledge content.

Optionally, in a possible implementation manner of this embodiment, the translation unit 202 may be specifically configured to perform, by using the at least one knowledge content, restricted decoding processing on the content to be translated to obtain a translation result of the content to be translated.

In a specific implementation process, the translation unit 202 may be specifically configured to replace a part of the content to be translated, which matches the content of the first language type in the at least one knowledge content, with a special character to obtain a converted content; obtaining a translation result of the conversion content; and restoring the special symbol in the translation result of the conversion content into the content of the second language type corresponding to the special symbol so as to obtain the translation result of the content to be translated.

In another specific implementation process, the translation unit 202 may be specifically configured to perform model training of a translation model by using the at least one knowledge content; and obtaining a translation result of the content to be translated by using the translation model.

For example, the translation unit 202 may be specifically configured to add the at least one knowledge content to the translation model to perform model training of the translation model.

Alternatively, for another example, the translation unit 202 may be specifically configured to perform model training on the translation model by using the at least one knowledge content as new training data of the translation model.

Optionally, in a possible implementation manner of this embodiment, the translation unit 202 may further be configured to perform content modification on the content to be translated by using the at least one knowledge content.

For example, the translation unit 202 may be specifically configured to replace a part of the content to be translated, which matches the content of the first language type in the at least one knowledge content, with the content of the first language type, so as to obtain a correct content to be translated.

It should be noted that the method in the embodiment corresponding to fig. 1 may be implemented by the translation apparatus provided in this embodiment. For a detailed description, reference may be made to relevant contents in the embodiment corresponding to fig. 1, and details are not described here.

In this embodiment, the preparation unit obtains at least one knowledge content according to the associated information of the content to be translated, where each knowledge content in the at least one knowledge content includes a content of a first language type and a content of a second language type, so that the translation unit can obtain a translation result of the content to be translated by using the at least one knowledge content.

In addition, according to the technical scheme provided by the application, the language type corresponding to the content to be translated and the associated information of the content to be translated, which is at least one of the language type corresponding to the translation result of the content to be translated, the title information of the content to be translated, the author information and the field information, are used as the basis for constructing the global information of the translation task, so that the constructed global information can more comprehensively assist the translation task, and the reliability of the translation result can be effectively improved.

In addition, by adopting the technical scheme provided by the application, each knowledge content further comprises a flag bit for indicating the language type included in the knowledge content, so that whether the knowledge content contains bilingual content can be indicated, and the use efficiency of the knowledge content can be effectively improved.

In addition, by adopting the technical scheme provided by the application, the limited decoding processing is carried out on the content to be translated by utilizing the at least one knowledge content, so that the translation result of the content to be translated can be obtained, the operation is simple, and the translation efficiency can be effectively improved.

In addition, by adopting the technical scheme provided by the application, model training of the translation model is carried out by utilizing the at least one knowledge content, and then the translation model can be utilized to obtain the translation result of the content to be translated.

In addition, by adopting the technical scheme provided by the application, the content of the content to be translated is corrected by utilizing the at least one knowledge content, and particularly in a speech translation scene in which a speech recognition result is used as the content to be translated, an error speech recognition result can be corrected in time before translation, so that a correct translation result is obtained, and the reliability of the translation result can be effectively improved.

In addition, by adopting the technical scheme provided by the application, the user experience can be effectively improved.

The present application also provides an electronic device and a non-transitory computer readable storage medium having computer instructions stored thereon, according to embodiments of the present application.

Fig. 3 is a schematic view of an electronic device for implementing the translation method provided in the embodiment of the present application. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the present application that are described and/or claimed herein.

As shown in fig. 3, the electronic apparatus includes: one or more processors 301, memory 302, and interfaces for connecting the various components, including high-speed interfaces and low-speed interfaces. The various components are interconnected using different buses and may be mounted on a common motherboard or in other manners as desired. The processor may process instructions for execution within the electronic device, including instructions stored in or on the memory to display graphical information of a Graphical User Interface (GUI) on an external input/output apparatus, such as a display device coupled to the interface. In other embodiments, multiple processors and/or multiple buses may be used, along with multiple memories and multiple memories, as desired. Also, multiple electronic devices may be connected, with each device providing portions of the necessary operations (e.g., as a server array, a group of blade servers, or a multi-processor system). In fig. 3, one processor 301 is taken as an example.

Memory 302 is a non-transitory computer readable storage medium as provided herein. Wherein the memory stores instructions executable by at least one processor to cause the at least one processor to perform the translation method provided herein. The non-transitory computer-readable storage medium of the present application stores computer instructions for causing a computer to perform the translation method provided by the present application.

The memory 302, which is a non-transitory computer readable storage medium, may be used to store non-transitory software programs, non-transitory computer executable programs, and units, such as program instructions/units (e.g., the preparation unit 201 and the translation unit 202 shown in fig. 2) corresponding to the translation method in the embodiment of the present application. The processor 301 executes various functional applications of the server and data processing, i.e., implements the translation method in the above-described method embodiments, by executing non-transitory software programs, instructions, and units stored in the memory 302.

The memory 302 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data and the like created according to use of an electronic device implementing the translation method provided by the embodiment of the present application. Further, the memory 302 may include high speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory 302 may optionally include a memory remotely located from the processor 301, and such remote memory may be connected over a network to an electronic device implementing the translation methods provided by embodiments of the present application. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.

The electronic device of the translation method may further include: an input device 303 and an output device 304. The processor 301, the memory 302, the input device 303 and the output device 304 may be connected by a bus or other means, and fig. 3 illustrates the connection by a bus as an example.

The input device 303 may receive input numeric or character information and generate key signal inputs related to user settings and function control of an electronic apparatus implementing the translation method provided by the embodiment of the present application, such as an input device of a touch screen, a keypad, a mouse, a track pad, a touch pad, a pointing stick, one or more mouse buttons, a track ball, a joystick, or the like. The output devices 304 may include a display device, auxiliary lighting devices (e.g., LEDs), and haptic feedback devices (e.g., vibrating motors), among others. The display device may include, but is not limited to, a Liquid Crystal Display (LCD), a Light Emitting Diode (LED) display, and a plasma display. In some implementations, the display device can be a touch screen.

Various implementations of the systems and techniques described here can be realized in digital electronic circuitry, integrated circuitry, an Application Specific Integrated Circuit (ASIC), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.

These computer programs (also known as programs, software applications, or code) include machine instructions for a programmable processor, and may be implemented using high-level procedural and/or object-oriented programming languages, and/or assembly/machine languages. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and/or device (e.g., magnetic discs, optical disks, memory, Programmable Logic Devices (PLDs)) used to provide machine instructions and/or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal used to provide machine instructions and/or data to a programmable processor.

To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a Cathode Ray Tube (CRT) or Liquid Crystal Display (LCD) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.

The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.

The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other.

According to the technical scheme of the embodiment of the application, at least one knowledge content is obtained according to the associated information of the content to be translated, each knowledge content in the at least one knowledge content comprises a first language type content and a second language type content, so that the translation result of the content to be translated can be obtained by utilizing the at least one knowledge content, and the same content to be translated can be ensured due to the fact that the at least one knowledge content obtained in advance is used as the global information of the translation task at this time, the translation result is consistent, and the quality of the translation result is improved.

In addition, according to the technical scheme provided by the application, the language type corresponding to the content to be translated and the associated information of the content to be translated, which is at least one of the language type corresponding to the translation result of the content to be translated, the title information of the content to be translated, the author information and the field information, are used as the basis for constructing the global information of the translation task, so that the constructed global information can more comprehensively assist the translation task, and the reliability of the translation result can be effectively improved.

In addition, by adopting the technical scheme provided by the application, each knowledge content further comprises a flag bit for indicating the language type included in the knowledge content, so that whether the knowledge content contains bilingual content can be indicated, and the use efficiency of the knowledge content can be effectively improved.

In addition, by adopting the technical scheme provided by the application, the limited decoding processing is carried out on the content to be translated by utilizing the at least one knowledge content, so that the translation result of the content to be translated can be obtained, the operation is simple, and the translation efficiency can be effectively improved.

In addition, by adopting the technical scheme provided by the application, model training of the translation model is carried out by utilizing the at least one knowledge content, and then the translation model can be utilized to obtain the translation result of the content to be translated.

In addition, by adopting the technical scheme provided by the application, the content of the content to be translated is corrected by utilizing the at least one knowledge content, and particularly in a speech translation scene in which a speech recognition result is used as the content to be translated, an error speech recognition result can be corrected in time before translation, so that a correct translation result is obtained, and the reliability of the translation result can be effectively improved.

In addition, by adopting the technical scheme provided by the application, the user experience can be effectively improved.

It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present application may be executed in parallel, sequentially, or in different orders, as long as the desired results of the technical solutions disclosed in the present application can be achieved, and the present invention is not limited herein.

The above-described embodiments should not be construed as limiting the scope of the present application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present application shall be included in the protection scope of the present application.

20页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种基于RFID射频技术有限空间的发电机组检修方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!