Hierarchical context tagging for utterance rewriting
AssigneeTencent America LLC
InventorLinfeng SONG
Life of this patent
Estimating the term…
Abstract
Hierarchical context tagging for utterance rewriting comprising computer code for obtaining source tokens and context tokens, encoding the source tokens and the context tokens to generate source contextualized embeddings and context contextualized embeddings, tagging the source tokens with tags indicating a keep or delete action for each source token of the source tokens, selecting a rule to insert before the each source token, wherein the rule contains a sequence of one or more slots, and generating spans from the context tokens, wherein each span corresponds to one of the one or more slots of the selected rule.
Claims20
A method of hierarchical context tagging for utterance rewriting, the method comprising:
- obtaining source tokens and context tokens;
- encoding, by inputting the source tokens and context tokens into an encoder, the source tokens and the context tokens to generate first source contextualized embeddings and first context contextualized embeddings;
- tagging the first source contextualized embeddings with tags indicating a keep or delete action for each source contextualized embedding of the first source contextualized embeddings;
- selecting, by inputting the first source contextualized embeddings and the first context contextualized embeddings into a rule tagger, a rule, containing a sequence of one or more slots, to insert before the each source token;
- and
- generating, by inputting an output of the rule tagger, the first source contextualized embeddings, and first context contextualized embeddings into a span predictor, spans from the context tokens, each span corresponding to one of the one or more slots of the selected rule.
An apparatus for utterance rewriting using hierarchical context tagging, the apparatus comprising:
- at least one memory configured to store computer program code;
- at least one processor configured to access the computer program code and operate as instructed by the computer program code, the computer program code including:
- first obtaining code configured to cause the at least one processor to obtain source tokens and context tokens;
- first encoding code configured to cause the at least one processor to encode, by inputting the source tokens and context tokens into an encoder, the source tokens and the context tokens to generate first source contextualized embeddings and first context contextualized embeddings;
- first tagging code configured to cause the at least one processor to tag the first source contextualized embeddings with tags indicating a keep or delete action for each source contextualized embedding of the first source contextualized embeddings;
- first selecting code configured to cause the at least one processor to select, by inputting the first source contextualized embeddings and the first context contextualized embeddings into a rule tagger, a rule, containing a sequence of one or more slots, to insert before the each source token;
- and
- first generating code configured to cause the at least one processor to generate, by inputting an output of the rule tagger, the first source contextualized embeddings, and first context contextualized embeddings into a span predictor, spans from the context tokens, each span corresponding to one of the one or more slots of the selected rule.
A non-transitory computer readable medium storing instructions, that when executed by at least one processor, cause the at least one processor to:
- obtain source tokens and context tokens;
- encode, by inputting the source tokens and context tokens into an encoder, the source tokens and the context tokens to generate first source contextualized embeddings and first context contextualized embeddings;
- tag the first source contextualized embeddings with tags indicating a keep or delete action for each source contextualized embedding of the first source contextualized embeddings;
- select, by inputting the first source contextualized embeddings and the first context contextualized embeddings into a rule tagger, a rule, containing a sequence of one or more slots, to insert before the each source token;
- and
- generate, by inputting an output of the rule tagger, the first source contextualized embeddings, and first context contextualized embeddings into a span predictor, spans from the context tokens, each span corresponding to one of the one or more slots of the selected rule.
Dependencies are inferred from the claim text.