Text automatic labeling method, system, device and terminal for judgment documents

By combining text augmentation and semi-supervised learning, the problem of poor parsing of judicial documents was solved, achieving efficient and accurate automatic text annotation and improving the data support capabilities for judicial intelligence.

CN116450817BActive Publication Date: 2026-03-24湖南工商大学
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-11
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

In existing technologies, the parsing of court documents usually only performs fuzzy structural segmentation, resulting in overly coarse results in the extraction of legal elements by machines. There is a lack of methods for parsing the substantive content of legal cases, leading to poor parsing results.

Method used

We employ a combination of text augmentation and semi-supervised learning. We use the Jieba Chinese parser for word segmentation, dynamic programming to find the path with the highest probability, build a corpus annotation library for automatic annotation, train the text using a machine learning model, and adjust the annotation score after user rating.

Benefits of technology

It greatly reduces the manual cost of text entity annotation, improves the efficiency and accuracy of text annotation, and provides data support for the field of intelligent justice.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116450817B_ABST
    Figure CN116450817B_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of data labeling, and discloses a method, system, device and terminal for automatically labeling text about judgment documents, wherein the text with punctuation symbols is divided into sentences and then input into a Jieba Chinese parser for word segmentation; based on the word frequency word segmentation result, a dynamic programming method is used to find the path with the maximum probability, and the text word segmentation terms are stored in an intermediate database; the manually labeled text is trained through a machine learning model, and automatic labeling of the text is realized through a constructed corpus labeling library; after the annotation data in the database are scored, the labeling is automatically reloaded, and data sorting is performed according to the labeling score. Through the method combining text enhancement and semi-supervised learning, the target case document is subjected to event extraction and labeling according to preset event extraction rules, and combined with an external online database, the labor cost of text entity labeling is greatly reduced, and the efficiency and accuracy of text labeling are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of data annotation technology, and in particular relates to a method, system, device and terminal for automatic text annotation of judicial documents. Background Technology

[0002] Currently, data annotation is a crucial step for the effective operation of most artificial intelligence algorithms. The more accurate the data annotation and the larger the amount of labeled data, the better the algorithm's performance.

[0003] With the rapid development of technologies such as artificial intelligence and big data, the judicial field has gradually begun the process of informatization and intelligentization. The automatic annotation of judgment documents aims to use cutting-edge artificial intelligence technology to scientifically analyze a large amount of legal text data. After preliminary cleaning and classification, the data is automatically annotated according to certain rules in order to provide data support for relevant research on judicial intelligence.

[0004] The judgment document annotation system will perform preprocessing operations such as data cleaning, transformation, and storage on the data crawled from China Judgments Online; extract information such as title, case number, crime, court of trial, and time from the text to realize the retrieval function; design and implement the event information configuration function of the system annotation; and use front-end dynamic interactive components to realize document event annotation with text operation monitoring as the core.

[0005] The court judgment annotation system, using documents related to environmental protection crimes as an example, completes the entire process of transforming raw unstructured data into structured data that is searchable and accessible. The rigorous analysis process and the intuitive visualization of case and annotation information enhance the system's scientific rigor and universality. This platform plays a significant role in the integration of the computer industry and the judicial field, and in the informatization of the judiciary.

[0006] However, current analysis of legal judgments typically involves only a fuzzy structural segmentation of the entire judgment text. This results in overly coarse extraction of legal elements by machines, which generally only lists relevant content containing certain fixed keywords. In particular, the lack of analysis methods for the substantive content of legal cases leads to poor analysis results of judgment content.

[0007] Based on the above analysis, the problems and shortcomings of the existing technology are as follows:

[0008] (1) Currently, the analysis of legal judgment documents usually only performs fuzzy structural segmentation of the full text of the judgment document, which results in the machine extracting legal elements in a very crude way.

[0009] (2) Existing technologies only list relevant content containing certain fixed keywords, and especially lack analysis methods involving the substantive content of legal cases, resulting in poor analysis of the content of judgment documents. Summary of the Invention

[0010] To address the problems existing in the prior art, this invention provides a method, system, device, and terminal for automatic text annotation of judicial documents.

[0011] This invention is implemented as follows: an automatic text annotation method for judicial documents. The automatic text annotation method for judicial documents includes: segmenting the text with punctuation marks into sentences and inputting them into the Jieba Chinese parser for word segmentation; based on the word frequency segmentation results, using dynamic programming to find the path with the highest probability, and storing the text segmentation terms in an intermediate segmentation database; training manually annotated text using a machine learning model, and achieving automatic text annotation through a constructed corpus annotation library; automatically reloading the annotations after scoring the annotation data in the database, and sorting the data according to the annotation scores.

[0012] Furthermore, the method for automatic text annotation of court judgments includes the following steps:

[0013] Step 1: Before word segmentation, the text is preprocessed and then input into the parser for word segmentation;

[0014] Step 2: Based on the word frequency segmentation results, a dynamic programming method is used to determine the path with the highest probability.

[0015] Step 3: Store the terms obtained from text segmentation in the intermediate segmentation database and output and display them;

[0016] Step 4: Train the manually annotated text and implement automatic annotation of the segmented text;

[0017] Step 5: Determine the correctness and helpfulness of the annotations and score the annotation data in the database.

[0018] Furthermore, in step one, the text with punctuation marks is automatically segmented into sentences before formal word segmentation, and then input into the parser for word segmentation; the Jieba Chinese parser is used, and a custom dictionary with an expandable vocabulary is used.

[0019] Furthermore, in step two, based on all possible words in the sentence with a tree structure, a dynamic programming method is used to find the path with the highest probability; where the path is based on the word frequency segmentation results, the search parser dictionary will search for the most correct word segmentation for the terms until the entire text is segmented.

[0020] Furthermore, in step three, the terms obtained from text segmentation are stored in the intermediate segmentation database for text representation and automatic annotation; the segmented text is then output to a text reader to display the full text.

[0021] Furthermore, in step four, the manually annotated text is trained using a machine learning model, and the trained document data is loaded into the database.

[0022] After the segmented text is loaded into the reader, the system begins automatic annotation, performing automatic annotation on the segmented text. Automatic text annotation is achieved through a constructed corpus annotation library, using event elements as the annotation source, loading event elements retrieved from the database as reference data for automatic annotation.

[0023] Furthermore, in step five, after the user completes the automatic annotation process, they can move the cursor on the reader to the automatically annotated entry and click to view the annotation data in the linked database. The annotation data is arranged in the order of the linked database.

[0024] Users judge the correctness and helpfulness of annotations and score the annotation data in the database. After users score the annotations from the database, the system calculates the score, automatically reloads the annotations, and sorts the data from the database according to the annotation scores, displaying the annotations with higher scores first.

[0025] Another objective of this invention is to provide an automatic text annotation system for judgment documents that applies the aforementioned automatic text annotation method for judgment documents. The automatic text annotation system for judgment documents includes:

[0026] The text preprocessing module is used to automatically segment punctuated text into sentences before formal word segmentation. It uses a custom dictionary with an expandable vocabulary and inputs it into the Jieba Chinese parser for word segmentation.

[0027] The dynamic programming module is used to find the path with the highest probability based on the word segmentation results of all possible words in a tree-structured sentence and word frequency.

[0028] The manual annotation text training module is used to train a machine learning model on manually annotated text and load the trained document data into the database.

[0029] The automatic text annotation module is used to automatically annotate text through a constructed corpus annotation library and load event elements obtained from the database as reference data for automatic annotation.

[0030] The annotation data scoring module is used to determine the correctness and helpfulness of annotations, score the annotation data in the database, and sort the data from the database according to the annotation scores;

[0031] The data storage module is used to store the terms obtained from text segmentation in the intermediate segmentation database for text representation and automatic annotation, and to load the trained document data into the database.

[0032] Another object of the present invention is to provide a computer device, the computer device including a memory and a processor, the memory storing a computer program, which, when executed by the processor, causes the processor to perform the steps of the method for automatically annotating text of judicial documents.

