Contract file text content extraction method based on ocr, nlp and regular expression

Through the deep learning model combined with regular expression methods, the key information in trade contract documents is automatically processed and extracted, which solves the problem that existing technology is difficult to efficiently handle non-standard contract documents, and achieves efficient and accurate automated review.

CN119888754APending Publication Date: 2025-04-25重庆富民银行股份有限公司
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411970819.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

The prior art is difficult to efficiently and accurately identify and process non-standardized trade contract documents, resulting in long manual review time, high cost and susceptible to human factors.

Method used

The OCR text recognition model and the NLP keyword extraction model based on deep learning are adopted, combined with regular expressions, and the contract files are processed automatically, key information is extracted and verified.

Benefits of technology

It significantly reduces the time and cost of manual audits, improves processing efficiency, enhances the accuracy of information verification and system adaptability, and reduces labor costs and error rates.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119888754A_ABST
    Figure CN119888754A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of contract management, and discloses a contract file text content extraction method based on ocr, nlp and a regular expression, and the method comprises the following steps: S1, employing a deep learning framework to construct an OCR text recognition model and an NLP keyword extraction model, and training the models; s2, deploying the trained model in a container, and providing an interface for a business system to call; s3, the business system receives a contract file uploaded by a client, performs text detection and recognition by using an OCR character recognition model, and extracts contract text content; performing information extraction by using an NLP keyword extraction model, and extracting keywords and structured information; s4, matching the contract file identification result with the order contract information by using a regular expression; s5, finding out an unmatched part and marking the unmatched part; the technical problem that the auditing work of the non-standardized trade contract file cannot be efficiently and accurately identified and processed in the prior art is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of contract management, and in particular to a method for extracting text content from a contract document based on OCR, NLP and regular expressions. Background Art

[0002] In the financial market, bill discounting, as an important short-term financing method, is widely used to meet corporate financing needs. According to regulatory requirements, bill discounting business must be based on real trade background to ensure that funds flow to the real economy and prevent financial idleness and arbitrage. Therefore, in the bill discounting scenario, the financing company needs to upload real and valid trade background certification materials to prove that its financing needs are related to real trade activities. These trade background materials usually include non-standardized documents such as trade contracts, invoices, and transport documents, which carry key transaction information, such as the two parties to the transaction, product description, transaction amount, transaction time, etc.

[0003] At present, the processing of trade background certification materials in the market mainly relies on manual review. This process includes receiving paper or electronic documents submitted by enterprises, and then professional reviewers check the trade information in the documents one by one to ensure its authenticity, accuracy and completeness. Although manual review has certain advantages in accuracy and reliability, facing the growing demand for bill discounting and complex trade background materials, this model has gradually exposed many shortcomings.

[0004] The review of trade background materials requires certain financial, legal and trade knowledge, so auditors need to undergo professional training. As the volume of business increases, the demand for the number and quality of auditors also increases, resulting in a sharp increase in labor costs. The manual review process is cumbersome, takes a lot of time to check information item by item, and is easily affected by human factors, such as fatigue and negligence.

[0005] Although OCR (optical character recognition) and NLP (natural language processing) technologies have made significant progress in document recognition and text analysis, due to the non-standard characteristics of trade background materials, such as diverse formats and complex content, existing technologies find it difficult to accurately and comprehensively extract key information. Summary of the invention

[0006] The present invention aims to provide a method for extracting text content from contract documents based on OCR, NLP and regular expressions, so as to solve the technical problem that the prior art cannot efficiently and accurately identify and process the review of non-standardized trade contract documents.

[0007] To achieve the above object, the present invention adopts the following technical solution: a method for extracting text content of contract documents based on OCR, NLP and regular expressions, comprising the following steps:

[0008] S1. Build a model, using a deep learning framework to build an OCR text recognition model and an NLP keyword extraction model, wherein the OCR text recognition model is used to recognize text information in the contract document, and the NLP keyword extraction model is used to extract keywords from the recognition results of the OCR text recognition model;

[0009] The OCR text recognition model and the NLP keyword extraction model are trained using a contract sample data set, wherein the contract sample data set includes a contract document and an annotated document;

[0010] S2. Save and deploy the model. Save the trained NLP keyword extraction model and OCR text recognition model. Deploy them in a container and provide an interface for the business system to call.

