Text processing method and device, electronic equipment and storage medium
By extracting and clustering the text information, high-quality training data is screened out, which solves the problem of insufficient training data quality in the existing technology and improves the accuracy and efficiency of model training.
Patent Information
- Application Number
- CN202411025328.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-26
- Publication Date
- 2024-12-17
AI Technical Summary
In the field of text processing, the prior art is difficult to effectively improve the quality of training data, especially before NLP model training, insufficient accuracy during the clustering process leads to low quality of training data, which is difficult to meet the model's demand for high-quality data.
By extracting information to the text to be processed, the statement elements of the target role are extracted, and clustered based on these elements to generate cluster data, and then high-quality data used for model training is filtered out through evaluation processing.
It improves the accuracy of clustering and the quality of training data, reduces the probability of grouping errors during clustering, and improves the data quality of model training.
Smart Images

Figure CN119149730A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of text processing, and in particular to a text processing method, device, electronic device and storage medium. Background Art
[0002] NLP (Natural Language Processing) is an important field in the fields of computer science and artificial intelligence. It studies various theories and methods that can achieve effective communication between people and computers using natural language. Before a machine learning model that uses NLP technology is put into downstream tasks in a specific field, it is often necessary to obtain training data in that specific field to train the model. The higher the quality of the training data, the better the training effect of the model. Therefore, in the field of text processing, how to improve the data quality of training data has become a hot research issue. Summary of the invention
[0003] The embodiments of the present application provide a text processing method, device, electronic device and storage medium, which can improve data quality when constructing training data.
[0004] In a first aspect, an embodiment of the present application provides a text processing method, comprising:
[0005] Performing information extraction processing on the text to be processed to obtain sentence elements of the target role in the text to be processed;
[0006] Performing clustering processing according to the sentence elements of the target role to obtain clustering data of the text to be processed;
[0007] The cluster data is evaluated and processed, and training data for model training is screened from the cluster data according to the evaluation result.
[0008] In a second aspect, an embodiment of the present application provides a text processing device, including:
[0009] An extraction unit, used for performing information extraction processing on the text to be processed to obtain sentence elements of the target role in the text to be processed;
[0010] A clustering unit, used for performing clustering processing according to the sentence elements of the target role to obtain clustering data of the text to be processed;
[0011] The screening unit evaluates the cluster data and screens the cluster data to obtain training data for model training according to the evaluation result.
[0012] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor; and a memory configured to store computer-executable instructions, wherein the computer-executable instructions, when executed, cause the processor to execute the text processing method as described in the first aspect.
[0013] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium for storing computer-executable instructions, which, when executed by a processor, implement the text processing method as described in the first aspect.
[0014] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the text processing method as described in the first aspect.
[0015] It can be seen that in the embodiment of the present application, first, the text to be processed is subjected to information extraction processing to obtain the sentence elements of the target role in the text to be processed; then, clustering processing is performed according to the sentence elements of the target role to obtain clustering data of the text to be processed; finally, the clustering data is evaluated and processed, and training data for model training is screened from the clustering data according to the evaluation results. Generally, clustering refers to grouping data with high similarity. In the embodiment of the present application, by extracting and clustering the sentence elements of the target role from the text to be processed, the data in the clustering data that are grouped together due to high similarity can correspond to the same target role. Compared with directly clustering the text to be processed without considering which role the sentence elements belong to, it is more conducive to reducing the probability of grouping errors during clustering and improving the accuracy of clustering. In addition, the training data is screened from the clustering data, so improving the accuracy of clustering is conducive to improving the quality of the training data. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative labor.
[0017] Figure 1 A processing flow chart of a text processing method provided in an embodiment of the present application;
[0018] Figure 2 A processing flow chart of another text processing method provided in an embodiment of the present application;
[0019] Figure 3 A schematic diagram of a text processing device provided in an embodiment of the present application;
[0020] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0021] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments of the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0022] This specification provides a text processing method embodiment:
[0023] Taking the machine learning model that uses NLP technology as an example, during the training phase, the model often requires text data in a specific field to construct training samples. Only then can the trained model achieve good results in specific NLP tasks, for example, more accurate text classification.
[0024] In the process of constructing training data using real texts in a specific field, if we completely rely on manual combing and annotating of each real text in turn, it will be time-consuming, labor-intensive, and inefficient. If we directly perform cluster analysis on the real text to obtain clustering results, and then perform annotation processing based on the clustering results, the efficiency will be significantly improved compared with manual combing. However, considering that the clustering process is to divide text fragments with high similarity into the same group, the diverse expressions of language may sometimes lead to two text fragments with "high similarity" being regarded as two text fragments with essentially the same content, but sometimes the contents of two text fragments with "high similarity" are actually quite different but are mistakenly classified into the same group. Therefore, if annotation processing is performed based on the clustering results, the accuracy of clustering will directly affect the data quality of the constructed training data. If the accuracy of clustering is low, the data quality of the training data constructed based on the clustering results is poor, and it may be difficult to meet the quality requirements of model training for training data.
[0025] Therefore, in order to solve the above problems, an embodiment of the present application provides a text processing method.
[0026] The text processing method provided in one or more embodiments of the present specification may be applicable to an implementation environment of the text processing method, which implementation environment at least includes a server for generating training data.
[0027] The server may be a single server, or a server cluster consisting of several servers, or one or more cloud servers in a cloud computing platform, for generating training data.
[0028] In this implementation environment, in the process of generating training data, the server first performs information extraction processing on the text to be processed to obtain the sentence elements of the target role in the text to be processed; then, clustering processing is performed according to the sentence elements of the target role to obtain clustering data of the text to be processed; finally, the clustering data is evaluated and processed, and training data for model training is obtained from the clustering data based on the evaluation results. Generally, clustering refers to grouping data with high similarity. In the embodiment of the present application, by extracting and clustering the sentence elements of the target role from the text to be processed, the data in the clustering data that are grouped together due to high similarity can correspond to the same target role. Compared with directly clustering the text to be processed without considering which role the sentence elements belong to, it is more conducive to reducing the probability of grouping errors during clustering and improving the accuracy of clustering. In addition, the training data is obtained by screening the clustering data, so improving the accuracy of clustering is conducive to improving the quality of the training data.
[0029] Figure 1 A processing flow chart of a text processing method provided in an embodiment of the present application. Figure 1 The text processing method provided in this embodiment specifically includes steps S102 to S108:
[0030] Step S102: extract information from the text to be processed to obtain sentence elements of the target character in the text to be processed.
[0031] IE (Information Extraction) is an important branch of the field of natural language processing (NLP), which aims to automatically extract useful and structured information from unstructured or semi-structured text data. The goal of information extraction is to convert large amounts of text data into a format that is easy to query and analyze for further processing and application.
[0032] Unstructured means that data or information does not follow a predefined pattern or format and lacks a clear organizational structure, making it difficult to store, retrieve and analyze directly using traditional database management systems or query languages.
[0033] Semi-structured refers to data or information that has a certain organizational structure but does not strictly follow a predefined pattern or format. Semi-structured data is between structured data and unstructured data. It usually contains some tags or metadata to indicate the relationship and hierarchy between data elements, but these tags are not fixed and do not follow a strict database model.
[0034] Structured means organizing data or information into a regular, predefined format, making it easy to store, retrieve, analyze and process. Structured data usually has a clear schema, that is, the organization of the data and the relationship between data elements are predefined.
[0035] Specifically, in the text processing method provided in this embodiment, information extraction processing refers to using information extraction technology to automatically extract information points expressed in a unified form from unstructured or semi-structured text to be processed, and the information points are sentence elements of the target role.
[0036] An information point is a specific element or fragment that can be individually identified and extracted from data or information. It is the basic unit of information and is usually structured. It can be a single value, string, date, entity name, or a more complex structure such as a record, event, relationship, etc.
[0037] The text to be processed may be a document in a first field. The number of the text to be processed may be one or more. The first field may be a predetermined specific field, such as a financial field, a service field, and the like.
[0038] Taking the service field as an example, multiple texts to be processed may include general service guidance documents, complaint handling documents, service transfer documents, and so on.
[0039] It should be noted that the ordinal numbers such as "first" and "second" in this specification are only for the convenience of distinguishing different technical features and have no actual meaning, and will not be elaborated below.
[0040] The text to be processed may include text content related to roles. In each text to be processed, only text content related to one role may be included, or text content related to each role in multiple roles may be included at the same time. Taking the service scenario as an example, roles include but are not limited to agents, customers, technical support personnel, etc.
[0041] For example, the text to be processed 1 is a general service guidance document. The text to be processed 1 includes: If role 1 encounters a question from role 2, it should perform operation A, and can request help from role 3 if necessary. Among them, "If role 1 encounters a question from role 2, it should perform operation A, and can request help from role 3 if necessary" are all text contents related to role 1, "questions from role 2" are text contents related to role 2, and "requesting help from role 3" are text contents related to role 3.
[0042] The target role may refer to any one or more roles involved in the text to be processed. When the text to be processed corresponds to one role, the target role is the role corresponding to the text to be processed. When the text to be processed corresponds to multiple roles, each target role may be any one of the multiple roles, or may be a pre-specified role among the multiple roles.
[0043] Sentence elements refer to the information extraction results obtained by performing information extraction processing on the text to be processed. For example, sentence elements can be entities, relationships, events, attributes, facts, patterns and trends, emotions and opinions, etc.
[0044] Entity refers to an actual object or concept with a specific meaning in a text, which can be clearly identified and classified. Entities can be noun phrases, which represent concrete or abstract things in the real world. For example, entities can be names of people, places, institutions, and so on. For example, assuming that the text to be processed is "User A purchased product B", the entities extracted from the text to be processed may include: "User A" and "Product B".
[0045] Relation refers to the semantic connection or interaction between entities in a text. Event refers to a specific action, occurrence, or state change described in a text. Taking the above text to be processed as an example, the relationship extracted from the text to be processed is as follows: There is a purchase relationship between "User A" and "Product B".
[0046] An event usually involves a set of entities, such as participants, places, time, etc. In addition, events can be classified into different event types. For example, the text to be processed is "Institution B, Location A, released a batch of new products in XXXX year", and the events extracted from the text to be processed can be represented by a set of entities as follows: "XXXX year", "Location A", and "Product Release".
[0047] Attributes refer to the characteristics or properties of extracted entities, such as a person's occupation, the climate of a place, the price of a product, and so on. For example, assuming that the text to be processed is "A is the founder of organization B, he was born at time C and place D", the attributes extracted from the text to be processed include: name, date of birth, place of birth, occupation. Among them, the attribute value of the attribute "name" is "A"; the attribute value of the attribute "date of birth" is "time C"; the attribute value of the attribute "place of birth" is "place D"; the attribute value of the attribute "occupation" is "founder of organization B".
[0048] Facts refer to the combination of entities, relations and events to form factual statements that can be used in knowledge bases or databases. For example, the text to be processed is "In sports meeting B at time A, athlete C won the gold medal in sport event D". The facts extracted from the text to be processed include: event: "athlete C won the gold medal in sport event D"; time: "time A"; location: "sports meeting B", etc.
[0049] Patterns and Trends refers to the identification of patterns and trends by analyzing entities, relationships, and events in large amounts of text data. For example, if the text to be processed is "In the past year, we have noticed that more and more customers have begun to ask about product A", the patterns extracted from the text to be processed include: customers' interest in product A has increased. For another example, if the text to be processed is "According to report A, the sales of product B have continued to decline this quarter", the trends extracted from the text to be processed include: the sales of product B have declined.
[0050] Sentiment and Opinions refer to the sentiment tendencies and opinions in the identified text. For example, if the text to be processed is "I like the taste of this restaurant", the sentiment tendencies extracted from the text to be processed include positive sentiments. For another example, if the text to be processed is "I don't think there will be any good results if Project A continues", the opinions extracted from the text to be processed include: I do not support continuing Project A.
[0051] In this specification, the text processing method is exemplified by sentence elements including one or more of entities, relationships, and events. For other types of sentence elements, please refer to the corresponding description part and will not be described in detail.
[0052] The sentence element of the target role may include one or more of entities, relations, and events related to the target role.
[0053] For example, the name of the target character can be extracted from the text to be processed as an entity, and the name is the entity related to the target character.
[0054] For another example, the name of role A is entity 1, and the name of role B is entity 2. From the text to be processed, the relationship between entity 1 and entity 2 can be extracted: consulting relationship. When the target role includes role A or role B, the "consulting relationship" belongs to the relationship related to the target role.
[0055] For another example, event 1 can be extracted from the text to be processed: character C performs operation A at time T1 and location X. When the target characters include character C, event 1 is an event in which the target character participates, that is, an event related to the target character.
[0056] The number of sentence elements of the target role can be one or more.
[0057] In the case where the sentence elements include entities, the information extraction process may include NER (Named Entity Recognition) processing. Named entity recognition refers to identifying some meaningful words in the text, such as names of people, places, and institutions.
[0058] The information extraction process is performed on the text to be processed to obtain the sentence elements of the target role in the text to be processed, which can be performed on the text to be processed to obtain the entity of the target role in the text to be processed. The entity of the target role is the aforementioned entity related to the target role.
[0059] In the case where the sentence elements include relations, the information extraction process may include RE (Relation Extraction) processing. Relation extraction refers to identifying entities with relations in the text and the relations between them. For example, address 1 in the text to be processed is a district-level address information, and address 2 in the text to be processed is a street-level address information. The district level is greater than the street level. Through the relationship extraction process, it can be identified that address 1 and address 2 are entities with relations, and there is a "containment relationship" between address 1 and address 2.
[0060] The information extraction process is performed on the text to be processed to obtain the sentence elements of the target role in the text to be processed, and the relationship of the target role in the text to be processed can be obtained by performing relationship extraction on the text to be processed. The relationship of the target role is the aforementioned relationship related to the target role.
[0061] In the case where the sentence elements include events, the information extraction process may include EE (Event Extraction) processing. Event extraction refers to identifying events and related arguments in the text. Events generally have event trigger words, and event arguments are some entities that describe the event.
[0062] The information extraction process is performed on the text to be processed to obtain the sentence elements of the target role in the text to be processed, which can be performed on the text to be processed to obtain the events of the target role in the text to be processed. The events of the target role are the aforementioned events related to the target role.
[0063] In a specific implementation, information extraction is performed on the text to be processed to obtain sentence elements of the target role in the text to be processed, including: information extraction is performed on the text to be processed through a text processing model to obtain sentence elements belonging to the target role in the text to be processed.
[0064] In specific implementation, the target role can be determined in advance and the identification information of the target role can be obtained. The identification information of the target role and the text to be processed are input into the text processing model for information extraction to obtain the sentence elements belonging to the target role in the text to be processed.
[0065] The identification information of the target role is used to instruct the text processing model to perform information extraction processing on the entities of the target role, the relationships between entities, and the events in which the target role participates.
[0066] The text processing model can be any model with information extraction capabilities. For example, the text processing model can be a machine learning model, which can learn how to extract information from text through training data. Or, the text processing model can be a pre-trained language model, which is pre-trained on a large text corpus and can capture rich language features, etc.
[0067] In a specific implementation, a text processing model includes a sentence element extraction model and a role identification model; information extraction is performed on the text to be processed through the text processing model to obtain sentence elements belonging to a target role in the text to be processed, including: inputting the text to be processed into the sentence element extraction model for extraction processing to obtain extraction results of sentence elements in the text to be processed; sentence elements include one or more of entities, relationships between entities, and events in which roles participate; inputting the text to be processed and the extraction results into the role identification model for role identification processing to obtain role identification results of the text to be processed; and determining sentence elements belonging to the target role in the text to be processed based on the sentence element extraction results and the role identification results.
[0068] The text processing model may include a sentence element extraction model and a role recognition model, and the input of the role recognition model includes the output of the sentence element extraction model.
[0069] The sentence element extraction model can be a text classification model obtained by inputting the labeled data into a pre-trained language model for training, and the role recognition model can be another text classification model obtained by inputting the labeled data into a pre-trained language model for training. Considering the different functions of the sentence element extraction model and the role recognition model, the two models use different labeled data during the training process.
[0070] The annotation data may include text and label information corresponding to the text.
[0071] Exemplarily, the pre-trained language model may be a roberta model.
[0072] The text to be processed is input into a sentence element extraction model for extraction processing to obtain the extraction results of sentence elements in the text to be processed; sentence elements include one or more of entities, relationships between entities, and events in which roles participate.
[0073] The extraction results of sentence elements may include one or more of entity recognition results, relationship extraction results, and event extraction results.
[0074] When sentence elements include entities, relationships between entities, and events in which characters participate, in order to enable the sentence element extraction model to simultaneously extract entities, relationships, and events using only one model, the start and end indexes of the entities, the start and end indexes of the relationships, and the start and end indexes of the events can be marked in the process of constructing the training samples for the sentence element extraction model. Then, the marked data can be input into the sentence element extraction model obtained by training the pre-trained language model. Then, the sentence element extraction model can be used to extract the entities, relationships, and events in the text to be processed.
[0075] The extraction process may include one or more of: named entity recognition, relationship extraction, and event extraction.
[0076] The following uses sentence elements including entities as an example to illustrate the extraction process of the sentence element extraction model. For other types of sentence elements, refer to the corresponding description part of the entity:
[0077] In specific implementation, the text to be processed is input into a sentence element extraction model for extraction processing to obtain the extraction result of the sentence elements in the text to be processed. The text to be processed can be input into a sentence element extraction model for named entity recognition to obtain one or more entities in the text to be processed, and the one or more entities are used as the extraction result of the entities in the text to be processed.
[0078] The text to be processed is input into a sentence element extraction model for extraction processing to obtain the extraction result of the sentence elements in the text to be processed. Alternatively, the text to be processed is input into a sentence element extraction model for named entity recognition to obtain one or more entities in the text to be processed, and the number of times each entity appears in the text to be processed is statistically processed. Based on the statistical results and a preset number threshold, the high-frequency entities in the text to be processed are determined, and the high-frequency entities are used as the extraction results of the entities in the text to be processed.
[0079] For example, the text to be processed is divided into four queues, each queue includes corresponding regular business documents, complaint handling documents, and business transfer documents. The full text of 12 documents is input into the sentence element extraction model for named entity recognition to obtain multiple entities. The number of hits of the entities is counted. If the number of hits is greater than the preset threshold, the entity can be determined as a high-frequency entity, and the high-frequency entity is used as the extraction result of the entity in the text to be processed.
[0080] The text to be processed and the extraction result are input into the role recognition model for role recognition processing to obtain the role recognition result of the text to be processed.
[0081] Role recognition processing usually refers to identifying and classifying the roles played by various participants (such as people, organizations, entities, etc.) in text or conversations in the fields of text analysis, natural language processing, or social network analysis. This processing can help understand the content of text, the structure of conversations, or the interaction patterns in social networks.
[0082] In the case that the text to be processed is a document, the text to be processed may include the document name and the document content.
[0083] In the text processing method provided in this embodiment, the role recognition result may include one or more roles in the text to be processed, and may also include the behavior or attitude of each role.
[0084] "Role" refers to a specific role played in a conversation or interaction. In specific implementation, different roles can be distinguished by identity information such as occupation, age, education background, place of residence, social relations, etc. For example, in the text to be processed 1, role 1 is a seat and role 2 is a customer. In the text to be processed 2, role 1 is a middle school student and role 2 is a teacher. In the text to be processed 3, role 1 is a local resident and role 2 is a tourist.
[0085] The role recognition result may be a phrase obtained by concatenating the role and the behavior or attitude of the role.
[0086] For example, role identification result 1 is: customer agrees. Role identification result 2 is: agent answers. Role identification result 3 is: tourist asks for directions, and so on.
[0087] In the process of role identification, the role identification model may preferentially check the subtext at a specified position in the text to be processed, for example, the document name of the text to be processed, or the subtext at a first preset position in the document content of the text to be processed. The subtext at the specified position may be used as reference information when the role identification model performs role identification.
[0088] During the role identification process, the role identification model may combine the subtext at the specified position with the high-frequency entities in the aforementioned extraction results as reference information.
[0089] For example, the sub-text at the specified position includes the first two paragraphs of sub-text of the text to be processed, the extraction result includes the high-frequency entities in the text to be processed, the high-frequency entities that have appeared at least once in the first two paragraphs of sub-text of the text to be processed are determined, and the target high-frequency entity is obtained. The role recognition model performs role recognition processing based on the target high-frequency entity and the first two paragraphs of sub-text to obtain the role recognition result of the text to be processed.
[0090] Considering that the role recognition model can be a text classification model obtained by training the labeled data into a pre-trained language model, the role recognition process can include a text classification process.
[0091] In a specific implementation, the text to be processed and the extraction results are input into a role recognition model for role recognition processing to obtain a role recognition result of the text to be processed. The text to be processed and the extraction results are input into a role recognition model for text classification processing to obtain a classification result. The classification result includes one or more roles in the text to be processed. For each role, the complete content related to the role is obtained in the document content of the text to be processed by completing sentence components, limiting the logical relationship between the previous and next sentences, etc. The behavior or attitude of the role is determined based on the complete content related to the role, and then the role recognition result can be generated based on each role and the behavior or attitude of the role.
[0092] For example, in the process of performing role identification processing based on the text to be processed and the extraction result, the role identification model may perform the following operations:
[0093] (1) Determine which roles are involved in the text to be processed, for example, customers and agents.
[0094] (2) Determine the role corresponding to each sub-text of the text to be processed by completing sentence components and limiting the logical relationship between the previous and next sentences.
[0095] The text to be processed may include multiple sub-texts.
[0096] Sentence component completion means that, considering the content of the document, in order to keep the narrative concise, the repetition of the narrative subject may be reduced, so the narrative subject, that is, the role, needs to be completed.
[0097] The logical relationship between the preceding and following sentences refers to the conjunctions used to indicate the logic of the preceding and following sentences. Specifically, the conjunctions include conjunctions and conjunction adverbs, such as: because, so; not only, but also. The narrative subjects before and after the paired conjunctions are generally the same, so when completing one, you need to fill in the missing one based on the other.
[0098] (3) Generate phrases that represent the behavior / attitude of the subject role based on the subtext.
[0099] According to each sub-text, a phrase representing the behavior or attitude of the subject character of the sub-text can be generated.
[0100] In linguistics, the subject is one of the core components of a sentence or clause, which usually performs or assumes the action or state described by the predicate in the sentence. The subject plays an important role in the grammatical structure, and together with the predicate, it forms the basic framework of the sentence.
[0101] In active voice sentences, the subject is usually the doer of the action. In sentences describing a state or property, the subject is the bearer of the state or property. The subject is usually the logical starting point of the sentence, which guides the reader or listener to understand the theme or focus of the sentence.
[0102] The subject role of a subtext is the role corresponding to the subject of the subtext.
[0103] For example, subtext 1 is: Role A invites Role B to a party. In this subtext 1, Role A is the subject role.
[0104] For another example, subtext 2 is: The customer is very dissatisfied with the solution proposed by the agent. In this subtext 2, the role "customer" is the subject role.
[0105] (4) Concatenate the subject role with the phrase representing the subject role’s behavior / attitude to obtain the role recognition result.
[0106] That is, the role recognition result output by the final role recognition model includes both the role and the role's behavior or attitude.
[0107] For example, role 1 is an agent, and role 2 is a customer. The role identification result of sentence 1 is: the agent asks. The role identification result of sentence 2 is: the customer agrees. The role identification result of sentence 3 is: the agent reminds. The role identification result of sentence 4 is: the customer objects, and so on.
[0108] The reason why the phrase obtained by splicing the role and the role's behavior or attitude is used as the role identification result is that the subject of the sub-text may be a role, but the sentence elements in the sub-text may involve more than one role.
[0109] For example, subtext 1 is: The customer cannot accept the solution given by the agent.
[0110] In this subtext 1, the customer is the subject role, and the role identification result is that the customer disagrees. In this subtext, "solution" is the sentence element corresponding to the agent, not the sentence element corresponding to the customer.
[0111] By utilizing the role recognition results that include both the role and the role's behavior or attitude, it is possible to more accurately determine to which role each sentence element in a sub-text belongs when a sub-text involves multiple roles, rather than simply determining that the subject role of a sub-text is a certain role and then determining that all sentence elements appearing in the sub-text are sentence elements belonging to that role.
[0112] According to the sentence element extraction results and the role recognition results, the sentence elements belonging to the target role are determined in the text to be processed. This can be done by determining the sentence elements belonging to the target role in each sub-text in the text to be processed based on the role recognition results and the sentence element extraction results of the sub-text.
[0113] In a specific implementation, the text to be processed includes a first text to be processed and a second text to be processed; the extraction results include the extraction results of sentence elements in the first text to be processed and the extraction results of sentence elements in the second text to be processed; after the text to be processed is input into a sentence element extraction model for extraction processing to obtain the extraction results of sentence elements in the text to be processed, the text processing method also includes: inputting the extraction results of sentence elements in the text to be processed into a relationship recognition model for relationship recognition to obtain the relationship recognition results between the first text to be processed and the second text to be processed; according to the sentence element extraction results and the role recognition results, determining the sentence elements belonging to the target role in the text to be processed, including: according to the sentence element extraction results, the role recognition results and the relationship recognition results in the text to be processed, determining the sentence elements of the target role in the first text to be processed and the second text to be processed.
[0114] In this implementation, the text processing model may include a sentence element extraction model, a role recognition model, and a relationship recognition model. The input of the role recognition model includes the output of the sentence element extraction model, and the input of the relationship recognition model includes the output of the sentence element extraction model.
[0115] The sentence element extraction model can be a text classification model obtained by inputting labeled data into a pre-trained language model for training, the role recognition model can be another text classification model obtained by inputting labeled data into a pre-trained language model for training, and the relationship recognition model can be another text classification model obtained by inputting labeled data into a pre-trained language model for training.
[0116] Taking into account the different functions of the sentence element extraction model, role recognition model and relationship recognition model, the three models use different labeled data during the training process.
[0117] There may be multiple texts to be processed, and each text to be processed may be a document.
[0118] The first to-be-processed text may be a document, and the second to-be-processed text may be another document. In this implementation, two to-be-processed texts are used as an example for illustrative description. If the number of to-be-processed texts is greater than two, the corresponding description part may be referred to.
[0119] Relation identification can be a text classification process.
[0120] The extraction results of sentence elements in the text to be processed are input into the relationship recognition model for relationship recognition to obtain the relationship recognition result between the first text to be processed and the second text to be processed. The extraction results of sentence elements in the first text to be processed and the extraction results of sentence elements in the second text to be processed can be input into the relationship recognition model for text classification processing to obtain the classification result, and the classification result is used as the relationship recognition result describing the relationship between the first text to be processed and the second text to be processed.
[0121] Considering that in a document, high-frequency entities can reflect the content of the document and play an important role in determining the relationship between documents, the relationship recognition model can use the high-frequency entities in the extraction results of the sentence elements of two documents as a reference for determining the relationship between the two documents during the text classification process.
[0122] The relationship recognition result between the first to-be-processed text and the second to-be-processed text may be a parallel relationship, a succession relationship, etc. A parallel relationship means that the two to-be-processed texts will not be used at the same time, and a succession relationship means that the former document is used first, and then the latter document is used.
[0123] For example, the text to be processed in the service domain is input into the relationship recognition model.
[0124] There are 12 documents to be processed in this service area, and the 12 documents to be processed are divided into 4 queues. Each queue includes corresponding general service guidance documents, complaint handling documents, and service transfer documents.
[0125] After text classification, the relationship recognition model can determine that: the regular service guidance documents of any two of the four queues are in a parallel relationship; the complaint handling documents of any two of the four queues are in a parallel relationship; the service transfer documents of any two of the four queues are in a parallel relationship; the relationship between the complaint handling documents and service transfer documents of the same queue is a succession relationship.
[0126] If there is a parallel relationship between the first text to be processed and the second text to be processed, for the same role, the sentence elements such as entities, relationships, and events corresponding to the role in the two texts to be processed are similar, but there may be some differences.
[0127] For example, the first text to be processed is the M0 general service guidance document, and the second text to be processed is the M1 general business guidance document. The first text to be processed and the second text to be processed are in parallel. M0 represents the first scenario, the time point of which is earlier than the customer's appointment date, and the customer will receive a reminder from the agent for the designated service. M1 represents the second scenario, the time point of which exceeds the customer's appointment date and the customer has not applied for the designated service.
[0128] The first text to be processed and the second text to be processed are both related to the business guidance process, but belong to different scenarios.
[0129] The entity, relationship, event and other sentence elements of the role "seat" in the first and second texts to be processed are similar, but there are certain differences. The difference lies in whether the customer has failed to handle the designated service. In the first text to be processed, the customer is a first-type customer, and the relationship between the customer and the designated service is that the customer is making an appointment; in the second text to be processed, the customer is a second-type customer, and the relationship between the customer and the designated service is that the customer has missed the appointment and needs to reapply.
[0130] If there is a connection relationship between the first text to be processed and the second text to be processed, then for the same role, the sentence elements such as entities, relationships, and events corresponding to the role in the two texts to be processed may have the same parts or different parts.
[0131] For example, the first pending text is the M0 complaint handling document, and the second pending text is the M0 service transfer document. There is a connection relationship between the first pending text and the second pending text. M0 represents the first scenario, which is earlier than the customer's appointment date. At this time, the customer will receive a reminder from the agent for the specified service.
[0132] The entities belonging to the role "seat" in the first to-be-processed text include: complained seat, transferred seat, and customer. The relationships belonging to the role "seat" in the first to-be-processed text include: the complained seat and the customer are in a complaint relationship, and the transferred seat and the customer are in a comfort relationship. The events belonging to the role "seat" in the first to-be-processed text include: the role "customer" complains about the role "complained seat".
[0133] The entities belonging to the role "seat" in the second text to be processed include: seat before transfer, seat after transfer, and customer. The relationships belonging to the role "seat" in the second text to be processed include: the service relationship between the seat before transfer and the customer, and the service relationship between the seat after transfer and the customer. The events belonging to the role "seat" in the second text to be processed include: the service of the seat before transfer.
[0134] According to the extraction results of sentence elements in the text to be processed, the role recognition results and the relationship recognition results, the sentence elements of the target role are determined in the first text to be processed and the second text to be processed.
[0135] In the process of determining the sentence elements of the target role, the relationship recognition results can be used as a partial reference. For example, the relationship recognition results between the first text to be processed and the second text to be processed can determine that the first text to be processed and the second text to be processed both focus on describing the first service. Therefore, the description content of the second service appearing in the first text to be processed does not need to be analyzed in detail.
[0136] In a specific implementation method, the extraction results of sentence elements in the text to be processed are input into a relationship recognition model for relationship recognition to obtain the relationship recognition result between the first text to be processed and the second text to be processed, including: inputting the extraction results of sentence elements in the text to be processed into the extraction submodule in the relationship recognition model for feature phrase extraction processing to obtain the target feature phrases in the first text to be processed and the second text to be processed; inputting the target feature phrases in the first text to be processed and the second text to be processed into the calculation submodule in the relationship recognition model for distance calculation processing to obtain the distance information between the first text to be processed and the second text to be processed; inputting the distance information into the classification submodule in the relationship recognition model for classification processing to obtain the relationship recognition result between the first text to be processed and the second text to be processed.
[0137] In this implementation, two texts to be processed, namely the first text to be processed and the second text to be processed, are taken as an example for illustrative description. If the number of texts to be processed is greater than two, refer to the corresponding description part.
[0138] The relationship recognition model may include an extraction submodule, a calculation submodule and a classification submodule connected in series in sequence. The input of the calculation submodule includes the output of the extraction submodule, and the input of the classification submodule includes the output of the calculation submodule.
[0139] The text to be processed may include the document name and the document content.
[0140] The extraction submodule can perform feature phrase extraction processing on the document name and / or document content of the first text to be processed in combination with the extraction result of the sentence elements of the first text to be processed to obtain the target feature phrases in the first text to be processed.
[0141] The extraction submodule can perform feature phrase extraction processing on the document name and / or document content of the second text to be processed in combination with the extraction result of the sentence elements of the second text to be processed to obtain the target feature phrases in the second text to be processed.
[0142] A feature phrase can be a specific phrase used to describe or distinguish text, sentences or language phenomena. A feature phrase can be used to capture certain characteristics, themes, sentiment tendencies or semantic information of a text.
[0143] The extraction submodule can extract the corresponding target feature phrase from each text to be processed.
[0144] The calculation submodule may perform distance calculation processing based on target characteristic phrases in the first text to be processed and the second text to be processed to obtain distance information between the first text to be processed and the second text to be processed.
[0145] In specific implementation, the target feature phrase in the first text to be processed can be encoded as a first vector, and the target feature phrase in the second text to be processed can be encoded as a second vector, and then the vector distance is calculated based on the first vector and the second vector, and the vector distance is used as the distance information between the first text to be processed and the second text to be processed.
[0146] The classification submodule can perform text classification processing according to the distance information between the first text to be processed and the second text to be processed to obtain a classification result, which is a relationship recognition result between the first text to be processed and the second text to be processed.
[0147] For example, the first text to be processed is the M1 general service guidance document, and the second text to be processed is the M2 general service guidance document. The document names of the first text to be processed and the second text to be processed are similar, and the value of the distance information between the first text to be processed and the second text to be processed is small. The classification submodule can determine that there is a parallel relationship between the first text to be processed and the second text to be processed based on the distance information.
[0148] For another example, the business side determines the order of business processes according to the actual situation. For example, business development precedes complaint handling, and each business process is assigned a unique number: business development number 1; complaint handling number 2. The number of the previous business is smaller than the number of the next business, and the number of the previous process minus the number of the next process equals 1. When determining the continuation relationship, the classification submodule needs to split the words and compare the document names. If the distance between the two documents = -1 or 1, then it is a continuation relationship. Specifically, if it is equal to -1, the former is before the latter, and if it is equal to 1, the latter is better than the former.
[0149] a) Document name 1 of the document to be processed 1 = keyword 1 + keyword 2 + keyword 3;
[0150] b) Document name 2 of the text to be processed 2 = keyword 1' + keyword 2' + keyword 3';
[0151] If keyword 1 = keyword 1', keyword 2 = keyword 2', keyword 3-keyword 3'=-1, then document name 1-document name 2=-1, the classification submodule can determine that the text to be processed 1 and the text to be processed 2 have a connection relationship based on the distance information, and the text to be processed 1 comes first and the text to be processed 2 comes later.
[0152] In addition, different weight parameters can be assigned to the distance information between the document names of the first text to be processed and the second text to be processed, as well as the distance information between the document contents, and then the distance information between the document names and the distance information between the document contents are weightedly summed to obtain the comprehensive distance information between the first text to be processed and the second text to be processed. Classification processing is performed based on the comprehensive distance information to obtain the relationship recognition result between the first text to be processed and the second text to be processed.
[0153] Step S104, clustering processing is performed according to the sentence elements of the target role to obtain clustering data of the text to be processed.
[0154] The clustering data of the text to be processed may be native clustering data or non-native clustering data.
[0155] Clustering is an unsupervised learning technique that divides objects in a data set into several groups or classes so that objects in the same group are similar to each other, while objects in different groups are as different as possible. Cluster analysis is an important research field in data mining, pattern recognition, machine learning, and statistics, and is widely used in market research, image processing, bioinformatics, social network analysis, and other fields. In simple terms, clustering can be understood as grouping data with high similarity into a group.
[0156] According to the sentence elements of the target role, clustering is performed in an interception manner to obtain native clustering data of the text to be processed.
[0157] In specific implementation, the text to be processed can be intercepted and concatenated according to the sentence elements of the target role to obtain a phrase set, which includes multiple phrases, each phrase corresponding to one or more sentence elements of the text to be processed. The phrase set is clustered to obtain native clustering data of the text to be processed.
[0158] The number of target roles can be one or more. When the number of target roles is more than one, for each target role, the aforementioned step of "clustering the sentence elements of the target role to obtain cluster data of the text to be processed" is performed respectively.
[0159] The phrase set is clustered to obtain native clustering data of the text to be processed. The phrases with high semantic similarity in the phrase set can be grouped together to obtain multiple groups of native clustering data of the text to be processed.
[0160] Since each phrase in the phrase set corresponds to a sentence element in the text to be processed, and each sentence element belongs to the target role, the data used for clustering are all derived from the data related to the target role in the text to be processed, which is conducive to making the clustering data consistent with the semantics of the text to be processed and making the clustering data consistent with the logic of the text to be processed.
[0161] For example, entities belonging to the role of "seat" include entity 1, entity 2, and entity 3, relationships belonging to the role of "seat" include relationship 1 and relationship 2, and events belonging to the role of "seat" include event 1, event 2, and event 3.
[0162] Entities belonging to the role of “customer” include entity 4 and entity 5, relationships belonging to the role of “customer” include relationship 3 and relationship 4, and events belonging to the role of “customer” include event 4 and event 5.
[0163] Assuming that the target role is the role of "agent", the data used for clustering are all derived from sentence elements such as entities, relationships, events, etc. belonging to the role of "agent", which can avoid splicing sentence elements of different roles to obtain clustering data that is inconsistent with the semantics or logic of the text to be processed.
[0164] Determining the sentence elements of the target role first and then clustering them, rather than ignoring the differences between the roles and directly processing the text clustering, can avoid the situation in the clustering process where the phrases obtained by putting together what role A and role B do are inconsistent with the semantics or logic of the original text.
[0165] For example, role A is an agent, role B is a customer, and in the text to be processed, role B complains about role A to institution A. If the text to be processed is clustered directly, the things done by role A and role B may be put together during the clustering process, and it becomes role A complaining about role B, which is inconsistent with the logic of the text to be processed.
[0166] According to the sentence elements of the target role, clustering is performed in a disordered manner, so that non-native clustering data of the text to be processed can be obtained.
[0167] The sentence-making raw materials used by the native clustering data and the non-native clustering results may include sentence elements from the target role in the text to be processed, for example, entities, relations, events, etc. belonging to role 1.
[0168] Native clustering refers to clustering data that is formed by directly extracting fragments from the text to be processed, and the fragments may include two or more words.
[0169] Non-native clustering means that the raw materials for sentence formation also include phrases outside the text to be processed, that is, the clustering data is not directly extracted from the text to be processed, but is freely combined with phrases outside the text to be processed.
[0170] For example, non-native clustering data includes "agents can adopt preset service methods", where "agent" is an entity in the text to be processed and other words are freely generated.
[0171] In a specific implementation method, clustering processing is performed according to the sentence elements of the target role to obtain clustering data of the text to be processed, including: determining the first word to be replaced in the sentence elements of the target role according to the word mapping relationship; replacing the first word with the second word to obtain an intermediate element set; the second word is a word indicated in the word mapping relationship and has a mapping relationship with the first word; clustering processing is performed on the intermediate element set to obtain clustering data of the text to be processed.
[0172] This implementation method exemplifies a process of generating non-native clustering data.
[0173] The second word is a word indicated in the word mapping relationship and having a mapping relationship with the first word.
[0174] The word mapping relationship includes one or more pre-configured word pairs, each of which includes a first word and a second word having a mapping relationship with the first word. The first word is a word that appears at least once in the text to be processed, and the second word is a word outside the text to be processed.
[0175] The text similarity between the first word and the second word may be less than or equal to a preset similarity threshold.
[0176] In specific implementation, the first word and the second word may be synonyms, near-synonyms, have a hyponymous relationship, and so on.
[0177] Determine the first word to be replaced in the sentence element of the target role according to the word mapping relationship, which can be based on the sentence element of the target role. Query whether there is a first word identical to the sentence element in the word mapping relationship. If so, determine the sentence element as the first word to be replaced.
[0178] For example, the word mapping relationship includes a word pair (A1, A2), a word pair (B1, B2), a word pair (C1, C2), etc. The sentence element of the target role includes B1. According to B1, query processing is performed in the word mapping relationship, and it is determined that there is a first word B1 that is the same as the sentence element, then the sentence element B1 is determined as the first word to be replaced.
[0179] The first word is replaced by the second word to obtain an intermediate element set. The intermediate element set includes one or more intermediate elements, each of which is obtained by replacing the first word with the second word.
[0180] Clustering the intermediate element set to obtain cluster data of the text to be processed may include firstly performing random order processing on the intermediate element set, and then clustering the random order processed intermediate element set to obtain cluster data of the text to be processed.
[0181] It should be emphasized that, in the conventional sense, text clustering refers to the process of grouping a set of text data according to the similarity of their content or features. It can be seen that the "clustering" operation itself cannot be used independently to expand the amount of data, but generating clustering data of the text to be processed through this implementation method is helpful for the subsequent expansion of the amount of training data. The reasons are as follows: if the sentence elements of the target role are directly clustered, no new text data is added during the clustering process, so the amount of data cannot be expanded. However, in this implementation method, before clustering, the first word to be replaced in the sentence elements of the target role is determined according to the word mapping relationship, and then the second word is used to replace the first word to obtain a set of intermediate elements for clustering. That is, in this implementation method, the amount of text data participating in clustering is expanded by word replacement before clustering. Therefore, in the process of constructing training data, if the clustering data of the text to be processed is generated through this implementation method, it is conducive to the rapid expansion of training data.
[0182] Step S106: evaluating the cluster data, and selecting training data for model training from the cluster data according to the evaluation results.
[0183] The training data in this step may be training data of a machine learning model using NLP technology.
[0184] Before a machine learning model that uses NLP technology is put into downstream tasks in a specific field, in order to ensure the training effect of the model, it is often necessary to obtain training data in the specific field to train the model.
[0185] In specific implementation, an evaluation method for cluster data can be pre-configured, and the cluster data can be evaluated and processed by the evaluation method to obtain evaluation scores of the cluster data. Then, the evaluation scores are sorted, and training data for model training is screened from the cluster data according to the sorting results.
[0186] The evaluation score of clustering data may include evaluation scores of one or more dimensions, and each dimension may be pre-configured with corresponding weight parameters. For different machine learning models, the training requirement information of the machine learning model may be obtained, and the weight parameters of each dimension may be adjusted based on the training requirement information of the machine learning model, and then the evaluation scores of each dimension may be weighted and summed using the adjusted weight parameters of each dimension to obtain a comprehensive evaluation score of the clustering data, and the comprehensive evaluation scores may be sorted, and training data for model training of the machine learning model may be screened from the clustering data according to the sorting results.
[0187] For example, the training requirements of the first model have higher requirements for the first dimension and lower requirements for the second dimension, then the initial values of the weight parameters of the first dimension and the second dimension are updated according to the training requirements of the first model.
[0188] The reason for selecting training data from clustering data is that model training requires a large amount of labeled data, but if the unorganized and disorganized text data is manually labeled, it will be time-consuming, labor-intensive, and inefficient. Clustering can be understood as grouping data with high similarity. Therefore, data grouped into a group by clustering can be labeled with the same label, which helps to reduce the subsequent labeling workload. In addition, using the evaluation results of clustering data to select training data from clustering data is conducive to selecting a part of text data with better data quality from the clustering data as training data, and discarding the remaining text data with poor data quality, thereby improving the data quality of the training data.
[0189] In a specific implementation, the clustering data is evaluated and processed, including: performing text enhancement processing on the clustering data; and performing evaluation processing on the enhanced clustering data.
[0190] Perform text enhancement on clustered data.
[0191] A small change in the text may bring about a change in semantics. Text enhancement can be understood as changing the text content while keeping the semantics of the tag unchanged.
[0192] Text enhancement can be achieved through back translation, random word replacement, non-core word replacement, context-based text enhancement, and so on.
[0193] For evaluating the cluster data after the enhancement processing, reference may be made to the corresponding description of evaluating the cluster data mentioned above.
[0194] First clustering is performed, then text enhancement is performed, and then training data is obtained by screening. On the one hand, text enhancement can quickly expand the amount of data while keeping the semantics unchanged. On the other hand, the quality of the data after expansion may be uneven. Through screening, a part of the enhanced clustered data with relatively good quality can be obtained as training data.
[0195] In a specific implementation, text enhancement processing is performed on the cluster data, including: splicing the cluster data and preset prompts to obtain spliced data corresponding to the cluster data; inputting the spliced data into a text generation model for text generation processing to obtain enhanced cluster data.
[0196] The text generation model can be a language model applied to the field of natural language processing and using artificial intelligence technology, for example, the GPT-3 (Generative Pre-trained Transformer-3) model, and the like.
[0197] The text generation model can complete various tasks like a "human", for example, writing emails, creating copywriting, translating, and even programming during a conversation. The principle behind it can be understood as "condensing" all kinds of human knowledge into a data file. When a person talks to a big model, the text of the question asked by the person is essentially sent to the server where the big model is located. The server gives the text of the question to the big model's data file for calculation. This calculation process can be called reasoning. The result of the reasoning is that the big model generates a paragraph of answer text, and the server sends this text back to the questioner.
[0198] In essence, the working principle of the text generation model is text completion, which refers to the use of specific text fragments or beginnings to generate subsequent content.
[0199] The preset prompt can be a custom-configured input text used to guide the text generation model to generate a specific type of response. For example, please perform text enhancement on the following sentences and give 10 sentences after text enhancement. For another example, please generate 10 sentences. I hope that these 10 sentences are consistent with the semantics of the sentences I provide below.
[0200] During specific implementation, the preset prompt may also prompt the text generation model to perform text enhancement only for a certain entity or a certain relationship.
[0201] When receiving the splicing data, the text generation model can complete the text according to the clustering data under the prompt of the preset prompt to obtain the clustering data after text enhancement processing.
[0202] For example, a preset prompt is used to prompt the GPT model that there is a text enhancement task that needs to be assigned to the GPT model to implement. For example, please perform text enhancement processing on the following sentences through any of the multiple text enhancement methods such as synonym replacement, random insertion, random exchange, and random deletion to generate 10 sentences: [Cluster Data 1]. After receiving this spliced data, the GPT model will automatically perform text generation processing to obtain 10 sentences, which are the cluster data 1 after text enhancement processing.
[0203] After obtaining the enhanced cluster data, the enhanced cluster data may be evaluated, and training data for model training may be screened from the enhanced cluster data according to the evaluation result.
[0204] In specific implementation, the training data for model training is obtained by screening the enhanced cluster data according to the evaluation results. The enhanced cluster data can be sorted according to the evaluation results to obtain the sorted results; and a preset number of enhanced cluster data are selected as training data based on the sorted results.
[0205] According to the evaluation results, the training data for model training is obtained by screening the enhanced cluster data. Alternatively, when the evaluation results include evaluation scores of multiple dimensions, the enhanced cluster data is screened in combination with the evaluation results and preset screening conditions for one or more dimensions to obtain the training data.
[0206] The enhanced cluster data is evaluated, and training data for model training is obtained from the enhanced cluster data according to the evaluation results. Alternatively, the enhanced cluster data is input into a verification model to filter out data that meets the enhancement requirements. The verification model can be a pre-trained text classification model, which is used to verify the rationality of text enhancement from one or more dimensions.
[0207] For example, the validation model can be judged based on the rationality of each enhanced text, the diversity of all data in the same category, and the distinguishing effect between different categories.
[0208] In a specific implementation, clustering data includes sentences to be evaluated; the clustering data is evaluated, including: encoding the sentences to be evaluated to obtain first encoded data; calculating text evaluation parameters of the sentences to be evaluated, and encoding the text evaluation parameters to obtain second encoded data; concatenating the first encoded data and the second encoded data to obtain comprehensive encoded data; mapping is performed based on the comprehensive encoded data to obtain an evaluation result of the sentences to be evaluated.
[0209] The first encoded data may represent the semantics of the sentence to be evaluated.
[0210] The text evaluation parameter may be any parameter used to evaluate the sentence to be evaluated.
[0211] Exemplarily, the text evaluation parameter may be a Perplexity parameter.
[0212] The perplexity parameter is an indicator used to measure the performance of a language model in natural language processing. It is a measure of the predictive ability of a probability model for test data and is usually used to evaluate the language model's ability to generate text. The lower the perplexity value, the more accurate the model's prediction of the data and the better the model's performance.
[0213] In specific implementation, an evaluation model may be used to evaluate the clustering data. The evaluation model may be a text classification model obtained by inputting the labeled data into a pre-trained language model.
[0214] Exemplarily, the evaluation model may include a first encoding layer, a second encoding layer, a concat layer, and a linear layer.
[0215] The first encoding layer can be used to encode the sentence to be evaluated to obtain first encoded data.
[0216] After calculating the text evaluation parameters of the sentence to be evaluated, the second encoding layer can be used to encode the text evaluation parameters to obtain second encoded data.
[0217] The concatenation layer can be used to concatenate the first coded data and the second coded data to obtain comprehensive coded data.
[0218] The linear layer can be used to map the comprehensive coding data to obtain the evaluation result of the sentence to be evaluated. The evaluation result can include evaluation scores of one or more dimensions.
[0219] In such Figure 1In the illustrated embodiment, first, the text to be processed is subjected to information extraction processing to obtain the sentence elements of the target role in the text to be processed; then, clustering processing is performed according to the sentence elements of the target role to obtain clustering data of the text to be processed; finally, the clustering data is evaluated and processed, and training data for model training is obtained from the clustering data based on the evaluation results. Generally, clustering refers to grouping data with high similarity. In the embodiment of the present application, by extracting and clustering the sentence elements of the target role from the text to be processed, the data in the clustering data that are grouped together due to high similarity can correspond to the same target role. Compared with directly clustering the text to be processed without considering which role the sentence elements belong to, it is more conducive to reducing the probability of grouping errors during clustering and improving the accuracy of clustering. In addition, the training data is obtained by screening the clustering data, so improving the accuracy of clustering is conducive to improving the quality of the training data.
[0220] Based on the same technical concept, the embodiment of the present application also provides another text processing method. Figure 2 A processing flow chart of another text processing method provided in an embodiment of the present application. Figure 2 The text processing method shown may include the following steps:
[0221] Step S202: input documents in the first domain into the model.
[0222] The first field may be a predetermined specific field, for example, a financial field, a service field, and so on.
[0223] The model in this step can be a text processing model, which has information extraction capabilities and can be used to extract sentence elements of the target role in the document from the document. The model can refer to the corresponding description part of the "text processing model" in the aforementioned method embodiment.
[0224] The documents in the first field can refer to the corresponding description part of the "text to be processed" in the aforementioned method embodiment.
[0225] Step S204: the model determines the relationship and applicable roles of multiple documents.
[0226] The model determines the applicable roles of multiple documents. For each document, the document may be input into a sentence element extraction model for extraction processing to obtain the extraction results of sentence elements in the document; the sentence elements include entities, relationships between entities, and one or more events in which roles participate; the document and the extraction results are input into a role recognition model for role recognition processing to obtain the role recognition results of the document. For details, please refer to the corresponding description part of the aforementioned method embodiment "the text to be processed is input into a sentence element extraction model for extraction processing to obtain the extraction results of sentence elements in the text to be processed; the sentence elements include entities, relationships between entities, and one or more events in which roles participate; the text to be processed and the extraction results are input into a role recognition model for role recognition processing to obtain the role recognition results of the text to be processed".
[0227] The relationship identification of multiple documents can be performed by inputting the extraction results of sentence elements in each document into a relationship identification model for relationship identification, and obtaining the relationship identification results between each document. For details, please refer to the corresponding description part of "inputting the extraction results of sentence elements in the text to be processed into a relationship identification model for relationship identification, and obtaining the relationship identification results between the first text to be processed and the second text to be processed" in the aforementioned method embodiment.
[0228] Step S206: The model extracts entities, relationships, and events of applicable roles from the document in combination with document relationships and applicable roles.
[0229] The document relationship is the relationship identification result in the aforementioned method embodiment, the applicable role is the role identification result in the aforementioned method embodiment, and the entities, relationships, and events of the applicable role can refer to the corresponding description part of the "sentence elements of the target role" in the aforementioned method embodiment.
[0230] The model combines document relationships and applicable roles to complete the extraction of entities, relationships, and events of applicable roles in the document. Please refer to the corresponding description part of the aforementioned method embodiment "Determining the sentence elements of the target role in the first text to be processed and the second text to be processed based on the extraction results of sentence elements in the text to be processed, the role recognition results, and the relationship recognition results."
[0231] The data processing flow consisting of steps S202 to S206 can be regarded as an exemplary implementation method of performing information extraction processing on the text to be processed to obtain the sentence elements of the target role in the text to be processed when the text to be processed is a document. For details, please refer to the corresponding description of step S102 in the aforementioned method embodiment.
[0232] Step S208, generating native clustering data based on the extracted entities, relationships, and events.
[0233] Step S210, generating non-native clustering data based on the extracted entities, relationships, and events.
[0234] For steps S208 to S210 , reference may be made to the corresponding description of step S104 in the aforementioned method embodiment.
[0235] Step S212, performing text enhancement on the clustered data.
[0236] In this step, the clustering data used for text enhancement may include at least one of the native clustering data generated after executing step S208 and the non-native clustering data generated after executing step S210, wherein the definition and specific generation method of "native clustering data" can refer to the corresponding description part of "native clustering data" in the aforementioned method embodiment, and the definition and specific generation method of "non-native clustering data" can refer to the corresponding description part of "non-native clustering data" in the aforementioned method embodiment.
[0237] Step S214, inputting the enhancement result of the text enhancement into the verification model to filter out the data that meets the enhancement requirements.
[0238] The enhancement result of text enhancement is the “clustering data after enhancement processing” in the aforementioned method embodiment.
[0239] This step may refer to the corresponding description of "evaluating the enhanced cluster data, and screening the enhanced cluster data to obtain training data for model training based on the evaluation results" in the aforementioned method embodiment.
[0240] Step S216, input all data into the model to be trained for training.
[0241] In this step, "all data" refers to the data that meets the enhancement requirements after filtering after executing step S214. In this step, the data that meets the enhancement requirements is used as training data, and the training data is input into the model to be trained for training.
[0242] Step S202 to step 214 can be regarded as a process of constructing training data. The data that meets the enhancement requirements obtained by executing steps S202 to step 214 can be used as training data for the model to be trained. Then, the constructed training data can be used for model training.
[0243] Since the technical concept is the same, the description in this embodiment is relatively simple, and the relevant parts may refer to the corresponding description of the method embodiment provided above.
[0244] An embodiment of a text processing device provided in this specification is as follows:
[0245] In the above-mentioned embodiment, a text processing method is provided. Based on the same technical concept, the embodiment of the present application also provides a text processing device, which is described below in conjunction with the accompanying drawings.
[0246] Figure 3 Schematic diagram of a text processing device provided in an embodiment of the present application. This embodiment provides a text processing device 300, including:
[0247] An extraction unit 302 is used to perform information extraction processing on the text to be processed to obtain sentence elements of the target role in the text to be processed;
[0248] A clustering unit 304 is used to perform clustering processing according to the sentence elements of the target role to obtain clustering data of the text to be processed;
[0249] The screening unit 306 performs evaluation processing on the cluster data, and screens the cluster data to obtain training data for model training according to the evaluation result.
[0250] Optionally, when the extraction unit 302 performs information extraction processing on the text to be processed and obtains the sentence element of the target role in the text to be processed, the extraction unit 302 performs the following steps:
[0251] The text to be processed is subjected to information extraction processing through a text processing model to obtain sentence elements in the text to be processed that belong to the target role.
[0252] Optionally, the text processing model includes a sentence element extraction model and a role identification model; when the extraction unit 302 performs information extraction processing on the text to be processed through the text processing model to obtain the sentence elements belonging to the target role in the text to be processed, the extraction unit 302 performs the following steps:
[0253] Inputting the text to be processed into the sentence element extraction model for extraction processing to obtain the extraction result of sentence elements in the text to be processed; the sentence elements include one or more of entities, relationships between entities, and events in which roles participate;
[0254] Inputting the text to be processed and the extraction result into a role recognition model for role recognition processing to obtain a role recognition result of the text to be processed;
[0255] According to the extraction result of the sentence elements and the role identification result, the sentence elements belonging to the target role are determined in the text to be processed.
[0256] Optionally, the text to be processed includes a first text to be processed and a second text to be processed; the extraction result includes an extraction result of sentence elements in the first text to be processed and an extraction result of sentence elements in the second text to be processed; the text processing device 300 further includes:
[0257] an identification unit, configured to input the extraction result of the sentence elements in the text to be processed into a relationship identification model for relationship identification, and obtain a relationship identification result between the first text to be processed and the second text to be processed;
[0258] When the extraction unit 302 determines the sentence element belonging to the target role in the text to be processed according to the extraction result of the sentence element and the role recognition result, it performs the following steps:
[0259] According to the extraction result of the sentence elements in the text to be processed, the role identification result and the relationship identification result, the sentence elements of the target role are determined in the first text to be processed and the second text to be processed.
[0260] Optionally, when the recognition unit inputs the extraction result of the sentence elements in the text to be processed into the relationship recognition model for relationship recognition and obtains the relationship recognition result between the first text to be processed and the second text to be processed, the recognition unit performs the following steps:
[0261] Inputting the extraction results of the sentence elements in the text to be processed into the extraction submodule in the relationship recognition model to perform feature phrase extraction processing to obtain target feature phrases in the first text to be processed and the second text to be processed;
[0262] Inputting the target characteristic phrases in the first to-be-processed text and the second to-be-processed text into the calculation submodule in the relationship recognition model to perform distance calculation processing, thereby obtaining distance information between the first to-be-processed text and the second to-be-processed text;
[0263] The distance information is input into a classification submodule in the relationship recognition model for classification processing to obtain a relationship recognition result between the first to-be-processed text and the second to-be-processed text.
[0264] Optionally, the screening unit 306 performs the following steps when evaluating the cluster data:
[0265] Performing text enhancement processing on the clustering data;
[0266] The clustering data after enhancement processing is evaluated.
[0267] Optionally, when the clustering unit 304 performs clustering processing according to the sentence elements of the target role to obtain clustering data of the text to be processed, the clustering unit 304 performs the following steps:
[0268] Determining a first word to be replaced in a sentence element of the target character according to the word mapping relationship;
[0269] Replacing the first word with a second word to obtain an intermediate element set; the second word is a word indicated in the word mapping relationship and having a mapping relationship with the first word;
[0270] The intermediate element set is clustered to obtain cluster data of the text to be processed.
[0271] Optionally, the cluster data includes statements to be evaluated; when the screening unit 306 evaluates the cluster data, it performs the following steps:
[0272] Encoding the sentence to be evaluated to obtain first encoded data;
[0273] Calculating a text evaluation parameter of the sentence to be evaluated, and encoding the text evaluation parameter to obtain second encoded data;
[0274] Performing splicing processing on the first coded data and the second coded data to obtain integrated coded data;
[0275] Mapping processing is performed according to the comprehensive coding data to obtain an evaluation result of the sentence to be evaluated.
[0276] Optionally, the screening unit 306 performs the following steps when performing text enhancement processing on the cluster data:
[0277] The clustering data and the preset prompt are spliced to obtain spliced data corresponding to the clustering data;
[0278] The spliced data is input into a text generation model for text generation processing to obtain enhanced clustering data.
[0279] In an embodiment of the present application, the text processing device includes: an extraction unit, which is used to perform information extraction processing on the text to be processed to obtain the sentence elements of the target role in the text to be processed; a clustering unit, which is used to perform clustering processing based on the sentence elements of the target role to obtain clustering data of the text to be processed; a screening unit, which evaluates the clustering data and screens the clustering data to obtain training data for model training based on the evaluation results. Generally, clustering refers to grouping data with high similarity. In an embodiment of the present application, by extracting and clustering the sentence elements of the target role from the text to be processed, the data in the clustering data that are grouped together due to high similarity can correspond to the same target role. Compared with directly clustering the text to be processed without considering which role the sentence elements belong to, it is more conducive to reducing the probability of grouping errors during clustering and improving the accuracy of clustering. The training data is obtained by screening the clustering data, so improving the accuracy of clustering is conducive to improving the quality of the training data.
[0280] Corresponding to the above-described text processing method, based on the same technical concept, an embodiment of the present application further provides an electronic device, which is used to execute the above-provided text processing method. Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0281] like Figure 4 As shown, the electronic device may have relatively large differences due to different configurations or performances, and may include one or more processors 401 and memory 402, and the memory 402 may store one or more storage applications or data. Among them, the memory 402 can be a temporary storage or a permanent storage. The application stored in the memory 402 may include one or more modules (not shown in the figure), and each module may include a series of computer executable instructions in the electronic device. Furthermore, the processor 401 can be configured to communicate with the memory 402 to execute a series of computer executable instructions in the memory 402 on the electronic device. The electronic device may also include one or more power supplies 403, one or more wired or wireless network interfaces 404, one or more input / output interfaces 405, one or more keyboards 406, etc.
[0282] In a specific embodiment, the electronic device includes a memory and one or more programs, wherein the one or more programs are stored in the memory, and the one or more programs may include one or more modules, and each module may include a series of computer executable instructions for the electronic device, and the one or more programs configured to be executed by one or more processors include the following computer executable instructions:
[0283] Performing information extraction processing on the text to be processed to obtain sentence elements of the target role in the text to be processed;
[0284] Performing clustering processing according to the sentence elements of the target role to obtain clustering data of the text to be processed;
[0285] The cluster data is evaluated and processed, and training data for model training is screened from the cluster data according to the evaluation result.
[0286] The computer-readable storage medium provided in this embodiment is used to store computer-executable instructions. When the computer-executable instructions are executed by a processor, the following process is implemented:
[0287] Performing information extraction processing on the text to be processed to obtain sentence elements of the target role in the text to be processed;
[0288] Performing clustering processing according to the sentence elements of the target role to obtain clustering data of the text to be processed;
[0289] The cluster data is evaluated and processed, and training data for model training is screened from the cluster data according to the evaluation result.
[0290] It should be noted that the embodiment of the computer-readable storage medium in this specification and the embodiment of the text processing method in this specification are based on the same inventive concept, so the specific implementation of this embodiment can refer to the implementation of the corresponding method mentioned above, and the repeated parts will not be repeated.
[0291] Another embodiment of the present disclosure further provides a computer program product, the computer program product comprising a computer program, and when the computer program is executed by a processor, the following process is implemented:
[0292] Performing information extraction processing on the text to be processed to obtain sentence elements of the target role in the text to be processed;
[0293] Performing clustering processing according to the sentence elements of the target role to obtain clustering data of the text to be processed;
[0294] The cluster data is evaluated and processed, and training data for model training is screened from the cluster data according to the evaluation result.
[0295] The computer program product in the embodiment of the present disclosure can implement each process of the above-mentioned text processing method embodiment and achieve the same effect and function, which will not be repeated here.
[0296] In an embodiment of the present application, first, information extraction is performed on the text to be processed to obtain the sentence elements of the target role in the text to be processed; then, clustering is performed based on the sentence elements of the target role to obtain clustering data of the text to be processed; finally, evaluation is performed on the clustering data, and training data for model training is screened from the clustering data based on the evaluation results. Generally, clustering refers to grouping data with high similarity. In an embodiment of the present application, by extracting and clustering the sentence elements of the target role from the text to be processed, the data in the clustering data that are grouped together due to high similarity can correspond to the same target role. Compared with directly clustering the text to be processed without considering which role the sentence elements belong to, it is more conducive to reducing the probability of grouping errors during clustering and improving the accuracy of clustering. In addition, the training data is screened from the clustering data, so improving the accuracy of clustering is conducive to improving the quality of the training data.
[0297] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0298] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the embodiments of the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, this specification may adopt the form of a computer program product implemented on one or more computer-readable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0299] This specification is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of this specification. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable electronic device to produce a machine, so that the instructions executed by the processor of the computer or other programmable electronic device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0300] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable electronic device to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0301] These computer program instructions may also be loaded onto a computer or other programmable electronic device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0302] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0303] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0304] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0305] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0306] Embodiments of the present application may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. One or more embodiments of the present specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communications network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0307] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0308] The above description is only an embodiment of this document and is not intended to limit this document. For those skilled in the art, this document may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this document should be included in the scope of the claims of this document.
Claims
1. A text processing method, characterized in that: include: Performing information extraction processing on the text to be processed to obtain sentence elements of the target role in the text to be processed; Performing clustering processing according to the sentence elements of the target role to obtain clustering data of the text to be processed; The cluster data is evaluated and processed, and training data for model training is screened from the cluster data according to the evaluation result.
2. The method according to claim 1, characterized in that The information extraction process is performed on the text to be processed to obtain the sentence elements of the target role in the text to be processed, including: The text to be processed is subjected to information extraction processing through a text processing model to obtain sentence elements in the text to be processed that belong to the target role.
3. The method according to claim 2, characterized in that The text processing model includes a sentence element extraction model and a role identification model; the information extraction process of the text to be processed by the text processing model to obtain the sentence elements belonging to the target role in the text to be processed includes: Inputting the text to be processed into the sentence element extraction model for extraction processing to obtain the extraction result of sentence elements in the text to be processed; the sentence elements include one or more of entities, relationships between entities, and events in which roles participate; Inputting the text to be processed and the extraction result into a role recognition model for role recognition processing to obtain a role recognition result of the text to be processed; According to the extraction result of the sentence elements and the role identification result, the sentence elements belonging to the target role are determined in the text to be processed.
4. The method according to claim 3, characterized in that The text to be processed includes a first text to be processed and a second text to be processed; the extraction result includes an extraction result of sentence elements in the first text to be processed and an extraction result of sentence elements in the second text to be processed; after the text to be processed is input into the sentence element extraction model for extraction processing and the extraction result of sentence elements in the text to be processed is obtained, the method further includes: Inputting the extraction result of the sentence elements in the text to be processed into the relationship recognition model to perform relationship recognition, thereby obtaining the relationship recognition result between the first text to be processed and the second text to be processed; The step of determining the sentence elements belonging to the target role in the text to be processed according to the sentence element extraction result and the role identification result includes: According to the extraction result of the sentence elements in the text to be processed, the role identification result and the relationship identification result, the sentence elements of the target role are determined in the first text to be processed and the second text to be processed.
5. The method according to claim 4, characterized in that The step of inputting the extraction result of the sentence elements in the text to be processed into a relationship recognition model for relationship recognition to obtain a relationship recognition result between the first text to be processed and the second text to be processed includes: Inputting the extraction results of the sentence elements in the text to be processed into the extraction submodule in the relationship recognition model to perform feature phrase extraction processing to obtain target feature phrases in the first text to be processed and the second text to be processed; Inputting the target characteristic phrases in the first to-be-processed text and the second to-be-processed text into the calculation submodule in the relationship recognition model to perform distance calculation processing, thereby obtaining distance information between the first to-be-processed text and the second to-be-processed text; The distance information is input into a classification submodule in the relationship recognition model for classification processing to obtain a relationship recognition result between the first to-be-processed text and the second to-be-processed text.
6. The method according to claim 1, characterized in that The evaluating and processing the clustering data includes: Performing text enhancement processing on the clustering data; The clustering data after enhancement processing is evaluated.
7. The method according to claim 1, characterized in that The clustering process is performed according to the sentence elements of the target role to obtain clustering data of the text to be processed, including: Determining a first word to be replaced in a sentence element of the target character according to the word mapping relationship; Replacing the first word with a second word to obtain an intermediate element set; the second word is a word indicated in the word mapping relationship and having a mapping relationship with the first word; The intermediate element set is clustered to obtain cluster data of the text to be processed.
8. The method according to claim 1, characterized in that The cluster data includes sentences to be evaluated; and the evaluating process on the cluster data includes: Encoding the sentence to be evaluated to obtain first encoded data; Calculating a text evaluation parameter of the sentence to be evaluated, and encoding the text evaluation parameter to obtain second encoded data; Performing splicing processing on the first coded data and the second coded data to obtain integrated coded data; Mapping processing is performed according to the comprehensive coding data to obtain an evaluation result of the sentence to be evaluated.
9. The method according to claim 6, characterized in that The performing text enhancement processing on the clustering data includes: The clustering data and the preset prompt are spliced to obtain spliced data corresponding to the clustering data; The spliced data is input into a text generation model for text generation processing to obtain enhanced clustering data.
10. A text processing device, characterized in that: include: An extraction unit, used for performing information extraction processing on the text to be processed to obtain sentence elements of the target role in the text to be processed; A clustering unit, used for performing clustering processing according to the sentence elements of the target role to obtain clustering data of the text to be processed; The screening unit evaluates the cluster data and screens the cluster data to obtain training data for model training according to the evaluation result.
11. An electronic device, characterized in that: include: processor; And, a memory configured to store computer executable instructions, which, when executed, cause the processor to perform the text processing method according to any one of claims 1 to 9.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store computer-executable instructions, and the computer-executable instructions, when executed by a processor, implement the text processing method according to any one of claims 1 to 9.
13. A computer program product, characterized in that The invention comprises a computer program, which, when executed by a processor, implements the text processing method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Data screening method, system, equipment and storage medium
CN113780418A
Text processing method, computer equipment and storage medium
CN114298031A
Role dialogue simulation method and device, equipment and storage medium
CN114822812A
Text extraction method and device and server
CN116702774A
Dialogue role determination method and device and storage medium
CN118277517A
