A method and apparatus for Chinese medical
named entity recognition based on multi-level adaptive
semantic enhancement, the method comprising: (1) representing Chinese text as T={C1、C2、···、C N}, construct character C i Features, including character features, boundary features, radical features, and
pinyin features; (2) Character-level C is generated through the ERNIE-Health pre-trained model. i The features are transformed into vector representations, including character feature vectors e. c Boundary eigenvector e b , radical
feature vector e r
Pinyin feature vector e p (3) Input the four character-level features into the character-level adaptive
semantic enhancement module. Use convolutional
layers to compress the character features, perform
nonlinear transformation through gating mechanism and ReLU
activation function, dynamically adjust semantic weights, and use
multilayer perceptron for decompression to obtain enhanced character-level features; (4) Input the enhanced character-level features into the
sentence-level adaptive
semantic enhancement module, and adaptively learn the contribution of different characters in the
sentence through compression and decompression mechanism; (5) Input the enhanced features after multi-level adaptive semantic enhancement module into BiLSTM-CRF module for
label prediction. This invention can better capture semantic differences in context, solve the limitations of existing methods in feature weight allocation, and improve the overall performance of CNER task.