An address unit resolution method and device based on double-layer iterative direct push learning
By employing a two-layer iterative probabilistic learning process, combined with the filtering and fine-tuning of F1 value changes in the address cell annotation model, the problem of poor sample quality in existing technologies is solved, and the predictive ability of the address cell parsing model is improved.
Patent Information
- Application Number
- CN202211227013.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-09
- Publication Date
- 2026-02-03
- Estimated Expiration
- 2042-10-09
AI Technical Summary
Existing transductive learning methods lack an effective iterative optimization process in address unit parsing, resulting in a small training set size that cannot cover the distribution space of the test set, leading to overfitting problems. Furthermore, the quality of the amplified samples is poor, affecting the model's prediction quality.
A two-layer iterative push learning process based on 'round + batch' is adopted. By dividing the address unit dataset and performing iterative optimization, combined with the changes in the F1 value of the address unit annotation model, high-quality samples are selected for fine-tuning and training to form the final address unit annotation model.
This improves the prediction quality of the address cell annotation model, avoids interference from low-quality samples on model optimization, and achieves efficient and stable address cell resolution.
Smart Images

Figure CN115600576B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of transductive learning, semi-supervised learning, sequence labeling, iterative optimization, and address unit parsing, and particularly to an address unit parsing method and apparatus based on two-layer iterative transductive learning. Background Technology
[0002] Address unit parsing can extract various spatial location information from address text in express delivery slips, work orders, and invoices, including: province, city, county, township, village, road, building, house number, direction, distance, etc., which has important application value in logistics, e-commerce, trade, tourism and other industries. For example, parsing the sentence "We arrived at the basement of Building 1, DF Market, No. 1, YJ Road, CY District, BJ City" yields "City = BJ City", "Dist = CY District", "Road = YJ Road", "RoadNo = No. 1", "Poi = DF Market", "PosNo = Building 1", and "SPoi = Basement". Here, City, Dist, Road, RoadNo, Poi, SPoi, and PosNo represent the city-level administrative region, district-level administrative region, road, building number on the road, point of interest, sub-point of interest, and the number referring to a point of interest or sub-point of interest, respectively.
[0003] Common address unit parsing methods include keyword matching, dictionary matching, address tree matching, sequence labeling, deep learning, and a combination of deep learning and sequence labeling. Each method has its own advantages and disadvantages. The first three methods are matching-based and have strong recognition capabilities for existing address units, but they lack learning capabilities and cannot recognize unknown address units. The latter three methods are probabilistic and statistical methods that use labeled data to train models with reasoning capabilities, enabling them to recognize unknown address units and outperforming the first three methods. The datasets used for training the latter three methods consist of three parts: a training set, a validation set, and a test set. The training and validation sets consist of address text and annotation information. The training set is used to train the address unit parsing model, and the validation set is used to test the model's performance and optimize its parameters. The test set consists of address text and is the object processed by the address unit parsing model. Due to the high cost of manual annotation, there are few training and validation sets with annotation information, and a large number of test samples lack annotation information, thus affecting the training effect of the address unit parsing model.
[0004] Transductive learning, first proposed by Vapink, can be considered a special type of semi-supervised learning. Its theoretical assumption is that although unlabeled samples lack human labels, they share the same independent and identically distributed characteristics as labeled samples, and their inherent information can help improve the model performance of the "learner." Therefore, this method uses a pre-trained model to machine-label the test data, treating the machine-labeled results as reliable labels. These labels are then combined with the initial manually labeled data in a certain proportion to form a new training set, which is then used for retraining to obtain a new learner. Thus, in address cell parsing, processing the test set using transductive learning can increase the size of the training set, reduce the burden of manual labeling, improve the prediction quality of the address cell labeling model, and effectively alleviate the overfitting problem caused by the small training set size in address cell parsing, which cannot cover the distribution space of the test set. It is suitable for scenarios where the number of training sets is small and the amount of test data is large in address cell parsing.
[0005] When using transductive learning to augment the training set samples of address unit annotation, test set samples with the same prediction results from multiple models are typically added to the training set, or test set samples with prediction scores exceeding a threshold are added to the training set. This increases the size of the training set to improve the prediction quality of the address unit annotation model. However, this sample augmentation process lacks practical effectiveness verification, and the selected samples may not meet the actual needs of address unit annotation model optimization. Furthermore, this method requires multiple iterations, but lacks an effective iterative optimization process, resulting in low efficiency in improving the prediction quality of the address unit annotation model. Additionally, the large number and varying quality of samples selected by this method lead to the training effects of samples with different annotation qualities canceling each other out, failing to effectively improve the prediction capability of the address unit annotation model. Summary of the Invention
[0006] To address the above technical problems, this invention provides an address unit parsing method based on two-layer iterative transductive learning. It expands the sample by combining the entire process of iterative training and optimization of the address unit annotation model. It constructs an efficient and stable transductive learning process based on the "round + batch" two-layer iterative mode. The batch is used as the smallest unit to fine-tune the address unit annotation model and screen samples, which helps to improve the application effect of transductive learning in address unit parsing.
[0007] The technical solution of this invention is:
[0008] A method for address unit resolution based on two-layer iterative transductive learning includes the following steps:
[0009] S1: Divide the address unit dataset;
[0010] S2: Training the basic address unit annotation model;
[0011] S3: Address cell annotation model based on two-layer direct learning iterative optimization;
[0012] S4: Use the final address unit annotation model to annotate the test set;
[0013] S5: Extract address units from the annotation results.
[0014] Furthermore,
[0015] Step S1 divides the dataset containing address units into a training set DSA. train Validation set DSA dev and test set DSA test Among them, the training set DSA train and verification set DSA dev The test set DSA consists of text and address unit annotation information. test Contains only text.
[0016] With the validation set DSA dev For testing purposes, the training set DSA train The best address unit annotation model Base As the basic address unit annotation model, use F1 Base Model Base In the validation set DSA dev The F1 value on the [data / data]. Step S2 specifically includes:
[0017] S21: DSA in the training set train Train M address units to label the model Model1, Model2, ..., Model M ;
[0018] S22: Use the generated M address units to label the model and process the validation set DSA. dev ;
[0019] S23: Calculate the F1 scores F11, F12, ..., F1 of the generated M address unit annotation models on the validation set. M ;
[0020] S24: Set Model Base Label the address cell with the largest F1 value:
[0021]
[0022] S25: Obtain the Model Base In the validation set DSA dev F1 value on
[0023] S26: Return the generated basic address unit annotation model. Base .
[0024] Use F1 Base Model Base In the validation set DSA dev The F1 value is represented by {S1,S2,L,S}. j ,L,S N} represents the test set DSA test S j This is the j-th sentence, 1≤j≤N, where N is the DSA. test The number of sentences contained, expressed in DSA test,tagged ={(S1,T1,C1),(S2,T2,C2),L,(S j ,T j C j ),L,(S N ,T N C N )} represents the test set DSA test The annotation results, where T j and C j They are S j The address unit label sequence and address unit score sequence, which respectively store S j The address unit label and corresponding score of each word in the DSA are used. Iter,Pre and DSA Iter,Curr These represent the address cell annotation results where the scores in the previous and current rounds meet the threshold requirements, respectively, using Model. Iter,Pre and Model Iter,Curr These represent the address cell annotation models generated in the previous and current iterations, respectively, using F1. Iter,Pre and F1 Iter,Curr They represent Model Iter,Pre and Model Iter,Curr In the validation set DSA dev The F1 value on the screen is represented by ΔF1. Iter,Sum and ΔF1 Iter,Once δ represents the cumulative decrease and single decrease of the F1 value in adjacent rounds during the iteration process, respectively. Iter,Sum and δ Iter,Once These represent the cumulative decrease threshold and the single decrease threshold of the F1 value in adjacent rounds during the iteration process, respectively. Step S3 specifically includes:
[0025] S31: Initialization Model Iter,Pre =Model Iter,Curr =Model Base F1Iter,Pre =F1 Iter,Curr =F1 Base ΔF1 Iter,Sum =0;
[0026] S32: Using Model Iter,Curr Processing test set DSA test DSA test,tagged ;
[0027] This step uses Model Iter,Curr Sentence-by-sentence DSA processing test Sentence S j 1≤j≤N, the corresponding annotation result T is obtained. j ;
[0028] S33: From DSA test,tagged Select the address cell annotation results whose score ranking meets the threshold requirement to obtain DSA. Iter,Curr ;
[0029] This step is based on DSA. test,tagged The intersection of the average and minimum scores of the address unit labels determines the DSA. Iter,Curr Using DSA test,tagged,sta ={(S1,T1,C1,a1,m1),L,(S j ,T j C j ,a j ,m j ),L,(S N ,T N C N ,a N ,m N )} represents DSA test,tagged The address unit score statistics results, where a j and m j They are C j The average and minimum values of all scores are represented by α and β, respectively, which are the scaling factors used to determine the address unit labeling results that meet the threshold requirements based on the score ranking results according to the average and minimum scores, where 0 ≤ α, β ≤ 1. Further, step S33 specifically includes:
[0030] S331: Calculate DSA test,tagged The average and minimum values of the address unit score sequence for each sentence are used to obtain the DSA. test,tagged,sta ;
[0031] S332: DSA test,tagged According to DSA test,tagged,sta The average value of the corresponding sentence address unit score sequence is sorted in descending order to obtain the DSA.test,tagged,avg ={(S p1 ,T p1 C p1 ),L,(S pj ,T pj C pj ),L,(S pN ,T pN C pN )};
[0032] S333: From DSA test,tagged,avg The annotation results of the first αgN sentences are selected to form an ordered subset DSA. test,tagged,avg_sub ;
[0033] S334: DSA test,tagged According to DSA test,tagged,sta The minimum value of the corresponding sentence address unit score sequence is sorted in descending order to obtain the DSA. test,tagged,min ={(S q1 ,T q1 C q1 ),L,(S qj ,T qj C qj ),L,(S qN ,T qN C qN )};
[0034] S335: From DS t A es,ttag,gmei The annotation results of the first βgN sentences are selected to form an ordered subset DSA. test,tagged,min_sub ;
[0035] S336: According to DSA test,tagged,min_sub The order of arrangement, and its relationship with DSA test,tagged,avg_sub The intersection of these values is used as the address unit labeling result for the current round's score ranking that meets the threshold requirement, i.e.: DSA Iter,Curr =DSA test,tagged,avg_sub IDSA test,tagged,min_sub ;
[0036] S337: Returns the address unit labeling results that meet the threshold requirements for the current round score ranking.
[0037] S34: If DSA Iter,Curr ==DSA Iter,Pre If so, switch to S3D; otherwise, switch to S35.
[0038] S35: Using DSA Iter,Curr For Model Iter,Curr Make fine adjustments;
[0039] This step will use the ordered dataset DSA Iter,Curr Divided into several ordered batches of DSA Iter,Curr,k k = 1, 2, L, R, using data from different batches in sequence to apply to Mode It l e,r Cu Make fine adjustments. Use Mode B l at,cPhr and Model Batch,Curr These represent the address cell annotation models generated in the previous batch and the current batch respectively during the fine-tuning process, using F1. Batch,Pre and F1 Batch,Curr They represent Model Batch,Pre and Model Batch,Curr The F1 value during the fine-tuning process is represented by ΔF1. Batch,Sum and ΔF1 Batch,Once δ represents the cumulative decrease and single decrease of F1 values in adjacent batches during the fine-tuning process, respectively. Batch,Sum and δ Batch,Once These represent the cumulative decrease threshold and the single decrease threshold of F1 values in adjacent batches during the fine-tuning process, respectively, using DSA. Iter,Curr,Sel DSA Iter,Curr The address unit labeling results for adjacent batches of F1 values that meet the threshold requirement. Further, step S35 specifically includes:
[0040] S351: Initialize k=1, Model Batch,Pre =Model Batch,Curr =Model Iter,Curr F1 Batch,Pre =F1 Batch,Curr =F1 Iter,Curr ΔF1 Batch,Sum =0, DSA Iter,Curr,Sel =φ;
[0041] S352: Using DSA Iter,Curr,k Fine-tuning the Model Batch,Curr ;
[0042] S353: Using Model Batch,Curr DSA Iter,Curr,k Perform reasoning and obtain F1 based on the reasoning results. Batch,Curr ;
[0043] S354: Calculate the single-time decrease ΔF1 of F1 value between adjacent batches. Batch,Once =F1 Batch,Pre -F1 Batch,Curr ;
[0044] S355: If ΔF1 Batch,Once ≤δ Batch,OnceIf so, switch to S356; otherwise, switch to S35C.
[0045] S356: Calculate the cumulative decrease ΔF1 of F1 values in adjacent batches. Batch,Sum =ΔF1 Batch,Sum +ΔF1 Batch,Once ;
[0046] S357: If ΔF1 Batch,Sum ≤δ Batch,Sum If so, switch to S358; otherwise, switch to S35C.
[0047] S358: Save the fine-tuning results of the current batch, Model Batch,Pre =Model Batch,Curr F1 Batch,Pre =F1 Batch,Curr ;
[0048] S359: DSA Iter,Curr,k Add to DSA Iter,Curr,Sel middle;
[0049] S35A: Calculate the number of the subsequent batch, k = k + 1;
[0050] S35B: If k≤R, then go to S352;
[0051] S35C: Using DSA train and DSA Iter,Curr,Sel Model with address cell annotation after training the current round of fine-tuning Iter,Curr ;
[0052] S35D: Returns to the model with the address cell annotation after the current round of fine-tuning. Iter,Curr .
[0053] S36: Using Model Iter,Curr Prediction Validation Set DSA dev Get F1 Iter,Curr ;
[0054] S37: Calculate the single-cycle decrease ΔF1 of the F1 value in adjacent rounds. Iter,Once =F1 Iter,Pre -F1 Iter,Curr ;
[0055] S38: If ΔF1 Iter,Once ≤δ Iter,Once If yes, switch to S39; otherwise, switch to S3C.
[0056] S39: Calculate the cumulative decrease ΔF1 of F1 values in adjacent rounds. Iter,Sum =ΔF1 Iter,Sum +ΔF1 Iter,Once ;
[0057] S3A: If ΔF1 Iter,Sum ≤δ Iter,Sum If yes, switch to S3B; otherwise, switch to S3C.
[0058] S3B: Saves the iteration optimization results of the current round, DSA Iter,Pre =DSA Iter,Curr Model Iter,Pre =Model Iter,Curr F1 Iter,Pre =F1 Iter,Curr Switch to S32;
[0059] S3C: Generate the final address unit annotation model Final =Model Iter,Pre Switch to S3E;
[0060] S3D: Generating the final address unit annotation model Final =Model Iter,Curr ;
[0061] S3E: Returns the generated final address cell annotation model. Final .
[0062] Step S4 uses the final address unit to label the Model. Final Annotated Test Set DSA test From the text, obtain the address unit label for each word.
[0063] Step S5 first determines the type of the address unit corresponding to the current word and its position within the address unit based on the address unit label of the current word in the annotation result; then, starting from the current word, multiple words are extracted consecutively to obtain address units of the corresponding type; and so on, processing all words in the annotation result to obtain the test set DSA. test The set of address units.
[0064] Furthermore, the present invention also provides an address unit resolution device based on two-layer iterative transductive learning, comprising:
[0065] Address unit dataset partitioning component M1 is used to partition the dataset containing address units into training set, validation set and test set;
[0066] The basic address unit annotation model training component M2 is used to generate the basic address unit annotation model that performs best on the training set;
[0067] The address unit annotation model iterative optimization component M3 is used to iteratively optimize the basic address unit annotation model using a two-layer direct learning process of "round + batch" to obtain the final address unit annotation model;
[0068] Address unit test set annotation component M4 is used to annotate text in the test set using the final address unit annotation model;
[0069] Address unit extraction component M5 is used to extract existing address units from the test set annotation results.
[0070] Furthermore, the basic address unit annotation model training component M2 specifically includes:
[0071] Address unit annotation model set generation component M21 is used to train multiple address unit annotation models on the training set;
[0072] The address cell annotation model quality evaluation component M22 is used to calculate the F1 score of the generated multiple address cell annotation models on the validation set;
[0073] The basic address unit annotation model selection component M23 is used to select the basic address unit annotation model based on the principle of the maximum F1 value.
[0074] The address unit annotation model iterative optimization component M3 specifically includes:
[0075] The iterative optimization parameter initialization component M31 is used to set the initial parameters when iteratively optimizing the address unit annotation model using a two-layer direct learning process.
[0076] The iterative optimization process control component M32 is used to control the normal execution and termination of the iterative optimization process based on two-layer push learning.
[0077] The address unit annotation result generation component M33, which generates address unit annotation results whose score ranking meets the threshold requirement, is used to filter address unit annotation results that meet the score ranking requirement from the annotation results of the current round of test set.
[0078] The address unit annotation model fine-tuning component M34 is used to optimize the current round of address unit annotation model using address unit annotation results whose score ranking meets the threshold requirements.
[0079] The beneficial effects of this invention are
[0080] This invention combines the entire process of iterative training and optimization of the address unit labeling model, using the F1 score (combining accuracy and recall) to measure the amplification effect of the training set samples, thus meeting the practical needs of address unit labeling model optimization. In the processing, this invention establishes a first-level loop based on rounds, using the cumulative decrease and single decrease of the F1 score from adjacent rounds to control the amplification process of the training set samples in each round. Inside this loop, a second-level loop based on batches is established, using the cumulative decrease and single decrease of the F1 score from adjacent batches to control the amplification process of the training set samples in each batch. This two-level iterative optimization process can finely control the amplification process of the address unit parsing training set samples, helping to efficiently improve the prediction quality of the address unit labeling model. Furthermore, the test set labeling results are sorted and divided into batches based on the statistical results of the address unit label scores. The address unit labeling model is fine-tuned using batches as the smallest unit, and effective samples are selected for amplification based on the fine-tuning results. This avoids interference from poorly labeled samples on the optimization of the address unit labeling model, thereby effectively improving the prediction capability of the address unit labeling model. Attached Figure Description
[0081] Figure 1 This is a flowchart of the working steps of the method of the present invention;
[0082] Figure 2 This is a flowchart detailing the steps in step S2;
[0083] Figure 3 This is a flowchart detailing the steps in step S3;
[0084] Figure 4 This is a flowchart showing the specific steps of step S33;
[0085] Figure 5 This is a flowchart showing the specific steps of step S35;
[0086] Figure 6 This is a structural block diagram of the device of the present invention. Detailed Implementation
[0087] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are some embodiments of the present invention, but not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0088] This invention is achieved through the following scheme: an address unit resolution method based on two-layer iterative transductive learning, such as... Figure 1 As shown, it includes the following steps:
[0089] S1: Divide the address unit dataset;
[0090] This step divides the dataset containing address units into a training set DSA. train Validation set DSA dev and test set DSA test Among them, the training set DSA train and verification set DSA dev The test set DSA consists of text and address unit annotation information. test Contains only text.
[0091] S2: Training the basic address unit annotation model;
[0092] This step uses the validation set DSA dev For testing purposes, the training set DSA train The best address unit annotation model Base As a basic address unit annotation model. Use F1. Base Model Base In the validation set DSA dev The F1 value. Further, such as... Figure 2 As shown, step S2 specifically includes:
[0093] S21: DSA in the training set train Train M address units to label the model Model1, Model2, ..., Model M ;
[0094] S22: Use the generated M address units to label the model and process the validation set DSA. dev ;
[0095] S23: Calculate the F1 scores F11, F12, ..., F1 of the generated M address unit annotation models on the validation set. M ;
[0096] S24: Set Model Base Label the address cell with the largest F1 value:
[0097]
[0098] S25: Obtain the Model Base In the validation set DSA dev F1 value on
[0099] S26: Return the generated base address unit annotation model. Base .
[0100] S3: Address cell annotation model based on two-layer direct learning iterative optimization;
[0101] This step begins with the test set DSA test The address cell annotation results that meet the threshold requirement in each round of score ranking are selected, then sorted and divided into several batches. The address cell annotation model is fine-tuned on a batch-by-batch basis. Based on the changes in F1 score, address cell annotation results whose F1 score decrease in adjacent batches meets the threshold requirement are selected. The joint training set DSA is then used. train The address unit annotation model was retrained and continuously optimized using the aforementioned "round + batch" two-layer push learning process to obtain the final address unit annotation model. Final Use F1 Base Mode B l ase In the validation set DSA dev The F1 value is represented by {S1,S2,L,S}. j ,L,S N} represents the test set DSA test S j This is the j-th sentence, 1≤j≤N, where N is the DSA. test The number of sentences contained, expressed in DSA test,tagged ={(S1,T1,C1),(S2,T2,C2),L,(S j ,T j C j ),L,(S N ,T N C N )} represents the test set DSA test The annotation results, where T j and C j They are S j The address unit label sequence and address unit score sequence, which respectively store S j The address unit label and corresponding score of each word in the DSA are used. Iter,Pre and DSA Iter,Curr These represent the address cell annotation results where the scores in the previous and current rounds meet the threshold requirements, respectively, using Model. Iter,Pre and Model Iter,Curr These represent the address cell annotation models generated in the previous and current iterations, respectively, using F1. Iter,Pre and F1 Iter,Curr They represent Model Iter,Pre and Model Iter,Curr In the validation set DSA dev The F1 value on the screen is represented by ΔF1. Iter,Sum and ΔF1 Iter,Onceδ represents the cumulative decrease and single decrease of the F1 value in adjacent rounds during the iteration process, respectively. Iter,Sum and δ Iter,Once These represent the cumulative decrease threshold and the single decrease threshold of the F1 value in adjacent rounds during the iteration process, respectively. For example... Figure 3 As shown, step S3 specifically includes:
[0102] S31: Initialization Model Iter,Pre =Model Iter,Curr =Model Base F1 Iter,Pre =F1 Iter,Curr =F1 Base ΔF1 Iter,Sum =0;
[0103] S32: Using Model Iter,Curr Processing test set DSA test DSA test,tagged ;
[0104] This step uses Model Iter,Curr Sentence-by-sentence DSA processing test Sentence S j 1≤j≤N, the corresponding annotation result T is obtained. j ;
[0105] S33: From DSA test,tagged Select the address cell annotation results whose score ranking meets the threshold requirement to obtain DSA. Iter,Curr ;
[0106] This step is based on DSA. test,tagged The intersection of the average and minimum scores of the address unit labels determines the DSA. Iter,Curr Using DSA test,tagged,sta ={(S1,T1,C1,a1,m1),L,(S j ,T j C j ,a j ,m j ),L,(S N ,T N C N ,a N ,m N )} represents DSA test,tagged The address unit score statistics results, where a j and m j They are C jThe average and minimum scores of all values are represented by α and β, respectively, which are the scaling factors used to determine the address unit labeling results that meet the threshold requirements based on the ranking results of the scores according to the average and minimum scores, where 0 ≤ α, β ≤ 1. For example... Figure 4 As shown, step S33 specifically includes:
[0107] S331: Calculate DSA test,tagged The average and minimum values of the address unit score sequence for each sentence are used to obtain the DSA. test,tagged,sta ;
[0108] S332: DSA test,tagged According to DSA test,tagged,sta The average value of the corresponding sentence address unit score sequence is sorted in descending order to obtain the DSA. test,tagged,avg ={(S p1 ,T p1 C p1 ),L,(S pj ,T pj C pj ),L,(S pN ,T pN C pN )};
[0109] S333: From DSA test,tagged,avg The annotation results of the first αgN sentences are selected to form an ordered subset DSA. test,tagged,avg_sub ;
[0110] S334: DSA test,tagged According to DSA test,tagged,sta The minimum value of the corresponding sentence address unit score sequence is sorted in descending order to obtain the DSA. test,tagged,min ={(S q1 ,T q1 C q1 ),L,(S qj ,T qj C qj ),L,(S qN ,T qN C qN )};
[0111] S335: From DSA tes,ttag,gmeid The annotation results of the first βgN sentences are selected to form an ordered subset DSA. test,tagged,min_sub ;
[0112] S336: According to DSA test,tagged,min_sub The order of arrangement, and its relationship with DSA test,tagged,avg_sub The intersection of these values is used as the address unit labeling result for the current round's score ranking that meets the threshold requirement, i.e.: DSA Iter,Curr =DSAtest,tagged,avg_sub IDSA test,tagged,min_sub ;
[0113] S337: Returns the address unit labeling results that meet the threshold requirements for the current round score ranking.
[0114] S34: If DSA Iter,Curr ==DSA Iter,Pre If so, switch to S3D; otherwise, switch to S35.
[0115] S35: Using DSA Iter,Curr For Model Iter,Curr Make fine adjustments;
[0116] This step will use the ordered dataset DSA Iter,Curr Divided into several ordered batches of DSA Iter,Curr,k k = 1, 2, L, R, using data from different batches in sequence to model Iter,Curr Fine-tuning was performed. It can be seen that as the batch number increases, the data within that batch in the DSA... Iter,Curr As the sequence number in the model gradually increases, the data quality decreases accordingly, affecting the model. Iter,Curr The optimization effect decreases accordingly, potentially leading to side effects. Therefore, during fine-tuning, the decrease in F1 value from adjacent batches needs to be accumulated. If it exceeds a given threshold, or if the decrease in F1 value from adjacent batches exceeds a given threshold, then the quality of the current batch of data is considered poor, the fine-tuning result of the current batch is discarded, and the current round of fine-tuning ends. (Using Model...) Batch,Pre and Model Batch,Curr These represent the address cell annotation models generated in the previous batch and the current batch respectively during the fine-tuning process, using F1. Batc,hPr and F1 Batch,Curr They represent Model Batc,hPr and Model Batch,Curr The F1 value during the fine-tuning process is represented by ΔF1. Batch,Sum and ΔF1 Batch,Once δ represents the cumulative decrease and single decrease of F1 values in adjacent batches during the fine-tuning process, respectively. Batch,Sum and δ Batch,Once These represent the cumulative decrease threshold and the single decrease threshold of F1 values in adjacent batches during the fine-tuning process, respectively, using DSA. Iter,Curr,Sel DSA Iter,Cur The address cell labeling results where the decrease in F1 value between adjacent batches meets the threshold requirement. For example... Figure 5 As shown, step S35 specifically includes:
[0117] S351: Initialize k=1, Model Batch,Pre =Model Batch,Curr=Model Iter,Curr F1 Batch,Pre =F1 Batch,Curr =F1 Iter,Curr ΔF1 Batch,Sum =0, DSA Iter,Curr,Sel =φ;
[0118] S352: Using DSA Iter,Curr,k Fine-tuning the Model Batch,Curr ;
[0119] S353: Using Model Batch,Curr DSA Iter,Curr,k Perform reasoning and obtain F1 based on the reasoning results. Batch,Curr ;
[0120] S354: Calculate the single-time decrease ΔF1 of F1 value between adjacent batches. Batch,Once =F1 Batch,Pre -F1 Batch,Curr ;
[0121] S355: If ΔF1 Batch,Once ≤δ Batch,Once If so, switch to S356; otherwise, switch to S35C.
[0122] S356: Calculate the cumulative decrease ΔF1 of F1 values in adjacent batches. Batch,Sum =ΔF1 Batch,Sum +ΔF1 Batch,Once ;
[0123] S357: If ΔF1 Batch,Sum ≤δ Batch,Sum If so, switch to S358; otherwise, switch to S35C.
[0124] S358: Save the fine-tuning results of the current batch, Model Batch,Pre =Model Batch,Curr F1 Batch,Pre =F1 Batch,Curr ;
[0125] S359: DSA Iter,Curr,k Add to DSA Iter,Curr,Sel middle;
[0126] S35A: Calculate the number of the subsequent batch, k = k + 1;
[0127] S35B: If k≤R, then go to S352;
[0128] S35C: Using DSA train and DSA Iter,Curr,Sel Model with address cell annotation after training the current round of fine-tuning Iter,Curr ;
[0129] S35D: Returns to the model with the address cell annotation after the current round of fine-tuning. Iter,Curr .
[0130] S36: Using Model Iter,Curr Prediction Validation Set DSA dev Get F1 Iter,Curr ;
[0131] S37: Calculate the single-cycle decrease ΔF1 of the F1 value in adjacent rounds. Iter,Once =F1 Iter,Pre -F1 Iter,Curr ;
[0132] S38: If ΔF1 Iter,Once ≤δ Iter,Once If yes, switch to S39; otherwise, switch to S3C.
[0133] S39: Calculate the cumulative decrease ΔF1 of F1 values in adjacent rounds. Iter,Sum =ΔF1 Iter,Sum +ΔF1 Iter,Once ;
[0134] S3A: If ΔF1 Iter,Sum ≤δ Iter,Sum If yes, switch to S3B; otherwise, switch to S3C.
[0135] S3B: Saves the iteration optimization results of the current round, DSA Iter,Pre =DSA Iter,Curr Model Iter,Pre =Model Iter,Curr F1 Iter,Pre =F1 Iter,Curr Switch to S32;
[0136] S3C: Generate the final address unit annotation model Final =Model Iter,Pre Switch to S3E;
[0137] S3D: Generating the final address unit annotation model Final =Model Iter,Curr ;
[0138] S3E: Returns the generated final address cell annotation model. Final .
[0139] S4: Use the final address unit annotation model to annotate the test set;
[0140] This step uses the final address unit to annotate the Model. Final Annotated Test Set DSAtest From the text, obtain the address unit label for each word.
[0141] S5: Extract address units from the annotation results.
[0142] This step first determines the type of the address unit corresponding to the current word and its position within the address unit based on the address unit label of the current word in the annotation results. Then, starting from the current word, multiple words are extracted consecutively to obtain address units of the corresponding type. This process is repeated for all words in the annotation results to obtain the test set DSA. test The set of address units.
[0143] The corresponding embodiments of the present invention:
[0144] Suppose that the labeled address cell dataset contains 10,000 data points and the unlabeled address cell dataset contains 100,000 data points. The amount of labeled data is relatively small compared to the amount of unlabeled data. It is necessary to train a model based on the labeled data and perform address cell parsing on the unlabeled data.
[0145] Execute S1: Divide the labeled address cell dataset into a training set DSA. train and verification set DSA dev The datasets contain 8000 and 2000 data points respectively. The dataset with unlabeled address cells is set as the test set DSA. test It contains 100,000 data entries.
[0146] Execute S21: DSA on the training set train Five address unit annotation models, Model1, Model2, Model3, Model4, and Model5, were trained using CRF, BiLSTM+CRF, Bert, ERNIE, and Bert+BiGRU+CRF, respectively.
[0147] Execute S22 and S23: Use the generated 5 address units to annotate the model and process the validation set DSA. dev Calculate the F1 values F11, F12, F13, F14, and F15 of the processing results.
[0148] Execute S24 and S25: Set the Model Base Label the address cell with the largest F1 score and obtain the corresponding F1 score F1. Base Let's assume F15 is the maximum of all F1 values, then Model Base =Model 5, F1 Base =F15.
[0149] Execute S31: Initialization operations before iterative optimization of the basic address unit annotation model. Model Iter,Pre =Model Iter,Curr =Model Base F1 Iter,Pre =F1 Iter,Curr =F1 Base δ Iter,Sum =0.
[0150] Execute S32: Using Model Iter,Curr Sentence-by-sentence DSA processing test Sentence S j 1≤j≤100000, the corresponding annotation result T is obtained. j Based on this, a test set DSA is generated. test The annotation results of DSA test,tagged This dataset contains address unit annotation results for 100,000 data points.
[0151] Execute S331: Calculate DSA test,tagged The average and minimum values of the address unit score sequence for each sentence are used to obtain the DSA. test,tagged,sta Each element of this dataset is a quintuple (S j ,T j C j ,a j ,m j ), where T j and C j They are S j The address unit label sequence and address unit score sequence, which respectively store S j The address unit label and corresponding score of each word in the text, a j and m j They are C j The average and minimum of all scores.
[0152] Execute S332: DSA test,tagged According to DSA test,tagged,sta The average value a of the corresponding sentence address unit score sequence j Sort in descending order to obtain DSA test,tagged,avg .
[0153] Execute S333: Assume α = 0.05, from DSA test,tagged,avg The annotation results of the first 0.05 * 100000 = 5000 sentences are selected to form an ordered subset DSA. test,tagged,avg_sub .
[0154] Execute S334: DSA test,tagged According to DSA test,tagged,sta The minimum value m of the corresponding sentence address unit score sequencej Sort in descending order to obtain DSA test,tagged,min .
[0155] Execute S335: Assume β = 0.08, from DSA test,tagged,min The annotation results of the first 0.08 * 100000 = 8000 sentences are selected to form an ordered subset DSA. test,tagged,min_sub .
[0156] Execute S336: in accordance with DSA test,tagged,min_sub The order of arrangement, and its relationship with DSA test,tagged,avg_sub The intersection of these values is used as the address unit annotation result that meets the threshold requirement for the current round's score ranking. Iter,Curr .
[0157] Execute S34: If DSA Iter,Curr ==DSA Iter,Pree Then, converting to S3D generates the final address unit labeled model. Final =Model Iter,Curr End the iterative optimization process; otherwise, proceed to S35 for Model. Iter,Curr Make minor adjustments.
[0158] Execute S35: DSA the ordered dataset Iter,Curr Divided into several ordered batches of DSA Iter,Curr,k k = 1, 2, L, R, using data from different batches in sequence to model Iter,Curr Fine-tuning is performed, and based on the fine-tuning results, address unit annotation results (DSA) are generated for adjacent batches where the F1 value reduction meets the threshold requirement. Iter,Curr,Sel Joint training set DSA train Retrain the address unit annotation model Iter,Curr Let DSA Iter,Curr The annotation results contain 3000 sentences, with a batch size of 128. Therefore, the total number of batches, R, is [3000 / 128] + 1 = 24. After fine-tuning each batch, the model (Model) needs to be used. Batch,Curr Calculate the F1 value of the current batch of data. Batch,Curr And calculate its F1 value compared to the previous batch. Batch,Curr Single drop ΔF1 Batch,Once =F1 Batch,Pre -F1 Batch,Curr And its F1 value compared to the previous batch. Batch,Curr The cumulative decrease ΔF1 Batch,Sum =ΔF1 Batch,Sum +ΔF1 Batch,Once If ΔF1 Batch,Once Exceeding the single-time decrease threshold δ of the F1 value of adjacent batches during the fine-tuning process Batch,Once, or ΔF1 Batch,Sum Exceeding the cumulative decrease threshold δ of F1 values in adjacent batches during the fine-tuning process Batch,Sum So, using DSA train and DSA Iter,Curr,Sel Model with address cell annotation after training the current round of fine-tuning Iter,Curr End the fine-tuning process; otherwise, save the fine-tuning results for the current batch. Model Batch,Pre =Model Batch,Curr F1 Batch,Pre =F1 Batch,Curr DSA Iter,Curr,k Add to DSA Iter,Curr,Sel In the middle, calculate the number of the subsequent batch k = k + 1; if Num Batch If the value is ≤24, proceed to the next batch of fine-tuning; otherwise, use DS. t A ra and DSA Iter,Curr,Sel Model with address cell annotation after training the current round of fine-tuning Iter,Curr The fine-tuning process is now complete.
[0159] Execute S36: Using Model Iter,Curr Prediction Validation Set DSA dev Get F1 Iter,Curr ;
[0160] Execute S37-S3E: First, calculate the single decrease ΔF1 of the F1 value in adjacent rounds. Iter,Once =F1 Iter,Pre -F1 Iter,Curr And the cumulative decrease ΔF1 of the F1 value in adjacent rounds. Iter,Sum =ΔF1 Iter,Sum +ΔF1 Iter,Once If ΔF1 Iter,Once Exceeding the single-cycle decrease threshold δ of the F1 value in adjacent rounds during the iteration process Iter,Once , or ΔF1 Iter,Sum The cumulative decrease threshold δ of the F1 value in adjacent rounds during the iteration process is exceeded. Iter,Sum Then, the address units generated in the previous round will be labeled as Model. Iter,Pre Model as the final address unit annotation model Final If the iteration ends, the optimization process ends; otherwise, the results of the current iteration are saved, and DSA is called. Iter,Pre =DSA Iter,Curr Model Iter,Pre =Model Iter,Curr F1 Iter,Pre =F1 Iter,Curr Then, switch to S32 for the next round of iterative optimization.
[0161] Execute S4: Label the model using the final address unit. Final Annotated Test Set DSA test The text is processed to obtain the address unit label for each word. Taking "Xiaoming's hometown is located in PX Town, TS County, WZ City, ZJ Province" as an example, using the BIEOS annotation system, the annotation result is "Xiao / Oming / O of / O home / O hometown / O is / O located / O at / OZ / B-ProvJ / I-Prov Province / E-ProvW / B-CityZ / I-City City / E-CityT / B-DistS / I-Dist County / E-Dist of / OP / B-TownX / I-Town Town / E-Town", where "O" indicates that the word is not an element of the address unit, "BX", "IX" and "EX" indicate that the word is the start element, middle element and end element of the address unit, respectively, and "X" is the address type, including: Prov = provincial administrative region, City = municipal administrative region, Dist = county administrative region, Town = township administrative region.
[0162] Execute S5: From the test set DSA test Address units are extracted from the annotation results. In the BIEOS annotation system, the word corresponding to "SX" is extracted as an address unit, and its type is X. The word between "BX" and its successor "EX" is also extracted as an address unit, and its type is X. Taking the annotation result of S4 as an example, the extracted address units are as follows:
[0163] ZJ Province = Prov, WZ City = City, TS County = Dist, PX Town = Town.
[0164] This invention also provides an address unit resolution device based on two-layer iterative transductive learning, such as... Figure 6 As shown, it includes:
[0165] Address unit dataset partitioning component M1 is used to partition the dataset containing address units into training set, validation set and test set;
[0166] The basic address unit annotation model training component M2 is used to generate the basic address unit annotation model that performs best on the training set; the basic address unit annotation model training component M2 includes:
[0167] Address unit annotation model set generation component M21 is used to train multiple address unit annotation models on the training set;
[0168] The address cell annotation model quality evaluation component M22 is used to calculate the F1 score of the generated multiple address cell annotation models on the validation set;
[0169] The basic address unit annotation model selection component M23 is used to select the basic address unit annotation model based on the principle of the maximum F1 value.
[0170] Address unit annotation model iterative optimization component M3 is used to iteratively optimize the basic address unit annotation model using a two-layer direct learning process of "round + batch" to obtain the final address unit annotation model; the address unit annotation model iterative optimization component M3 includes:
[0171] The iterative optimization parameter initialization component M31 is used to set the initial parameters when iteratively optimizing the address unit annotation model using a two-layer direct learning process.
[0172] The iterative optimization process control component M32 is used to control the normal execution and termination of the iterative optimization process based on two-layer push learning.
[0173] The address unit annotation result generation component M33, which generates address unit annotation results whose score ranking meets the threshold requirement, is used to filter address unit annotation results that meet the score ranking requirement from the annotation results of the current round of test set.
[0174] The address unit annotation model fine-tuning component M34 is used to optimize the current round of address unit annotation model using address unit annotation results whose score ranking meets the threshold requirements.
[0175] Address unit test set annotation component M4 is used to annotate text in the test set using the final address unit annotation model;
[0176] Address unit extraction component M5 is used to extract existing address units from the test set annotation results.
[0177] This invention addresses the following problems in current address unit parsing methods: lack of practical effect verification leads to the amplified samples not meeting the needs of address unit annotation model optimization; lack of an effective iterative optimization process leads to low efficiency in improving the prediction quality of address unit annotation models; and the uneven quality of amplified samples results in limited improvement in the performance of address unit annotation models.
[0178] The above description is merely a preferred embodiment of the present invention and is used only to illustrate the technical solution of the present invention, and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention are included within the scope of protection of the present invention.
Claims
1. A method for address unit resolution based on two-layer iterative transductive learning, characterized in that, Includes the following steps: S1: Divide the address unit dataset; S2: Training the basic address unit annotation model; S3: Address cell annotation model based on two-layer direct learning iterative optimization; S4: Use the final address unit annotation model to annotate the test set; S5: Extract address cells from the annotation results; Step S3 uses F1 Base Model Base In the validation set DSA dev The F1 value on the table is represented by {S1,S2,…,S...}. j ,…,S N } represents the test set DSA test S j This is the j-th sentence, 1≤j≤N, where N is the DSA. test The number of sentences contained, expressed in DSA test,tagged ={(S1,T1,C1),(S2,T2,C2),…,(S j ,T j C j ),…,(S N ,T N C N )} represents the test set DSA test The annotation results, where T j and C j They are S j The address unit label sequence and address unit score sequence, which respectively store S j The address unit label and corresponding score of each word in the DSA Iter,Pre and DSA Iter,Curr These represent the address cell annotation results where the scores in the previous and current rounds of the iteration process meet the threshold requirements, respectively, using Model. Iter,Pre and Model Iter,Curr These represent the address cell annotation models generated in the previous and current iterations, respectively, using F1. Iter,Pre and F1 Iter,Curr They represent Model Iter,Pre and Model Iter,Curr In the validation set DSA dev The F1 value on the screen is represented by ΔF1. Iter,Sum and ΔF1 Iter,Once δ represents the cumulative decrease and single decrease of the F1 value in adjacent rounds during the iteration process, respectively. Iter,Sum and δ Iter,Once These represent the cumulative decrease threshold and the single decrease threshold of the F1 value in adjacent rounds during the iteration process, respectively; specifically including: S31: Initialization Model Iter,Pre =Model Iter,Curr =Model Base F1 Iter,Pre =F1 Iter,Curr =F1 Base ΔF1 Iter,Sum =0; S32: Using Model Iter,Curr Processing test set DSA test DSA test,tagged ; Using Model Iter,Curr Sentence-by-sentence DSA processing test Sentence S j 1≤j≤N, the corresponding annotation result T is obtained. j ; S33: From DSA test,tagged Select the address cell annotation results whose score ranking meets the threshold requirement to obtain DSA. Iter,Curr ; S34: If DSA Iter,Curr ==DSA Iter,Pre If so, switch to S3D; otherwise, switch to S35. S35: Using DSA Iter,Curr For Model Iter,Curr Make fine adjustments; S36: Using Model Iter,Curr Prediction Validation Set DSA dev Get F1 Iter,Curr ; S37: Calculate the single-cycle decrease ΔF1 of the F1 value in adjacent rounds. Iter,Once =F1 Iter,Pre -F1 Iter,Curr ; S38: If ΔF1 Iter,Once ≤δ Iter,Once If yes, switch to S39; otherwise, switch to S3C. S39: Calculate the cumulative decrease ΔF1 of F1 values in adjacent rounds. Iter,Sum =ΔF1 Iter,Sum +ΔF1 Iter,Once ; S3A: If ΔF1 Iter,Sum ≤δ Iter,Sum If yes, switch to S3B; otherwise, switch to S3C. S3B: Saves the iteration optimization results of the current round, DSA Iter,Pre =DSA Iter,Curr Model Iter,Pre =Model Iter,Curr F1 Iter,Pre =F1 Iter,Curr Switch to S32; S3C: Generate the final address unit annotation model Final =Model Iter,Pre Switch to S3E; S3D: Generating the final address unit annotation model Final =Model Iter,Curr ; S3E: Returns the generated final address cell annotation model. Final .
2. The method according to claim 1, characterized in that, Step S1 divides the dataset containing address units into a training set DSA. train Validation set DSA dev and test set DSA test Among them, the training set DSA train and verification set DSA dev The test set DSA consists of text and address unit annotation information. test Contains only text.
3. The method according to claim 1, characterized in that, Step S2 uses the verification set DSA dev For testing purposes, the training set DSA train The best address unit annotation model Base As the basic address unit annotation model, use F1 Base Model Base In the validation set DSA dev The F1 value on the screen; specifically including: S21: DSA in the training set train Train M address units to label the model Model1, Model2, ..., Model M ; S22: Use the generated M address units to label the model and process the validation set DSA. dev ; S23: Calculate the F1 scores F11, F12, ..., F1 of the generated M address unit annotation models on the validation set. M ; S24: Set Model Base Label the model for the address cell with the largest F1 value: S25: Obtain the Model Base In the validation set DSA dev F1 value on S26: Return the generated basic address unit annotation model. Base .
4. The method according to claim 1, characterized in that, According to DSA test,tagged The intersection of the average and minimum scores of the address unit labels determines the DSA. Iter,Curr Using DSA test,tagged,sta ={(S1,T1,C1,a1,m1),…,(S j ,T j C j ,a j ,m j ),…,(S N ,T N C N ,a N ,m N )} represents DSA test,tagged The address unit score statistics results, where a j and m j They are C j The average and minimum values of all scores are represented by α and β, respectively, which are the scaling factors used to determine the address unit labeling results that meet the threshold requirements based on the score ranking results according to the average and minimum score ranking results, where 0 ≤ α, β ≤ 1; specifically including: S331: Calculate DSA test,tagged The average and minimum values of the address unit score sequence for each sentence are used to obtain the DSA. test,tagged,sta ; S332: DSA test,tagged According to DSA test,tagged,sta The average value of the corresponding sentence address unit score sequence is sorted in descending order to obtain the DSA. test,tagged,avg ={(S p1 ,T p1 C p1 ),…,(S pj ,T pj C pj ),…,(S pN ,T pN C pN )}; S333: From DSA test,tagged,avg The annotation results of the first α·N sentences are selected to form an ordered subset DSA. test,tagged,avg_sub ; S334: DSA test,tagged According to DSA test,tagged,sta The minimum value of the corresponding sentence address unit score sequence is sorted in descending order to obtain the DSA. test,tagged,min ={(S q1 ,T q1 C q1 ),…,(S qj ,T qj C qj ),…,(S qN ,T qN C qN )}; S335: From DSA test,tagged,min The annotation results of the first β·N sentences are selected to form an ordered subset DSA. test,tagged,min_sub ; S336: According to DSA test,tagged,min_sub The order of arrangement, and its relationship with DSA test,tagged,avg_sub The intersection of these values is used as the address unit labeling result for the current round's score ranking that meets the threshold requirement, i.e.: DSA Iter,Curr =DSA test,tagged,avg_sub ∩DSA test,tagged,min_sub ; S337: Returns the address cell labeling results that meet the threshold requirements for the current round's score ranking; DSA of ordered datasets Iter,Curr Divided into several ordered batches of DSA Iter,Curr,k k = 1, 2, ..., R, using data from different batches in sequence to model Iter,Curr Make fine adjustments; use Model Batch,Pre and Model Batch,Curr These represent the address cell annotation models generated in the previous batch and the current batch respectively during the fine-tuning process, using F1. Batch,Pre and F1 Batch,Curr They represent Model Batch,Pre and Model Batch,Curr The F1 value during the fine-tuning process is represented by ΔF1. Batch,Sum and ΔF1 Batch,Once δ represents the cumulative decrease and single decrease of F1 values in adjacent batches during the fine-tuning process, respectively. Batch,Sum and δ Batch,Once These represent the cumulative decrease threshold and the single decrease threshold of F1 values in adjacent batches during the fine-tuning process, respectively, using DSA. Iter,Curr,Sel DSA Iter,Curr The address cell annotation results where the decrease in F1 value between adjacent batches meets the threshold requirement; specifically including: S351: Initialize k=1, Model Batch,Pre =Model Batch,Curr =Model Iter,Curr F1 Batch,Pre =F1 Batch,Curr =F1 Iter,Curr ΔF1 Batch,Sum =0, DSA Iter,Curr,Sel =φ; S352: Using DSA Iter,Curr,k Fine-tuning the Model Batch,Curr ; S353: Using Model Batch,Curr DSA Iter,Curr,k Perform reasoning and obtain F1 based on the reasoning results. Batch,Curr ; S354: Calculate the single-time decrease ΔF1 of F1 value between adjacent batches. Batch,Once =F1 Batch,Pre -F1 Batch,Curr ; S355: If ΔF1 Batch,Once ≤δ Batch,Once If so, switch to S356; otherwise, switch to S35C. S356: Calculate the cumulative decrease ΔF1 of F1 values in adjacent batches. Batch,Sum =ΔF1 Batch,Sum +ΔF1 Batch,Once ; S357: If ΔF1 Batch,Sum ≤δ Batch,Sum If so, switch to S358; otherwise, switch to S35C. S358: Save the fine-tuning results of the current batch, Model Batch,Pre =Model Batch,Curr F1 Batch,Pre =F1 Batch,Curr ; S359: DSA Iter,Curr,k Add to DSA Iter,Curr,Sel middle; S35A: Calculate the number of the subsequent batch, k = k + 1; S35B: If k≤R, then go to S352; S35C: Using DSA train and DSA Iter,Curr,Sel Model with address cell annotation after training the current round of fine-tuning Iter:Curr ; S35D: Returns to the model with the address cell annotation after the current round of fine-tuning. Iter,Curr .
5. The method according to claim 1, characterized in that, Step S4 uses the final address unit to label the Model. Final Annotated Test Set DSA test From the text, obtain the address unit label for each word.
6. The method according to claim 1, characterized in that, Step S5 first determines the type of the address unit corresponding to the current character and its position within the address unit based on the address unit label of the current character in the annotation result; then, starting from the current character, it extracts one or more characters consecutively to obtain address units of the corresponding type; and so on, processing all characters in the annotation result to obtain the test set DSA. test The set of address units.
7. An address unit resolution device based on two-layer iterative transductive learning, used to implement any one of the methods in claims 1-6, characterized in that, include: Address unit dataset partitioning component M1 is used to partition the dataset containing address units into training set, validation set and test set; The basic address unit annotation model training component M2 is used to generate the basic address unit annotation model that performs best on the training set; Address unit annotation model iterative optimization component M3 is used to iteratively optimize the basic address unit annotation model using a two-layer direct learning process of "round + batch" to obtain the final address unit annotation model; Address unit test set annotation component M4 is used to annotate text in the test set using the final address unit annotation model; Address unit extraction component M5 is used to extract existing address units from the test set annotation results.
8. The apparatus according to claim 7, characterized in that, The basic address unit annotation model training component M2 specifically includes: Address cell annotation model set generation component M21 is used to train more than one address cell annotation model on the training set; The address cell annotation model quality evaluation component M22 is used to calculate the F1 score of one or more generated address cell annotation models on the validation set. The basic address unit annotation model selection component M23 is used to select the basic address unit annotation model based on the principle of the maximum F1 value.
9. The apparatus according to claim 7, characterized in that, The address unit annotation model iterative optimization component M3 specifically includes: The iterative optimization parameter initialization component M31 is used to set the initial parameters when iteratively optimizing the address unit annotation model using a two-layer direct learning process. The iterative optimization process control component M32 is used to control the normal execution and termination of the iterative optimization process based on two-layer push learning. The address unit annotation result generation component M33, which generates address unit annotation results whose score ranking meets the threshold requirement, is used to filter address unit annotation results that meet the score ranking requirement from the annotation results of the current round of test set. The address unit annotation model fine-tuning component M34 is used to optimize the current round of address unit annotation model using address unit annotation results whose score ranking meets the threshold requirements.
Citation Information
Patent Citations
Adaptive small sample learning intelligent error correction method based on ALBERT model
CN114757169A
Single chip VLSI implementation of a digital receiver employing orthogonal frequency division multiplexing
US20030142764A1