Short text anaphora resolution method and device
By constructing reference word recognition rules and big model prompt words, extracting entity content and replacing it, the problem of limited accuracy and application scope of reference digestion in the prior art is solved, and higher accuracy and user experience are achieved.
Patent Information
- Application Number
- CN202411525615.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-30
- Publication Date
- 2025-02-18
AI Technical Summary
The prior art relies on word segmentation rules when dealing with short text reference digestion, resulting in limited generalization and accuracy, affecting semantic understanding and user intention execution.
By constructing the reference pronoun recognition rules, identify the part and position of the reference pronoun in the current input statement, construct a large model prompt word, extract the entity content in the previous round of input statements, and replace it based on the reference pronoun position to complete the reference digestion.
It improves the accuracy and scope of application of pronouns, enhances the user's voice interaction experience, and avoids the accuracy and generalization problems caused by word segmentation dependence in traditional methods.
Smart Images

Figure CN119476287A_ABST
Abstract
Description
Technical Field
[0001] The present invention mainly relates to the technical field of natural language processing, and in particular to a method and device for short text reference resolution. Background Art
[0002] Generally speaking, in linguistics and daily language, abbreviations or pronouns are used in the following text to replace a word that has already appeared in the previous text. In linguistics, this situation is called "reference phenomenon", or reference. Reference phenomenon can avoid problems such as bloated sentences and redundancy caused by the repeated appearance of the same word; but this omission also causes the problem of "unclear reference". In natural language processing, if reference resolution cannot be handled correctly and the entity corresponding to the reference word cannot be found, the downstream semantic understanding task cannot understand the real user intention of the current conversation, which will directly affect the accuracy of the execution result of the device that executes the intention.
[0003] Currently, the processing of reference resolution basically requires word segmentation of the sentences input in the previous round, and analysis of the subject, predicate, and object components and parts of speech of each segmentation result in the sentence. However, this method of reference resolution heavily relies on the rules of word segmentation to analyze and determine the reference relationship in the text, and the generalization and accuracy of the use of reference resolution are limited. Summary of the invention
[0004] Technical Problems Solved by the Invention
[0005] A method and device for short text pronoun resolution are provided, aiming to improve the application scope and accuracy of pronoun resolution.
[0006] The technical solution adopted by the present invention to solve the above technical problems
[0007] In one aspect, the present invention provides a method for short text reference resolution, comprising:
[0008] Construct pronoun recognition rules to identify the pronoun part of speech and position for the current input sentence;
[0009] Based on the identified parts of speech of the pronouns, a large model prompt word is constructed to extract entity content that matches the parts of speech of the pronouns in the previous round of input sentences;
[0010] The pronouns are replaced based on the identified pronoun positions and the extracted entity contents, and the currently input sentence is rewritten.
[0011] Furthermore, the pronoun recognition rule divides the currently input sentence into different regular expressions and then performs pronoun part of speech and position recognition.
[0012] Furthermore, for different types of pronouns, multiple pronoun identification rules with the same semantics but different word orders are constructed.
[0013] On the other hand, the present invention provides a short text reference resolution device for implementing the above short text reference resolution method, the device specifically includes a reference word recognition module, an LLM prompt word generation module, an LLM entity recognition module and a text rewriting module;
[0014] The pronoun recognition module is used to recognize the part of speech and position of the pronoun in the current input sentence according to the constructed pronoun recognition rules;
[0015] The LLM prompt word generation module is used to construct a large model prompt word according to the part of speech of the pronoun identified by the pronoun identification module;
[0016] The LLM entity recognition module is used to extract entity content that meets the pronoun part of speech in the previous round of input sentences according to the large model prompt word constructed by the LLM prompt word generation module;
[0017] The text rewriting module is used to rewrite the input text according to the position of the pronoun identified by the pronoun identification module and the entity content extracted by the LLM entity identification module to complete the reference resolution.
[0018] Beneficial effects of the present invention
[0019] The method and device for short text reference resolution described in the present invention do not need to segment the sentences input in the previous round during the process of resolving the reference words in the text. Instead, the parts of speech of the reference words in the current input sentence are directly identified according to the constructed reference word recognition rules to construct a large model prompt word, and the corresponding entity in the previous sentence text is identified based on the large model prompt word. The reference word is directly replaced according to the position of the reference word to complete the resolution of the reference word. Compared with the traditional reference word resolution method, the accuracy and application scope of the reference word resolution are improved, and the user's voice interaction experience can be effectively enhanced. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 The present invention is a flowchart of a method for short text reference resolution. DETAILED DESCRIPTION
[0021] like Figure 1 As shown, first, the pronoun recognition module divides the current input sentence into different regular expressions according to the constructed pronoun recognition rules, and recognizes the part of speech (ap_pos) and position (ap_loc) of the pronoun in the input sentence. Preferably, when defining the pronoun recognition rules, a part of speech description term (ap_pos_desc) of the pronoun is also formulated to explain the part of speech of the pronoun and improve the accuracy of the large model prompt words.
[0022] In order to improve the success rate of identifying the part of speech and position of a anaphora, in this embodiment, multiple anaphora identification rules with the same semantics but different word orders are constructed for each type of anaphora. The type of anaphora specifically refers to which of the following the anaphora belongs to: person, role, region, IoT device, etc. In this embodiment, the currently input sentence is "I want to watch his movie", and the anaphora identification module identifies the part of speech and position of the anaphora for the input sentence according to the multiple anaphora identification rules it stores, for example:
[0023]
[0024]
[0025] In this embodiment, the currently input sentence "I want to watch his movie" hits the pronoun recognition rule regular1, and the part of speech and position of the pronoun in the pronoun recognition rule regular1 are the part of speech and position of the pronoun in the currently input sentence.
[0026] The LLM prompt word generation module constructs a large model prompt word according to the part of speech of the pronoun identified by the pronoun identification module, and stipulates that the result is represented by json.
[0027] The LLM entity recognition module extracts the entity content that matches the pronoun part of speech in the previous round of input sentences based on the large model prompt words generated by the LLM prompt word generation module.
[0028] In this embodiment, the sentence input in the previous round is "Introduce actor A", then the LLM entity recognition module directly extracts the corresponding entity content (ap_entity) as "actor A" based on the large model prompt word.
[0029] The text rewriting module rewrites the current input text according to the position of the pronoun identified by the pronoun recognition module and the entity content extracted by the LLM entity recognition module, and the output text rewriting result is "I want to watch a movie starring actor A", completing the reference resolution.
Claims
1. A method for short text reference resolution, characterized in that: include: Construct pronoun recognition rules to identify the pronoun part of speech and position for the current input sentence; Based on the identified parts of speech of the pronouns, a large model prompt word is constructed to extract entity content that matches the parts of speech of the pronouns in the previous round of input sentences; The pronouns are replaced based on the identified pronoun positions and the extracted entity contents, and the currently input sentence is rewritten.
2. A method for short text reference resolution according to claim 1, characterized in that: The pronoun recognition rule divides the currently input sentence into different regular expressions and then performs pronoun part of speech and position recognition.
3. The method for short text reference resolution according to claim 1, characterized in that: For different types of pronouns, multiple pronoun identification rules with the same semantics but different word orders are constructed.
4. The method for short text reference resolution according to claim 1, characterized in that: The pronoun identification rule also includes a description of the part of speech of the pronoun.
5. A device for short text reference resolution, used to implement a method for short text reference resolution as claimed in any one of claims 1 to 4, characterized in that: It includes a pronoun recognition module, an LLM prompt word generation module, an LLM entity recognition module and a text rewriting module; The pronoun recognition module is used to recognize the part of speech and position of the pronoun in the current input sentence according to the constructed pronoun recognition rules; The LLM prompt word generation module is used to construct a large model prompt word according to the part of speech of the pronoun identified by the pronoun identification module; The LLM entity recognition module is used to extract entity content that meets the pronoun part of speech in the previous round of input sentences according to the large model prompt word constructed by the LLM prompt word generation module; The text rewriting module is used to rewrite the input text according to the position of the pronoun identified by the pronoun identification module and the entity content extracted by the LLM entity identification module to complete the reference resolution.