[0033] Another objective of this invention is to provide an information data processing terminal for implementing the aforementioned automatic text annotation system for judicial documents.

[0034] Based on the above technical solutions and the technical problems solved, the advantages and positive effects of the technical solution to be protected by this invention are as follows:

[0035] First, addressing the technical problems existing in the prior art and the difficulty of solving them, this paper closely analyzes, in conjunction with the technical solution to be protected by this invention and the results and data obtained during the research and development process, how the technical solution of this invention solves the technical problems, and the inventive technical effects brought about by solving these problems. The specific description is as follows:

[0036] This invention uses a combination of text augmentation and semi-supervised learning to extract and annotate events from target case documents according to preset event extraction rules. Combined with an external online database, this greatly reduces the manual cost of text entity annotation and significantly improves the efficiency and accuracy of text annotation.

[0037] Second, considering the technical solution as a whole or from a product perspective, the technical effects and advantages of the technical solution to be protected by this invention are specifically described as follows:

[0038] This invention specifically relates to a method for automatically annotating the text of judgment documents on the China Judgments Online website, which can provide support for analysis in the field of intelligent justice. Attached Figure Description

[0039] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0040] Figure 1 This is a flowchart of an automatic text annotation method for judicial documents provided in an embodiment of the present invention. Detailed Implementation

[0041] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0042] To address the problems existing in the prior art, the present invention provides a method, system, device, and terminal for automatic text annotation of judicial documents. The present invention will be described in detail below with reference to the accompanying drawings.

[0043] I. Explanatory and Illustrative Embodiments. To enable those skilled in the art to fully understand how the present invention is specifically implemented, this section provides an explanatory and illustrative description of the embodiments described in the claims.

[0044] like Figure 1 As shown, the automatic text annotation method for judicial documents provided in this embodiment of the invention includes the following steps:

[0045] S101, The text is preprocessed before being input into the parser for word segmentation;

[0046] S102, Based on the word frequency segmentation results, a dynamic programming method is used to determine the path with the highest probability;

[0047] S103, Store the terms obtained from text segmentation in the intermediate segmentation database and output and display them;

[0048] S104, train on manually annotated text and achieve automatic annotation of word segmented text;

[0049] S105, determine the correctness and helpfulness of the annotations and score the annotation data in the database.

[0050] As a preferred embodiment, the automatic text annotation method for judicial documents provided by this invention specifically includes the following steps:

[0051] S1. Text preprocessing is required before word segmentation. In word segmentation preprocessing, the text with punctuation marks is automatically split into sentences before formal word segmentation, and then input into the parser for word segmentation.

[0052] S2. This method uses the Jieba Chinese parser and a custom dictionary with an expandable vocabulary. Based on all possible words in a sentence within a tree structure, dynamic programming is used to find the path with the highest probability. This path is the word segmentation result based on word frequency. At this stage, terms in the parser's dictionary are searched to find the most accurate word segmentation until the entire text is segmented.

[0053] S3. Store the terms obtained from the previous stage of text segmentation in the intermediate segmentation database for text representation and automatic annotation.

[0054] S4. The segmented text is output to a text reader to display the full text.

[0055] S5. Train the manually annotated text using a machine learning model, and load the trained document data into the database.

[0056] S6. After loading the segmented text into the reader, the system begins to load automatic annotations and automatically annotates the segmented text.

[0057] S7. Automatic text annotation is achieved through a constructed corpus annotation library. Event elements are used as the annotation source, and event elements obtained from the database are loaded as reference data for automatic annotation.

[0058] S8. After the user completes the automatic annotation process, they can move the cursor on the reader to the automatically annotated entry and click to view the annotation data in the linked database. This annotation data is arranged in the order of the linked database. In this case, the user can judge the correctness and helpfulness of the annotations and score the annotation data in the database.

[0059] S9. After the user rates the annotations from the database, the system calculates the rating score, automatically reloads the annotations, and sorts the data from the database according to the annotation scores; annotations with higher scores are displayed first.

