Review text-oriented summarization method and device
By employing a relation-aware summarization method, the problem of information overload in functional requirement discussions in open-source software is solved. The method automatically extracts the central sentences and stances of comments, improves the efficiency of comment comprehension, and helps stakeholders quickly identify supporting or opposing viewpoints.
Patent Information
- Application Number
- CN202211347612.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-31
- Publication Date
- 2026-03-03
- Estimated Expiration
- 2042-10-31
AI Technical Summary
In open-source software issue tracking systems, comments during feature requirement discussions are often lengthy and difficult to understand, especially in discussions of complex features. This leads to information overload, and stakeholders have to spend considerable time and effort browsing and summarizing the comments.
A relation-aware summarization method is adopted. By preprocessing the comment text, semantic similarity, argumentation relationship and sentence content similarity are calculated. Combined with a graph ranking model, the sentence with the highest centrality is selected as the summary. Explicit and implicit response relationships are extracted, and the stance of the comment is detected to form the summary.
It effectively extracts the central sentences and stances of comments, reduces information overload, improves the efficiency of comment comprehension, and helps stakeholders quickly identify supporting or opposing viewpoints.
Smart Images

Figure CN115905508B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of computer technology and relates to technologies such as requirements engineering and natural language processing. In particular, it relates to a method and apparatus for summarizing comment text. Background Technology
[0002] The success of a software system depends on the level and quality of service provided to its users. Requirements gathering, the practice of identifying and collecting requirements from stakeholders of the system to be developed, has a significant impact on the overall quality of the requirements engineering process. Content provided by open-source platform users is an important source of knowledge, offering broader prospects for improving software quality. Compared to traditional methods such as user surveys or interviews, applying this information can greatly improve the effectiveness of requirements gathering activities.
[0003] Feature requirements in open-source software issue tracking systems (such as GitHub Issue Tracker, Google CodeIssue Tracker, and Bugzilla) are the most commonly used knowledge source for user-submitted requirements on open-source platforms. After users submit feature requirements, stakeholders follow up on the issues and discuss the target feature through comments. These discussions often become lengthy and difficult to understand as the number of comments increases, especially for complex features that could significantly impact the project. Furthermore, stakeholders in open-source software typically come from diverse backgrounds, often requiring in-depth discussions before reaching a consensus on the target feature, exacerbating information overload in feature requirement discussions. A previous study of 82 GitHub projects showed that each project had an average of over 170 issue reports (including feature requirements), each issue report contained over 20 comments, and an average of 10 participants. A typical feature requirement discussion process involves different stakeholders expressing their stance (support or opposition) on a particular feature requirement through detailed comments. Feature requirements on GitHub are often labeled with tags like "vote required," soliciting stakeholder opinions on whether to accept the feature requirement. In order to conduct effective voting, stakeholders typically need to go through all previous discussions, distinguish comments for / against the feature (position detection), and summarize each side's viewpoint (viewpoint summary), a process that is quite time-consuming and labor-intensive.
[0004] The technologies involved in this invention include position detection technology and text summarization technology.
[0005] 1) The stance detection task aims to automatically identify the author's stance / attitude (support, opposition, or neutrality, etc.) towards a specific proposition, topic, or goal in a text. This task differs from sentiment analysis tasks, which aim to classify texts based on the concept of polarity (positive, negative, or neutral). In texts, sentiment polarity is usually explicitly expressed, while stance polarity relative to the topic is often more abstract and may not be directly mentioned in the text. Sometimes, a text expresses support for the target topic but conveys a negative emotion. Previous research has shown that the correlation between stance and sentiment measures is only 60%.
[0006] 2) In this invention, an extractive summarization method is used to determine the centrality of a sentence to decide whether the sentence should be included in the summary. Traditional graph-based sorting algorithms typically first sort a set of n sentences {s1, s2, ..., s...}. n A document D composed of} is represented as a graph G = (V; E), where V is the set of vertices in the graph, representing sentences in the document; and E is the set of edges in the graph, representing the relationships between sentences in the document. Node pairs <v i ,v j The weight e between > ij This is typically a measure of similarity between two sentences (e.g., the cosine distance between their vector representations). Sentences s i Centrality can be defined as:
[0007]
[0008] These algorithms select the most important sentence (i.e. the sentence with the highest centrality) as the summary, based on the fundamental assumption that the more similar a sentence is to other sentences in the text, the more important it is. Summary of the Invention
[0009] To overcome the shortcomings of existing technologies, this invention proposes a summarization method and apparatus for comment text. This method is a relation-aware approach that combines three relationships between sentences in or within comments to better understand the discussion related to the comment topic.
[0010] The technical content of this invention includes:
[0011] A summarization method for comment text, the method comprising:
[0012] The comment topic and comment text are preprocessed; wherein, the comment topic includes: functional requirements;
[0013] Calculate the semantic similarity between the comment topic and each comment sentence in the comment text;
[0014] Calculate the argumentation relationship between each comment sentence in the comment text; wherein, the argumentation relationship represents the functional role and contribution of the comment sentence in the comment text;
[0015] Calculate the sentence content similarity between the comment sentences in the comment text;
[0016] Based on the semantic similarity, the argumentation relationship, and the sentence content similarity, the centrality of each comment sentence is calculated;
[0017] The comment sentence with the highest centrality is selected as the content summary of the comment text.
[0018] Furthermore, the preprocessing of the comment topics includes:
[0019] Filter comment text that lacks sufficient information;
[0020] Remove HTML tags and unrecognizable garbled characters from the comment text;
[0021] Use the tool Spacy to lowercase and restore the word form of all words in the comment text;
[0022] Replace words with insufficient information using special symbols; wherein, the special symbols include: <ref> 、 <code>and <url>.
[0023] Further, calculating the semantic similarity between the comment topic and each comment sentence in the comment text includes:
[0024] Each comment sentence and comment topic is encoded into a USE vector using a generic sentence encoder.
[0025] Based on the cosine similarity score between the USE vectors, the semantic similarity between the comment topic and each comment sentence is obtained.
[0026] Furthermore, the calculation of the argumentative relationships among the comment sentences in the comment text includes:
[0027] The DiSA model was pre-trained on open-source data provided by existing research.
[0028] A training dataset is built based on the GitHub dataset to fine-tune the pre-trained DiSA model;
[0029] By inputting the comment sentence into the fine-tuned DiSA model, the argument relationship of the comment sentence can be obtained.
[0030] Further, calculating the sentence content similarity between comment sentences in the comment text includes:
[0031] Use a BERT pre-trained model to process comment sentences. i Encoded as a continuous vector representation;
[0032] The similarity between the vector representations is calculated and normalized to obtain the sentence content similarity between the comment sentences.
[0033] Furthermore, the centrality of each of the comment sentences Among them, s i Let λ represent the i-th comment sentence, λ represent the weight, n represent the number of comment sentences, and e represent the weight. ij SSR represents the similarity of sentence content. i Indicating semantic similarity, ar i It indicates an argumentative relationship.
[0034] Furthermore, after selecting the comment sentence with the highest centrality as the content summary of the comment text, the method further includes:
[0035] Calculate the stance of the comment text; wherein, calculating the stance of the comment text includes:
[0036] Based on the preprocessed comment text, extract the reply relationships between the comment texts;
[0037] For each comment text and its reply relationship, a vector representation of the reply relationship is generated based on the comment text, the most recent parent comment text, and the most recent child comment text's commenter role.
[0038] Calculate the vector representation of the comment text, and concatenate the vector representation of the comment text with the vector representation of the corresponding reply relationship to obtain the final vector representation of the comment text;
[0039] The final vector representation is classified to obtain the stance of the comment text.
[0040] Based on the stance and content summary of each comment text, a list of summaries representing different stances on the aforementioned comment topic is generated.
[0041] Furthermore, the step of extracting the reply relationships between the preprocessed comment texts includes:
[0042] Explicit reply relationships between preprocessed comment texts are extracted by matching specific patterns using regular expressions.
[0043] The IRC-Disentanglement model is used to decouple the preprocessed comment text from the dialogue in order to extract the implicit response relationship between the comment texts;
[0044] When a comment text has at least one explicit reply relationship with other comment texts, the explicit reply relationship that is closest in the time dimension is used as the reply relationship between the comment texts;
[0045] When there is no explicit reply relationship between a comment text and other comment texts, the implicit reply relationship is used as the reply relationship between the comment texts;
[0046] If a comment text does not have an explicit or implicit reply relationship with other comment texts, it means that there is no reply relationship between that comment text and other comment texts.
[0047] Furthermore, for each comment text, the reply relationship is generated by generating a vector representation of the reply relationship based on the comment text, the most recent parent comment text, and the most recent child comment text's commenter role, including:
[0048] The commenter roles are obtained from the comment text, the most recent parent comment text, and the most recent child comment text, respectively; wherein, the commenter roles include: the publisher of the functional requirement, a member of the open source software project, a contributor to the open source software project, a collaborator of the open source software project, a regular user without a role, or a reply relationship that is missing;
[0049] Vectorize the commenter roles of the comment text, the most recent parent comment text, and the most recent child comment text to obtain the vector representation r of the current commenter role and the vector representation r of the parent commenter role. p and the vector representation r of the sub-commenter role c ;
[0050] Connect the vector representation r, the vector representation r p and the vector representation r c This yields a vector representation of the response relationship.
[0051] A summarizing device for comment text, characterized in that the device comprises:
[0052] A preprocessing module is used to preprocess the comment topic and comment text; wherein, the comment topic includes: functional requirements;
[0053] A semantic similarity calculation module is used to calculate the semantic similarity between the comment topic and each comment sentence in the comment text;
[0054] An argument relationship calculation module is used to calculate the argument relationship between each comment sentence in the comment text; wherein, the argument relationship represents the function and contribution of the comment sentence in the comment text;
[0055] The sentence content similarity calculation module is used to calculate the sentence content similarity between comment sentences in the comment text;
[0056] The centrality calculation module is used to calculate the centrality of each comment sentence based on the semantic similarity, the argument relationship, and the sentence content similarity.
[0057] The content summary acquisition module is used to select the comment sentence with the highest centrality as the content summary of the comment text.
[0058] A computer device includes a memory and a processor, the memory storing a computer program which is loaded and executed by the processor to implement the above-described summarization method for comment text.
[0059] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-described summarization method for comment text.
[0060] A computer program product, when run on a computer device, causes the computer device to perform the summarization method for comment text as described above.
[0061] Compared with the prior art, the technical advantages of the present invention include:
[0062] 1) Preprocess the comment topics (comment topics and related comments) described by natural language.
[0063] 2) An extraction-based summarization method based on graph sorting is designed to select the sentence with the highest centrality as the summary of each comment. It further combines the semantic relevance of sentences in the current comment to the functional requirements, as well as the argumentation relationship between the sentences in the comment, to better correct the centrality of the summary sentence.
[0064] 3) By extracting the explicit and implicit reply relationships between comments, the stance of the comment text is obtained, and the summaries of the supporting and opposing comments are merged to obtain the summaries of the two stances respectively. Attached Figure Description
[0065] Figure 1 This is the overall flowchart of the present invention. Detailed Implementation
[0066] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only specific embodiments of the present invention, and not all embodiments.
[0067] The objective of this invention is to propose a summarization method for comment texts to detect the stance (support or opposition) of comments on a particular feature and to summarize the viewpoints of different stances.
[0068] The following example uses the functional requirements of an open-source software issue tracking system to illustrate the relevant technologies of this invention. However, it should be understood that the implementation method of this invention is not limited to the functional requirements of an open-source software issue tracking system; methods for summarizing comment text in all fields fall within the scope of protection of this invention.
[0069] The summarization method for comment text of the present invention, such as Figure 1 As shown, it includes the following steps.
[0070] Step 1: Data Preprocessing
[0071] The original feature requirements and related comments on GitHub were written in natural language and submitted by stakeholders from diverse backgrounds. This resulted in the frequent appearance of words / phrases lacking sufficient information in the text, such as repeated quotations of comments, code snippets, and HTML tags. Therefore, this invention requires preprocessing of the feature requirements and related comments.
[0072] First, this invention filters out comments lacking sufficient information, as these comments do not contribute to the expression of viewpoints, such as bot comments and image / GIF comments. It also removes HTML tags and unrecognizable garbled characters from the text. Second, this invention formats noisy words by using the tool Spacy to lowercase and lemmatize all words in the text, thus mitigating the impact of word morphology. Third, this invention replaces words lacking sufficient information with special symbols, as these words may confuse the model during training, for example, using the symbol "". <ref>Replace the quoted text with the symbol " <code>Replace code snippets using symbols. <url>"Replace hyperlink addresses, etc."
[0073] Step 2: Content Summary
[0074] This method performs content summarization in three steps: semantic relevance acquisition, argumentation relationship extraction, and graph-based summary extraction. This invention treats this task as an extractive summarization task, selecting the sentence with the most information as the summary. Specifically, it first acquires the semantic relevance of each sentence in the comment to the functional requirements and extracts the argumentation relationships between sentences in the comment. Then, it combines these with the textual information of each sentence in the comment and integrates them into a graph-based ranking model to extract the summary sentence.
[0075] 1) Semantic relevance acquisition
[0076] Unlike typical summarization tasks, content summarization involves not only the commentary content from which the summary is extracted but also, to some extent, the functional requirements that define the discussion topic. Therefore, the summary should be highly relevant to the proposed functional requirements; sentences that deviate from the functional requirements are unlikely to be summaries. In this regard, this invention obtains the semantic relevance of each sentence in the commentary to the functional description and incorporates it into the summary extraction model to improve performance.
[0077] Specifically, this invention first uses a Universal Sentence Encoder (USE) to encode each comment sentence and feature description into 512-dimensional vectors. USE is a Transformer-based sentence embedding model that captures rich semantic information and has proven to be more effective than traditional word embedding models in many applications. Then, this invention calculates the cosine similarity score between two USE vectors as the semantic relevance between the comment sentence and the feature requirement.
[0078] 2) Extraction of argumentative relationships
[0079] Argumentative relations can measure the functional role and contribution of each sentence within the overall document. A typical classification of argumentative relations includes MajorClaim, Claim, and Premise, where MajorClaim represents the main point, while Premise supports the validity of the Claim. This invention observes that summary sentences often share similar positional patterns with some argumentative relations; for example, summary sentences may appear more frequently at the beginning or end of paragraphs, similar to the positional pattern of MajorClaim. Therefore, this invention takes argumentative relations into account.
[0080] Specifically, this invention applies the DiSA model to identify argument relations in comment sentences, namely MajorClaim, Claim, Premise, and Other. DiSA is designed as a self-attention neural network that uses three sentence positions (local, paragraph, and global) for positional encoding, effectively characterizing the positional features of argument relations (especially effective for MajorClaims, which typically convey the main idea of the text). This invention first pre-trains DiSA on open-source data provided by existing research, and then fine-tunes DiSA using a dataset of approximately 800 comments constructed from an open-source GitHub dataset. This invention uses the fine-tuned model to obtain the probability of predicting the argument relation as MajorClaim to improve summarization performance.
[0081] 3) Graph-based summary extraction
[0082] For each sentence in the comment, this invention obtains the semantic relevance to the functional requirement (denoted as sr) and the argumentative relationship of sentences within the comment (denoted as ar). Then, this invention constructs a graph for the comment, where nodes are sentences in the comment and edges are the similarity between two sentences. Specifically, this invention uses a BERT pre-trained model to encode sentences into continuous vector representations. After normalizing the similarity based on previous research practices to mitigate the influence of absolute value magnitude, this invention obtains sentence s. i and s j Similarity score between ij Finally, sentence s i The centrality is defined as:
[0083]
[0084] In this invention, Considered as s i Semantic similarity between sr and other sentences in the comments; i Considered as s i Semantic relevance to functional requirements; λ represents the weights of the two similarities. The final centrality is the probability ar of the argument relation. i The sentence with the highest center score, calculated by multiplying the sum of the two similarities, will become the summary of the current comment.
[0085] The hyperparameter λ was tuned experimentally on a validation set consisting of comments and corresponding summaries. This invention implements the content summarization module using PyTorch based on the open-source software PACSUM.
[0086] Step 3: Stance Detection
[0087] This method performs stance detection in two steps: reply relationship extraction and polarity classification. Specifically, it first extracts the reply relationships between comments and combines them with the textual information of the comments. Then, it classifies the stance polarity (support or opposition) of each comment by fine-tuning the BERT model.
[0088] 1) Reply Relationship Extraction
[0089] During discussions of functional requirements, the replies between comments often imply shifts in stance during the discussion. Some comments have explicit replies, such as directly quoting someone; meanwhile, stakeholders of open-source software can implicitly reply to others' comments when discussing functional requirements. For both cases, this invention uses pattern matching to extract explicit replies and leverages a dialogue decoupling model to predict implicit replies.
[0090] a) Pattern matching for extracting explicit reply relationships: This invention extracts explicit reply relationships by matching specific patterns using regular expressions. For example, this invention identifies the symbol "@" or prefix symbols of quoted text, and extracts explicit reply relationships by matching usernames or quoted text.
[0091] b) Dialogue Decoupling Model for Predicting Implicit Response Relationships: Dialogue decoupling is a common task in the natural language processing community, used to identify individual dialogues in a message stream. In practice, comments in a dialogue acquire response relationships after decoupling. This invention uses the IRC-Disentanglement model for dialogue decoupling. This model uses a feedforward model based on textual features (e.g., word overlap and context) to predict the respondent in the response relationship by averaging the GloVe vector of each word as the sentence's vector representation. The model was pre-trained using 77,563 messages from the Ubuntu and Linux channels of the online communication platform Internet RelayChat. In the scenario of this invention, all comments related to the functional requirements are considered as input. For each comment, the pre-trained IRC-Disentanglement model predicts the comment most likely to respond to the current comment. Response relationships (even if not 100% accurate) provide more clues for the model to perform stance detection.
[0092] Of the two types of response relations, the extracted explicit response relation has higher priority. When there is a conflict with the extracted implicit response relation, the explicit relation will be retained and the implicit relation will be deleted.
[0093] 2) Polarity classification
[0094] This invention incorporates the reply relationships of comment texts into the BERT model for classifying the polarity of each comment. Each comment, after reply relationship extraction, has a parent comment (the comment currently replying to) and a child comment (the comment replying to the current comment). The first and last comments are special cases, having only one of either a child or a parent comment. Furthermore, this invention observes a high correlation between comment stance and the commenter's role (e.g., Contributor, Collaborator), and stance transitions are usually accompanied by changes in commenter roles. Therefore, this invention utilizes commenter roles to represent reply relationships, specifically the commenter roles of the current comment and the nearest (temporally and spatially closest) parent / child comment to represent the reply relationship. Commenter roles are categorized as follows: Author, Member, Contributor, Collaborator, and None. This invention adds a special label, Null, to mark missing reply relationships. Commenter roles are discrete values; by inputting them into the embedding layer, they can be converted into a continuous vector (r represents the current commenter role, r...). p Indicates the role of the parent commentator, r c (This represents the sub-commenter role). The embedding layer can represent each value with a continuous vector and participate in the joint training of the entire model.
[0095] For each comment, this invention first inputs the comment text into the BERT model to obtain a vector (denoted as v) embedding the comment's semantics. Then, this invention connects... This yields a vector (denoted as v′) that embeds both the semantics of the current comment and the reply relationship. Finally, the concatenated vector v′ is sequentially fed into a dropout layer to avoid overfitting, and a fully connected layer to compute the polarity label (i.e., support / neutral / oppose) probability vector. Since this is a classification task, this invention uses the commonly used cross-entropy as the loss function, defined as:
[0096]
[0097] Where θ is the parameter of the neural network, y i and p i (θ) represents the true polarity label and predicted probability distribution of comment i under parameter θ, respectively.
[0098] This invention uses a greedy strategy to adjust the hyperparameters in the model to obtain optimal performance. Specifically, given a hyperparameter P and its candidate values, this invention performs n iterations of automatic hyperparameter tuning and selects the value that achieves the best performance as the optimal tuning value for P. After tuning, the learning rate is set to 10. -3 The optimizer is the Adam algorithm. This invention uses mini-batch technology to accelerate the training process, with a batch size of 32. The drop rate is set to 0.5, meaning that 50% of neurons will be randomly masked to avoid overfitting. This invention uses PyTorch to implement the stance detection module.
[0099] Step 4: Summary of viewpoints
[0100] Based on the content summary obtained in step 2 and the stance obtained in step 3, the present invention can automate the method to obtain the stance (support or opposition) of comments in the functional requirements on the function, and summarize the viewpoints of different stances to form a summary list of different stances.
[0101] In summary, the final output of this example is a summary of supporting and opposing viewpoints in the discussion related to the feature requirements, to help stakeholders of the open-source software system decide whether to accept the request for the feature or improvement.
[0102] The present invention also discloses a summarizing device for comment text, the device comprising: a preprocessing module, a content similarity calculation module, an argument relationship calculation module, a sentence content similarity calculation module, a centrality calculation module, a content summary acquisition module, and an opinion summary generation module.
[0103] A preprocessing module is used to preprocess the comment topic and comment text; wherein, the comment topic includes: functional requirements;
[0104] The content similarity calculation module is used to calculate the content similarity between the comment topic and each comment sentence in the comment text;
[0105] An argument relationship calculation module is used to calculate the argument relationship between each comment sentence in the comment text; wherein, the argument relationship represents the function and contribution of the comment sentence in the comment text;
[0106] The sentence content similarity calculation module is used to calculate the sentence content similarity between comment sentences in the comment text;
[0107] The centrality calculation module is used to calculate the centrality of each comment sentence based on the content similarity, the argument relationship, and the sentence content similarity.
[0108] The content summary acquisition module is used to select the comment sentence with the highest centrality as the content summary of the comment text.
[0109] For details regarding the specific execution process and beneficial effects of the device module, please refer to the description of the above method embodiments; further details will not be provided here.
[0110] In an exemplary embodiment, a computer device is also provided, the computer device including a memory and a processor, the memory storing a computer program, the computer program being loaded and executed by the processor to implement the above-described summarization method for comment text.
[0111] In an exemplary embodiment, a computer-readable storage medium is also provided, on which a computer program is stored, which, when executed by a processor, implements the summarization method for comment text as described above.
[0112] In an exemplary embodiment, a computer program product is also provided, which, when run on a computer device, causes the computer device to perform the summarization method for comment text as described above.
[0113] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.< / url> < / code> < / ref> < / url> < / code> < / ref>
Claims
1. A review text-oriented summarization method, characterized by, The method comprises: preprocessing the review topic and the review text; wherein the review topic comprises: functional requirements; calculating semantic similarity between the review topic and each review sentence in the review text; calculating argumentation relationship of each review sentence in the review text; wherein the argumentation relationship represents the functional role and contribution of the review sentence in the review text; calculating sentence content similarity between review sentences in the review text; calculating the centrality of each review sentence based on the semantic similarity, the argumentation relationship and the sentence content similarity; selecting the review sentence with the highest centrality as the content summary of the review text; calculating the position of the review text; wherein the calculation of the position of the review text comprises: extracting the reply relationship between the preprocessed review texts; for each review text, generating a vector representation of the reply relationship based on the reviewer role of the review text, the nearest parent review text and the nearest child review text; calculating the vector representation of the review text, and concatenating the vector representation of the review text with the vector representation of the corresponding reply relationship to obtain the final vector representation of the review text; classifying the final vector representation to obtain the position of the review text; based on the position and the content summary of each review text, forming an abstract list facing different positions of the review topic.
2. The method of claim 1, wherein, The preprocessing of the review topic comprises: filtering review texts with insufficient information; deleting HTML tags and unrecognized garbled characters in the review text; using the tool Spacy to lowercase and lemmatize all words in the review text; replacing words with insufficient information amount by special symbols; wherein the special symbols include: <ref> 、 <code>and <url> 。< / url> < / code> < / ref> <code> 3. The method of claim 1, wherein, The calculation of the semantic similarity between the review topic and each review sentence in the review text comprises: using a general sentence encoder to encode each review sentence and the review topic into a USE vector respectively; based on the cosine similarity score between the USE vectors, the semantic similarity between the review topic and each review sentence is obtained.
4. The method of claim 1, wherein, The calculation of the argumentation relationship of each review sentence in the review text comprises: pre-training the DiSA model on open source data provided by existing research; based on the GitHub dataset, a training dataset is constructed to fine-tune the pre-trained DiSA model; input the review sentence into the fine-tuned DiSA model to obtain the argumentation relationship of the review sentence.
5. The method of claim 1, wherein, The calculation of the sentence content similarity between review sentences in the review text comprises: BERT pre-trained model to encode the review sentence s i into a continuous vector representation; calculate the similarity between the vector representations and perform normalization processing to obtain the sentence content similarity between the review sentences.
6. The method of claim 1, wherein, The centrality of each review sentence wherein s i represents the ith review sentence, λ represents a weight, n represents a number of review sentences, e ij represents a sentence content similarity, sr i represents a semantic similarity, ar i represents an argumentation relationship.
7. The method of claim 1, wherein, The extraction of the reply relationship between the preprocessed review texts comprises: extracting the explicit reply relationship between the preprocessed review texts by matching specific patterns through regular expressions; using the irc-disentanglement model to decouple the dialog of the preprocessed review texts to extract the implicit reply relationship between the review texts; In a case where a comment text and other comment texts have at least one explicit reply relationship, using the closest explicit reply relationship in the time dimension as the reply relationship between the comment texts; In a case where a comment text and other comment texts do not have an explicit reply relationship, using the implicit reply relationship as the reply relationship between the comment texts; In a case where a comment text and other comment texts do not have an explicit reply relationship or an implicit reply relationship, indicating that there is no reply relationship between the comment text and other comment texts.
8. The method of claim 1, wherein, The reply relationship for each comment text generates a vector representation of the reply relationship based on the roles of the comment text, the nearest parent comment text, and the nearest child comment text. The roles of the comment text, the nearest parent comment text, and the nearest child comment text are obtained respectively; wherein the roles of the comment text include: the publisher of the functional requirement, the member of the open source software project, the contributor of the open source software project, the collaborator of the open source software project, the ordinary user without a role, or the missing reply relationship. Vectorization of the reviewer role of the comment text, the recent parent comment text, and the recent child comment text to obtain a vector representation r of the current reviewer role, a vector representation r of the parent reviewer role, and a vector representation r of the child reviewer role p c ; connecting the vector representation r, the vector representation r p and the vector representation r c to obtain a vector representation of a reply relationship.
9. A review text-oriented summarization apparatus characterized by comprising: The device comprises: A preprocessing module for preprocessing the comment topic and the comment text; wherein the comment topic includes: functional requirements; A semantic similarity calculation module for calculating the semantic similarity between the comment topic and each comment sentence in the comment text; An argumentation relationship calculation module for calculating the argumentation relationship of each comment sentence in the comment text; wherein the argumentation relationship represents the functional role and contribution of the comment sentence in the comment text; A sentence content similarity calculation module for calculating the sentence content similarity between comment sentences in the comment text; A centrality calculation module for calculating the centrality of each comment sentence based on the semantic similarity, the argumentation relationship, and the sentence content similarity; A content summary acquisition module for selecting the comment sentence with the highest centrality as the content summary of the comment text; calculating the position of the comment text; and forming an abstract list for different positions of the comment topic based on the position and content summary of each comment text. The calculation of the position of the comment text comprises: Extracting the reply relationship between the comment texts based on the preprocessed comment texts; Generating a vector representation of the reply relationship for each comment text based on the roles of the comment text, the nearest parent comment text, and the nearest child comment text; Calculating the vector representation of the comment text and concatenating the vector representation of the comment text with the vector representation of the corresponding reply relationship to obtain the final vector representation of the comment text; Classifying the final vector representation to obtain the position of the comment text. < / code>
Citation Information
Patent Citations
Automatic abstracting method and system based on user comment text feature
CN101667194A
System and method for analyzing network comment relevance
CN102254038A