CPC G06F 40/51 (2020.01) [G06F 40/42 (2020.01)] | 18 Claims |
1. A translation method, comprising:
acquiring, based on a to-be-translated specified sentence and a pre-trained weighting model, a weight for each translation model in at least two pre-trained translation models translating the specified sentence; and
translating the specified sentence using the at least two translation models based on the weight for each translation model translating the specified sentence, comprising:
acquiring target words for locations generated in a process of translating the specified sentence by the at least two translation models, based on the weight for each translation model translating the specified sentence, comprising:
acquiring several candidate words for each location predicted in the process of translating the specified sentence by each of the at least two translation models, and probabilities corresponding to the candidate words;
calculating an inference probability of each candidate word for each location, based on the probability corresponding to each candidate word predicted during the translation by each of the at least two translation models, and the weight for each translation model translating the specified sentence; and
determining the target word at each location based on the inference probability of the candidate words for each location.
|