[0011] S3. Asynchronously process the contract file. The business system receives the contract file uploaded by the customer and sends it to the asynchronous processing queue of the OCR and NLP services. The OCR service receives the contract file and uses the OCR text recognition model to detect and recognize the text and extract the contract text content. The NLP service receives the text content extracted by the OCR service and uses the NLP keyword extraction model to extract information and extract keywords and structured information. The processing results of OCR and NLP are combined to obtain the recognition result of the contract file.

[0012] S4. Use regular expressions to match the contract document recognition result with the order contract information;

[0013] S5. Mark and display the results, compare the contract document recognition results with the order contract information, find out the mismatching parts and mark them; display the marked contract document recognition results and order contract information on the order review page.

[0014] The principles and advantages of this solution are: in actual application, the time and cost of manual review are significantly reduced by automating the processing of contract documents; the asynchronous processing mechanism enables the system to process multiple contract documents at the same time, further improving processing efficiency; using the deep learning framework, an OCR text recognition model and an NLP keyword extraction model are constructed, and the model is trained using a sample data set containing contract documents and corresponding annotated files to improve the model's recognition accuracy and information extraction capabilities.

[0015] The trained OCR and NLP models are saved and deployed in a container, providing an interface for the business system to call. In this way, the business system can call these models in real time or asynchronously to process contract documents. Regular expressions refined by expert experience are used to match the contract document recognition results with the order contract information to further verify the accuracy and completeness of the information.

[0016] The combined use of OCR and NLP models can accurately identify text information in contract documents and extract key structured information. The application of regular expressions further enhances the accuracy of information verification and reduces the risk of misjudgment and omission. This solution not only utilizes the automated processing capabilities of machine learning, but also combines regular expressions refined by expert experience to achieve dual guarantees of technology and experience. This integrated approach enables the system to handle more complex trade contract documents and improves the adaptability and flexibility of the system.

[0017] Automated processing reduces reliance on manual review and reduces labor costs. At the same time, the system's efficient processing also reduces errors and omissions caused by manual fatigue or negligence. By automatically processing and verifying contract document information, the system can more effectively identify potential risk points and enhance risk prevention and control capabilities. This helps ensure that bill discounting business is based on a real trade background and prevent financial idleness and arbitrage.

[0018] Preferably, as an improvement, in step S1, the deep learning framework is Baidu Feipang deep learning framework, the OCR text recognition model is PaddleOCR, and the NLP keyword extraction model is PaddleNLP.

[0019] The beneficial effect of this improvement is that Baidu Feipang deep learning framework, as a deep learning platform independently developed by Baidu, is highly compatible and stable with PaddleOCR and PaddleNLP, which can ensure the efficient operation of model training and reasoning. PaddleOCR and PaddleNLP provide a wealth of pre-trained models and tools, supporting OCR text recognition and NLP keyword extraction tasks in multiple languages ​​and scenarios, lowering the development threshold and improving application efficiency. PaddleOCR and PaddleNLP based on Baidu Feipang deep learning framework achieve faster reasoning speed while maintaining high accuracy, and have good scalability, which can adapt to application scenarios of different scales and complexities.

[0020] Preferably, as an improvement, in step S1, training the OCR text recognition model includes: selecting a PPv3-OCR model, which includes a text detection module based on a DB algorithm and a text recognition module based on an SVTR algorithm.

[0021] The beneficial effects of this improvement are: the DB algorithm performs well in text detection and can accurately detect the text area in the image; while the SVTR algorithm has a strong text recognition ability and can accurately recognize the text content. The combination of the two can significantly improve the accuracy of OCR text recognition. While maintaining high accuracy, the PPv3-OCR model also focuses on improving the inference speed, so that the OCR text recognition task can be completed in a shorter time.

[0022] Preferably, as an improvement, in step S1, training the NLP keyword extraction model includes: integrating PaddleNLP and selecting the UIE model; defining a schema, which defines the keyword information to be extracted and related context or prompts; and training the UIE model in PaddleNLP using a contract sample data set.

[0023] The beneficial effect of this improvement is that the UIE model, as an advanced information extraction model in PaddleNLP, can accurately extract keyword information from text to meet the needs of specific application scenarios. By defining the schema, users can customize the keyword information and related context or prompts to be extracted according to their needs, which improves the flexibility and adaptability of the model. Using the contract sample dataset for training enables the model to better adapt to the characteristics and format of the contract text, improving the accuracy and efficiency of keyword extraction.

