Intention recognition method, electronic device, and storage medium
AssigneeBeijing Baidu Netcom Science Technology Co., Ltd.
InventorQi Qiu
Life of this patent
Estimating the term…
Abstract
An intention recognition method includes: obtaining an input sentence; obtaining at least one first sentence-intention pair based on the input sentence, in which the first sentence-intention pair includes a candidate sentence similar to the input sentence and a candidate intention to which the candidate sentence belongs; generating first prompt information based on the at least one first sentence-intention pair; and obtaining a target intention to which the input sentence belongs by performing an intention recognition on the input sentence based on the first prompt information.
Claims18
An intention recognition method, comprising:
- obtaining an input sentence;
- obtaining at least one first sentence-intention pair based on the input sentence, wherein the first sentence-intention pair comprises a candidate sentence similar to the input sentence and a candidate intention to which the candidate sentence belongs;
- generating first prompt information based on the at least one first sentence-intention pair, wherein generating the first prompt information based on the at least one first sentence-intention pair comprises:
- generating at least one question-answer pair based on the at least one first sentence-intention pair;
- wherein a question in the question-answer pair is configured to indicate the candidate sentence in the first sentence-intention pair, and an answer in the question-answer pair is configured to indicate the candidate intention in the first sentence-intention pair;
- determining an intention recognition range based on at least one candidate intention in the at least one first sentence-intention pair;
- and
- generating the first prompt information based on the at least one question-answer pair and the intention recognition range;
- and
- obtaining a target intention to which the input sentence belongs by performing an intention recognition on the input sentence based on the first prompt information.
An electronic device, comprising:
- at least one processor;
- and
- a memory communicating with the at least one processor;
- wherein the at least one processor is configured to:
- obtain an input sentence;
- obtain at least one first sentence-intention pair based on the input sentence, wherein the first sentence-intention pair comprises a candidate sentence similar to the input sentence and a candidate intention to which the candidate sentence belongs;
- generate first prompt information based on the at least one first sentence-intention pair, wherein, when generating the first prompt information based on the at least one first sentence-intention pair, the at least one processor is configured to:
- generate at least one question-answer pair based on the at least one first sentence-intention pair;
- wherein a question in the question-answer pair is configured to indicate the candidate sentence in the first sentence-intention pair, and an answer in the question-answer pair is configured to indicate the candidate intention in the first sentence-intention pair;
- determine an intention recognition range based on at least one candidate intention in the at least one first sentence-intention pair;
- and
- generate the first prompt information based on the at least one question-answer pair and the intention recognition range;
- and
- obtain a target intention to which the input sentence belongs by performing an intention recognition on the input sentence based on the first prompt information.
A non-transitory computer-readable storage medium storing a computer instruction, wherein the computer instruction is configured to enable a computer to execute an intention recognition method, the method comprising:
- obtaining an input sentence;
- obtaining at least one first sentence-intention pair based on the input sentence, wherein the first sentence-intention pair comprises a candidate sentence similar to the input sentence and a candidate intention to which the candidate sentence belongs;
- generating first prompt information based on the at least one first sentence-intention pair, wherein generating the first prompt information based on the at least one first sentence-intention pair comprises:
- generating at least one question-answer pair based on the at least one first sentence-intention pair;
- wherein a question in the question-answer pair is configured to indicate the candidate sentence in the first sentence-intention pair, and an answer in the question-answer pair is configured to indicate the candidate intention in the first sentence-intention pair;
- determining an intention recognition range based on at least one candidate intention in the at least one first sentence-intention pair;
- and
- generating the first prompt information based on the at least one question-answer pair and the intention recognition range;
- and
- obtaining a target intention to which the input sentence belongs by performing an intention recognition on the input sentence based on the first prompt information.
Dependencies are inferred from the claim text.