Text annotation method and device, computer equipment and storage medium
Through the combination of automatic annotation and expert annotation, text data is filtered and spliced, which solves the problem of poor annotation quality in generative artificial intelligence models and improves the accuracy and compliance of generated content.
Patent Information
- Application Number
- CN202311316116.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-10
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2043-10-10
AI Technical Summary
Existing generative artificial intelligence models have problems with poor annotation quality during the text annotation process, resulting in generated content that does not conform to the language environment.
By obtaining the original text and original annotation data, automatic annotation is performed, synonymous extended text is received, and candidate text is formed by splicing, and the target annotation information is screened according to the number and proportion of annotation categories. If the proportion is lower than the threshold, the expert system is consulted for annotation to form a high-quality Quality target text data.
Improved the quality of text annotation, ensuring that the annotation data used in generative model training is better and the generated content is more in line with the locale.
Smart Images

Figure CN117540730B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to a text annotation method and apparatus, a computer device, and a storage medium. Background Art
[0002] With the rapid development and widespread application of large-scale language models, generative artificial intelligence (AI) technology has become a hot topic in current research and practice. Although generative models have shown amazing capabilities in natural language understanding, dialogue generation, and knowledge reasoning, generative model training uses annotated text, but text annotation is only annotated by classifiers, and the annotation quality is poor. Therefore, how to improve the quality of text annotation has become a technical problem that needs to be solved urgently. Summary of the invention
[0003] The main purpose of the embodiments of the present application is to provide a text annotation method and apparatus, a computer device and a storage medium, aiming to improve the quality of text annotation.
[0004] To achieve the above object, a first aspect of an embodiment of the present application provides a text annotation method, the method comprising:
[0005] Acquire original text data; wherein the original text data includes: original text and original annotation information of the original text;
[0006] Classifying the original text to obtain automatic annotation information;
[0007] Receive extended text; wherein the extended text is obtained by performing synonymous expansion on the content of the original text by the annotation end, and is obtained by screening the synonymous text according to the automatic annotation information;
[0008] The extended text and the original text are concatenated to obtain a candidate text, and the automatic annotation information and the original annotation information are concatenated to obtain candidate annotation information of the candidate text;
[0009] Obtaining the number of annotations of the same type of candidate annotation information in each candidate text to obtain the number of annotation categories;
[0010] Screening the candidate annotation information according to the number of annotation categories to obtain target annotation information;
[0011] Obtaining the marking ratio of the target marking information;
[0012] If the annotation ratio is lower than a preset ratio threshold, feedback information is generated to a preset expert system to receive expert annotation information;
[0013] The expert annotation information and the candidate text are combined to obtain target text data.
[0014] In some embodiments, the classifying process of the original text to obtain automatic annotation information includes:
[0015] Performing annotation search in a preset annotation database according to the original text to obtain an annotation search result;
[0016] If the annotation search result indicates that the annotation database contains annotation information that matches the original text, the annotation information in the annotation database that matches the original text is used as the automatic annotation information;
[0017] If the annotation search result indicates that the annotation database does not contain annotation information matching the original text, annotation missing information is generated to the annotation end, so as to receive the custom annotation information fed back by the annotation end as the automatic annotation information.
[0018] In some embodiments, if the annotation search result is characterized as that the annotation database does not have annotation information matching the original text, generating annotation missing information to the annotation end, so as to receive the custom annotation information fed back by the annotation end as the automatic annotation information, includes:
[0019] If the annotation search result indicates that the annotation database does not contain annotation information matching the original text, generating the annotation missing information to the annotation end;
[0020] Receiving annotation feedback data fed back by the annotation end; wherein the annotation feedback data includes: synonymous texts and synonymous annotation information of the synonymous texts, wherein the synonymous texts are obtained by the annotation end of the first party performing synonymous modification on the original texts, and the synonymous annotation information is obtained by the annotation end of the second party classifying the synonymous texts;
[0021] If the synonymous tagging information is different from the original tagging information, the synonymous tagging information is used as the automatic tagging information.
[0022] In some embodiments, if the annotation search result is characterized as that the annotation database does not have annotation information matching the original text, after generating the annotation missing information to the annotation end, the method further includes:
[0023] Receiving preliminary annotation information of the original text from the annotation end of the second party;
[0024] Comparing the original annotation information with the preliminary annotation information to obtain a first comparison result;
[0025] Performing a score prediction according to the first comparison result and a preset score mapping relationship to obtain a first score and a second score; wherein the score mapping relationship includes a mapping relationship between the comparison result and the first score and the second score, the first score is the score of the first party, and the second score is the score of the second party;
[0026] Comparing the original annotation information with the synonymous annotation information to obtain a second comparison result;
[0027] Performing score prediction according to the second comparison result and the score mapping relationship to obtain a third score and a fourth score; wherein the third score is the score of the first party, and the fourth score is the score of the second party;
[0028] Constructing a first total score of the annotated end of the first party according to a preset first variation coefficient, the first score and the third score;
[0029] Constructing a second total score of the annotated end of the second party according to a preset second variation coefficient, the second score and the fourth score;
[0030] Resources are allocated to the annotated end of the first party according to the first total score, and resources are allocated to the annotated end of the second party according to the second total score.
[0031] In some embodiments, after the original text is classified to obtain automatic annotation information, the method further includes:
[0032] Receiving objection information from the annotation end to the automatic annotation information;
[0033] Feeding back the objection information to the expert system, and receiving objection review information fed back by the expert system;
[0034] If the objection review information indicates that the objection has been passed, the automatic marking information is updated according to the objection information to obtain updated marking information;
[0035] If the objection review information indicates that the objection has not been passed, the automatic marking information is retained.
[0036] In some embodiments, the screening of the candidate annotation information according to the number of the annotation categories to obtain the target annotation information includes:
[0037] Obtaining the maximum number of categories from the number of labeled categories;
[0038] The candidate labeling information of the maximum number of categories is used as the target labeling information.
[0039] In some embodiments, obtaining the annotation ratio of the target annotation information includes:
[0040] Obtain the total number of annotations of the candidate annotation information;
[0041] The ratio of the maximum number of categories to the total number of annotations is calculated to obtain the annotation ratio of the target annotation information.
[0042] In some embodiments, if the annotation ratio is lower than a preset ratio threshold, before generating feedback information to a preset expert system to receive expert annotation information, the method further includes:
[0043] Setting the preset ratio threshold includes:
[0044] Obtain the number of marked categories and the minimum excess threshold; wherein the minimum excess threshold is less than 1;
[0045] The number of marked categories and the minimum excess threshold are input into a preset formula to obtain the preset ratio threshold; wherein the preset formula is:
[0046] ;
[0047] In the formula, is the number of labeled categories, is the minimum excess threshold.
[0048] In some embodiments, after the candidate annotation information is screened according to the number of annotation categories to obtain target annotation information, the method further includes:
[0049] Acquire reference annotation data of each of the annotation ends; wherein the reference annotation data includes: the total number of annotations and the number of selected annotations of target annotation information;
[0050] Distribute scores according to the number of selected annotations and the total number of annotations to obtain the annotation score of each of the annotation ends;
[0051] Performing confidence prediction on the labeled score according to a preset function to obtain a target confidence;
[0052] Resources are divided for the annotation end according to the target confidence.
[0053] In some embodiments, after obtaining the annotation ratio of the target annotation information, the method further includes:
[0054] If the annotation ratio is greater than or equal to the preset ratio threshold, the target annotation information and the candidate text are combined into target text data.
[0055] To achieve the above-mentioned purpose, a second aspect of an embodiment of the present application provides a text annotation device, the device comprising:
[0056] A data acquisition module, used to acquire original text data; wherein the original text data includes: original text and original annotation information of the original text;
[0057] A text classification module is used to classify the original text to obtain automatic annotation information;
[0058] A text receiving module, used for receiving an extended text; wherein the extended text is obtained by performing synonymous expansion on the content of the original text by the annotation end, and is obtained by screening from the synonymous text according to the automatic annotation information;
[0059] A text concatenation module, used for concatenating the extended text with the original text to obtain a candidate text, and concatenating the automatic annotation information with the original annotation information to obtain candidate annotation information of the candidate text;
[0060] A quantity acquisition module, used to acquire the number of annotations of the same type of candidate annotation information in each candidate text, and obtain the number of annotation categories;
[0061] A screening module, used to screen the candidate annotation information according to the number of the annotation categories to obtain target annotation information;
[0062] A ratio acquisition module, used to acquire the annotation ratio of the target annotation information;
[0063] An expert interaction module, for generating feedback information to a preset expert system to receive expert annotation information if the annotation ratio is lower than a preset ratio threshold;
[0064] The combination module is used to combine the expert annotation information and the candidate text to obtain target text data.
[0065] To achieve the above-mentioned purpose, the third aspect of an embodiment of the present application proposes a computer device, which includes a memory and a processor, the memory stores a computer program, and the processor implements the method described in the first aspect when executing the computer program.
[0066] To achieve the above-mentioned purpose, the fourth aspect of an embodiment of the present application proposes a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in the first aspect is implemented.
[0067] The text annotation method and device, computer equipment and storage medium proposed in the present application collect the original text and the original annotation data of the original text, and first automatically annotate the original text to obtain automatic annotation information. At the same time, the original text is expanded by the annotation end, and the extended text is screened out with the automatic annotation information, and then the extended text and the original text are combined to form a candidate text. The original annotation information and the automatic annotation information are combined to form candidate annotation information of the candidate text. In order to determine whether the candidate annotation information can effectively represent the candidate text, the number of annotation categories is obtained by obtaining the number of candidate annotation information of the same category, so as to screen the target annotation information from the candidate annotation information according to the number of annotation categories, and further determine the annotation ratio of the target annotation information. When the annotation ratio is lower than the preset ratio threshold, it is accurately determined that the quality of the candidate annotation information of the candidate text is not good, and the expert system will be asked to annotate the candidate text to obtain expert annotation information, so as to combine the expert annotation information and the candidate text to form new target text data, so as to construct a text data with better annotation quality, and then the subsequent generative model will generate better content that conforms to the language environment by training with the target text data. BRIEF DESCRIPTION OF THE DRAWINGS
[0068] Figure 1 is a flowchart of a text annotation method provided in an embodiment of the present application;
[0069] Figure 2 It is a flowchart of a text annotation method provided in an embodiment of the present application;
[0070] Figure 3 is a system architecture diagram of the text annotation method provided in the embodiment of the present application;
[0071] Figure 4 yes Figure 1 Flow chart of step S102 in FIG.
[0072] FIG5(a), FIG5(b), FIG5(c), and FIG5(d) are schematic diagrams of interfaces for clicking on objection and skipping in the text annotation method provided in an embodiment of the present application;
[0073] Figure 6 yes Figure 2 Flow chart of step S203 in FIG.
[0074] Figure 7 is a schematic diagram of the interaction between the red and blue teams in the text annotation method provided in an embodiment of the present application;
[0075] Figure 8 is a flowchart of a text annotation method provided by another embodiment of the present application;
[0076] Fig. 9 is a flowchart of a text annotation method provided by another embodiment of the present application;
[0077] Fig.10 yes Figure 1 Flow chart of step S106 in FIG.
[0078] Fig.11 yes Figure 1 Flow chart of step S107 in FIG.
[0079] Fig.12 is a flowchart of a text annotation method provided by another embodiment of the present application;
[0080] Fig.13 is a flowchart of a text annotation method provided by another embodiment of the present application;
[0081] Fig.14 is a structural schematic diagram of a text annotation device provided in an embodiment of the present application;
[0082] Fig.15 It is a schematic diagram of the hardware structure of the computer device provided in the embodiment of the present application. DETAILED DESCRIPTION
[0083] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0084] It should be noted that, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification, claims and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0085] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0086] First, some nouns involved in this application are analyzed:
[0087] Artificial intelligence (AI) is a new technical science that studies and develops theories, methods, technologies and application systems for simulating, extending and expanding human intelligence. AI is a branch of computer science that attempts to understand the essence of intelligence and produce a new type of intelligent machine that can respond in a similar way to human intelligence. Research in this field includes robotics, speech recognition, image recognition, natural language processing and expert systems. AI can simulate the information process of human consciousness and thinking. AI is also a theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0088] Text annotation: It is the process of annotating the features of text, labeling it with specific semantics, composition, context, purpose, emotion and other raw data labels. By annotating the training data, the machine can be taught how to identify the implicit intention or emotion in the text, so that the machine can understand the language in a more humane way.
[0089] Cross-validation: Mainly used in modeling applications, such as PCR and PLS regression modeling. In a given modeling sample, most of the samples are taken out for model building, and a small number of samples are reserved for prediction using the newly established model. The prediction error of this small number of samples is calculated, and their square sum is recorded.
[0090] Confidence: Also known as reliability, confidence level, or confidence coefficient, that is, when sampling to estimate the overall parameters, due to the randomness of the sample, the conclusion is always uncertain. The span of the confidence interval is a positive function of the confidence level, that is, the greater the required degree of certainty, the wider the confidence interval will be, which will correspondingly reduce the accuracy of the estimate.
[0091] With the rapid development and widespread application of existing large-scale language models, generative artificial intelligence technology has become the focus of current research and practice. However, although generative large models have shown amazing capabilities in natural language understanding, dialogue generation, and knowledge reasoning, their generation process lacks effective control, resulting in compliance issues that need to be addressed urgently. Specifically, generative models are trained through annotated text, while traditional annotations are only obtained by direct classification by classifiers, so the quality of text annotations is difficult to control, and low-quality text annotation data is prone to occur.
[0092] Based on this, the embodiment of the present application provides a text annotation method and device, a computer device and a storage medium, which aims to automatically annotate the original text to obtain automatic annotation information by collecting the original text and the original annotation data of the original text. At the same time, the original text is expanded by the annotation end and the extended text is screened out with the automatic annotation information, and then the extended text and the original text are combined to form a candidate text. The original annotation information and the automatic annotation information are combined to form candidate annotation information of the candidate text. In order to judge whether the candidate annotation information can effectively represent the candidate text, the number of annotation categories is obtained by obtaining the number of candidate annotation information of the same category, so as to screen out the target annotation information according to the number of annotation categories, and further determine the annotation ratio of the target annotation information. When the annotation ratio is lower than the preset ratio threshold, it is accurately judged that the quality of the candidate annotation information of the candidate text is not good, and the expert system will be asked to annotate the candidate text to obtain the expert annotation information, so as to combine the expert annotation information and the candidate text to form a new target text data, so as to construct a text data with better annotation quality, then the subsequent generative model will generate better content that conforms to the language environment with the target text data training.
[0093] The text annotation method and apparatus, computer equipment, and storage medium provided in the embodiments of the present application are specifically described through the following embodiments. First, the text annotation method in the embodiments of the present application is described.
[0094] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0095] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0096] The text annotation method provided in the embodiment of the present application relates to the field of artificial intelligence technology. The text annotation method provided in the embodiment of the present application can be applied to a terminal, can be applied to a server side, or can be software running in a terminal or a server side. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc.; the server side can be configured as an independent physical server, or a server cluster or a distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application that implements the text annotation method, etc., but is not limited to the above forms.
[0097] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer computer devices, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can 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. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0098] It should be noted that in each specific implementation of the present application, when it comes to the need to perform relevant processing based on data related to user identity or characteristics such as user information, user behavior data, user historical data, and user location information, the user's permission or consent will be obtained first, and the collection, use, and processing of these data will comply with relevant laws, regulations, and standards. In addition, when the embodiment of the present application needs to obtain the user's sensitive personal information, the user's separate permission or consent will be obtained through a pop-up window or by jumping to a confirmation page. After clearly obtaining the user's separate permission or consent, the necessary user-related data for the normal operation of the embodiment of the present application will be obtained.
[0099] Figure 1 is an optional flowchart of the text annotation method provided in the embodiment of the present application. Figure 1 The method may include but is not limited to steps S101 to S109.
[0100] Step S101, obtaining original text data; wherein the original text data includes: original text and original annotation information of the original text;
[0101] Step S102, classifying the original text to obtain automatic annotation information;
[0102] Step S103, receiving the extended text; wherein the extended text is obtained by performing synonymous expansion on the original text by the annotation end, and is obtained by screening the synonymous text according to the automatic annotation information;
[0103] Step S104, concatenating the extended text with the original text to obtain a candidate text, and concatenating the automatic annotation information with the original annotation information to obtain candidate annotation information of the candidate text;
[0104] Step S105, obtaining the number of annotations of the same type of candidate annotation information in each candidate text to obtain the number of annotation categories;
[0105] Step S106, screening the candidate annotation information according to the number of annotation categories to obtain target annotation information;
[0106] Step S107, obtaining the annotation ratio of the target annotation information;
[0107] Step S108, if the annotation ratio is lower than a preset ratio threshold, generating feedback information to a preset expert system to receive expert annotation information;
[0108] Step S109: combining the expert annotation information and the candidate texts to obtain target text data.
[0109] In the steps S101 to S109 shown in the embodiment of the present application, the original text and the original annotation information of the original text are first obtained, and the original text is classified to obtain automatic annotation information. The original text is received by the annotation end to expand the content to obtain a synonymous text, and then the extended text is screened out from the synonymous text according to the automatic annotation information. Then, the extended text and the original text are combined to form a new candidate text, and the original annotation information and the automatic annotation information are used as the candidate annotation information of the candidate text. In order to verify whether the quality of the candidate annotation information meets the requirements and whether the text features of the candidate text can be characterized, the number of candidate annotation texts of the same type is obtained to obtain the number of annotation categories, and the target annotation information of the candidate text is screened out from the candidate annotation information according to the number of annotation categories, so as to extract the optimal candidate annotation information as the target annotation information. However, the target annotation information is manually and machine-annotated. In order to further judge the quality of the target annotation information, the annotation ratio of the target annotation information in all the candidate annotation information is obtained. If the annotation ratio is lower than the preset ratio threshold, it indicates that the annotation of the candidate text is unstable, and the target annotation information is not generally recognized. Therefore, feedback information is generated to the expert system, and the expert system is asked to feedback expert annotation information on the candidate text. Because the annotation information of the expert system is professional, the quality of the expert annotation information is authoritative. Therefore, the expert annotation information and the candidate text are combined to form the target text data to construct text with better quality annotation information and improve the quality of text annotation. Therefore, using text with better annotation quality to train the generative model and optimize the model training effect can enable the generative model to generate more accurate content.
[0110] In step S101 of some embodiments, Figure 2 As shown, there are three ways to obtain the original text data, but in other embodiments, the original text data can be obtained in more than three ways. Figure 2 It can be known that the original text data can be obtained through an API interface, or extracted from potentially sensitive text or public reporting data, but is not limited thereto. Through the acquisition of the original text data, it can be known that the annotation of the original text data in the present invention application is mainly to analyze whether the original text complies with relevant laws, regulations and ethical standards, so as to label the original text in advance, so that a legal and compliant generative model can be trained based on the labeled text data. It should be noted that the original annotation information is obtained by classifying the original text by a classifier.
[0111] For details, please refer to Figure 3After the quick judgment module makes a security judgment on the original text data, it extracts the potentially sensitive original text data from the original text data and stores the original text data in the database. The annotation platform caches, updates and performs necessary format conversion on the original text data at regular intervals and sends it to the message queue. It should be noted that the format conversion of the original text data is mainly to json format or xml format.
[0112] See also Figure 4 In some embodiments, step S102 may include but is not limited to steps S401 to S403:
[0113] Step S401, performing annotation search in a preset annotation database according to the original text to obtain an annotation search result;
[0114] Step S402: if the annotation search result indicates that the annotation database contains annotation information that matches the original text, the annotation information that matches the original text in the annotation database is used as automatic annotation information;
[0115] Step S403: if the annotation search result indicates that the annotation database does not contain annotation information matching the original text, annotation missing information is generated to the annotation end, so as to receive the custom annotation information fed back by the annotation end as automatic annotation information.
[0116] In step S401 of some embodiments, annotation search is performed in the annotation database according to the original text, and the annotation database stores annotation information matching the text, so the annotation corresponding to the original text is searched in the annotation database to obtain the annotation search result. It should be noted that there are two types of annotation search results, one is that the annotation database has annotation information matching the original text, and the other is that the annotation database does not have annotation information matching the original text.
[0117] In step S402 of some embodiments, if the annotation search result indicates that there is annotation information in the annotation database that matches the original text, the annotation information in the annotation database that matches the original text is directly used as automatic annotation information, so that the automatic annotation information search is simple.
[0118] In step S403 of some embodiments, if the annotation search result indicates that the annotation data does not have annotation information matching the original text, it is necessary to seek help from the annotation end. By generating missing annotation information and sending the missing annotation information to the annotation end, the annotation end automatically annotates the information according to the original text feedback. It should be noted that the annotation end is a device used by the annotator. The annotator logs in to the feedback platform application on the annotation end, obtains the original text from the message queue through the hypertext transfer protocol interface, and organizes and displays it on the interface of logging into the feedback platform. As shown in Figure 5 (a) and Figure 5 (b), the interface displays "Please determine whether the following sentences have problems and what is the degree?", "XXX, XXXXXX." Therefore, the annotator can select the corresponding annotation box through the content displayed on the interface to generate custom annotation information. It should be noted that the annotation box includes "correct", "ok", "uncertain", "not very good", "wrong", "skip", and "raise objection". If "skip" is clicked and switched to another interface of the original text. Therefore, the annotator only needs to click the annotation box to obtain the custom annotation information, and use the custom annotation information as the automatic annotation information of the original text to help the user complete the text annotation, which can ensure that the text has corresponding annotation information.
[0119] In steps S401 to S403 shown in this embodiment, the original text is searched in the annotation database. If the annotation database contains annotation information that matches the original text, the annotation information is used as the automatic annotation information of the original text. If the annotation database does not contain annotation information that matches the original text, the annotation end is asked for help, and the customized annotation information fed back by the annotator through the annotation end is used as the automatic annotation information. Therefore, when the annotation database does not contain annotation information that matches the original text, the annotation end is asked for feedback to realize manual annotation of the original text, further improving the quality of the original text annotation.
[0120] See also Figure 6 In some embodiments, step S203 may include but is not limited to steps S601 to S603:
[0121] Step S601, if the annotation search result indicates that the annotation database does not contain annotation information matching the original text, annotation missing information is generated to the annotation end;
[0122] Step S602, receiving annotation feedback data fed back by the annotation end; wherein the annotation feedback data includes: synonymous texts and synonymous annotation information of the synonymous texts, the synonymous texts are obtained by the annotation end of the first party performing synonymous modification on the original texts, and the synonymous annotation information is obtained by the annotation end of the second party classifying the synonymous texts;
[0123] Step S603: if the synonymous annotation information is different from the original annotation information, the synonymous annotation information is used as the automatic annotation information.
[0124] In step S602 of some embodiments, there is not only one annotation end, but annotation feedback data fed back by multiple annotation ends based on the original text will be received. It should be noted that the annotation feedback data includes: synonymous text and synonymous annotation information, and the annotation end is divided into a first party and a second party. The annotation end of the first party is used to change the content in the original text to obtain a synonymous text, and the annotation end of the second party is used to classify the synonymous text to obtain synonymous annotation information.
[0125] For example, Figure 7 As shown in the figure, the first party is the red team and the second party is the blue team. The work of the red team's annotation end is to change the classification attributes of the original text while minimizing the changes to the original text. If X is the red team and Y is the blue team, the red team will { = "How to make XX", = violence} is changed to { = "How to make XXXX", =safe}; Generate new text called synonym text (The edit distance algorithm is used as the change metric). In order to get points, the red team needs to change the original text as much as possible to deceive the blue team, with the goal of improving the quality of the augmented data. The blue team's work is mainly to classify the same text, such as Figure 7 , for synonymous text To obtain points, the blue team needs to try to determine whether the two sentences are different; in order to prevent the blue team from directly knowing whether the synonymous text is augmented data (augmented data must have inconsistent labels), texts with consistent labels will be randomly added from the text database in a certain proportion.
[0126] In step S603 of some embodiments, until the synonymous annotation information of the synonymous text by the annotation end of the second party is different from the original annotation information, that is, the synonymous text and the original text represent the same meaning, but the annotation end of the second party cannot identify the true category of the synonymous text, the synonymous annotation information is used as automatic annotation information to reduce the situation where the text cannot be used due to being labeled as dangerous.
[0127] In the steps S601 to S603 shown in this embodiment, if the annotation database does not match the original text, the annotation end feeds back annotation feedback data, and the two annotation ends feed back synonymous texts and synonymous annotation information of the synonymous texts. When the synonymous annotation information is inconsistent with the original annotation information, it means that the synonymous text retains the meaning of the original text, but successfully deceives the other annotation end to be unable to accurately classify the synonymous text, so the synonymous annotation information is used as automatic annotation information.
[0128] See also Figure 8In some embodiments, after step S601, the text annotation method may further include but is not limited to steps S801 to S808:
[0129] Step S801, receiving preliminary annotation information of the original text from the annotation end of the second party;
[0130] Step S802, comparing the original annotation information with the preliminary annotation information to obtain a first comparison result;
[0131] Step S803, performing score prediction according to the first comparison result and a preset score mapping relationship to obtain a first score and a second score; wherein the score mapping relationship includes a mapping relationship between the comparison result and the first score and the second score, the first score is the score of the first party, and the second score is the score of the second party;
[0132] Step S804, comparing the original annotation information with the synonymous annotation information to obtain a second comparison result;
[0133] Step S805, performing score prediction according to the second comparison result and the score mapping relationship to obtain a third score and a fourth score; wherein the third score is the score of the first party, and the fourth score is the score of the second party;
[0134] Step S806, constructing a first total score of the first marking end according to the preset first variation coefficient, the first score and the third score;
[0135] Step S807, constructing a second total score of the second marking end according to the preset second variation coefficient, the second score and the fourth score;
[0136] Step S808: Allocate resources to the first party's annotation terminal according to the first total score, and allocate resources to the second party's annotation terminal according to the second total score.
[0137] In steps S801 to S803 of some embodiments, if the annotation end of the second party classifies the original text to obtain preliminary annotation information, the preliminary annotation information and the original annotation information are compared to obtain a first comparison result. It should be noted that the first comparison result includes: the same or different. If the first comparison result is the same, it means that the annotation end of the second party can accurately identify the category of the original text. If it is different, it means that the annotation end of the second party recognizes the category of the wrong original text. Therefore, after determining the first comparison result, the corresponding score is found in the scoring mapping relationship according to the first comparison result to determine the first score of the first party and the second score of the second party. Specifically, if the first comparison result is the same, then the first score is determined to be a negative number and the second score is a positive number, that is, the second party can accurately identify the category of the original text, and the score is increased for the second party. If the first comparison result is different, the first score is determined to be a positive number and the second score is a negative number, that is, when the second party cannot identify the category of the original text, the score of the second party is deducted.
[0138] It should be noted that because the first party needs to change the content, the work is more difficult, while the annotation end of the second party only needs to determine the category of the original text, the work is less difficult, so it is determined that the first party gets a higher score than the second party, and the first party's deduction is also less than the second party's deduction.
[0139] For example, Figure 7 As shown in the figure, if the original text is "How to make XX", the blue team determines that the preliminary annotation information is "violence", and the original annotation information is also "violence", then the blue team scores 1 point and the red team gets -0.5.
[0140] In steps S804 to S805 of some embodiments, after the annotation end of the first party changes the original text into a synonymous text with a synonym, the annotation end of the second party classifies the synonymous text to obtain synonymous annotation information. The synonymous annotation information and the original annotation information are compared to obtain a second comparison result, and the second comparison result is mainly different. If the second comparison result is different, it means that the annotation end of the second party misclassified, so the fourth score obtained by the second party is a negative number, and the third score obtained by the first party is a positive number.
[0141] For example, Figure 7 , if the original text is modified into a synonymous text, and the synonymous text is "How to make XXXX", and the synonymous annotation information is "normal", then it is determined that the synonymous annotation information and the original annotation information do not match. Therefore, the fourth score of the blue team is -1, and the third score of the red team is +2.
[0142] In steps S806 to S808 of some embodiments, after determining the first score, the second score, the third score and the fourth score, the first total score is obtained by multiplying the first variation coefficient and the first score and the third score, and the second total score is obtained by multiplying the second variation coefficient and the second score and the fourth score. It should be noted that the calculation formula of the first total score is Z1=a1*f1*f3, and the calculation formula of the second total score is Z2=a2*f2*f4, wherein a1 is the first variation coefficient, a2 is the second variation coefficient, f1 is the first score, f2 is the second score, f3 is the third score, and f4 is the fourth score. After determining the first total score and the second total score, the first total score is used as a reference to allocate resources to the annotation end of the first party, and the resources are allocated to the annotation end of the second party according to the second total score. Therefore, the higher the total score, the higher the resources that can be allocated, so as to encourage the annotation end to actively perform text annotation through resource allocation and improve the efficiency of text annotation.
[0143] In steps S801 to S808 shown in this embodiment, the two annotation terminals interact between changing the text and reclassifying, and then determine whether the two annotation terminals can accurately classify or avoid classification to assign corresponding scores, and then allocate resources to the annotation terminals after calculating the total score. This can increase the active participation of the annotation terminals in annotation and motivate the annotation terminals to make annotations more accurate through resource allocation.
[0144] See also Fig. 9 In some embodiments, after step S102, the text annotation method may further include but is not limited to steps S901 to S904:
[0145] Step S901, receiving objection information from the annotation end to the automatic annotation information;
[0146] Step S902, feeding back the objection information to the expert system, and receiving the objection review information fed back by the expert system;
[0147] Step S903: if the objection review information indicates that the objection is passed, the automatic marking information is updated according to the objection information to obtain updated marking information;
[0148] Step S904: If the objection review information indicates that the objection has not been passed, the automatic marking information is retained.
[0149] In step S901 of some embodiments, as shown in FIG5(c) and FIG5(d), the objection information is information generated by the annotator selecting the "objection" annotation box on the interface of the annotation terminal, and the objection information also indicates that the annotator has an objection to the automatic annotation information of the original text. It should be noted that if the annotation terminal has sufficient information about its own annotation, it can apply for an objection to generate objection information, and the objection information can be uploaded in the format of list data, image data, link, etc.
[0150] In step S902 of some embodiments, the objection information is directly fed back to the expert system, and the expert personnel within the expert system review the objection information, that is, the automatic annotation information of the original text is reviewed according to the objection information to obtain the objection review information.
[0151] In step S903 of some embodiments, if the objection review information indicates that the objection fed back by the annotation end is correct, and there is an error in the automatic annotation information, the automatic annotation information needs to be updated according to the objection review information, that is, the automatic annotation information is replaced according to the updated annotation information in the objection information. It should be noted that when the objection review information indicates that it is passed, a score is assigned to the annotation end that raises the objection according to the objection review information, and the score is the preset first multiple of the ordinary annotation. For example, if the ordinary score of the annotation end is 1 point, and the preset first multiple is 10 times, when the objection is passed, 10 points will be assigned to the annotation end, then the annotation end can get more resources when allocating resources, so as to strongly encourage the annotation end to raise objections when it is sure. At the same time, the updated annotation information will be stored in the annotation database.
[0152] In step S904 of some embodiments, if the objection review information indicates that the objection has not been passed, the automatic marking information will not be changed. It should be noted that when the objection review information is not passed, the marking end that raised the objection will be punished, that is, the mark value of the preset second multiple of the marking end will be deducted. For example, if the preset second multiple is less than 3 times, 3 points will be deducted from the marking end whose objection was rejected.
[0153] In steps S901 to S904 shown in this embodiment, when the annotation end has an objection to the automatic annotation information, the objection information can be extracted, and the experts of the expert system review the objection information and then determine whether to modify the automatic annotation information to ensure the accuracy of the annotation information stored in the annotation database.
[0154] In step S104 of some embodiments, the original text is X and the expanded text is , then the candidate text after splicing is {X, }, and the original annotation information is , the automatic annotation information is Y, then the candidate annotation information is {Y, }.
[0155] In step S105 of some embodiments, in order to filter out some unqualified candidate annotation information, a voting mechanism with a minimum excess threshold is proposed, which is applicable to the determination of annotation information with different classification numbers and improves the quality of annotation. The candidate annotation information screening operation is mainly implemented by a cross-check module, which inputs the candidate annotation information and candidate text input by the annotation platform, and outputs the positive detection data and the false detection data.
[0156] See also Fig.10 In some embodiments, step S106 includes but is not limited to steps S1001 to S1002:
[0157] Step S1001, obtaining the maximum number of categories from the number of marked categories;
[0158] Step S1002: taking the candidate annotation information with the largest number of categories as the target annotation information.
[0159] In step S1001 of some embodiments, the candidate annotation information and candidate text of each annotation end are obtained through the annotation platform to construct a text corpus. It should be noted that the original annotation information output by the classifier is , the automatic annotation information is , but the text corpus stores candidate annotation information for each category, obtains the maximum value of the number of annotation categories for each category, and takes the maximum number of annotation categories as the maximum number of categories. For example, if there are 3, 4, 2, and 5 annotation categories, determine 5 as the maximum number of categories.
[0160] In step S1002 of some embodiments, the candidate annotation information corresponding to the maximum number of categories is used as the target annotation information, that is, the crowd-tested annotation information is obtained as ,and It is the candidate annotation information with the largest number of annotations.
[0161] In step S1001 to step S1002 shown in this embodiment, by selecting the largest number of candidate annotation information as target annotation information, the target annotation information is easily screened.
[0162] See also Fig.11 In some embodiments, step S107 may include but is not limited to steps S1101 to S1102:
[0163] Step S1101, obtaining the total number of annotations of candidate annotation information;
[0164] Step S1002, calculating the ratio of the maximum number of categories to the total number of annotations to obtain the annotation ratio of the target annotation information.
[0165] In some embodiments, in step S1101 to step S1102, the total number of annotations is obtained by calculating the number of candidate annotations of the text corpus, and the number of large categories is divided by the total number of annotations to obtain the annotation ratio of the target annotation information. For example, the total number of annotation votes is Zn, and the maximum number of categories is , then the annotation ratio is for The proportion of votes to the total number of marked votes Zn.
[0166] In steps S1101 to S1102 shown in the embodiment of the present invention, the annotation ratio is obtained by dividing the maximum number of categories by the total number of annotations, so that the annotation ratio of the target annotation information is easily calculated, so as to judge whether the target annotation information is valid according to the annotation ratio.
[0167] In some embodiments, before step S107, the text annotation method may further include setting a preset ratio threshold. By setting the preset ratio threshold in advance, after calculating the annotation ratio of the target annotation information, the quality of the target annotation information can be judged according to the preset ratio threshold and the annotation ratio, which can provide an intuitive reference for the quality judgment of the target annotation information.
[0168] See also Fig.12 In some embodiments, setting the preset ratio threshold may include but is not limited to steps S1201 to S1202:
[0169] Step S1201, obtaining the number of marked categories and the minimum excess threshold; wherein the minimum excess threshold is less than 1;
[0170] Step S1202: Input the number of marked categories and the minimum excess threshold into a preset formula to obtain a preset ratio threshold; wherein the preset formula is:
[0171] ;
[0172] In the formula, is the number of labeled categories, is the minimum excess threshold.
[0173] In step S1201 of some embodiments, by setting a minimum excess threshold, and the minimum excess threshold is less than 1, then the minimum excess threshold is , , which is generally set to 0.2 by default. The number of annotation categories is the number of categories into which the text can be divided, defined as For example, if the label category can be {violence, pornography, spam}, then the number of label categories =3.
[0174] In step S1202 of some embodiments, the preset ratio threshold is obtained by substituting the number of marked categories and the minimum excess threshold into a preset formula, so that the preset ratio threshold is easy to calculate.
[0175] It should be noted that after determining the preset ratio threshold, if the annotation ratio is less than the preset ratio threshold, that is, when , then the automatic annotation information is invalid, and the expert system needs to determine the annotation information of the original text. =2, when <1 / 2+ 0.2(1-1 / 2)=0.6, the target labeling information is invalid. =3, when <1 / 3+0.2(1-1 / 3) When the value is 0.467, the target labeling information is invalid.
[0176] In steps S1201 to S1202 illustrated in this embodiment, a preset ratio threshold is determined according to the number of annotation categories and the maximum excess threshold, so as to set an intuitive threshold serving as a reference for the quality of the annotation information.
[0177] In some embodiments, if the annotation ratio is greater than or equal to a preset ratio threshold, it means that multiple annotation terminals have annotated the same annotation information, so the target annotation information is stable, so the self-service annotation information and the candidate text are combined to form the target text data to construct text data with annotation quality that meets the requirements.
[0178] See also Fig.13 In some embodiments, after step S106, the text annotation method may further include but is not limited to steps S1301 to S1304:
[0179] Step S1301, obtaining reference annotation data of each annotation end; wherein the reference annotation data includes: the total number of annotations and the number of selected annotations of target annotation information;
[0180] Step S1302, assigning points according to the number of selected annotations and the total number of annotations to obtain the annotation score of each annotation end;
[0181] Step S1303, predicting the confidence of the labeled score according to a preset function to obtain a target confidence;
[0182] Step S1304: divide resources for the annotation end according to the target confidence.
[0183] In step S1301 of some embodiments, in order to allocate resources more reasonably to the annotation end, it is necessary not only to see whether the annotation end performs annotation correctly and objection feedback, but also to judge the accuracy of the annotation end annotation. A higher score can be assigned to an annotation end with a high accuracy, and a more appropriate confidence level can be set to facilitate resource allocation. Therefore, by obtaining the total number of annotations of the annotation end and the number of selected annotations, the number of selected annotations indicates that the annotation information output by the annotation end is correct, that is, the annotation information output by the annotation end is the same as the original annotation information or the same as the target annotation information.
[0184] In step S1302 of some embodiments, the number of selected annotations and the total number of annotations are assigned points using a preset function to obtain the annotation points, and the preset function is ; where M is the number of data entries, is the annotation information of the annotation end, Label the target information. The number of annotation information at the annotation end is equal to the number of target annotation information, that is, the number of selected annotations. It should be noted that the annotation score is expressed in percentage.
[0185] In some embodiments, in step S1303 to step S1304, the score is marked and confidence Set the associated functions between them, such as , M is the number of corpora, the It can be used as the target confidence of the annotation end. It should be noted that the target confidence can be used as a reference value for allocating resources to the annotation end. Therefore, resources are allocated to the annotation end according to the target confidence to encourage the annotation end to make correct annotations.
[0186] In steps S1301 to S1304 shown in this embodiment, the target confidence of each annotation end is calculated based on the total number of annotations and the number of selected annotations, and resources are divided to the annotation ends according to the target confidence to reasonably allocate resources. The enthusiasm of each resource end to correctly annotate is increased through resource division, thereby improving the accuracy and efficiency of text annotation.
[0187] See also Fig.14 The present application also provides a text annotation device, which can implement the above text annotation method, and the device includes:
[0188] The data acquisition module 1401 is used to acquire original text data; wherein the original text data includes: original text and original annotation information of the original text;
[0189] The text classification module 1402 is used to classify the original text and obtain automatic annotation information;
[0190] The text receiving module 1403 is used to receive the extended text; wherein the extended text is obtained by performing synonymous expansion on the original text by the annotation end, and is obtained by screening the synonymous text according to the automatic annotation information;
[0191] The text concatenation module 1404 is used to concatenate the extended text with the original text to obtain the candidate text, and to concatenate the automatic annotation information with the original annotation information to obtain the candidate annotation information of the candidate text;
[0192] The quantity acquisition module 1405 is used to acquire the number of annotations of the same type of candidate annotation information in each candidate text to obtain the number of annotation categories;
[0193] A screening module 1406 is used to screen the candidate annotation information according to the number of annotation categories to obtain target annotation information;
[0194] A ratio acquisition module 1407 is used to acquire the annotation ratio of target annotation information;
[0195] The expert interaction module 1408 is used to generate feedback information to a preset expert system to receive expert annotation information if the annotation ratio is lower than a preset ratio threshold;
[0196] The combining module 1409 is used to combine the expert annotation information and the candidate text to obtain the target text data.
[0197] The specific implementation of the text annotation device is basically the same as the specific implementation of the above-mentioned text annotation method, and will not be repeated here.
[0198] The embodiment of the present application also provides a computer device, the computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the above text annotation method when executing the computer program. The computer device can be any intelligent terminal including a tablet computer, a car computer, etc.
[0199] See also Fig.15 , Fig.15 The hardware structure of a computer device according to another embodiment is shown, and the computer device includes:
[0200] The processor 1501 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;
[0201] The memory 1502 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 1502 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 1502, and the processor 1501 calls and executes the text annotation method of the embodiment of this application;
[0202] Input / output interface 1503, used to implement information input and output;
[0203] Communication interface 1504, used to realize communication interaction between the device and other devices, which can be realized through wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WIFI, Bluetooth, etc.);
[0204] A bus 1505 that transmits information between various components of the device (e.g., the processor 1501, the memory 1502, the input / output interface 1503, and the communication interface 1504);
[0205] The processor 1501 , the memory 1502 , the input / output interface 1503 and the communication interface 1504 are connected to each other in communication within the device via the bus 1505 .
[0206] An embodiment of the present application further provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the above-mentioned text annotation method is implemented.
[0207] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0208] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0209] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.
[0210] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0211] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.
[0212] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0213] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0214] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0215] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0216] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0217] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.
[0218] The preferred embodiments of the present application are described above with reference to the accompanying drawings, but the scope of the rights of the present application is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present application should be within the scope of the rights of the present application.
Claims
1. A text annotation method, characterized in that: The method comprises: Acquire original text data; wherein the original text data includes: original text and original annotation information of the original text; Classifying the original text to obtain automatic annotation information; Receiving the extended text; wherein the annotation end performs synonymous expansion on the content of the original text to obtain a synonymous text, and filters out the extended text from the synonymous text according to the automatic annotation information; The extended text and the original text are concatenated to obtain a candidate text, and the automatic annotation information and the original annotation information are concatenated to obtain candidate annotation information of the candidate text; Obtain the number of annotations of the candidate annotation information of the same category as the candidate text to obtain the number of annotation categories; Screening the candidate annotation information according to the number of annotation categories to obtain target annotation information; Obtaining the marking ratio of the target marking information; If the annotation ratio is lower than a preset ratio threshold, feedback information is generated to a preset expert system to receive expert annotation information; The expert annotation information and the candidate text are combined to obtain target text data.
2. The method according to claim 1, characterized in that The classifying process of the original text to obtain automatic annotation information includes: Performing annotation search in a preset annotation database according to the original text to obtain an annotation search result; If the annotation search result indicates that the annotation database contains annotation information that matches the original text, the annotation information in the annotation database that matches the original text is used as the automatic annotation information; If the annotation search result indicates that the annotation database does not contain annotation information matching the original text, annotation missing information is generated to the annotation end, so as to receive the custom annotation information fed back by the annotation end as the automatic annotation information.
3. The method according to claim 2, characterized in that If the annotation search result is characterized as that the annotation database does not have annotation information matching the original text, generating annotation missing information to the annotation end, so as to receive the custom annotation information fed back by the annotation end as the automatic annotation information, includes: If the annotation search result indicates that the annotation database does not contain annotation information matching the original text, generating the annotation missing information to the annotation end; Receiving annotation feedback data fed back by the annotation end; wherein the annotation feedback data includes: synonymous texts and synonymous annotation information of the synonymous texts, wherein the synonymous texts are obtained by the annotation end of the first party performing synonymous modification on the original texts, and the synonymous annotation information is obtained by the annotation end of the second party classifying the synonymous texts; If the synonymous tagging information is different from the original tagging information, the synonymous tagging information is used as the automatic tagging information.
4. The method according to claim 3, characterized in that If the annotation search result indicates that the annotation database does not have annotation information matching the original text, after generating the annotation missing information to the annotation end, the method further includes: Receiving preliminary annotation information of the original text from the annotation end of the second party; Comparing the original annotation information with the preliminary annotation information to obtain a first comparison result; Performing a score prediction according to the first comparison result and a preset score mapping relationship to obtain a first score and a second score; wherein the score mapping relationship includes a mapping relationship between the comparison result and the first score and the second score, the first score is the score of the first party, and the second score is the score of the second party; Comparing the original annotation information with the synonymous annotation information to obtain a second comparison result; Performing score prediction according to the second comparison result and the score mapping relationship to obtain a third score and a fourth score; wherein the third score is the score of the first party, and the fourth score is the score of the second party; Constructing a first total score of the annotated end of the first party according to a preset first variation coefficient, the first score and the third score; Constructing a second total score of the annotated end of the second party according to a preset second variation coefficient, the second score and the fourth score; Resources are allocated to the annotated end of the first party according to the first total score, and resources are allocated to the annotated end of the second party according to the second total score.
5. The method according to claim 1, characterized in that After the original text is classified and the automatic annotation information is obtained, the method further includes: Receiving objection information from the annotation end to the automatic annotation information; Feeding back the objection information to the expert system, and receiving objection review information fed back by the expert system; If the objection review information indicates that the objection has been passed, the automatic marking information is updated according to the objection information to obtain updated marking information; If the objection review information indicates that the objection has not been passed, the automatic marking information is retained.
6. The method according to any one of claims 1 to 5, characterized in that: The screening and processing of the candidate annotation information according to the number of the annotation categories to obtain the target annotation information includes: Obtaining the maximum number of categories from the number of labeled categories; The candidate labeling information of the maximum number of categories is used as the target labeling information.
7. The method according to claim 6, characterized in that The obtaining the annotation ratio of the target annotation information includes: Obtain the total number of annotations of the candidate annotation information; The ratio of the maximum number of categories to the total number of annotations is calculated to obtain the annotation ratio of the target annotation information.
8. The method according to any one of claims 1 to 5, characterized in that: If the annotation ratio is lower than a preset ratio threshold, before generating feedback information to a preset expert system to receive expert annotation information, the method further includes: Setting the preset ratio threshold includes: Obtain the number of marked categories and the minimum excess threshold; wherein the minimum excess threshold is less than 1; The number of marked categories and the minimum excess threshold are input into a preset formula to obtain the preset ratio threshold; wherein the preset formula is: ; In the formula, is the number of labeled categories, is the minimum excess threshold.
9. The method according to any one of claims 1 to 5, characterized in that: After the candidate annotation information is screened according to the number of annotation categories to obtain target annotation information, the method further includes: Acquire reference annotation data of each of the annotation ends; wherein the reference annotation data includes: the total number of annotations and the number of selected annotations of target annotation information; Distribute scores according to the number of selected annotations and the total number of annotations to obtain the annotation score of each of the annotation ends; Performing confidence prediction on the labeled score according to a preset function to obtain a target confidence; Resources are divided for the annotation end according to the target confidence.
10. The method according to any one of claims 1 to 5, characterized in that: After obtaining the annotation ratio of the target annotation information, the method further includes: If the annotation ratio is greater than or equal to the preset ratio threshold, the target annotation information and the candidate text are combined into target text data.
11. A text annotation device, characterized in that: The device comprises: A data acquisition module, used to acquire original text data; wherein the original text data includes: original text and original annotation information of the original text; A text classification module is used to classify the original text to obtain automatic annotation information; A text receiving module, used for receiving an extended text; wherein the annotation end performs synonymous expansion on the content of the original text to obtain a synonymous text, and selects the extended text from the synonymous text according to the automatic annotation information; A text concatenation module is used to concatenate the extended text with the original text to obtain a candidate text, and to concatenate the automatic annotation information with the original annotation information to obtain the candidate text. Candidate annotation information of A quantity acquisition module, used to acquire the number of annotations of the candidate annotation information of the same category as the candidate text, and obtain the number of annotation categories; A screening module, used to screen the candidate annotation information according to the number of the annotation categories to obtain target annotation information; A ratio acquisition module, used to acquire the annotation ratio of the target annotation information; An expert interaction module, for generating feedback information to a preset expert system to receive expert annotation information if the annotation ratio is lower than a preset ratio threshold; The combination module is used to combine the expert annotation information and the candidate text to obtain target text data.
12. A computer device, characterized in that: The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the text annotation method according to any one of claims 1 to 10 when executing the computer program.
13. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the text annotation method according to any one of claims 1 to 10 is implemented.
Citation Information
Patent Citations
Information classification method and apparatus, computer device and storage medium
CN108491406A
Text processing method and device, equipment, storage medium and computer program product
CN114676255A
Text extension method and device, equipment and medium
CN114912448A
Annotation method, annotation device, computer equipment and storage medium
CN115034187A
Voice-to-text conversion method and device, computer equipment and storage medium
CN116631400A
