Research Article
How to Construct a Power Knowledge Graph with Dispatching Data?
Algorithm 1
How to build BiLSTM + CRF named entity recognition model.
| Input: self. | | Output: Trained model. | | (1) Initialize the model. | | (2) Define the Embedding layer. | | (3) Add the Embedding layer to the model. | | (4) Add forward LSTM to the model//units = 128, return_sequences = True. | | (5) Add Dropout. | | (6) Add backward LSTM to the model//units = 64, return_sequences = True. | | (7) Add Dropout. | | (8) Add TimeDistributed layer to the model. | | (9) Define the CRF layer and Add the CRF layer to the model. | | (10) Parameter status of each layer of the output model. | | (11) Return model. |
|