Method, apparatus, device and storage medium for outputting information
AssigneeBeijing Baidu Netcom Science Technology Co., Ltd.
InventorsMengzhao Li, Jun Zhang
Life of this patent
Estimating the term…
Abstract
A method, an apparatus, a device and a storage medium for outputting information are provided. The method includes: acquiring a to-be-translated sentence; determining a foreign language sentence matching the to-be-translated sentence from a preset set of sentence pairs, where the set of sentence pairs includes local language sentences and corresponding foreign language sentences; determining a target foreign language sentence of the to-be-translated sentence according to the to-be-translated sentence and the determined foreign language sentence; and outputting the target foreign language sentence.
Claims20
A method for outputting information, the method comprising:
- acquiring a to-be-translated sentence;
- determining a foreign language sentence matching the to-be-translated sentence from a preset set of sentence pairs, wherein the set of sentence pairs comprises local language sentences and corresponding foreign language sentences;
- determining a target foreign language sentence of the to-be-translated sentence according to the to-be-translated sentence and the determined foreign language sentence;
- and
- outputting the target foreign language sentence.
The method according to claim. 2, wherein the determining a local language sentence matching the to-be-translated sentence from the set of sentence pairs according to the first variable, the first local language word, the second variables and the second local language words, comprises:
- determining first location information of the first variable in the to-be-translated sentence;
- determining second location information of the second variables in the local language sentences of the set of sentence pairs;
- and
- determining the local language sentence matching the to-be-translated sentence from the set of sentence pairs according to the first location information, the second location information, the first local language word and the second local language words.
An electronic device for outputting information, the electronic device comprising:
- at least one processor;
- and
- a memory communicating with the at least one processor, wherein the memory stores instructions executable by the at least one processor, and the instructions, when executed by the at least one processor, cause the at least one processor to perform operations comprising:
- acquiring a to-be-translated sentence;
- determining a foreign language sentence matching the to-be-translated sentence from a preset set of sentence pairs, wherein the set of sentence pairs comprises local language sentences and corresponding foreign language sentences;
- determining a target foreign language sentence of the to-be-translated sentence according to the to-be-translated sentence and the determined foreign language sentence;
- and
- outputting the target foreign language sentence.
A non-transitory computer readable storage medium storing computer instructions for causing a computer to perform operations comprising:
- acquiring a to-be-translated sentence;
- determining a foreign language sentence matching the to-be-translated sentence from a preset set of sentence pairs, wherein the set of sentence pairs comprises local language sentences and corresponding foreign language sentences;
- determining a target foreign language sentence of the to-be-translated sentence according to the to-be-translated sentence and the determined foreign language sentence;
- and
- outputting the target foreign language sentence.
Dependencies are inferred from the claim text.