[0060] II. Evidence of the Relevant Effects of the Embodiments. The embodiments of the present invention have achieved some positive effects during research and development or use, and indeed possess significant advantages compared to existing technologies. The following description, in conjunction with data, charts, and other materials from the experimental process, illustrates these advantages.

[0061] As a preferred embodiment, the automatic text annotation method for judicial documents provided by this invention specifically includes the following steps:

[0062] 1. Analyze the case texts and manually annotate the events to be extracted, annotating a small number of cases.

[0063] 2. Obtain the text to be extracted, and perform word encoding and position encoding on each word in the text to be extracted to obtain the word embedding vector and position embedding vector corresponding to the text to be extracted.

[0064] 3. The text to be extracted can correspond to one event type or multiple event types. In this embodiment, the example of the text to be extracted corresponding to multiple event types will be used for illustration.

[0065] 4. The text to be extracted includes several words. Each word is encoded to form a word vector. Position encoding is used to encode the position information of the words in the text to be extracted. Position encoding will form a position vector.

[0066] 5. After obtaining the word vectors corresponding to each word, arrange the word vectors according to the order of each word in the text to be extracted to obtain the word embedding vectors corresponding to the text to be extracted; then, arrange the position vectors according to the order of each word in the sentence to be extracted to obtain the position embedding vectors corresponding to the sentence to be extracted.

[0067] 6. Add the word embedding vector and the position embedding vector to obtain the first input vector, input the first input vector into the pre-trained encoder, and output the contextualized expression vector of the sentence to be extracted through the encoder.

[0068] 7. The word embedding vector and the position embedding vector mentioned above have the same number of elements and the same vector dimension.

[0069] 8. In this embodiment of the invention, the vector dimension of each word vector and each position vector is the same, so as to perform calculations and improve the efficiency of event extraction.

[0070] 9. In this embodiment of the invention, the pre-trained encoder is a pre-trained Transformer language model encoder (i.e., a Transformer encoder), which is not specifically limited here. The encoder's input (i.e., the first input vector) consists of two parts: the first part is the word embedding of the sentence text after passing through the word embedding layer, and the second part is the positional embedding of the positional information after passing through the positional embedding layer. After the first input vector is encoded by the Transformer language model's self-attention mechanism, the output is a contextualized representation vector corresponding to the sentence to be extracted. The contextualized representation vector is the result of the model mapping the input data to the same dimensional space through the attention mechanism.

[0071] 10. Input the above contextualized expression vector into a pre-trained multi-label event type classifier, determine the event type embedding vector corresponding to the above statement to be extracted through the multi-label event type classifier, and obtain the event type comprehensive vector corresponding to the above statement to be extracted based on the above event type embedding vector.

[0072] It should be noted that embodiments of the present invention can be implemented in hardware, software, or a combination of both. The hardware portion can be implemented using dedicated logic; the software portion can be stored in memory and executed by a suitable instruction execution system, such as a microprocessor or dedicated-design hardware. Those skilled in the art will understand that the above-described devices and methods can be implemented using computer-executable instructions and / or included in processor control code, for example, such code provided on a carrier medium such as a disk, CD, or DVD-ROM, a programmable memory such as read-only memory (firmware), or a data carrier such as an optical or electronic signal carrier. The devices and modules of the present invention can be implemented by hardware circuitry such as very large-scale integrated circuits or gate arrays, semiconductors such as logic chips, transistors, or programmable hardware devices such as field-programmable gate arrays, programmable logic devices, etc., or by software executed by various types of processors, or by a combination of the above-described hardware circuitry and software, such as firmware.

[0073] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any modifications, equivalent substitutions, and improvements made by those skilled in the art within the scope of the technology disclosed in the present invention, and within the spirit and principles of the present invention, should be covered within the scope of protection of the present invention.

Claims

1. A method for automatic text annotation of court judgments, characterized in that, The automatic text annotation method for court judgments includes: segmenting the text with punctuation marks into sentences and then inputting it into the Jieba Chinese parser for word segmentation; based on the word frequency segmentation results, using dynamic programming to find the path with the highest probability, and storing the text segmentation terms in an intermediate segmentation database; training manually annotated text using a machine learning model, and achieving automatic text annotation through a constructed corpus annotation library; automatically reloading the annotations after scoring the annotation data in the database, and sorting the data according to the annotation scores; The method for automatic text annotation of court judgments includes the following steps: Step 1: Before word segmentation, the text is preprocessed and then input into the parser for word segmentation; Step 2: Based on the word frequency segmentation results, a dynamic programming method is used to determine the path with the highest probability. Step 3: Store the terms obtained from text segmentation in the intermediate segmentation database and output and display them; Step 4: Train the manually annotated text and implement automatic annotation of the segmented text; Step 5: Determine the correctness and helpfulness of the annotations and score the annotation data in the database; In step one, the text with punctuation marks is automatically segmented into sentences before formal word segmentation, and then input into the parser for word segmentation; the Jieba Chinese parser is used, and a custom dictionary with an expandable vocabulary is used; In step four, the manually annotated text is trained using a machine learning model, and the trained document data is loaded into the database. After the segmented text is loaded into the reader, the system begins to load automatic annotations and automatically annotates the segmented text. Automatic text annotation is achieved through the constructed corpus annotation library, using event elements as the annotation source, and loading event elements obtained from the database as reference data for automatic annotation.

2. The method for automatic text annotation of judgment documents as described in claim 1, characterized in that, In step two, based on all possible words in the sentence with a tree structure, a dynamic programming method is used to find the path with the highest probability. The path is based on the word frequency segmentation results, and the terms in the search parser dictionary are used to find the most correct word segmentation until the entire text is segmented.

3. The method for automatic text annotation of judgment documents as described in claim 1, characterized in that, In step three, the terms obtained from text segmentation are stored in the intermediate segmentation database for text representation and automatic annotation; the segmented text is then output to a text reader to display the full text.

4. The method for automatic text annotation of judgment documents as described in claim 1, characterized in that, In step five, after the user completes the automatic annotation process, they can move the cursor on the reader to the automatically annotated entry and click to view the annotation data in the linked database. The annotation data is arranged in the order of the linked database. Users judge the correctness and helpfulness of annotations and score the annotation data in the database. After users score the annotations from the database, the system calculates the score, automatically reloads the annotations, and sorts the data from the database according to the annotation scores, displaying the annotations with higher scores first.

5. A system for automatically annotating text of judgment documents using the automatic text annotation method for judgment documents as described in any one of claims 1 to 4, characterized in that, Automatic text annotation systems for court judgments include: The text preprocessing module is used to automatically segment punctuated text into sentences before formal word segmentation. It uses a custom dictionary with an expandable vocabulary and inputs it into the Jieba Chinese parser for word segmentation. The dynamic programming module is used to find the path with the highest probability based on the word segmentation results of all possible words in a tree-structured sentence and word frequency. The manual annotation text training module is used to train a machine learning model on manually annotated text and load the trained document data into the database. The automatic text annotation module is used to automatically annotate text through a constructed corpus annotation library and load event elements obtained from the database as reference data for automatic annotation. The annotation data scoring module is used to determine the correctness and helpfulness of annotations, score the annotation data in the database, and sort the data from the database according to the annotation scores; The data storage module is used to store the terms obtained from text segmentation in the intermediate segmentation database for text representation and automatic annotation, and to load the trained document data into the database.

6. A computer device, characterized in that, The computer device includes a memory and a processor. The memory stores a computer program, which, when executed by the processor, causes the processor to perform the steps of the automatic text annotation method for judicial documents as described in any one of claims 1 to 4.

7. An information data processing terminal, characterized in that, The information data processing terminal is used to implement the automatic text annotation system for judgment documents as described in claim 5.

Citation Information

Patent Citations

  • Adjudication document annotation method and device based on machine learning algorithm

    CN108334500A