Implementation of BcBERT-SW-BiLSTM-CRF model based on vocabulary enhancement and pre-training
By applying the BcBERT-SW-BiLSTM-CRF model based on vocabulary enhancement and pre-training in the subway field, combined with BERT for in-depth pre-training, the problem of low entity recognition accuracy in the subway field is solved, and the performance of named entity recognition is improved.
Patent Information
- Application Number
- CN202110813366.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-07-19
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2041-07-19
AI Technical Summary
Research on entity recognition and entity relationship extraction in the subway field is in its infancy. There is a lack of authoritative corpus for subway design specifications, resulting in low accuracy of named entity recognition. It is difficult for existing technologies to effectively solve this problem.
The BcBERT-SW-BiLSTM-CRF model based on vocabulary enhancement and pre-training is adopted. By dynamically introducing the SW-BiLSTM-CRF model and using the pre-trained language model for cross-domain knowledge transfer, it is combined with BERT for in-depth pre-training to build a named entity recognition model. to improve recognition performance.
It effectively improves the performance of named entity recognition in subway design specifications, reduces recognition errors caused by small data size, and improves the accuracy of named entity recognition.
Smart Images

Figure CN113779992B_ABST
Abstract
Description
Technical Field
[0001] The present invention is an important process in the research of entity recognition and entity relationship extraction in the subway field, and specifically relates to an implementation method of a BcBERT-SW-BiLSTM-CRF model based on vocabulary enhancement and pre-training. Background Art
[0002] With the development of computer science and technology, the field of natural language processing has also made progress in deep learning with practical significance and application prospects. However, for natural language processing, in order to achieve fine and in-depth semantic understanding, simply relying on manual methods for data labeling and computing power investment cannot solve the essential problem.
[0003] At present, the research on entity recognition and entity relationship extraction in the subway field is in its infancy, and there is no public and authoritative corpus corresponding to the subway design specification text. The fundamental reason is that the content in the specification involves many professions, many situations, and complex relationships, making it impossible for professionals and people with natural language processing technology to work alone. Therefore, the machine learning-based method cannot obtain effective annotated corpus. Therefore, relevant model algorithms are needed to optimize and improve the machine's ability to recognize entity relationships. Summary of the invention
[0004] The purpose of the present invention is to provide a method for implementing a BcBERT-SW-BiLSTM-CRF model based on vocabulary enhancement and pre-training, thereby solving the problem of low accuracy of named entity recognition in subway design specifications in the prior art.
[0005] The invention discloses an implementation method of a BcBERT-SW-BiLSTM-CRF model based on vocabulary enhancement and pre-training. The invention firstly introduces a SW-BiLSTM-CRF model dynamically; then uses a named entity recognition method based on a pre-trained language model to perform cross-domain knowledge transfer to implement BcBERT, and finally implements a BcBERT-SW-BiLSTM-CRF model.
[0006] The SW-BiLSTM-CRF model is mainly divided into five modules: input layer, search layer, feature extraction layer, data projection layer and output layer.
[0007] The words in the input layer need to be processed in advance as follows: the text document annotated with the BIO annotation system is used as the input of the framework, and the words and tags are counted and numbered according to the word frequency to obtain four dictionaries: word to number, number to word, tag to number, and number to tag; the actual input of the input layer is the sentence number sequence obtained based on the word to number dictionary, in which the special character 0 is also needed to fill in the sentence to make each sentence of the same length. The design of vocabulary enhancement needs to obtain the boundary information of the word and the number sequence of the word information at this layer. The boundary information of the word is realized with the help of four discrete numbers, which represent the non-entity, the beginning and end of the entity, and the middle position of the entity. The processing of word information is similar to that of the word.
[0008] The main task of the search layer is to represent the sentence number sequence of the input layer with vectors; prepare three vector matrices corresponding to a character, word boundary and word in advance. For example, in the character vector matrix, the rows of the matrix represent the representation vectors of each character; these vectors can be randomly initialized to generate random numbers from a uniform distribution in an interval, or they can be pre-trained vector files. If it is the latter, it is necessary to use the dictionary of numbers to words preprocessed in the input layer, find the words corresponding to the numbers, and then search for the corresponding vectors in the pre-trained vector file. Finally, the character, word boundary and word information are spliced as the input of the next layer.
[0009] The main work of the feature extraction layer is to let the model automatically select more important feature combinations or learn deeper abstract features based on the given core feature set, characters, word boundaries and words. In order to take into account context information at the same time, this layer uses a bidirectional LSTM network, including forward and backward chain structures. The forward LSTM is used to obtain the impact of the past moment on the current moment, while the backward LSTM is used to obtain the impact of the future moment on the current moment. The forward and reverse outputs of each moment are spliced to obtain the output vector of this layer.
[0010] The data projection layer projects the feature vector obtained by the feature extraction layer. The feature vector is a high-dimensional vector configured according to the BiLSTM structure. This layer projects the high-dimensional vector to the label dimension through a fully connected layer. The vector size is [batch size*sequence length*label number], so that the score of each label is obtained.
[0011] The main task of the output layer is to select the label with the highest score as the final predicted label based on the label scores obtained by the data projection layer. However, if we only rely on the score for prediction, there will be label transfer errors. Therefore, the CRF algorithm is usually used in this layer to further constrain the label transfer relationship and correct the prediction results. The CRF algorithm takes the path as the unit, considers the probability of the path, and regards the sequence label as 1 k n (k is the number of categories, n is the sentence length) classification problem, the maximum likelihood estimation method is used to find the optimal labeling sequence in the actual training process.
[0012] The specific parts of vocabulary enhancement in the BcBERT-SW-BiLSTM-CRF model are:
[0013] When the observation sequence, that is, the input sequence is X = x0, x1, ..., x n , state sequence, that is, the output label sequence is Y = y0, y1, ..., y n The probability is:
[0014]
[0015] z(x)=∑ y exp(∑ k λ k ∑ i t k (y i-1 ,y i ,x,i)+∑ l μ l ∑ i s l (y i ,x,i)) (4-2)
[0016] Formula (4-1) realizes the transformation from features to probabilities, t k (y i-1 ,y i , x,i) is the feature function defined on the edge, representing the label transfer feature, s l (y i , x, i) is the characteristic function defined on the node, representing the state characteristics, and the value of the characteristic function is 1 or 0. k and μ l are the weights corresponding to the two features. z(x) is the normalization factor, which sums all possible values of y. During the training process, the maximum likelihood estimation is used to obtain the loss function:
[0017] loss = -log(P(Y = y|x)), use the gradient descent algorithm for learning, and finally select the Y with the highest score as the label sequence of X.
[0018] Specific implementation process:
[0019] Step 1: Select the BIO labeling method.
[0020] Step 2: A SW-BiLSTM-CRF model based on vocabulary enhancement is proposed, which dynamically introduces word boundary information and word embedding information into the BiLSTM-CRF model;
[0021] Step 3: Use BERT pre-training to construct BERT input features by inputting part of the existing civil engineering information text corpus.
[0022] Step 4: Using BERT as the text encoder, based on the general domain pre-training model, continue deep pre-training of architectural corpus text and build a named entity recognition model based on BcBERT-SW-BiLSTM-CRF.
[0023] The beneficial effects of the present invention are:
[0024] The present invention uses a named entity recognition method based on a pre-trained language model to transfer knowledge across domains, to reduce the recognition error caused by the small data scale to a certain extent. Other standard texts in the construction field are used to continue deep pre-training on the BERT general domain pre-training model to obtain BcBERT (Building Code BERT), thereby transferring the knowledge of other standard texts in the general domain and the construction field to the SW-BiLSTM-CRF model. This can effectively improve the performance of the subway design specification named entity recognition task. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 Design steps for the implementation method of the BcBERT-SW-BiLSTM-CRF model based on vocabulary enhancement and pre-training of the present invention
[0026] Figure 2 The implementation method of the BcBERT-SW-BiLSTM-CRF model based on vocabulary enhancement and pre-training. The structure diagram of the SW-BiLSTM-CRF model
[0027] Figure 3 Example of BERT input for the implementation of the BcBERT-SW-BiLSTM-CRF model with vocabulary augmentation and pre-training
[0028] Figure 4 Implementation method of BcBERT-SW-BiLSTM-CRF model based on vocabulary enhancement and pre-training Model framework of BcBERT-SW-BiLSTM-CRF model DETAILED DESCRIPTION
[0029] The present invention is described in detail below with reference to the accompanying drawings and specific embodiments.
[0030] The invention discloses an implementation method of a BcBERT-SW-BiLSTM-CRF model based on vocabulary enhancement and pre-training. The invention firstly introduces a SW-BiLSTM-CRF model dynamically; then uses a named entity recognition method based on a pre-trained language model to perform cross-domain knowledge transfer to implement BcBERT, and finally implements a BcBERT-SW-BiLSTM-CRF model.
[0031] The SW-BiLSTM-CRF model is mainly divided into five modules: input layer, search layer, feature extraction layer, data projection layer and output layer.
[0032] The words in the input layer need to be processed in advance as follows: the text document annotated with the BIO annotation system is used as the input of the framework, and the words and tags are counted and numbered according to the word frequency to obtain four dictionaries: word to number, number to word, tag to number, and number to tag; the actual input of the input layer is the sentence number sequence obtained based on the word to number dictionary, in which the special character 0 is also needed to fill in the sentence to make each sentence of the same length. The design of vocabulary enhancement needs to obtain the boundary information of the word and the number sequence of the word information at this layer. The boundary information of the word is realized with the help of four discrete numbers, which represent the non-entity, the beginning and end of the entity, and the middle position of the entity. The processing of word information is similar to that of the word.
[0033] The main task of the search layer is to represent the sentence number sequence of the input layer with vectors; prepare three vector matrices corresponding to a character, word boundary and word in advance. For example, in the character vector matrix, the rows of the matrix represent the representation vectors of each character; these vectors can be randomly initialized to generate random numbers from a uniform distribution in an interval, or they can be pre-trained vector files. If it is the latter, it is necessary to use the dictionary of numbers to words preprocessed in the input layer, find the words corresponding to the numbers, and then search for the corresponding vectors in the pre-trained vector file. Finally, the character, word boundary and word information are spliced as the input of the next layer.
[0034] The main work of the feature extraction layer is to let the model automatically select more important feature combinations or learn deeper abstract features based on the given core feature set, characters, word boundaries and words. In order to take into account context information at the same time, this layer uses a bidirectional LSTM network, including forward and backward chain structures. The forward LSTM is used to obtain the impact of the past moment on the current moment, while the backward LSTM is used to obtain the impact of the future moment on the current moment. The forward and reverse outputs of each moment are spliced to obtain the output vector of this layer.
[0035] The data projection layer projects the feature vector obtained by the feature extraction layer. The feature vector is a high-dimensional vector configured according to the BiLSTM structure. This layer projects the high-dimensional vector to the label dimension through a fully connected layer. The vector size is [batch size*sequence length*label number], so that the score of each label is obtained.
[0036] The main task of the output layer is to select the label with the highest score as the final predicted label based on the label scores obtained by the data projection layer. However, if we only rely on the score for prediction, there will be label transfer errors. Therefore, the CRF algorithm is usually used in this layer to further constrain the label transfer relationship and correct the prediction results. The CRF algorithm takes the path as the unit, considers the probability of the path, and regards the sequence label as 1 k n (k is the number of categories, n is the sentence length) classification problem, the maximum likelihood estimation method is used to find the optimal labeling sequence in the actual training process.
[0037] The specific parts of vocabulary enhancement in the BcBERT-SW-BiLSTM-CRF model are:
[0038] When the observation sequence, that is, the input sequence is X = x0, x1, ..., x n , state sequence, that is, the output label sequence is Y = y0, y1, ..., y n The probability is:
[0039]
[0040] z(x)=∑ y exp(∑ k λ k ∑ i t k (y i-1 ,y i ,x,i)+∑ l μ l ∑ i s l (y i ,x,i)) (4-2)
[0041] Formula (4-1) realizes the transformation from features to probabilities, t k (y i-1 ,y i , x,i) is the feature function defined on the edge, representing the label transfer feature, s l (y i , x, i) is the characteristic function defined on the node, representing the state characteristics, and the value of the characteristic function is 1 or 0.k and μ l are the weights corresponding to the two features. z(x) is the normalization factor, which sums all possible values of y. During the training process, the maximum likelihood estimation is used to obtain the loss function
[0042] loss = -log(P(Y = y|x)), use the gradient descent algorithm for learning, and finally select the Y with the highest score as the label sequence of X.
[0043] Specific implementation process:
[0044] Step 1: Select the BIO labeling method.
[0045] Step 2: A SW-BiLSTM-CRF model based on vocabulary enhancement is proposed, which dynamically introduces word boundary information and word embedding information into the BiLSTM-CRF model;
[0046] Step 3: Use BERT pre-training to construct BERT input features by inputting part of the existing civil engineering information text corpus.
[0047] Step 4: Using BERT as the text encoder, based on the general domain pre-training model, continue deep pre-training of architectural corpus text and build a named entity recognition model based on BcBERT-SW-BiLSTM-CRF.
[0048] Step 1: Select the BIO labeling method.
[0049] Step 2: A SW-BiLSTM-CRF model based on vocabulary enhancement is proposed, which dynamically introduces word boundary information and word embedding information into the BiLSTM-CRF model.
[0050] like Figure 2 As shown in the figure, the model is mainly divided into five modules: input layer, search layer, feature extraction layer, data projection layer and output layer. The following introduces these five modules and the vocabulary enhancement part of the model respectively.
[0051] 1) Input layer
[0052] The model takes the words in the sentence sequence as input. The words in the input layer need to be processed in advance: the text document annotated with the BIO annotation system is used as the input of the framework, and the words and labels are counted and numbered according to the word frequency to obtain four dictionaries: word to number, number to word, label to number, and number to label. The actual input of the input layer is the sentence number sequence obtained based on the word to number dictionary, in which special characters such as 0 are needed to fill in the sentences to make each sentence of the same length. The design of vocabulary enhancement needs to obtain the boundary information of the word and the number sequence of the word information at this layer. The boundary information of the word is realized with the help of four discrete numbers, which represent the non-entity, the beginning and end of the entity, and the middle position of the entity. The processing of word information is similar to that of the word.
[0053] 2) Search layer
[0054] The main task of this layer is to represent the sentence number sequence of the input layer with vectors. Prepare three vector matrices corresponding to a character, word boundary and word in advance. For example, in the character vector matrix, the rows of the matrix represent the representation vectors of each character. These vectors can be randomly initialized, such as generating random numbers from a uniform distribution in an interval, or they can be pre-trained vector files. If it is the latter, it is necessary to use the dictionary of numbers to characters obtained in 1) to find the characters corresponding to the numbers, and then search for the corresponding vectors in the pre-trained vector file. Finally, the character, word boundary and word information are concatenated as the input of the next layer.
[0055] 3) Feature extraction layer
[0056] The main work of this layer is to let the model automatically select more important feature combinations or learn deeper abstract features based on the given core feature set, characters, word boundaries and words. In order to take into account context information at the same time, this layer uses a bidirectional LSTM network, including a forward and backward chain structure. The forward LSTM is used to obtain the impact of the past moment on the current moment, while the backward LSTM is used to obtain the impact of the future moment on the current moment. The forward and reverse outputs of each moment are spliced to obtain the output vector of this layer.
[0057] 4) Data projection layer
[0058] The work of this layer is to project the feature vector obtained by the feature extraction layer into a dimension. The feature vector is a high-dimensional vector configured according to the BiLSTM structure. This layer projects the high-dimensional vector to the label dimension through a fully connected layer. The vector size is [batch size*sequence length*number of labels], so that the score of each label is obtained.
[0059] 5) Output layer
[0060] The main task of this layer is to select the label with the highest score as the final predicted label based on the label score obtained by the data projection layer. However, there will be label transfer errors if prediction is based solely on the score. Therefore, the CRF algorithm is usually used in this layer to further constrain the label transfer relationship and correct the prediction results. The CRF algorithm takes the path as the unit, considers the probability of the path, and regards the sequence label as 1 k n (k is the number of categories, n is the sentence length) classification problem, the maximum likelihood estimation method is used to find the optimal labeling sequence in the actual training process.
[0061] When the observation sequence, that is, the input sequence is X = x0, x1, ..., x n , state sequence, that is, the output label sequence is Y = y0, y1, ..., y n The probability is:
[0062]
[0063] z(x)=∑ y exp(∑ k λ k ∑ i t k (y i-1 ,y i ,x,i)+∑ l μ l ∑ i s l (y i ,x,i)) (4-2)
[0064] Formula (4-1) realizes the transformation from features to probabilities, t k (y i-1 ,y i , x,i) is the feature function defined on the edge, representing the label transfer feature, s l (y i , x, i) is the characteristic function defined on the node, representing the state characteristics, and the value of the characteristic function is 1 or 0. k and μ l are the weights corresponding to the two features. z(x) is the normalization factor, which sums all possible values of y. During the training process, the maximum likelihood estimation is used to obtain the loss function
[0065] loss = -log(P(Y = y|x)), use the gradient descent algorithm for learning, and finally select the Y with the highest score as the label sequence of X.
[0066] Step 3: Use BERT pre-training to construct BERT input features by inputting some existing civil engineering and construction information text corpus. Figure 3 As shown in the figure, BERT input contains three embedding features, namely word embedding, context embedding, and position embedding. The word embedding construction uses the WordPiece process to split the input words, making the vocabulary more concise and the meaning clearer. It is a method to solve the Out Of Vocabulary (OOV) problem. The word splitting process is implemented using BytePair Encoding (BPE). Specifically, in Chinese text containing English words, the Chinese part is segmented into single words and the English words are segmented into subwords. For example, testing is divided into test and ##ing, and ## represents word segmentation. These segmented blocks are the smallest units covered during BERT language model training. At the same time, the two concatenated sentences are distinguished by a special symbol [SEP], which is also added to the end of the second sentence. [CLS] is a special symbol that indicates the beginning of the model, indicating the position of the beginning of the sentence.
[0067] The context embedding is an input construct for sentence relationship judgment tasks. The EA part is required, and the EB part is optional. 0 represents the first sentence and 1 represents the second sentence. The supervision information is reflected in the [CLS] flag. If the latter is empty, it becomes a single sentence classification task. The position embedding is the absolute position information of the word in the sentence, and the upper limit of the sequence length supported by BERT is 512. Finally, the three layers of embedding codes are added together as the input representation vector and persisted in a binary file in TFRecord format.
[0068] Step 4: Figure 4 As shown in the figure, BERT is used as a text encoder. On the basis of the general domain pre-training model, the architectural corpus text is deeply pre-trained to build a named entity recognition model based on BcBERT-SW-BiLSTM-CRF. The model mainly consists of two modules: a pre-trained text representation layer and a feature extraction layer that completes the named entity recognition task. BcBERT is a domain pre-training model that has been deeply trained in architectural corpus text. It integrates the relevant knowledge of unsupervised architectural corpus text related to subway design specifications, so that the pre-trained language model has a certain degree of domain adaptability and is more suitable for the named entity recognition task of downstream subway design specifications.
Claims
1. The implementation method of the BcBERT-SW-BiLSTM-CRF model based on vocabulary enhancement and pre-training is characterized in that: First, the SW-BiLSTM-CRF model is dynamically introduced; then the named entity recognition method based on the pre-trained language model is used to perform cross-domain knowledge transfer to implement BcBERT, and finally the BcBERT-SW-BiLSTM-CRF model is implemented. The SW-BiLSTM-CRF model is mainly divided into five modules: input layer, search layer, feature extraction layer, data projection layer and output layer. The words in the input layer need to be processed in advance as follows: the text document annotated with the BIO annotation system is used as the input of the framework, and the words and labels are counted, and numbered according to the word frequency, and four dictionaries are obtained respectively: word to number, number to word, label to number and number to label; the actual input of the input layer It is a sentence number sequence obtained based on the dictionary from words to numbers, in which the special character 0 is needed to fill in the sentences to make each sentence of the same length. The design of vocabulary enhancement needs to obtain the boundary information of words and the number sequence of word information at this layer. The boundary information of words is realized by means of four discrete numbers, which represent the entity that does not belong to the entity, the beginning and end of the entity, and the middle position of the entity. The processing of word information is the same as that of words. The work of the data projection layer is to project the feature vector obtained by the feature extraction layer into a dimension. The feature vector is a high-dimensional vector configured according to the BiLSTM structure. This layer projects the high-dimensional vector to the label dimension through a fully connected layer. The vector size is [batch size (batch size size)*sequence length*number of labels[size], thus we get the score of each label. The main task of the output layer is to select the label with the highest score as the final predicted label according to the label score obtained by the data projection layer. However, there will be label transfer errors if we only rely on the score for prediction. Therefore, the CRF algorithm is usually used in this layer to further constrain the transfer relationship of the label and correct the prediction result. The CRF algorithm takes the path as the unit, considers the probability of the path, and regards the sequence annotation as 1 k n The classification problem is k, which is the number of categories and n, which is the sentence length. The maximum likelihood estimation method is used in the actual training process to find the optimal labeling sequence. The vocabulary enhancement part in the BcBERT-SW-BiLSTM-CRF model is as follows: When the observation sequence, that is, the input sequence is X = x0, x1, ..., x n , state sequence, that is, the output label sequence is Y=y0,y1,…,y n The probability is: z(x)=∑ y exp(∑ k λ k ∑ i t k (y i-1 ,y i ,x,i)+∑ l μ l ∑ i s l (y i ,x,i)) The above formula realizes the transformation from features to probabilities. t k (y i-1 ,y i ,x,i) is the feature function defined on the edge, representing the label transfer feature, s l (y i ,x,i) is the characteristic function defined on the node, representing the state characteristics, and the value of the characteristic function is 1 or 0, λ k and μ l are the weights corresponding to the two features, z(x) is the normalization factor, and all possible values of y are summed. During the training process, the maximum likelihood estimation is used to obtain the loss function: loss = -log(P(Y = y|x)), use the gradient descent algorithm for learning, and finally select the Y with the highest score as the label sequence of X. The specific implementation process of the BcBERT-SW-BiLSTM-CRF model is as follows: Step 1: Select the BIO labeling method; Step 2: A SW-BiLSTM-CRF model based on vocabulary enhancement is proposed, which dynamically introduces word boundary information and word embedding information into the BiLSTM-CRF model; Step 3: Use BERT pre-training to input some existing civil engineering information text corpus to construct BERT input features; Using BERT pre-training, we input some existing civil engineering information text corpus to construct BERT input features. BERT input contains three embedding features, namely word embedding, context embedding, and position embedding. The word embedding construction uses the WordPiece process to split the input words. The word splitting process is implemented using double-byte encoding. Specifically, in Chinese text containing English words, the Chinese part is split into single words, and the English words are split into subwords. The split blocks are the smallest units covered during BERT language model training. At the same time, the two concatenated sentences are distinguished by a special symbol [SEP], which is also added to the end of the second sentence. [CLS] is a special symbol that indicates the beginning of the model, indicating the position of the beginning of the sentence. The context embedding is an input structure for sentence relationship judgment tasks. The EA part is required and the EB part is optional. 0 represents the first sentence and 1 represents the second sentence. The supervision information is reflected in the [CLS] flag. If the latter is empty, it becomes a single sentence classification task. The position embedding is the absolute position information of the word in the sentence, and the upper limit of the sequence length supported by BERT is 512. Finally, the three layers of embedding codes are added together as the input representation vector and persisted in a binary file in TFRecord format. Step 4: Using BERT as the text encoder, based on the general domain pre-training model, continue to perform deep pre-training of architectural corpus text and build a named entity recognition model based on BcBERT-SW-BiLSTM-CRF; Using BERT as the text encoder, on the basis of the general domain pre-training model, we continue to conduct deep pre-training of architectural corpus text and build a named entity recognition model based on BcBERT-SW-BiLSTM-CRF. The model mainly consists of two modules: a pre-trained text representation layer and a feature extraction layer for completing the named entity recognition task. BcBERT is a domain pre-training model that has been deeply trained with architectural corpus text. It integrates relevant knowledge of unsupervised architectural corpus text related to subway design specifications, so that the pre-trained language model has a certain domain adaptability and is more suitable for the named entity recognition task of downstream subway design specifications.
2. The implementation method of the BcBERT-SW-BiLSTM-CRF model based on vocabulary enhancement and pre-training according to claim 1 is characterized in that: The main task of the search layer is to represent the sentence number sequence of the input layer with a vector; prepare three vector matrices corresponding to a character, word boundary and word in advance, wherein in the character vector matrix, the rows of the matrix represent the representation vectors of each character; the representation vector adopts a random initialization method to generate random numbers from a uniform distribution in an interval, or a pre-trained vector file. If it is the latter, it is necessary to use the dictionary of numbers to words pre-processed in the input layer to find the characters corresponding to the numbers, and then search for the corresponding vectors in the pre-trained vector file, and finally concatenate the characters, word boundaries and word information as the input of the next layer.
3. The implementation method of the BcBERT-SW-BiLSTM-CRF model based on vocabulary enhancement and pre-training according to claim 1 is characterized in that: The main work of the feature extraction layer is to allow the model to automatically select more important feature combinations or learn deeper abstract features based on a given set of core features, characters, word boundaries and words. In order to take into account contextual information at the same time, this layer uses a bidirectional LSTM network, including forward and backward chain structures. The forward LSTM is used to obtain the impact of past moments on the current moment, while the backward LSTM is used to obtain the impact of future moments on the current moment. The forward and reverse outputs of each moment are spliced to obtain the output vector of this layer.
