Sequence labeling method based on multi-head self-attention mechanism
A technology of sequence labeling and attention, applied in neural learning methods, computer components, natural language data processing, etc.
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Example Embodiment
[0069]Example 1
[0070]The present invention first uses the bidirectional long and short-term memory unit (BLSTM) to learn the contextual semantic features of words in the text. Subsequently, based on the hidden representation learned by BLSTM, a multi-head self-attention mechanism is used to model the semantic relationship between any two words in the text, and then the global semantics that each word should be concerned with are obtained. In order to fully consider the complementarity of the local context semantics and the global semantics, the present invention designs three feature fusion methods to fuse the two parts of the semantics, and based on the fused features, the conditional random field model (CRF) is used to predict the label sequence.
Example Embodiment
[0071]Example 2
[0072]The present invention mainly adopts deep learning technology and natural language processing related theoretical methods to realize sequence labeling tasks. In order to ensure the normal operation of the system, in specific implementation, the computer platform used is required to be equipped with no less than 8G of memory and CPU cores. Not less than 4 and the main frequency is not less than 2.6GHz, GPU environment, Linux operating system, and install Python3.6 and above, pytorch0.4 and above and other necessary software environments.
[0073]Such asfigure 1 As shown, the sequence labeling method based on the multi-head self-attention mechanism provided by the present invention mainly includes the following steps executed in sequence:
[0074]Step 1. Local context semantic coding: Use the bidirectional long-term short-term memory network (BLSTM) to serially learn the local context semantic representation of words in the text.
[0075]Step 1.1) Use the Stanford NLP toolk...
Example Embodiment
[0093]Example 3
[0094]The sequence labeling method based on the multi-head self-attention mechanism mainly includes the following steps executed in order:
[0095]Step 1. Local context semantic coding: Use the bidirectional long-term short-term memory network (BLSTM) to serially learn the local context semantic representation of words in the text.
[0096]Step 1.1, use the Stanford NLP toolkit to segment the input text to obtain the corresponding word sequence X = {x1,x2,...,XN}.
[0097]For example, given the text "I participated in a marathon in Tianjin yesterday", the word sequence can be obtained after word segmentation {"我", "yesterday", "in", "Tianjin", "participate in", "了", "One game", "Marathon", "Game"}.
[0098]Step 1.2, considering that the words in the text usually contain rich morphological features, such as prefix and suffix information, this step is for each word in the word sequenceEncode each word x using the bidirectional LSTM (BLSTM) structureiCorresponding character-level ve...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap