Translation subtitle production method and device, electronic equipment and storage medium

文档序号:1849901 发布日期:2021-11-16 浏览:16次 中文

阅读说明:本技术 翻译字幕制作方法、装置、电子设备与存储介质 (Translation subtitle production method and device, electronic equipment and storage medium ) 是由 丁艳燕 袁华东 国丽 王兆育 于 2021-08-17 设计创作,主要内容包括:本发明提供一种翻译字幕制作方法、装置、电子设备与存储介质,所述方法包括:基于源语言字幕中各字幕帧的尾部标点,和/或各字幕帧之间的间隔时长,对所述源语言字幕进行译群分割,得到若干个译群文本;分别对各译群文本进行翻译,得到各译群文本的翻译文本;基于各译群文本的翻译文本,确定目标语言字幕。本发明提供的方法与装置,通过在翻译前对多个字幕帧进行基于语义的合并,得到若干个能够独立表达完整语义的译群文本,再在此基础上进行机器翻译,使得翻译时可以综合字幕帧的上下文语境,从而提升字幕场景下机器翻译的效果,保证翻译结果整体的语言连贯性,进而减少用户后续修整次数,提高用户满意程度。(The invention provides a method and a device for making a translation caption, an electronic device and a storage medium, wherein the method comprises the following steps: performing translation group segmentation on the source language caption based on tail punctuations of caption frames in the source language caption and/or interval duration between the caption frames to obtain a plurality of translation group texts; translating the translation group texts respectively to obtain translation texts of the translation group texts; and determining the target language caption based on the translation text of each translation group text. According to the method and the device provided by the invention, a plurality of caption frames are merged based on semantics before translation to obtain a plurality of translation group texts capable of independently expressing complete semantics, and then machine translation is carried out on the basis, so that the context of the caption frames can be synthesized during translation, the effect of machine translation in a caption scene is improved, the integral language continuity of a translation result is ensured, the subsequent trimming times of a user are further reduced, and the satisfaction degree of the user is improved.)

1. A method for producing a translation subtitle, comprising:

performing translation group segmentation on the source language caption based on tail punctuations of caption frames in the source language caption and/or interval duration between the caption frames to obtain a plurality of translation group texts;

translating the translation group texts respectively to obtain translation texts of the translation group texts;

and determining the target language caption based on the translation text of each translation group text.

2. The method for making translated captions according to claim 1, wherein the step of performing translation group segmentation on the source language captions based on the tail punctuation of each caption frame in the source language captions and/or the interval duration between each caption frame comprises the steps of:

determining the affiliation of the current caption frame and the current translation group text based on the tail punctuation of the previous caption frame in the source language caption and/or the interval duration between the previous caption frame and the current caption frame, wherein the current translation group text is the translation group text to which the previous caption frame belongs;

and based on the dependency relationship between the current caption frame and the current translation group text, putting the current caption frame into the corresponding translation group text.

3. The method of claim 1, wherein the translating the texts of the respective translation groups to obtain the translated texts of the respective translation groups comprises:

performing translation group segmentation adjustment on each translation group text based on the text length of each translation group text;

and respectively translating the adjusted translation group texts to obtain the translated texts of the adjusted translation group texts.

4. The method of claim 3, wherein the adjusting of the translation group division for each translation group text based on the text length of each translation group text comprises:

and if the text length of any translation group text is greater than the translation length threshold, performing translation group segmentation adjustment on any translation group text based on punctuations contained in the any translation group text.

5. The method of producing a translation subtitle according to claim 4, wherein the adjusting of the translation group division for the arbitrary translation group text based on the punctuation included in the arbitrary translation group text comprises:

intercepting a first part of text of any translation group text for punctuation marking to obtain a first marked text of the first part of text, wherein the first part of text is a section of text with the first character of the any translation group text as the beginning and the text length equal to a marking length threshold;

and performing translation group segmentation on the first annotation text based on punctuations contained in the first annotation text, and if the segmentation is successful, determining a new translation group text based on the segmented segmentation annotation text and a second part of text of any translation group text, wherein the segmentation annotation text is the residual text obtained after the translation group segmentation is performed on the first annotation text, and the second part of text is the text of any translation group text except the first part of text.

6. The method for producing a translated caption according to any one of claims 1 to 5, wherein the determining a target language caption based on the translated text of each translation group text includes:

determining the number of caption frames occupied by any translation group text in the source language caption;

the translation text of any translation group text is divided into sentences to obtain the number of the sentences;

and determining the corresponding relation between the translation text of any translation group text and each caption frame in the target language caption based on the number of the caption frames and the number of the clauses.

7. The method of any one of claims 1 to 5, wherein each subtitle frame in the source language subtitle is determined based on:

the voice data is transcribed to obtain a transcribed text;

and segmenting the transcribed text based on punctuations contained in the transcribed text and/or role information to which each participle in the transcribed text belongs to obtain a plurality of subtitle frames.

8. The method for creating a translated caption according to claim 7, wherein the segmenting the transcribed text based on punctuation included in the transcribed text and/or role information to which each participle in the transcribed text belongs to obtain a plurality of caption frames comprises:

dividing the transcribed text based on punctuations contained in the transcribed text and/or role information to which each participle in the transcribed text belongs to obtain a plurality of sentences;

adjusting each sentence based on the duration of each sentence and/or the text length of each sentence;

and determining the plurality of subtitle frames based on the adjusted sentences.

9. The method of claim 8, wherein the adjusting each sentence based on the duration of each sentence and/or the text length of each sentence comprises:

and adjusting each sentence based on the duration of each sentence and/or the text length of each sentence, and the ending punctuation of each sentence and/or the interval duration between each sentence.

10. A translation subtitle producing apparatus, comprising:

the segmentation module is used for carrying out translation group segmentation on the source language caption based on tail punctuations of caption frames in the source language caption and/or interval duration between the caption frames to obtain a plurality of translation group texts;

the translation module is used for translating the translation group texts respectively to obtain translation texts of the translation group texts;

and the determining module is used for determining the target language caption based on the translation text of each translation group text.

11. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of the method for producing a subtitle according to any one of claims 1 to 9 when executing the program.

12. A non-transitory computer readable storage medium having a computer program stored thereon, wherein the computer program when executed by a processor implements the steps of the method for producing a translation subtitle as recited in any one of claims 1 to 9.

Technical Field

The invention relates to the technical field of artificial intelligence, in particular to a method and a device for making a translation subtitle, electronic equipment and a storage medium.

Background

With the increasing frequency of international and multilingual communication, video sharing has become a popular knowledge transmission and culture communication mode in the world today. In order to improve efficiency of a subtitle making link in a video making process, extensive attention has been paid to utilization of AI (Artificial Intelligence) technologies such as speech recognition and machine translation.

Some existing caption manufacturing software adopting AI technology on the market cannot achieve a more ideal level in the link processing effect of translating corrected captions, and after the current situation is specifically analyzed, the main factor influencing the link processing effect is that the caption texts are mostly translated line by line when the captions are translated, so that the translated contents lack continuity of scenes and semantics on the whole.

Disclosure of Invention

The invention provides a method and a device for making a translated caption, electronic equipment and a storage medium, which are used for solving the defect that caption translation in the prior art is lack of semantic consistency and realizing the integral language consistency of a translation result.

The invention provides a method for making translation subtitles, which comprises the following steps:

performing translation group segmentation on the source language caption based on tail punctuations of caption frames in the source language caption and/or interval duration between the caption frames to obtain a plurality of translation group texts;

translating the translation group texts respectively to obtain translation texts of the translation group texts;

and determining the target language caption based on the translation text of each translation group text.

According to the method for making the translated caption provided by the invention, the group translation and segmentation are carried out on the source language caption based on the tail punctuations of caption frames in the source language caption and/or the interval duration between the caption frames, and the method comprises the following steps:

determining the affiliation of the current caption frame and the current translation group text based on the tail punctuation of the previous caption frame in the source language caption and/or the interval duration between the previous caption frame and the current caption frame, wherein the current translation group text is the translation group text to which the previous caption frame belongs;

and based on the dependency relationship between the current caption frame and the current translation group text, putting the current caption frame into the corresponding translation group text.

According to the method for making the translated captions provided by the invention, the step of translating the texts of the translation groups respectively to obtain the translated texts of the translation groups comprises the following steps:

performing translation group segmentation adjustment on each translation group text based on the text length of each translation group text;

and respectively translating the adjusted translation group texts to obtain the translated texts of the adjusted translation group texts.

According to the method for producing the translated caption provided by the invention, the group-translating, dividing and adjusting are carried out on each group-translating text based on the text length of each group-translating text, and the method comprises the following steps:

and if the text length of any translation group text is greater than the translation length threshold, performing translation group segmentation adjustment on any translation group text based on punctuations contained in the any translation group text.

According to the method for making the translated caption provided by the invention, the group segmentation adjustment is carried out on any translation group text based on the punctuations contained in the any translation group text, and the method comprises the following steps:

intercepting a first part of text of any translation group text for punctuation marking to obtain a first marked text of the first part of text, wherein the first part of text is a section of text with the first character of the any translation group text as the beginning and the text length equal to a marking length threshold;

and performing translation group segmentation on the first annotation text based on punctuations contained in the first annotation text, and if the segmentation is successful, determining a new translation group text based on the segmented segmentation annotation text and a second part of text of any translation group text, wherein the segmentation annotation text is the residual text obtained after the translation group segmentation is performed on the first annotation text, and the second part of text is the text of any translation group text except the first part of text.

According to the method for making the translated captions, the method for determining the target language captions based on the translated texts of the translated group texts comprises the following steps:

determining the number of caption frames occupied by any translation group text in the source language caption;

the translation text of any translation group text is divided into sentences to obtain the number of the sentences;

and determining the corresponding relation between the translation text of any translation group text and each caption frame in the target language caption based on the number of the caption frames and the number of the clauses.

According to the method for making the translated caption, provided by the invention, each caption frame in the source language caption is determined based on the following steps:

the voice data is transcribed to obtain a transcribed text;

and segmenting the transcribed text based on punctuations contained in the transcribed text and/or role information to which each participle in the transcribed text belongs to obtain a plurality of subtitle frames.

According to the method for making the translated caption provided by the invention, the method for segmenting the transcribed text based on punctuations contained in the transcribed text and/or role information to which each participle in the transcribed text belongs to obtain a plurality of caption frames comprises the following steps:

dividing the transcribed text based on punctuations contained in the transcribed text and/or role information to which each participle in the transcribed text belongs to obtain a plurality of sentences;

adjusting each sentence based on the duration of each sentence and/or the text length of each sentence;

and determining the plurality of subtitle frames based on the adjusted sentences.

According to the method for making the translated captions provided by the invention, the adjusting of each sentence based on the duration of each sentence and/or the text length of each sentence comprises the following steps:

and adjusting each sentence based on the duration of each sentence and/or the text length of each sentence, and the ending punctuation of each sentence and/or the interval duration between each sentence.

The present invention also provides a translation subtitle producing apparatus, comprising:

the segmentation module is used for carrying out translation group segmentation on the source language caption based on tail punctuations of caption frames in the source language caption and/or interval duration between the caption frames to obtain a plurality of translation group texts;

the translation module is used for translating the translation group texts respectively to obtain translation texts of the translation group texts;

and the determining module is used for determining the target language caption based on the translation text of each translation group text.

The invention also provides an electronic device, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor executes the program to realize the steps of the method for making the translated captions.

The present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the method for producing a translated caption as described in any one of the above.

According to the translated caption manufacturing method, the device, the electronic equipment and the storage medium, the plurality of caption frames are merged based on the semantics before translation to obtain a plurality of translation group texts capable of independently expressing complete semantics, and machine translation is performed on the basis, so that the context of the caption frames can be synthesized during translation, the effect of machine translation in a caption scene is improved, the integral language continuity of the translation result is ensured, the subsequent trimming times of a user are reduced, and the satisfaction degree of the user is improved.

Drawings

In order to more clearly illustrate the technical solutions of the present invention or the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.

Fig. 1 is a schematic flow chart of a method for making translated captions according to the present invention;

FIG. 2 is a flowchart illustrating a translation group partitioning method according to the present invention;

FIG. 3 is a flow chart of a method for determining a translated text according to the present invention;

FIG. 4 is a flowchart illustrating a translation group partition adjusting method according to the present invention;

FIG. 5 is a flowchart illustrating a method for segmenting a translation group of a first annotation document according to the present invention;

FIG. 6 is a flowchart illustrating a method for determining a target language subtitle according to the present invention;

fig. 7 is a flowchart illustrating a method for determining a subtitle frame according to the present invention;

fig. 8 is a second flowchart illustrating a method for determining a caption frame according to the present invention;

fig. 9 is a schematic structural diagram of a translation subtitle making apparatus according to the present invention;

fig. 10 is a schematic structural diagram of an electronic device provided by the present invention.

Detailed Description

In order to make the objects, technical solutions and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is obvious that the described embodiments are some, but not all embodiments of the present invention. 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 invention.

An embodiment of the present invention provides a method for making a translated caption, and fig. 1 is a schematic flow chart of the method for making a translated caption provided by the present invention, and as shown in fig. 1, the method includes:

step 110, performing translation group segmentation on the source language caption based on tail punctuations of caption frames in the source language caption and/or interval duration between the caption frames to obtain a plurality of translation group texts;

step 120, translating each translation group text respectively to obtain a translation text of each translation group text;

step 130, determining the target language caption based on the translation text of each translation group text.

Specifically, the source language subtitle is the subtitle to be translated, the language applied by the source language subtitle is the source language, the language applied by the subtitle is the target language after translation, and the translation result obtained correspondingly is the target language subtitle. Here, the embodiments of the present invention do not specifically limit the types of the source language and the target language, and may be, for example, chinese, english, french, and the like. The source language caption may be composed of a plurality of caption frames sequentially displayed according to a time sequence, and the source language caption may be obtained directly from a multimedia file or obtained by extracting speech data from the multimedia file and then performing speech transcription on the speech data.

In the prior art, the subtitle text content is usually translated by a machine one by one subtitle frame, so that the translated result lacks the language continuity with the preceding and following subtitle frames, the overall translation quality is not high, and a user needs to modify the subtitle text content in a large area. To solve the problem, the embodiment of the present invention first performs translation group segmentation on the source language caption, that is, the source language caption is segmented into a plurality of translation group texts, where the translation group text is a text segment that can independently express complete semantics, and a segment of translation group text may correspond to one or more caption frames. After the translation group division is completed, machine translation processing can be respectively carried out on each translation group text to obtain the translation text of each translation group text, so that the context of the caption frame can be kept consistent with the contexts of the front caption frame and the rear caption frame after machine translation, and the consistency of the translation result on the whole is ensured.

The translation group segmentation can be realized by merging continuous caption frames under the same semantic meaning based on the semantic meaning of each caption frame in the source language caption, and a translation group text consisting of a plurality of caption frames can be formed after the caption frames based on the semantic meaning are merged. The semantic-based subtitle frame merging can be realized by judging whether the semantics expressed by each subtitle frame are finished or not or judging whether the semantics between two adjacent subtitle frames are the same or not.

Because the end punctuation of the caption frame can represent whether the corresponding caption frame is the end part of a complete sentence, for example, the end punctuation of the caption frame is a period, question mark or exclamation mark, that is, the corresponding caption frame is the end part of a complete sentence, in addition, the interval duration between the caption frames can represent the pause duration between the corresponding voices, and can reflect the correlation between the semantics expressed by the two caption frames respectively to a certain extent, the semantic-based caption frame combination can be realized by combining the semantics of the caption frames according to the end punctuation of each caption frame in the source language caption, or the interval duration between each caption frame, or combining the end punctuation of each caption frame and the interval duration between each caption frames.

The manner of merging the caption frames based on semantics may be to sequentially determine whether two adjacent caption frames belong to the same translation group text from front to back, and then determine whether to merge or separate the two caption frames according to the determination result, or may be to divide all the caption frames into a plurality of sections according to the determined position where the semantics end, and then combine all the caption frames in each section into each translation group text.

After the translated text of each translation group text is obtained, the translated text of each translation group text may be directly used as the target language caption, or the translated text of each translation group text may be correspondingly adjusted according to semantic information of the translated text, and the adjusted translated text is used as the target language caption. In addition, the target language subtitle may be displayed on the screen alone, or the target language subtitle may be restored to the subtitle frames of the source language subtitle to thereby be produced as a bilingual subtitle.

According to the method provided by the embodiment of the invention, a plurality of caption frames are merged based on semantics before translation to obtain a plurality of translation group texts capable of independently expressing complete semantics, and then machine translation is carried out on the basis, so that the context of the caption frames can be synthesized during translation, the effect of machine translation in a caption scene is improved, the integral language continuity of a translation result is ensured, the subsequent trimming times of a user are reduced, and the satisfaction degree of the user is improved.

Based on any of the above embodiments, fig. 2 is a flowchart illustrating a translation group partitioning method provided by the present invention, as shown in fig. 2, step 110 includes:

step 111, determining the affiliation of the current caption frame and the current translation group text based on the tail punctuation of the previous caption frame in the source language caption and/or the interval duration between the previous caption frame and the current caption frame, wherein the current translation group text is the translation group text to which the previous caption frame belongs;

and 112, based on the dependency relationship between the current caption frame and the current translation group text, putting the current caption frame into the corresponding translation group text.

Specifically, the translation group division of the source language caption can be realized by the following modes: combining each caption frame in the source language caption from front to back in sequence, after determining the translated group text to which the previous caption frame belongs, namely the current translated group text, judging the subordination relationship between the current caption frame and the current translated group text, namely judging whether the current caption frame belongs to the current translated group text, if so, combining the current caption frame into the current translated group text, if not, taking the current caption frame as the beginning of the next translated group text, and combining the subsequent caption frames on the basis until all the caption frames in the source language caption belong to the corresponding translated group text.

Here, the specific manner of determining the dependency relationship between the current caption frame and the current translation group text may be determined according to a tail punctuation of a previous caption frame in the source language caption, for example, if the tail punctuation of the previous caption frame is a period, an exclamation mark or a question mark, it may be considered that the content included in the current translation group text is already complete semantic, and at this time, the dependency relationship between the current caption frame and the current translation group text should be not belonging; for example, if the interval duration between the previous subtitle frame and the current subtitle frame is less than the preset maximum interval duration, it may be considered that the semantics to be expressed by the current translation group text is still incomplete, and at this time, the dependency relationship between the current subtitle frame and the current translation group text should belong to, or may be determined by combining a tail punctuation of the previous subtitle frame and the interval duration between the previous subtitle frame and the current subtitle frame, which is not specifically limited in the embodiment of the present invention.

Based on any of the above embodiments, fig. 3 is a schematic flowchart of the method for determining a translated text provided by the present invention, and as shown in fig. 3, step 120 includes:

step 121, performing translation group segmentation adjustment on each translation group text based on the text length of each translation group text;

and step 122, translating the adjusted translation group texts respectively to obtain the translated texts of the adjusted translation group texts.

Specifically, considering that if the text length of the translation group text is too long, the quality of machine translation is reduced, therefore, in the embodiment of the present invention, after obtaining each translation group text, it is determined whether the text length of each translation group text exceeds a preset translation length threshold, and according to the determination result, the translation group division adjustment is performed on each translation group text to obtain each adjusted translation group text, so that the text length of each adjusted translation group text does not exceed the translation length threshold, and then, machine translation processing is performed on each adjusted translation group text, so as to obtain the translated text of each adjusted translation group text, thereby ensuring the accuracy of machine translation in a caption scene.

Based on any of the above embodiments, step 121 includes:

if the text length of any translation group text is larger than the translation length threshold, performing translation group segmentation adjustment on the translation group text based on punctuations contained in any translation group text.

Specifically, after the text length of any one translation group text is judged to exceed the preset translation length threshold, the translation group segmentation adjustment may be performed on the translation group text according to the punctuations included in the translation group text, for example, if the translation group text includes a period, that is, it is stated that the translation group text includes a complete sentence, the complete sentence may be used as an adjusted translation group text, and the remaining text may be used as another adjusted translation group text. For example, if the translation group text does not include a punctuation that is commonly used to indicate the end of a sentence, but the length of the translation group text still needs to be adjusted, the translation group text may be adjusted by performing translation group division based on the punctuation such as a comma or a semicolon included in the translation group text.

The punctuation may be a punctuation that exists directly in the translated group text, or may be a punctuation obtained by performing punctuation labeling on the translated group text according to semantic information of the translated group text, which is not specifically limited in this embodiment of the present invention.

Based on any of the above embodiments, fig. 4 is a schematic flow chart of the method for adjusting translation group segmentation provided by the present invention, and as shown in fig. 4, based on punctuations included in any translation group text, the method for adjusting translation group segmentation for the translation group text includes:

step 1211, intercepting a first part of text of any translation group text for punctuation marking to obtain a first marked text of the first part of text, wherein the first part of text is a section of text with the first character of the translation group text as the beginning and the text length equal to a marking length threshold;

step 1212, performing translation group segmentation on the first annotation text based on punctuations included in the first annotation text, and if the segmentation is successful, determining a new translation group text based on the segmented segmentation annotation text and a second part of text of the translation group text, where the segmentation annotation text is a remaining text after performing translation group segmentation on the first annotation text, and the second part of text is a text except the first part of text in the translation group text.

Specifically, in consideration of the fact that punctuation may be removed in the subtitle making process, which results in no punctuation or incomplete punctuation in the translated group text, in the embodiment of the present invention, after it is determined that the text length of any one of the translated group texts exceeds a preset translation length threshold, punctuation marking processing is performed on the translated group text first, and then, translation group segmentation adjustment is performed on the translated group text according to the punctuation included in the marked translated group text.

In addition, considering that the text length of the translated group text is too long, which may affect the accuracy of punctuation marking, in the embodiment of the present invention, first, a text with a text length equal to a preset marking length threshold is intercepted from the first character of the translated group text, that is, a first part of text, and then, punctuation marking is performed on the first part of text, so as to obtain a first marked text of the first part of text.

After the first annotation text is obtained, the first annotation text can be translated and segmented according to punctuations contained in the first annotation text, if the first annotation text contains a complete sentence and an ending punctuation of the complete sentence is not located at the last position of the first annotation text, the complete sentence can be segmented from the first annotation text, each complete sentence can be used as a translation group text, at this moment, the translation group segmentation is successful, otherwise, the translation group segmentation is unsuccessful.

After the translation group division is successful, a new translation group text can be determined based on the remaining text in the first annotation text, namely the division annotation text, and the text in the translation group text except the first part of text, namely the second part of text. The method for determining the new translation group text is similar to the above process, that is, the segmented annotation text is used as the beginning of the next text to be annotated, then the characters are sequentially taken out from the second part of the text from front to back and spliced with the segmented annotation text until the annotation length threshold is reached or all the characters of the second part of the text are taken out, the next text to be annotated is obtained, then the punctuation marking is performed on the next text to be annotated, the second annotation text of the next text to be annotated is obtained, the translation group segmentation is performed on the second annotation text according to the punctuation included in the second annotation text, and the new translation group text is obtained.

For example, if the total text length of the segmented annotation text plus the second part of text does not exceed the annotation length threshold, the segmented annotation text and the second part of text can be spliced to obtain the next text to be annotated, then punctuation marking is performed on the text to be annotated to obtain the second annotation text, and then whether the second annotation text contains a complete sentence or not is judged, and if so, the complete sentence can be used as a new translation group text.

Based on any of the above embodiments, the specific process of translation group division and adjustment of translation group division may be as follows:

1. traversing from front to back to search the tail punctuations of each caption frame in the source language caption;

2. when a punctuation point at the end of the representation sentence is not found and the time interval between two caption frames is less than the maximum interval duration S, continuously combining the two caption frames into the same translation group text, and always finding the punctuation point until the end of the representation sentence is found after the text length of the translation group text after combination is ensured not to exceed the limit of a translation length threshold value M, wherein the punctuation point is used as the end point of the translation group text;

3. if the time interval between two caption frames exceeds S, taking the previous caption frame exceeding the position as an end point of the translation group text combination;

4. if the text length of the combined translated group text exceeds M, cutting a small translated group forward, wherein the small translated group is a section of text consisting of a plurality of subtitle frames from the starting point of the translated group text to the position of a comma or a part mark closest to the current subtitle frame, combining a plurality of subtitle frames left in the cut translated group text with the current subtitle frame, if the length of the combined text does not exceed M, independently packaging the cut small translated group into a translated group text, combining the plurality of cut subtitle frames left with the current subtitle frame into a new translated group text, if the length of the combined text still exceeds M, splicing and restoring the cut small translated group and the plurality of remaining subtitle frames into a translated group text, and then taking the current subtitle frame as the starting subtitle frame of the new translated group text;

5. when the text length of the combined translated group text exceeds M, a punctuation point representing the end of the sentence is not found yet, the nearest comma or semicolon punctuation point is taken forward as the end point of the combined translated group text, a subtitle frame after the comma or semicolon position and the current subtitle frame are combined into a new translated group text, if the text length of the new translated group text still exceeds M, the subtitle frame before the current subtitle frame is taken as the end point of the translated group text, and the current subtitle frame is taken as the start subtitle frame of the new translated group text; and if the comma or the semicolon punctuation is not found before, taking the subtitle frame before the current subtitle frame as the end point of the translated group text, and taking the current subtitle frame as the start subtitle frame of the new translated group text.

Based on any of the above embodiments, the specific process of translation group division and translation group division adjustment may be as follows, and it should be noted that the process is applicable to source language subtitles of various languages, and is particularly applicable to source language subtitles of chinese:

1. firstly, performing translation group segmentation on source language subtitles according to a maximum interval duration rule and a tail punctuation rule to obtain a plurality of translation group texts obtained by combining subtitle frames;

2. processing each translation group text one by one, if the text length of any translation group text exceeds a translation length threshold value M, further judging whether the text length of the translation group text exceeds a mark length threshold value N (M > N), and performing translation group segmentation adjustment on the translation group text according to a judgment result;

3. if the text length of the translation group text does not exceed N, directly sending the translation group text into a labeling process: if the marked text contains a plurality of complete sentences, packaging the complete sentences into a translation group text one by one, and packaging the text left after cutting out the complete sentences into a translation group text; if the marked text has no complete sentence, the text content after splicing the caption frames in the translation group text one by one is used as a translation group text;

4. if the text length of the translation group text exceeds N, intercepting a text with a text length equal to N preset from the first character of the translation group text, that is, a first part of the text, sending the first part of the text to a labeling process to obtain a first labeled text of the first part of the text, and then performing translation group segmentation on the first labeled text according to punctuations included in the first labeled text, where fig. 5 is a schematic flow diagram of a translation group segmentation method for the first labeled text provided by the present invention, as shown in fig. 5:

(1) if the first labeling text contains a plurality of complete sentences and the ending punctuations of the complete sentences are not at the last position of the first labeling text (the ending punctuations at the ending position of the first labeling text do not have strict referential property), cutting out the plurality of complete sentences, taking the residual text in the first labeling text after cutting out as the beginning of the next text to be labeled, and then sequentially splicing the texts to be labeled backwards to perform labeling and subsequent processing;

(2) if the first annotation text contains a plurality of complete sentences and the ending punctuations of the complete sentences are at the last position of the first annotation text, judging whether the first annotation text can cut out the maximum standard semantic sentence or not, if so, taking the maximum standard semantic sentence as a translation group text, taking the rest text as the beginning of the next text to be annotated, and if not, taking the first annotation text as a translation group text;

(3) if the first annotated text has no complete sentence but has a standard semantic sentence, cutting out the maximum standard semantic sentence in the first annotated text as a group text to be translated, taking the residual text after cutting out as the beginning of the next text to be translated, continuing to splice the texts to be translated from the beginning to the end in sequence (two points are needed to be ensured in the splicing process, wherein one point is that the total text length of the spliced text to be translated plus the previously cut maximum standard semantic sentence does not exceed M, the other point is that the text length of the spliced text to be translated does not exceed N), if the total text length of the currently spliced text to be translated plus the maximum standard semantic sentence reaches the edge of M, performing labeling processing on the currently spliced text to be translated to obtain a labeled text, if the labeled text has a complete sentence and the end punctuation point is not at the last position, splicing the complete sentence and the previous maximum standard semantic sentence into a translated group text, taking the rest text as the beginning of the next text to be marked; if the marked text has a complete sentence and the end punctuation is at the last position, judging whether the maximum standard semantic sentence can be cut out from the total marked text, if so, taking the maximum standard semantic sentence as a translation group text, taking the rest text as the beginning of the next text to be marked, and if not, taking the total marked text as a translation group text;

(4) and if the first labeled text has no complete sentence and the first labeled text can not cut out the standard semantic sentence, taking the first labeled text as a translation group text.

Here, the maximum standard semantic sentence refers to a sentence in which as many combinations of standard semantic sentences are cut out as possible in one markup text, that is, a sentence whose end is a sentence division punctuation such as a comma, a semicolon, or the like.

In the embodiments, in consideration of the problem that the existing machine caption translation method is line-by-line translation, and the translation result lacks the language coherence with the front and rear caption frames, which results in low overall translation quality, an algorithm is provided which can integrate a plurality of caption frames into a translation group text with complete semantics and perform backtracking adjustment on the translation group text, so that the machine translation effect in a caption scene can be improved, and the overall language coherence of the translation result is ensured.

Based on any of the above embodiments, fig. 6 is a schematic flowchart of a method for determining a target language subtitle, as shown in fig. 6, step 130 includes:

step 131, determining the number of caption frames occupied by any translation group text in the source language caption;

step 132, dividing the translation text of the translation group text into clauses to obtain the number of the clauses;

step 133, determining the corresponding relationship between the translated text of the translated group text and each caption frame in the target language caption based on the number of caption frames and the number of clauses.

Specifically, in order to form bilingual subtitles, in the embodiment of the present invention, after obtaining the translated text of each translation group text, the correspondence between the translated text of each translation group text and each subtitle frame in the target language subtitle is determined, and then the translated text of each translation group text is restored to the corresponding subtitle frame in the source language subtitle according to the correspondence. It will be understood that there will eventually be text in both the source language and the target language displayed in each subtitle frame, where the text displayed in the target language in each subtitle frame constitutes the target language subtitle.

Here, for any one translated group text, the number of caption frames occupied by the translated group text in the source language caption may be determined, the translated text of the translated group text is claused to obtain the number of clauses, and then the corresponding relationship between the translated text of the translated group text and each caption frame in the target language caption is determined according to the number of caption frames and the number of clauses. For example, if the translated group text occupies only one caption frame in the caption of the source language, it can be directly determined that there is a one-to-one correspondence between the translated text of the translated group text and the caption frame. For another example, if the translated group text occupies at least two subtitle frames in the source language subtitle and the number of clauses of the translated text is the same as the number of subtitle frames of the translated group text, it may be determined that a one-to-one correspondence exists between each clause of the translated text and each subtitle frame occupied by the translated group text.

Based on any of the above embodiments, a specific process for splitting and restoring the translated text of each translation group text to the corresponding subtitle frame in the source language subtitle may be as follows, and it should be noted that the process is suitable for splitting and restoring translated texts of various languages, and is particularly suitable for english translated texts:

1. determining the number of subtitle frames occupied by each translation group text in the source language subtitles and the proportion of each subtitle frame in each translation group text in the translation group text;

2. if the translated group text only occupies one caption frame in the source language caption, the translated text of the translated group text can be directly assigned to the caption frame;

3. if the translated group text occupies at least two caption frames in the source language caption, dividing the translated text of the translated group text into clauses according to the meanings, and if the number of the divided clauses is the same as that of the caption frames occupied by the translated group text, assigning the clauses to the caption frames occupied by the translated group text from front to back one by one;

4. if the number of the divided clauses is different from the number of the caption frames occupied by the translation group text, the translation text of the translation group text is participated according to English participated words Arabic numerals, then the corresponding number of participated words are spliced into word groups according to the proportion condition of each caption frame in the translation group text, the word groups are assigned to each caption frame occupied by the translation group text, and then language optimization is executed; processing the word groups of each caption frame one by one from front to back, cutting out head and tail short sentences in the word groups, if the short sentences can be merged to the caption frames in front or back, merging the cut short sentences to the caption frames in front or back, and merging the two merged caption frames if the two merged caption frames cannot be separated by the semantic segmentation punctuations.

Based on any of the above embodiments, the specific process of splitting and restoring the translated text of each translated group text to the corresponding subtitle frame in the source language subtitle may be as follows, and it should be noted that this process is applicable to splitting and restoring translated texts of various languages, and is particularly applicable to translated texts in chinese:

1. determining the number of subtitle frames occupied by each translation group text in the source language subtitles and the proportion of each subtitle frame in each translation group text in the translation group text;

2. if the translated group text only occupies one caption frame in the source language caption, the translated text of the translated group text can be directly assigned to the caption frame;

3. if the translated group text occupies at least two caption frames in the source language caption, dividing the translated text of the translated group text into clauses according to the meanings, and if the number of the divided clauses is the same as that of the caption frames occupied by the translated group text, assigning the clauses to the caption frames occupied by the translated group text from front to back one by one;

4. if the number of the divided clauses is different from the number of the caption frames occupied by the translation group text, performing Chinese word segmentation on the translation text of the translation group text, splicing the corresponding number of the clauses into word groups according to the occupation condition of each caption frame in the translation group text, assigning the word groups to each caption frame occupied by the translation group text, and then performing language optimization; processing word groups of each caption frame one by one from front to back, cutting out head and tail short sentences in the word groups, if the short sentences can be merged to the caption frames in front or back, merging the cut short sentences to the caption frames in front or back, wherein the merging condition is that the two merged caption frames cannot be separated by semantic segmentation punctuations;

5. traversing the text content of each subtitle frame, checking whether the ending characters of the subtitle frames before and after each subtitle frame are punctuations, and if the following conditions are met:

when the non-punctuation mark of the previous caption frame is ended, Chinese word segmentation is carried out on the text of the current caption frame, and the Chinese word segmentation word sequence rule correction is carried out on the segmented result so as to achieve the splitting and restoring effects with smoother semantics and smoothness. For example, if the term "has" cannot be used at the beginning of a sentence, then "has" may be placed at the end of the previous subtitle frame.

Based on any of the above embodiments, fig. 7 is a flowchart illustrating a method for determining a caption frame according to the present invention, and as shown in fig. 7, each caption frame in a source language caption is determined based on the following steps:

step 101, transcribing voice data to obtain a transcribed text;

and 102, segmenting the transcribed text to obtain a plurality of subtitle frames based on punctuations contained in the transcribed text and/or role information to which each participle in the transcribed text belongs.

Specifically, when producing each subtitle frame of the source language subtitle, the speech data may be first parsed from the multimedia file, where the multimedia file may be, for example, a video file, an audio file, and the like, and then the speech data is subjected to speech transcription to obtain a transcribed text, and then the transcribed text is divided into each subtitle frame.

In consideration of the fact that in the prior art, when each subtitle frame of a source language subtitle is made, only the fixed value of which the character length contained in each subtitle frame does not exceed the input value of a user is used as a unique segmentation rule, an original subtitle text is forcedly segmented into a plurality of subtitle frames according to the segmentation rule, and the problem that the semantics of the upper and lower subtitle frames are disordered and the like often occurs due to the fact that the overall effect is not comprehensively considered.

Aiming at the problem, the embodiment of the invention divides the transcribed text according to punctuations contained in the transcribed text and/or role information to which each participle in the transcribed text belongs, and then determines a plurality of subtitle frames according to the division result, thereby carrying out comprehensive evaluation on the whole effect during division and avoiding the problem of semantic disorder of each subtitle frame obtained by division. Here, the character information to which each word belongs in the transcribed text is obtained by performing character recognition based on the voice feature of the voice data in the process of transcription.

Based on any of the above embodiments, fig. 8 is a second flowchart illustrating the method for determining a subtitle frame according to the present invention, as shown in fig. 8, step 102 includes:

step 1021, segmenting the transcribed text based on punctuations contained in the transcribed text and/or role information to which each participle in the transcribed text belongs to obtain a plurality of sentences;

step 1022, adjusting each sentence based on the duration of each sentence and/or the text length of each sentence;

in step 1023, a plurality of caption frames are determined based on the adjusted sentences.

Specifically, considering that the rule index for the user to input is single in the prior art, and the user can only define the maximum character length of the caption frame by self, the embodiment of the present invention provides a caption segmentation postprocessing rule capable of providing customization of the user scene, and comprehensively balances various factors to segment the caption frame of the transcribed text when each caption frame is manufactured: firstly, preliminarily dividing the transcribed text according to punctuations contained in the transcribed text and/or role information to which each participle in the transcribed text belongs to obtain a plurality of sentences after preliminary division, then adjusting corresponding indexes of preliminary division results according to user-defined division indexes on the basis of the plurality of sentences after preliminary division to obtain each adjusted sentence, and then determining each subtitle frame in the source language subtitle according to each adjusted sentence.

Here, the user-defined segmentation index may be at least one of a maximum duration, a minimum duration, and a maximum text length of each sentence. For example, if the user-defined segmentation index includes the maximum duration of each sentence, it may be determined whether the duration of each sentence exceeds the maximum duration, and if it is determined that there is a sentence exceeding, the sentence may be segmented and adjusted, so as to ensure that the segmented sentences do not exceed the maximum duration.

The method has the advantages that various rules and indexes which can be input by a user are utilized, so that various factors are comprehensively balanced during subtitle segmentation, the method is more suitable for subtitle making scenes, the subtitle generating accuracy is obviously improved, and the user satisfaction degree can be improved.

Based on any of the above embodiments, the specific process of performing preliminary segmentation on the transcribed text is as follows:

1. and filtering the participles with the part-of-speech as the segment identifiers in the transcribed text, and filtering the participles with the part-of-speech as the smooth words according to whether the language-atmosphere words are filtered by user self-definition (default filtering).

2. And sorting and calculating the starting time and the ending time of each participle.

3. Traversing the sorted participles, combining the participles into sentences with different lengths (duration and text length) according to the rules of punctuation segmentation and role separation, wherein punctuation marks are not reserved in Chinese and punctuation marks are reserved in English, and the specific assembling process comprises the following steps:

(1) judging whether the current participle and the previous participle belong to the same role, if not, finishing the assembling process of the current sentence, and using the current participle as the beginning of a new line of sentences;

(2) judging whether the current word segmentation is punctuation, if so, finishing the assembling process of the current sentence, and restarting the assembling of a new line of sentences;

(3) if the current participle belongs to the same role as the previous participle and is not a punctuation, assembling the current participle into the current sentence;

(4) and if the current participle is the last participle, finishing the assembling process of the current sentence.

Based on any of the above embodiments, step 1022 includes:

and adjusting each sentence based on the duration of each sentence and/or the text length of each sentence, and the ending punctuation of each sentence and/or the interval duration between each sentence.

Specifically, considering that a semantic disorder problem may occur in a process of adjusting sentences, in the embodiment of the present invention, after determining that the preliminarily segmented sentences need to be adjusted according to the duration of each sentence and/or the text length of each sentence, each sentence is adjusted according to the ending punctuations of each sentence and/or the interval duration between each sentence, so as to avoid the semantic disorder problem of the adjusted sentences. For example, if the duration of any statement is less than the minimum duration defined by the user, the statement may be merged and adjusted, and at this time, if it is further determined that the interval duration between the statement and the previous statement exceeds the maximum interval duration and the interval duration between the statement and the next statement does not exceed the maximum interval duration, the statement and the next statement may be merged.

Based on any of the above embodiments, the adjustment of each index of the preliminary segmentation result according to the user-defined segmentation index may include three steps of eliminating sentences with too long duration, combining sentences with too short duration, and eliminating sentences with too long text length. The statement with the overlong duration, namely the statement with the duration exceeding the user-defined maximum duration, can be realized by optimizing and dividing the statement according to the duration, and the specific flow is as follows:

1. an average segmentation duration AL is calculated and evaluated.

2. And recombining the words in the sentence to ensure that the duration of the combined sentence is not more than AL, such as:

the average segmentation duration is 8s, the duration of the currently combined sentence is 7.8s, if the sentence length after the next word is spliced is 8.2s, the currently combined sentence is used as the segmented sentence, and the next word is used as the starting word of the next sentence.

3. And sequentially judging whether each segmented sentence has a sentence with too short duration, if so, canceling the current segmentation result, adjusting the value of the average segmentation duration AL, and segmenting again until each segmented sentence has no sentence with too short duration.

The sentence with too short duration, that is, the sentence with the duration less than the minimum duration defined by the user, can be combined by combining the sentence with the preceding sentence and the following sentence, and the specific flow is as follows:

1. the condition that the sentence can be merged with the preceding and following sentences is as follows:

the interval duration between the sentence and the preceding sentence is not more than the maximum interval duration S obtained by user-defined segmentation index evaluation calculation; if the sentence is merged with the previous sentence, the ending punctuation of the previous sentence can not be the punctuation representing the end of the sentence; if the sentence is merged with the later sentence, the ending punctuation of the sentence can not be the punctuation representing the end of the sentence; the sentence has the same role as the preceding and following sentences.

2. And judging whether the sentence can be merged with the preceding sentence and the following sentence, if the preceding sentence and the following sentence accord with the merging condition, preferentially merging with the sentence with shorter interval duration, and if the preceding sentence and the following sentence accord with the merging condition and have the same interval duration with the sentence, merging with the preceding sentence.

3. After Chinese sentences are combined, the space is used for separating the front sentence from the rear sentence, and English sentences are combined and not processed.

The sentence with the overlong text length, namely the sentence with the text length exceeding the maximum text length defined by the user, can be eliminated by uniformly dividing the sentence, and the specific flow is as follows:

1. calculating the average division length so that the average division length is close to the specified length and uniform in each part of length, such as:

if the text length of the sentence is 80, the calculated average segmentation length is 27;

the text length of the sentence is 58, the calculated average segmentation length is 29.

2. Recombining the words in the sentence to make the text length of each sentence after combination not larger than the average segmentation length, such as:

if the average division length is calculated to be 29, the text length of the currently combined sentence is 26, and the text length of the next word is 4, the currently combined sentence is taken as the divided sentence, and the next word is taken as the start word of the next sentence.

3. And sequentially judging whether each segmented sentence has a sentence with too short duration, if so, trying to segment again after averaging the segmentation length of +2, and trying to comprehensively eliminate the sentence with too short duration.

4. If the trial division times exceed 5 times and the sentences which meet the rules are not cut out, the current trial division scheme is retained.

5. And (4) attempting to perform sentence segmentation from a reverse direction (decreasing on the basis of the original average segmentation length), and if the number of dead pixels is increased in the process of attempting, segmenting the sentence according to the last attempted segmentation scheme of the forward attempt in the previous step.

Based on any of the above embodiments, if the transcribed text is chinese, after the three steps of eliminating the sentence with too long duration, combining the sentence with too short duration and eliminating the sentence with too long text length are performed on the preliminary segmentation result, word order adjustment under the standard semantic of chinese may also be performed, and the specific flow is as follows:

and performing rule check on the role separation of the front and the rear subtitles of each subtitle frame, whether the ending character is a punctuation and whether the inter-subtitle interval exceeds the maximum interval duration S, if the following conditions are met:

and when the previous caption frame is not punctuated and the interval duration between the current caption frame and the previous caption frame is not more than S and the current caption frame and the previous caption frame belong to the same role, performing Chinese word segmentation on the current caption frame, and performing Chinese word segmentation word order rule correction on the segmented result to obtain an adjusted sentence with smoother semantic meaning and smoothness. For example, if the term "has" cannot be used at the beginning of a sentence, then "has" may be placed at the end of the previous subtitle frame. Here, the part-of-speech tag references a set of part-of-speech tagging tags of chinese text.

Based on any one of the embodiments, the invention adopts advanced natural language processing technologies such as speech recognition technology and machine translation to construct a set of intelligent caption manufacturing system, and the intelligent caption segmentation and sense group translation caption manufacturing method (sense group is a plurality of phrases with certain meaning divided by a slightly long sentence) provided by the invention is utilized to obviously improve the accuracy of caption generation, improve the machine translation effect in caption scenes and improve the satisfaction degree of users.

It should be noted that the sense group is a linguistic term, which represents an abstract dividing concept, and the translated group text is a work product of a specific application in the caption translation process, which is designed by adopting the dividing concept. The translation group text is a group to be translated which can independently express complete semantics under a certain scene, and the translation group text is a complete sentence from the beginning to the end and comprises a plurality of short sentences and sentences with strong context relevance.

The following describes a translation caption producing apparatus according to the present invention, and the following description and the above-described translation caption producing method may be referred to in correspondence with each other.

Based on any one of the above embodiments, an embodiment of the present invention provides a device for creating a translation subtitle, fig. 9 is a schematic structural diagram of the device for creating a translation subtitle provided by the present invention, and as shown in fig. 9, the device includes:

a dividing module 910, configured to perform translation group division on a source language subtitle based on a tail punctuation of each subtitle frame in the source language subtitle and/or an interval duration between each subtitle frame to obtain a plurality of translation group texts;

the translation module 920 is configured to translate each translation group text to obtain a translation text of each translation group text;

a determining module 930, configured to determine the target language subtitle based on the translation text of each translation group text.

According to the device provided by the embodiment of the invention, a plurality of caption frames are merged based on semantics before translation to obtain a plurality of translation group texts capable of independently expressing complete semantics, and then machine translation is carried out on the basis, so that the context of the caption frames can be synthesized during translation, the effect of machine translation in a caption scene is improved, the integral language continuity of a translation result is ensured, the subsequent trimming times of a user are reduced, and the satisfaction degree of the user is improved.

Based on any of the above embodiments, the segmentation module 910 includes:

the dependency relationship determining unit is used for determining the dependency relationship between the current caption frame and the current translation group text based on the tail punctuation of the previous caption frame in the source language caption and/or the interval duration between the previous caption frame and the current caption frame, wherein the current translation group text is the translation group text to which the previous caption frame belongs;

and the caption frame embedding unit is used for embedding the current caption frame into the corresponding translation group text based on the dependency relationship between the current caption frame and the current translation group text.

Based on any of the above embodiments, the translation module 920 includes:

the adjusting submodule is used for carrying out translation group segmentation adjustment on each translation group text based on the text length of each translation group text;

and the translation submodule is used for translating the adjusted translation group texts respectively to obtain the translation texts of the adjusted translation group texts.

Based on any of the above embodiments, the adjustment submodule is configured to:

if the text length of any translation group text is larger than the translation length threshold, performing translation group segmentation adjustment on the translation group text based on punctuations contained in any translation group text.

Based on any of the embodiments described above, the performing group segmentation adjustment on any group translation text based on punctuations included in the group translation text includes:

intercepting a first part of text of any translation group text for punctuation marking to obtain a first marked text of the first part of text, wherein the first part of text is a section of text with the first character of the translation group text as the beginning and the text length equal to a marking length threshold value;

and performing translation group segmentation on the first annotation text based on punctuations contained in the first annotation text, and if the segmentation is successful, determining a new translation group text based on the segmented segmentation annotation text and a second part of text of the translation group text, wherein the segmentation annotation text is the residual text after the translation group segmentation is performed on the first annotation text, and the second part of text is the text except the first part of text in the translation group text.

Based on any of the above embodiments, the determining module 930 includes:

the quantity determining unit is used for determining the number of subtitle frames occupied by any translation group text in the source language subtitle;

the text clause unit is used for clauseing the translation text of the translation group text to obtain the number of clauses;

and the relation determining unit is used for determining the corresponding relation between the translation text of the translation group text and each caption frame in the target language caption based on the number of the caption frames and the number of the clauses.

Based on any of the above embodiments, each subtitle frame in the source language subtitle is determined based on the following steps:

the voice data is transcribed to obtain a transcribed text;

and segmenting the transcribed text to obtain a plurality of subtitle frames based on punctuations contained in the transcribed text and/or role information to which each word in the transcribed text belongs.

Based on any of the embodiments, segmenting the transcribed text based on punctuations included in the transcribed text and/or role information to which each participle in the transcribed text belongs to obtain a plurality of subtitle frames, including:

segmenting the transcribed text to obtain a plurality of sentences based on punctuations contained in the transcribed text and/or role information to which each participle in the transcribed text belongs;

adjusting each sentence based on the duration of each sentence and/or the text length of each sentence;

based on the adjusted sentences, a plurality of caption frames are determined.

Based on any of the above embodiments, adjusting each sentence based on the duration of each sentence and/or the text length of each sentence includes:

and adjusting each sentence based on the duration of each sentence and/or the text length of each sentence, and the ending punctuation of each sentence and/or the interval duration between each sentence.

Fig. 10 illustrates a physical structure diagram of an electronic device, and as shown in fig. 10, the electronic device may include: a processor (processor)1010, a communication Interface (Communications Interface)1020, a memory (memory)1030, and a communication bus 1040, wherein the processor 1010, the communication Interface 1020, and the memory 1030 communicate with each other via the communication bus 1040. Processor 1010 may invoke logic instructions in memory 1030 to perform a method of translating captioning, the method comprising: performing translation group segmentation on the source language caption based on tail punctuations of caption frames in the source language caption and/or interval duration between the caption frames to obtain a plurality of translation group texts; translating the translation group texts respectively to obtain translation texts of the translation group texts; and determining the target language caption based on the translation text of each translation group text.

Furthermore, the logic instructions in the memory 1030 can be implemented in software functional units and stored in a computer readable storage medium when the logic instructions are sold or used as independent products. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.

In another aspect, the present invention also provides a computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions, which when executed by a computer, enable the computer to perform the method for creating a translation subtitle provided by the above methods, the method comprising: performing translation group segmentation on the source language caption based on tail punctuations of caption frames in the source language caption and/or interval duration between the caption frames to obtain a plurality of translation group texts; translating the translation group texts respectively to obtain translation texts of the translation group texts; and determining the target language caption based on the translation text of each translation group text.

In yet another aspect, the present invention also provides a non-transitory computer-readable storage medium having stored thereon a computer program, which when executed by a processor, implements a method for producing a translated caption, provided by the above methods, the method including: performing translation group segmentation on the source language caption based on tail punctuations of caption frames in the source language caption and/or interval duration between the caption frames to obtain a plurality of translation group texts; translating the translation group texts respectively to obtain translation texts of the translation group texts; and determining the target language caption based on the translation text of each translation group text.

The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.

Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.

Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

23页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种非制冷热红外焦平面器件以及红外成像设备

网友询问留言

已有0条留言

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

精彩留言,会给你点赞!

技术分类