[0024] Preferably, as an improvement, multiple optimization strategies are incorporated into the text detection module based on the DB algorithm, including LK-PAN, DML and RSE-FPN.

[0025] The beneficial effects of this improvement are: LK-PAN (Large Kernel PAN): Adopting the PAN (Path Aggregation Network) structure with a large receptive field to enhance the model's ability to capture text context information. DML (Deep Mutual Learning): Adopting the teacher model mutual learning strategy, through mutual learning between multiple models, the overall performance is improved. RSE-FPN (Residual SE-FPN): Combining the FPN (Feature Pyramid Network) structure with residual connection and attention mechanism to improve the efficiency and accuracy of feature extraction.

[0026] Optimization strategies such as LK-PAN, DML, and RSE-FPN can improve the model's ability to detect text images with complex backgrounds, different fonts, and print quality, thereby improving the accuracy of text detection. These optimization strategies can increase the robustness of the model, enabling it to better adapt to text detection tasks in different scenarios and conditions.

[0027] Preferably, as an improvement, a plurality of optimization strategies are incorporated into the text recognition module based on the SVTR algorithm, including GTC, TextConAug, TextRotNet, UDML and UIM.

[0028] The beneficial effects of this improvement are: GTC (Guided Training with CTC): Adopt Attention to guide the CTC (Connectionist Temporal Classification) training strategy to improve the model's ability to learn sequence labels. TextConAug (Text Context Augmentation): A data augmentation strategy that mines text context information to improve the generalization ability of the model by enhancing data diversity. TextRotNet: A self-supervised pre-training model that improves the model's robustness to text direction changes through rotation prediction tasks. UDML (Unified Deep Mutual Learning): A joint mutual learning strategy that further improves recognition performance through mutual learning between multiple recognition models. UIM (Unlabeled Image Mining): An unlabeled data mining solution that uses unlabeled data to further improve the recognition ability of the model.

[0029] Optimization strategies such as GTC, TextConAug, and TextRotNet can improve the model's ability to recognize text images and reduce the impact of recognition errors and noise. Optimization strategies such as UDML and UIM can enhance the model's ability to adapt to changes in text images, enabling it to better adapt to text recognition tasks with different fonts, sizes, and layout formats.

[0030] Preferably, as an improvement, the PPOCRLabel tool is used to manually mark the parts that need to be identified in multiple contract documents to form a contract sample data set.

[0031] The beneficial effect of this improvement is that by manually annotating contract documents, the accuracy and completeness of the data set can be ensured, providing a reliable basis for subsequent model training. The resulting contract sample data set can better reflect the characteristics and format of the contract text, allowing the model to better adapt to the processing needs of the contract text in subsequent training.

[0032] Preferably, as an improvement, the UIE model is trained based on a sentence generation model of Seq2Seq, and SLE is generated by inputting SSL and Text.

[0033] The beneficial effect of this improvement is that the Seq2Seq sentence generation model can generate more flexible and diverse outputs, allowing the model to better adapt to texts of different formats and contents in information extraction tasks. By inputting SSL (semantic representation or context information) and Text, the model can better understand the semantic information in the text, thereby improving the accuracy and efficiency of information extraction.

[0034] Preferably, as an improvement, the UIE model adopts a reading comprehension-style extraction method to generate SLE.

[0035] The beneficial effects of this improvement are: the extractive method of reading comprehension can more accurately extract keyword information from the text, reducing the number of misjudgments and missed judgments. The extractive method is easier to explain and verify the output of the model, making the model more reliable and trustworthy in practical applications. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 is a flow chart of an embodiment of the present invention. DETAILED DESCRIPTION

[0037] The following is further described in detail through specific implementation methods:

[0038] Example

[0039] Basically as attached Figure 1 As shown, a method for extracting text content from a contract document based on OCR, NLP and regular expressions includes:

[0040] S1. Use Baidu Feipang deep learning framework to build an OCR text recognition model (PaddleOCR) and an NLP keyword extraction model (PaddleNLP). The OCR text recognition model is used to identify text information in contract documents, and the NLP keyword extraction model is used to extract keywords from the recognition results of the OCR text recognition model.

[0041] S101. Use the contract sample data set to train the OCR text recognition model and the NLP keyword extraction model, and use the PPOCRLabel tool to manually mark the parts that need to be recognized in multiple contract documents to form a contract sample data set.

[0042] The annotation content includes text content, corresponding position, keywords, etc. The contract sample dataset includes the original contract file in image format and annotation files, such as Label.txt (label file for text detection tasks), rec_gt.txt (label file for text recognition tasks), etc. Convert the contract sample dataset to the data format required by PaddleOCR, organize the annotation files and corresponding image files into a specific folder structure, and generate corresponding data list files (such as train_list.txt, val_list.txt, etc.).

[0043] Collect and organize a large amount of contract document data to ensure data diversity and representativeness; pre-process the data, such as denoising, cropping, normalization, etc., to improve the efficiency and effect of model training. Divide the organized contract document data into training set and validation set. The training set is used for model training, and the validation set is used to evaluate model performance. Ensure that the ratio of training set and validation set is reasonable, generally 70%-80% for training set and 20%-30% for validation set.

[0044] S102. The construction and training methods of PaddleOCR include:

[0045] PaddleOCR uses the PPv3-OCR model, which is a high-performance OCR model that is particularly suitable for text detection and recognition tasks. The text detection module of PPv3-OCR is based on the DB (Differentiable Binarization) algorithm, which achieves accurate detection of text areas through a differentiable binarization process.

[0046] In order to improve the detection effect, the module also incorporates a number of optimization strategies, including:

[0047] LK-PAN (Large Kernel PAN): It uses a PAN (Path Aggregation Network) structure with a large receptive field to enhance the model's ability to capture text context information.

[0048] DML (Deep Mutual Learning): Adopts the teacher model mutual learning strategy to improve the overall performance through mutual learning between multiple models.

[0049] RSE-FPN (Residual SE-FPN): Combining the FPN (Feature Pyramid Network) structure with residual connection and attention mechanism to improve the efficiency and accuracy of feature extraction.

[0050] The text recognition module of PPv3-OCR uses the SVTR (Scene Text Recognition with a Single Visual Model) algorithm, which recognizes scene text through a single visual model.

[0051] In order to improve the recognition effect, this module also incorporates a number of optimization strategies, including:

[0052] GTC (Guided Training with CTC): Uses Attention to guide the CTC (Connectionist Temporal Classification) training strategy to improve the model's ability to learn sequence labels.

[0053] TextConAug (Text Context Augmentation): A data augmentation strategy that mines text context information and improves the generalization ability of the model by enhancing data diversity.

[0054] TextRotNet: A self-supervised pre-trained model that improves the robustness of the model to text orientation changes through the rotation prediction task.

[0055] UDML (Unified Deep Mutual Learning): A joint mutual learning strategy that further improves recognition performance through mutual learning among multiple recognition models.

[0056] UIM (Unlabeled Image Mining): An unlabeled data mining solution that uses unlabeled data to further improve the recognition ability of the model.

[0057] Set the training parameters such as learning rate, batch size, number of iterations, etc. in the PaddleOCR configuration file. The selection of these parameters should be adjusted according to the characteristics of the specific task and contract sample dataset. Specify the contract sample dataset path and configuration file path to ensure that PaddleOCR can load the data and configuration correctly.

[0058] Use the training script or API provided by PaddleOCR to start training the model. During the training process, the model will automatically update parameters and optimize performance. Use distributed training, mixed precision training and other technical means to improve training speed and efficiency.

[0059] S103, PaddleNLP construction and training methods include:

[0060] Integrate PaddleNLP and select UIE model; PaddleNLP uses UIE model, which is a powerful information extraction model that supports multiple information extraction tasks, such as named entity recognition, relationship extraction, etc.

[0061] The UIE (Unified Structure Generation for Universal Information Extraction) model is trained based on the Seq2Seq sentence generation model. It generates SLE (Structured Extraction Language) by inputting the SSL (Schema as prompt) structured pattern prompter and Text (the original text data from which information needs to be extracted). The advantage of this method is that it can flexibly handle various complex information extraction requirements.

[0062] In addition to the Seq2Seq model, UIE can also use the extractive method of Reading Comprehension (MRC), which extracts key information from the text by simulating the process of human reading comprehension. Combined with some post-processing steps such as entity linking and relationship construction, structured SLE (Structured Extraction Language) can be generated.

[0063] Define the schema. Schema is an important basis for UIE model to extract information. It defines the keyword information and related context or prompts to be extracted. In this example, the schema defines the keyword information required for the trade contract, such as: Party A, Party B, buyer, seller, purchaser, seller, contract amount, etc., as well as any related context or prompts; each keyword can contain one or more related prompts or context information to help the model extract information more accurately.

[0064] Call Taskflow API for extraction. Askflow is a high-level API provided by PaddleNLP, which simplifies the model calling and reasoning process. By initializing Taskflow and passing in the schema, you can easily use the UIE model for information extraction.

[0065] Example:

[0066] from paddlenlp import Taskflow

[0067] #Define schema

[0068] schema={

[0069] "Party A":[],

[0070] "Party B":[],

[0071] "Contract Content":[

[0072] "Buyer",

[0073] "Seller" ]

[0075] }

[0076] # Initialize Taskflow

[0077] uie=Taskflow("information_extraction",schema=schema)

[0078] # Input text for information extraction

[0079] text="Party A: XXX Company, Party B: YYY Company. Contract content: Buyer YYY Company purchases a batch of goods from seller XXX Company."

[0080] result = uie(text)

[0081] #Print the extraction results

[0082] print(result)

[0083] The UIE model in PaddleNLP is trained using a contract sample dataset. During the training process, the model learns to extract key information from the contract text. This usually involves inputting the text into the model and adjusting the model parameters through the back-propagation algorithm to minimize the difference between the predicted results and the true annotations.

[0084] Export the trained PaddleNLP model to a deployable format and deploy it to a server or embedded device. After deployment, use API or SDK to integrate the model into your application to achieve real-time information extraction.

[0085] S2. Save the model and save the trained PaddleNLP UIE model and PaddleOCR text detection and recognition model to local or cloud storage. Ensure the integrity and accessibility of the model file for subsequent deployment and calling.

[0086] Model deployment: Use Docker or other container technologies to encapsulate the model into a deployable image. Configure the container environment, including installing necessary dependencies and setting environment variables. Load the model file into the container, start the service, and provide interfaces such as HTTP or RPC for business systems to call.

[0087] Develop an API interface to receive contract documents or texts from the business system and return the processing results of OCR and NLP. The interface should support asynchronous processing to improve the response speed and throughput of the business system.

[0088] S3, asynchronous processing: After receiving the trade contract documents and order information uploaded by the customer, the business system sends them to the asynchronous processing queue of the OCR and NLP services. The asynchronous processing queue can be implemented based on a message queue (such as Kafka, RabbitMQ, etc.) or a task scheduling system (such as Celery, Airflow, etc.).

[0089] OCR and NLP processing, the OCR service receives the contract document, which usually uses PaddleOCR for text detection and recognition to extract the contract text content. The NLP service receives the text content extracted by OCR and uses PaddleNLP's UIE model to extract keywords and structured information. The processing results of OCR and NLP are combined to obtain the recognition result of the contract document. The recognition result should include the contract text content, keywords, structured information, etc.

[0090] S301, OCR service first receives the contract document (usually in image or PDF format) and uses PaddleOCR to perform text detection and recognition. The purpose of this step is to extract readable text content from the image. The result of OCR processing is one or more text blocks, which contain most or all of the text content in the contract document.

[0091] The NLP service receives the text content extracted by OCR as input and uses PaddleNLP's UIE to extract information. The purpose of this step is to extract keywords, structured information (such as date, amount, information about both parties, etc.) and other important information from the text content. The result of NLP processing is a structured data set containing keywords, structured information, etc.

[0092] The processing results of OCR and NLP are combined. The purpose of this step is to integrate the original text content and the structured information extracted from the text to form a complete contract document recognition result.

[0093] The recognition results usually include: the content of the contract text (which may be cleaned and formatted), a keyword list, and structured information (such as date, amount, names of both parties, etc.).

[0094] S4. Use regular expressions to match the contract document recognition results with the order contract information.

[0095] Regular expression example:

[0096] Match contract amount: ^\d+(\.\d+)?$(match integer or decimal)

[0097] Matching date: ^\d{4}-\d{2}-\d{2}$ (matching date in YYYY-MM-DD format)

[0098] Match company names: ^[A-Za-z0-9\s\-]+$ (match company names containing letters, numbers, spaces, and hyphens)

[0099] S5. Mark the mismatched parts, compare the contract document recognition results with the order contract information, and find out the mismatched parts. You can use color, highlight or text annotation to mark the mismatched parts.

[0100] Provided on the order review page, the marked contract document recognition results and order contract information are displayed on the order review page. Reviewers can quickly locate the mismatched parts through the marks on the page and perform corresponding processing or review.

[0101] The above is only an embodiment of the present invention, and the common knowledge such as the known specific technical solutions and / or characteristics in the solution is not described in detail here. It should be pointed out that for those skilled in the art, without departing from the technical solution of the present invention, several modifications and improvements can be made, which should also be regarded as the protection scope of the present invention, and these will not affect the effect of the implementation of the present invention and the practicality of the patent. The scope of protection required by this application shall be based on the content of its claims, and the specific implementation methods and other records in the specification can be used to interpret the content of the claims.

Claims

1. A method for extracting text content from contract documents based on OCR, NLP and regular expressions, characterized in that: The following steps are involved: S1. Build a model, using a deep learning framework to build an OCR text recognition model and an NLP keyword extraction model, wherein the OCR text recognition model is used to recognize text information in the contract document, and the NLP keyword extraction model is used to extract keywords from the recognition results of the OCR text recognition model; The OCR text recognition model and the NLP keyword extraction model are trained using a contract sample data set, wherein the contract sample data set includes a contract document and an annotated document; S2. Save and deploy the model. Save the trained NLP keyword extraction model and OCR text recognition model. Deploy them in a container and provide an interface for the business system to call. S3. Asynchronous processing of contract documents. The business system receives the contract documents uploaded by the customer and sends them to the asynchronous processing queues of the OCR and NLP services. The OCR service receives the contract documents and uses the OCR text recognition model to detect and recognize text and extract the contract text content. The NLP service receives the text content extracted by the OCR service and uses the NLP keyword extraction model to extract keywords and structured information. Combine the processing results of OCR and NLP to obtain the recognition result of the contract document; S4. Use regular expressions to match the contract document recognition result with the order contract information; S5. Mark and display the results, compare the contract document recognition results with the order contract information, find out the mismatched parts and mark them; The marked contract document recognition results and order contract information are displayed on the order review page.

2. According to claim 1, a method for extracting text content from contract documents based on OCR, NLP and regular expressions, characterized in that: In step S1, the deep learning framework is Baidu Feipang deep learning framework, the OCR text recognition model is PaddleOCR, and the NLP keyword extraction model is PaddleNLP.

3. According to claim 2, a method for extracting text content from contract documents based on OCR, NLP and regular expressions is characterized in that: In step S1, training the OCR text recognition model includes: selecting a PPv3-OCR model, which includes a text detection module based on a DB algorithm and a text recognition module based on an SVTR algorithm.

4. The method for extracting text content from contract documents based on OCR, NLP and regular expressions according to claim 3 is characterized by: In step S1, training the NLP keyword extraction model includes: integrating PaddleNLP and selecting the UIE model; defining a schema, which defines the keyword information to be extracted and the related context or prompts; and training the UIE model in PaddleNLP using a contract sample data set.

5. The method for extracting text content from contract documents based on OCR, NLP and regular expressions according to claim 4 is characterized in that: Multiple optimization strategies are integrated into the text detection module based on the DB algorithm, including LK-PAN, DML and RSE-FPN.

6. The method for extracting text content from contract documents based on OCR, NLP and regular expressions according to claim 5 is characterized by: A number of optimization strategies are incorporated into the text recognition module based on the SVTR algorithm, including GTC, TextConAug, TextRotNet, UDML and UIM.

7. The method for extracting text content from contract documents based on OCR, NLP and regular expressions according to claim 6 is characterized by: The PPOCRLabel tool is used to manually mark the parts that need to be identified in multiple contract documents to form a contract sample dataset.

8. The method for extracting text content from contract documents based on OCR, NLP and regular expressions according to claim 7 is characterized by: The UIE model is trained based on the sentence generation model of Seq2Seq, and generates SLE by inputting SSL and Text.

9. The method for extracting text content from contract documents based on OCR, NLP and regular expressions according to claim 7 is characterized by: The UIE model adopts a reading comprehension-style extractive approach to generate SLE.

Citation Information

Cited By

  • Knowledge graph construction method and electronic equipment

    CN120911579A