CN113657092A - Method, apparatus, device and medium for identifying label - Google Patents
Method, apparatus, device and medium for identifying label Download PDFInfo
- Publication number
- CN113657092A CN113657092A CN202110740862.8A CN202110740862A CN113657092A CN 113657092 A CN113657092 A CN 113657092A CN 202110740862 A CN202110740862 A CN 202110740862A CN 113657092 A CN113657092 A CN 113657092A
- Authority
- CN
- China
- Prior art keywords
- text
- vector
- recognized
- word
- feature vector
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 78
- 239000013598 vector Substances 0.000 claims abstract description 297
- 238000012549 training Methods 0.000 claims abstract description 49
- 239000011159 matrix material Substances 0.000 claims description 27
- 238000000926 separation method Methods 0.000 claims description 26
- 238000012545 processing Methods 0.000 claims description 19
- 238000004590 computer program Methods 0.000 claims description 16
- 230000011218 segmentation Effects 0.000 claims description 15
- 238000013507 mapping Methods 0.000 claims description 13
- 230000008569 process Effects 0.000 abstract description 18
- 239000002699 waste material Substances 0.000 abstract description 9
- 238000013473 artificial intelligence Methods 0.000 description 18
- 238000005516 engineering process Methods 0.000 description 14
- 230000006870 function Effects 0.000 description 11
- 238000004891 communication Methods 0.000 description 9
- 238000010586 diagram Methods 0.000 description 9
- 238000010801 machine learning Methods 0.000 description 9
- 241000272201 Columbiformes Species 0.000 description 6
- 238000013135 deep learning Methods 0.000 description 6
- 238000003058 natural language processing Methods 0.000 description 6
- 238000011160 research Methods 0.000 description 6
- 230000001360 synchronised effect Effects 0.000 description 5
- 241000282414 Homo sapiens Species 0.000 description 4
- 238000004422 calculation algorithm Methods 0.000 description 4
- 230000003993 interaction Effects 0.000 description 3
- 241000393496 Electra Species 0.000 description 2
- 238000013461 design Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000008447 perception Effects 0.000 description 2
- 230000003068 static effect Effects 0.000 description 2
- 238000006467 substitution reaction Methods 0.000 description 2
- 239000002023 wood Substances 0.000 description 2
- 241000282412 Homo Species 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 238000013459 approach Methods 0.000 description 1
- 230000009118 appropriate response Effects 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 238000013528 artificial neural network Methods 0.000 description 1
- 230000006399 behavior Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000003203 everyday effect Effects 0.000 description 1
- 239000000835 fiber Substances 0.000 description 1
- 230000001939 inductive effect Effects 0.000 description 1
- 230000002787 reinforcement Effects 0.000 description 1
- 238000013526 transfer learning Methods 0.000 description 1
- 238000013519 translation Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/20—Natural language analysis
- G06F40/205—Parsing
- G06F40/211—Syntactic parsing, e.g. based on context-free grammar [CFG] or unification grammars
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
- G06F18/241—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
- G06F18/2415—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on parametric or probabilistic models, e.g. based on likelihood ratio or false acceptance rate versus a false rejection rate
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/20—Natural language analysis
- G06F40/237—Lexical tools
- G06F40/242—Dictionaries
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/20—Natural language analysis
- G06F40/279—Recognition of textual entities
- G06F40/289—Phrasal analysis, e.g. finite state techniques or chunking
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/30—Semantic analysis
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Artificial Intelligence (AREA)
- General Physics & Mathematics (AREA)
- General Health & Medical Sciences (AREA)
- Computational Linguistics (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Health & Medical Sciences (AREA)
- Data Mining & Analysis (AREA)
- Life Sciences & Earth Sciences (AREA)
- Evolutionary Computation (AREA)
- Evolutionary Biology (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Bioinformatics & Computational Biology (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Probability & Statistics with Applications (AREA)
- Machine Translation (AREA)
Abstract
Provided are a method, apparatus, device, and medium for identifying a tag, the method including: acquiring a text to be identified; obtaining a first feature vector based on a text to be recognized; the first feature vector comprises a first sentence vector and a first word vector, the first sentence vector represents sentence-level information of the text to be recognized, and each numerical value in the first word vector represents a word in the text to be recognized; inputting the first characteristic vector into a recognition model to obtain an intention label of the text to be recognized and an attribute label of each word in the text to be recognized, wherein the intention label of the text to be recognized is recognized based on the first sentence vector, and the attribute label of each word in the text to be recognized is recognized based on the first word vector; according to the method, the recognition model is obtained through joint training of the task for recognizing the intention label of the text to be recognized and the task for recognizing the attribute label of each word in the text, so that the waste of computing resources in the recognition process is reduced, and the recognition efficiency of the two tasks is improved.
Description
Technical Field
The embodiments of the present application relate to the field of natural language processing technology, and more particularly, to a method, an apparatus, a device, and a medium for identifying tags.
Background
With continuous progress and deep application of artificial intelligence and 5G technology, traditional hardware is also fusing new characteristics and is endowed with powerful computing, perception and interconnection capabilities, wherein voice interaction is also more and more commonly applied to many scenes such as mobile phones, customer service, home, driving and the like, and the purpose of understanding the intention of a user and providing appropriate response for the user according to the intention is achieved. And the intention of the user, i.e. the intention to understand the text information conveyed in the interaction, is in turn understood to be related to the attribute tags of the individual words in the text information.
At present, the problems of computing resource waste and low recognition efficiency generally exist in the process of recognizing the text intention and recognizing the attribute labels of each word in the text.
Therefore, how to improve the efficiency of recognizing the text intention and recognizing the attribute labels of each word in the text and reduce the resource consumption of the recognition process is a problem which needs to be solved urgently in the field.
Disclosure of Invention
The embodiment of the application provides a method, a device, equipment and a medium for identifying labels, which can improve the identification efficiency of intention labels of texts and attribute labels of words in the texts and reduce the waste of resources in the identification process.
In one aspect, a method of identifying a tag is provided, including:
acquiring a text to be identified;
obtaining a first feature vector of the text to be recognized based on the text to be recognized;
the first feature vector comprises a first sentence vector and a first word vector, the first sentence vector is used for representing sentence level information of the text to be recognized, and each numerical value in the first word vector is used for representing a word in the text to be recognized;
and inputting the first feature vector into a recognition model to obtain an intention label of the text to be recognized and an attribute label of each word in the text to be recognized, wherein the intention label of the text to be recognized is recognized based on the first sentence vector, and the attribute label of each word in the text to be recognized is recognized based on the first word vector.
In another aspect, there is provided an apparatus for identifying a tag, including:
the acquiring unit is used for acquiring a text to be recognized;
the determining unit is used for obtaining a first feature vector of the text to be recognized based on the text to be recognized;
the first feature vector comprises a first sentence vector and a first word vector, the first sentence vector is used for representing sentence level information of the text to be recognized, and each numerical value in the first word vector is used for representing a word in the text to be recognized;
and the identification unit is used for inputting the first feature vector into an identification model so as to obtain an intention label of the text to be identified and an attribute label of each word in the text to be identified, wherein the intention label of the text to be identified is identified based on the first sentence vector, and the attribute label of each word in the text to be identified is identified based on the first word vector.
In another aspect, an embodiment of the present application provides an electronic device, including:
a processor adapted to execute a computer program;
a computer-readable storage medium, in which a computer program is stored which, when being executed by the processor, carries out the above-mentioned method of identifying a tag.
In another aspect, an embodiment of the present application provides a computer-readable storage medium storing computer instructions, which when read and executed by a processor of a computer device, cause the computer device to perform the above-mentioned method for identifying a tag.
Based on the scheme, the text to be recognized is processed to obtain a first feature vector, and based on the first feature vector, the intention label of the text to be recognized and the attribute label of each word in the text to be recognized are obtained by using the recognition model. On the one hand, through the recognition model, the intention label of the text to be recognized and the attribute label of each word in the text to be recognized can be obtained simultaneously, and the recognition efficiency is improved. On the other hand, because the recognition model is obtained by jointly training the task of recognizing the intention label of the text to be recognized and the task of recognizing the attribute label of each word in the text to be recognized through the first sentence vector and the first word vector, the recognition accuracy of the two tasks can be ensured, and the waste of computing resources in the recognition process can be reduced.
In summary, according to the method provided by the application, based on the first sentence vector in the first feature vector and the first word vector in the first feature vector, the task of identifying the intention label of the text to be identified and the task of identifying the attribute label of each word in the text to be identified are jointly trained to obtain the identification model, so that the identification accuracy of the two tasks is ensured, the waste of computing resources in the identification process is reduced, and the identification efficiency of the two tasks is improved.
Drawings
Fig. 1 is a system framework diagram provided in an embodiment of the present application.
Fig. 2 is a schematic flow chart of a method for identifying a tag provided by an embodiment of the present application.
FIG. 3 is a schematic block diagram illustrating the operation of a recognition model provided in an embodiment of the present application.
Fig. 4 is a schematic block diagram of an apparatus for identifying a tag provided in an embodiment of the present application.
Fig. 5 is a schematic structural diagram of an electronic device provided in an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The scheme provided by the application can relate to artificial intelligence technology.
Among them, Artificial Intelligence (AI) is a theory, method, technique and application system that simulates, extends and expands human Intelligence using a digital computer or a machine controlled by a digital computer, senses the environment, acquires knowledge and uses the knowledge to obtain the best result. In other words, artificial intelligence is a comprehensive technique of computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can react in a manner similar to human intelligence. Artificial intelligence is the research of the design principle and the realization method of various intelligent machines, so that the machines have the functions of perception, reasoning and decision making.
It should be understood that the artificial intelligence technology is a comprehensive subject, and relates to a wide range of fields, namely a hardware technology and a software technology. The artificial intelligence infrastructure generally includes technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technologies, operation/interaction systems, mechatronics, and the like. The artificial intelligence software technology mainly comprises a computer vision technology, a voice processing technology, a natural language processing technology, machine learning/deep learning and the like.
With the research and progress of artificial intelligence technology, the artificial intelligence technology is developed and applied in a plurality of fields, such as common smart homes, smart wearable devices, virtual assistants, smart speakers, smart marketing, unmanned driving, automatic driving, unmanned aerial vehicles, robots, smart medical care, smart customer service, and the like.
The embodiment of the application can relate to Machine Learning (ML) and Deep Learning (DL) in an artificial intelligence technology, wherein ML is a multi-field cross subject and relates to multi-field subjects such as probability theory, statistics, approximation theory, convex analysis and algorithm complexity theory. The special research on how a computer simulates or realizes the learning behavior of human beings so as to acquire new knowledge or skills and reorganize the existing knowledge structure to continuously improve the performance of the computer. Machine learning is the core of artificial intelligence, is the fundamental approach for computers to have intelligence, and is applied to all fields of artificial intelligence. DL is a new research direction in the field of machine learning, and is a complex machine learning algorithm, which is introduced into machine learning to make it closer to the original target, Artificial Intelligence (AI), and deep learning is the intrinsic law and expression level of learning sample data, and the information obtained in these learning processes is very helpful to the interpretation of data such as text, image, and sound. The final aim is to make the machine have the ability of analyzing and learning like a human, and recognize data such as characters, images and sounds. Machine learning and deep learning generally include techniques such as artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and formal education learning.
The embodiments of the present application may also relate to a Natural Language Processing (NLP) technology, which is an important direction in the fields of computer science and artificial intelligence. It studies various theories and methods that enable efficient communication between humans and computers using natural language. Natural language processing is a science integrating linguistics, computer science and mathematics. Therefore, the research in this field will involve natural language, i.e. the language that people use everyday, so it is closely related to the research of linguistics. Natural language processing techniques typically include text processing, semantic understanding, machine translation, robotic question and answer, knowledge mapping, and the like.
It should be noted that the apparatus provided in this embodiment of the present application may be integrated in a server, where the server may include a server or a distributed server that operates independently, may also include a server cluster or a distributed system that is composed of a plurality of servers, and may also be a cloud server that provides basic cloud computing services such as cloud service, cloud database, cloud computing, cloud function, cloud storage, network service, cloud communication, middleware service, domain name service, security service, and big data and an artificial intelligence platform, and the server may be directly or indirectly connected in a wired or wireless communication manner, which is not limited herein.
The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings.
Fig. 1 is a schematic scene diagram of a system framework 100 provided in an embodiment of the present application.
It should be understood that fig. 1 is only an example of the present application and should not be construed as limiting the present application.
As shown in fig. 1, the system framework may include terminal device 110, terminal device 120, terminal device 130, network 140, and server 150. Among other things, terminal device 110, terminal device 120, and terminal device 130 may communicate with server 150 via network 140.
A user may interact with server 150 via network 140 using end device 110, end device 120, and end device 130 to receive or send messages. Network 140 serves, among other things, to provide a medium for communication links between terminal devices 110, 120, 130 and server 150.
For example, the user inputs a text to be recognized using the terminal device 110, transmits the text to be recognized to the server 150 through the network 140, and the server 150 recognizes an intention tag of the text to be recognized and an attribute tag of each word in the text to be recognized using a recognition model therein, and transmits the recognized result to the terminal device 110 through the network 140.
It should be noted that the terminal devices 110, 120, 130 may be any electronic device having a display screen and supporting web browsing, and the terminal devices include, but are not limited to, smart mobile phones, tablet computers, and other small Personal portable devices, such as Personal Digital Assistants (PDAs), electronic books (E-books), etc., which is not limited in this application. The server 150 may include a server or a distributed server that operates independently, or may include a server cluster or a distributed system that is composed of a plurality of servers, or may be a cloud server that provides basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a network service, cloud communication, a middleware service, a domain name service, a security service, and a big data and artificial intelligence platform, and the server may be directly or indirectly connected through a wired or wireless communication manner. The network 140 may include various connection types, such as wired and/or wireless communication links, and so forth.
It should be noted that the apparatus for intention identification provided in the embodiment of the present application may be integrated in the server 150, or the apparatus for intention identification may also be integrated in the terminal device 110, 120, 130, or integrated in a terminal device different from the terminal device 110, 120, 130, and the present application does not specifically limit this.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative, and that any number of terminal devices, networks, and servers may be present, as desired.
The method provided by the present application will be described in detail below by way of example with the intention that the identified device be integrated in a server.
Fig. 2 is a schematic flow chart of a method 200 for identifying a tag provided by an embodiment of the present application.
It should be noted that the solutions provided in the embodiments of the present application can be implemented by any electronic device having data processing capability. For example, the electronic device may be implemented as a server. The server may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing basic cloud computing services such as cloud service, a cloud database, cloud computing, a cloud function, cloud storage, network service, cloud communication, middleware service, domain name service, security service, big data and an artificial intelligence platform, and the server may be directly or indirectly connected in a wired or wireless communication manner, which is not limited herein; such as the server shown in fig. 1.
As shown in fig. 2, the method 200 may include some or all of the following:
s201, acquiring a text to be identified;
s202, obtaining a first feature vector of the text to be recognized based on the text to be recognized;
the first feature vector comprises a first sentence vector and a first word vector, the first sentence vector is used for representing sentence level information of the text to be recognized, and each numerical value in the first word vector is used for representing a word in the text to be recognized;
s203, inputting the first feature vector into a recognition model to obtain an intention tag of the text to be recognized and an attribute tag of each word in the text to be recognized, where the intention tag of the text to be recognized is recognized based on the first sentence vector, and the attribute tag of each word in the text to be recognized is recognized based on the first word vector.
In other words, the server acquires a text to be recognized sent by the terminal device, firstly, the text to be recognized is processed into a first feature vector, secondly, the first feature vector is input into a recognition model to obtain an intention label of the text to be recognized and attribute labels of words in the text to be recognized, and finally, the intention label of the text to be recognized and the attribute labels of the words in the text to be recognized are sent to the terminal device; the first feature vector comprises a first sentence vector and a first word vector, the first sentence vector is used for representing sentence level information of the text to be recognized, and each numerical value in the first word vector is used for representing a word in the text to be recognized.
Based on the scheme, the text to be recognized is processed to obtain a first feature vector, and based on the first feature vector, the intention label of the text to be recognized and the attribute label of each word in the text to be recognized are obtained by using the recognition model. On the one hand, through the recognition model, the intention label of the text to be recognized and the attribute label of each word in the text to be recognized can be obtained simultaneously, and the recognition efficiency is improved. On the other hand, because the recognition model is obtained by jointly training the task of recognizing the intention label of the text to be recognized and the task of recognizing the attribute label of each word in the text to be recognized through the first sentence vector and the first word vector, the recognition accuracy of the two tasks can be ensured, and the waste of computing resources in the recognition process can be reduced.
In summary, according to the method provided by the application, based on the first sentence vector in the first feature vector and the first word vector in the first feature vector, the task of identifying the intention label of the text to be identified and the task of identifying the attribute label of each word in the text to be identified are jointly trained to obtain the identification model, so that the identification accuracy of the two tasks is ensured, the waste of computing resources in the identification process is reduced, and the identification efficiency of the two tasks is improved.
In one implementation, the recognition model may be a model trained based on an Electrora model.
The identification model is finely tuned and trained through an Encoder (effective Learning and accurate classification Token replacement) model, on one hand, marking data required by training is reduced, data marking cost required by identification model training is reduced, on the other hand, identification model training is carried out based on an electrora model, and convergence speed of the identification model is accelerated.
Of course, the recognition model may also be a two-way Encoder Representation from transforms (BERT) model based on a converter for fine tuning training, which is not specifically limited in this application.
It should be noted that the text to be recognized may include one text sentence, and may also include a plurality of text sentences, which is not specifically limited in this application. It is to be noted thatThe essence of the Electrora model is to change a method for training parameters of the BERT model, and the aim of multi-classification is fulfilled mainly by using the ideas of a generator and a discriminator。
It should be understood that the Electrora model is the preferred pre-trained model for the present application, but should not be a limitation of the pre-trained model in the embodiments of the present application.
The following will explain the method for identifying a tag provided in the embodiment of the present application in detail, taking a model for which the identification model is trained based on an ectra model as an example.
In some embodiments of the present application, S202 may include:
performing word segmentation processing on the text to be recognized to obtain a plurality of words;
adding a classification CLS symbol in front of the first word in the words, and adding a separation SEP symbol behind the last word in the words;
and matching the words, the CLS symbol and the SEP symbol with words in a dictionary respectively to obtain the first feature vector.
In other words, firstly, the server performs word segmentation on the acquired text to be recognized to obtain a plurality of words; then, a Classification (CLS) symbol is added before the first word of the obtained words, and a Separation (SEP) symbol is added after the last word; and finally, matching the words, the CLS symbol and the SEP symbol with words in a dictionary respectively to obtain the first feature vector.
It should be noted that the text to be recognized may be one sentence or a text composed of a plurality of sentences, for example, when the text to be recognized is a text composed of a plurality of sentences, the text to be recognized is first divided into sentences, then each sentence in the text to be recognized is divided into words, a CLS symbol and an SEP symbol are added to the beginning and the end of each sentence, and finally the plurality of words, the CLS symbol and the SEP symbol of each sentence are matched with words in a dictionary to obtain a first feature vector corresponding to each sentence. For another example, when the text to be recognized is a text composed of a sentence, the text may be directly participled and the CLS symbol and the SEP symbol may be added at the beginning and the end. In addition, the word segmentation processing may be to perform word segmentation on the text to be recognized according to characters, or may also perform word segmentation according to words, which is not specifically limited in the present application.
In one implementation, after adding a CLS symbol and an SEP symbol to a text to be recognized, the index numbers of the words, the CLS symbol, and the SEP symbol in the dictionary are respectively determined as the numerical values of the words, the CLS symbol, and the SEP symbol in the first feature vector, so as to obtain the first feature vector.
By respectively determining the index numbers of the words, the CLS symbols and the SEP symbols in the dictionary as the numerical values of the words, the CLS symbols and the SEP symbols in the first characteristic vector, the data sparseness of the first characteristic vector can be prevented, only effective data can be calculated, and the calculation efficiency is improved.
Of course, the first feature vector may also be a vector matrix, and the length of each column in the vector matrix may be the number of words or words in the dictionary, each numerical value in each column corresponds to one word or word, for example, there are 100 words in the dictionary, the first word in the text to be recognized is "wood", which corresponds to the 10 th position in the dictionary, and the length of the wood corresponding column vector is 100, where the 10 th position is 1, and the rest are all 0.
It should be noted that the CLS symbol is added in front of the first word of the text to be recognized, the semantic vector obtained through electrora can be used for subsequent classification tasks, and the SEP symbol is added behind the last word of the words of the text to be recognized to identify that the text to be recognized is finished.
In some embodiments of the present application, before performing word segmentation processing on the text to be recognized to obtain a plurality of words, the method further includes:
processing the text to be recognized into a text in a first format, wherein the text in the first format is used for representing the text meeting word segmentation conditions;
and performing word segmentation processing on the text in the first format to obtain a plurality of words.
For example, at least one of the following processes is performed on the text to be recognized:
full angle to half angle, English characters small case to large case, and punctuation mark removal.
In some embodiments of the present application, S203 may comprise:
inputting the first feature vector into an identification model, and encoding the first sentence vector by using the identification model to obtain a semantic vector corresponding to the first sentence vector;
mapping the semantic vector corresponding to the first sentence vector into a first probability distribution vector corresponding to the first sentence vector;
and determining the intention label of the text to be recognized based on the first probability distribution vector.
In other words, the server inputs the first feature vector into the recognition model, and codes the first sentence vector in the first feature vector by using the recognition model, which is equivalent to adding position information to the first sentence vector and extracting semantic information of the text to be recognized to obtain a semantic vector corresponding to the first sentence vector; mapping the semantic vector corresponding to the first sentence vector into a first probability distribution vector corresponding to the first sentence vector, namely mapping the semantic vector corresponding to the first sentence vector into a first probability distribution vector corresponding to the intention label of the text to be recognized, and determining the intention label of the text to be recognized based on the first probability distribution vector; for example, the length of the first probability distribution vector may be the total number of intent tags in the library of intent tags, and the value of each bit in the first probability distribution vector may be a probability value in the interval 0-1.
In one implementation, based on the first probability distribution vector, determining a maximum numerical value in the first probability distribution vector;
determining an intention label corresponding to the maximum numerical value in the first probability distribution vector in an intention label library;
and determining the intention label corresponding to the maximum numerical value as the intention label of the text to be recognized, wherein the intention label of the text to be recognized is used for representing the intention of the text to be recognized.
In other words, the intention label of the text to be recognized is determined by determining the maximum value in the first probability distribution vector and the intention label corresponding to the maximum value.
Of course, in another implementation manner, the label corresponding to the minimum value in the first probability distribution vector may also be determined as the intention label of the text to be recognized.
It should be noted that each numerical value in the first probability distribution vector corresponds to an intention label, and the size of each numerical value represents the probability that the intention label corresponding to each numerical value is the intention label of the text to be recognized, that is, the numerical value in the first probability distribution vector may be used to indicate the estimation accuracy for estimating the label corresponding to the numerical value as the intention label of the text to be recognized.
In some embodiments of the present application, S203 may further include:
inputting the first feature vector into an identification model, and coding the first word vector by using the identification model to obtain a semantic vector corresponding to the first word vector;
mapping the semantic vector corresponding to the first word vector into a vector matrix corresponding to the first word vector;
and determining the attribute labels of all words in the text to be recognized based on the vector matrix.
In other words, the server inputs the first feature vector into the recognition model, and encodes the first word vector in the first feature vector by using the recognition model, which is equivalent to adding position information and text information to the first word vector and extracting semantic information of each word in the text to be recognized to obtain a semantic vector corresponding to the first word vector; mapping the semantic vector corresponding to the first word vector into a vector matrix corresponding to the first word vector, namely mapping the semantic vector corresponding to the first word vector into probability distribution vectors corresponding to words in the text to be recognized, combining the probability distribution vectors corresponding to the words into a vector matrix, and determining the attribute label of each word in the text to be recognized based on the vector matrix.
For example, the vector matrix may be an M × N × K dimensional matrix, where M represents the number of sentences in the text to be recognized, N represents the number of words obtained after the text to be recognized is segmented, and K represents the total number of attribute tags in the attribute tag library; for another example, when the text to be recognized is a sentence, the vector matrix is N × K dimensional, and each value of the column vector in the vector matrix corresponds to an attribute tag.
In one implementation, based on the vector matrix, determining a second feature vector, where each value in the second feature vector is used for corresponding to an attribute tag;
determining an attribute label corresponding to each numerical value in the second feature vector;
and determining the attribute label corresponding to each numerical value as the attribute label of each word in the text to be recognized.
For example, the vector matrix may be processed into a second feature vector, and each numerical value in the second feature vector may be an index number of an attribute tag of a corresponding word. For example, if the text to be recognized is "white pigeon playing wubai", wubai and wubai correspond to B-aritist No. 8 and I-aitist No. 9 of the attribute tag library, respectively, the positions of wubai in the second feature vector are 8 and 9, respectively.
In another implementation, the vector matrix is subjected to a Conditional Random Field (CRF) to obtain the second feature vector.
For example, if the text to be recognized is "white pigeon playing wubai", a "column vector" exists between the column vector corresponding to "wu" and the column vector corresponding to "bai" in the vector matrix obtained by processing, wherein the "column vector" has no corresponding attribute tag in the attribute tag library, and the "attribute tag" is O; when the vector matrix passes through the CRF, the CRF carries out part-of-speech judgment according to a Viterbi algorithm, for example, when the part-of-speech judgment that O cannot appear between B-aritist and I-aitist is carried out according to the part-of-speech judgment, the positions of column vectors corresponding to different words are adjusted, and therefore the optimal attribute label sequence is obtained finally.
By carrying out Viterbi algorithm on the vector matrix through a conditional random field CRF, the sequence of the attribute labels of a plurality of words in the text to be recognized is adjusted, and the accuracy of the attribute labels of each word in the finally output text to be recognized is improved.
The following describes in detail the process of obtaining the intention label of the text to be recognized and the attribute labels of each word in the text to be recognized by using the recognition model with reference to fig. 3, taking the recognition model trained based on the ectra model as an example.
Fig. 3 is a schematic block diagram of an operation principle of a recognition model provided by an embodiment of the present application.
As shown in FIG. 3, taking the text to be recognized as "white pigeon playing wubai", and the recognition model as recognition model based on Electra as an example, the block diagram may include the text to be recognized as "white pigeon playing wubai", the recognition model based on Electra, the intention tag of the text to be recognized "playdummy", and the attribute tag of each word in the text to be recognized "00B-aritist I-aritist 0B-song I-song 0" which will be described in detail through steps 1 to 3
Step 1, firstly, performing word segmentation on a text to be recognized, namely a white pigeon playing wubai, then adding a CLS symbol and an SEP symbol to the head and the tail of a plurality of divided words, and finally, respectively matching the plurality of words of the text to be recognized, the added CLS symbol and the added SEP symbol with words in a dictionary to obtain a first feature vector; for example, the index numbers of a plurality of words, CLS symbols and SEP symbols of the text to be recognized in the dictionary are respectively determined as the numerical values of the plurality of words, the CLS symbols and the SEP symbols in the first feature vector; for example, the dictionary has 2000 words, the CLS symbol index 101, the SEP symbol index 102, and the wubai white pigeon index 1234567, respectively, and the first feature vector is [ 1011234567102 ].
And 2, inputting the first feature vector into an identification model, namely inputting [ 1011234567102 ] into the identification model, wherein firstly, coding a CLS sign bit in the first feature vector, namely E [ CLS ], to obtain a semantic vector T [ CLS ] of a first sentence vector, then mapping the T [ CLS ] into a first probability distribution vector, and finally obtaining an intention label planemisuic of the text to be identified based on a maximum numerical value in the first probability distribution vector.
And 3, firstly, coding other bits except the CLS sign bit in the first feature vector, namely E1-E8, to obtain semantic vectors T1-T8 of the first word vector, then mapping the semantic vectors T1-T8 of the first word vector to vector matrixes corresponding to T1-T8, and obtaining second feature vectors by subjecting the vector matrixes to conditional random fields CRF, for example, each numerical value in the second feature vectors is the index number of an attribute label, so that the attribute labels of each word in the text to be recognized can be obtained.
It should be noted that, the step 2 and the step 3 may not have a sequence, and the intention tag of the text to be recognized and the attribute tag of each word in the text to be recognized are obtained at the same time.
In summary, by using the recognition model, the intention label of the text to be recognized is recognized based on the first sentence vector in the first feature vector, and the attribute label of each word in the text to be recognized is recognized based on the first word vector in the first feature vector, so that the recognition accuracy of the two tasks can be ensured, the waste of computing resources in the recognition process is reduced, and the recognition efficiency of the two tasks is improved.
In some embodiments of the present application, before obtaining the first feature vector of the text to be recognized based on the text to be recognized, the method 200 may further include:
acquiring a training text;
obtaining a third feature vector of the training text based on the training text;
the third feature vector comprises a third sentence vector and a third word vector, the third sentence vector is used for representing sentence level information of the training text, and each numerical value in the third word vector is used for representing a word in the training text;
acquiring an intention label of the training text and an attribute label of each word in the training text;
and training by taking the third feature vector, the intention label of the training text and the attribute label of each word in the training text as training samples to obtain the intention recognition model.
Based on the scheme, a third feature vector is obtained by processing the training text, and the third feature vector, the intention label of the training text and the attribute label of each word in the training text are used as training samples to be trained to obtain the intention recognition model, which is equivalent to performing joint training on a task for recognizing the intention label of the training text and a task for recognizing the attribute label of each word in the training text through a first sentence vector and a first word vector in a first feature vector, so that on one hand, the recognition accuracy of the two tasks can be ensured, and meanwhile, the waste of computing resources in the recognition process is reduced; on the other hand, the recognition accuracy of the two tasks is ensured, and meanwhile, the recognition efficiency of the two tasks is improved.
It should be noted that the method for obtaining the third feature vector may refer to the method for obtaining the first feature vector in the method 200, and is not described herein again.
The preferred embodiments of the present application have been described in detail with reference to the accompanying drawings, however, the present application is not limited to the details of the above embodiments, and various simple modifications can be made to the technical solution of the present application within the technical idea of the present application, and these simple modifications are all within the protection scope of the present application. For example, the various features described in the foregoing detailed description may be combined in any suitable manner without contradiction, and various combinations that may be possible are not described in this application in order to avoid unnecessary repetition. For example, various embodiments of the present application may be arbitrarily combined with each other, and the same should be considered as the disclosure of the present application as long as the concept of the present application is not violated.
It should also be understood that, in the various method embodiments of the present application, the sequence numbers of the above-mentioned processes do not imply an execution sequence, and the execution sequence of the processes should be determined by their functions and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
The method provided by the embodiment of the present application is explained above, and the device provided by the embodiment of the present application is explained below.
Fig. 4 is a schematic block diagram of an apparatus 400 for identifying a tag provided in an embodiment of the present application.
As shown in fig. 4, the apparatus 400 may include:
an obtaining unit 410, configured to obtain a text to be recognized;
a determining unit 420, configured to obtain a first feature vector of the text to be recognized based on the text to be recognized;
the first feature vector comprises a first sentence vector and a first word vector, the first sentence vector is used for representing sentence level information of the text to be recognized, and each numerical value in the first word vector is used for representing a word in the text to be recognized;
the identifying unit 430 is configured to input the first feature vector into an identification model to obtain an intention tag of the text to be identified and an attribute tag of each word in the text to be identified, where the intention tag of the text to be identified is identified based on the first sentence vector, and the attribute tag of each word in the text to be identified is identified based on the first word vector.
In some embodiments of the present application, the determining unit 420 may be configured to:
performing word segmentation processing on the text to be recognized to obtain a plurality of words;
adding a classification CLS symbol in front of the first word in the words, and adding a separation SEP symbol behind the last word in the words;
and matching the words, the CLS symbol and the SEP symbol with words in a dictionary respectively to obtain the first feature vector.
In some embodiments of the present application, the determining unit 420 may be further configured to:
processing the text to be recognized into a text in a first format, wherein the text in the first format is used for representing the text meeting word segmentation conditions;
and performing word segmentation processing on the text in the first format to obtain a plurality of words.
For example, at least one of the following processes is performed on the text to be recognized:
full angle to half angle, English characters small case to large case, and punctuation mark removal.
In some embodiments of the present application, the determining unit 420 may be further configured to:
and respectively determining the index numbers of the words, the CLS symbols and the SEP symbols in the dictionary as the numerical values of the words, the CLS symbols and the SEP symbols in the first feature vector to obtain the first feature vector.
In some embodiments of the present application, the identifying unit 430 may be configured to:
inputting the first feature vector into an identification model, and encoding the first sentence vector by using the identification model to obtain a semantic vector corresponding to the first sentence vector;
mapping the semantic vector corresponding to the first sentence vector into a first probability distribution vector corresponding to the first sentence vector;
and determining the intention label of the text to be recognized based on the first probability distribution vector.
In some embodiments of the present application, the identifying unit 430 may further be configured to:
determining a maximum value in the first probability distribution vector based on the first probability distribution vector;
determining an intention label corresponding to the maximum numerical value in the first probability distribution vector in an intention label library;
and determining the intention label corresponding to the maximum numerical value as the intention label of the text to be recognized, wherein the intention label of the text to be recognized is used for representing the intention of the text to be recognized.
In some embodiments of the present application, the identifying unit 430 may further be configured to:
inputting the first feature vector into an identification model, and coding the first word vector by using the identification model to obtain a semantic vector corresponding to the first word vector;
mapping the semantic vector corresponding to the first word vector into a vector matrix corresponding to the first word vector;
and determining the attribute labels of all words in the text to be recognized based on the vector matrix.
In some embodiments of the present application, the identifying unit 430 may further be configured to:
determining a second feature vector based on the vector matrix, wherein each numerical value in the second feature vector is used for corresponding to an attribute label;
determining an attribute label corresponding to each numerical value in the second feature vector;
and determining the attribute label corresponding to each numerical value as the attribute label of each word in the text to be recognized.
In some embodiments of the present application, the identifying unit 430 may further be configured to:
and obtaining the second feature vector of the vector matrix by a conditional random field CRF.
In some embodiments of the present application, each of the values is an index number of an attribute tag.
In some embodiments of the present application, the recognition model is a model trained based on an Electrora model.
In some embodiments of the present application, the apparatus 400 may further comprise:
a training unit to:
acquiring a training text;
obtaining a third feature vector of the training text based on the training text;
the third feature vector comprises a third sentence vector and a third word vector, the third sentence vector is used for representing sentence level information of the training text, and each numerical value in the third word vector is used for representing a word in the training text;
acquiring an intention label of the training text and an attribute label of each word in the training text;
and training by taking the third feature vector, the intention label of the training text and the attribute label of each word in the training text as training samples to obtain the intention recognition model.
It is to be understood that apparatus embodiments and method embodiments may correspond to one another and that similar descriptions may refer to method embodiments. To avoid repetition, further description is omitted here. Specifically, the apparatus 400 may correspond to a corresponding main body for executing the method 200 of the embodiment of the present application, and for brevity, will not be described again here.
It should also be understood that the units in the apparatus 400 related to the embodiments of the present application may be respectively or entirely combined into one or several other units to form one or several other units, or some unit(s) therein may be further split into multiple functionally smaller units to form one or several other units, which may achieve the same operation without affecting the achievement of the technical effect of the embodiments of the present application. The units are divided based on logic functions, and in practical application, the functions of one unit can be realized by a plurality of units, or the functions of a plurality of units can be realized by one unit. In other embodiments of the present application, the apparatus 400 may also include other units, and in practical applications, the functions may also be implemented by being assisted by other units, and may be implemented by cooperation of a plurality of units. According to another embodiment of the present application, the apparatus 400 related to the embodiment of the present application and the method for identifying a tag of the embodiment of the present application may be constructed by running a computer program (including program codes) capable of executing the steps related to the corresponding method on a general-purpose computing device including a general-purpose computer such as a Central Processing Unit (CPU), a random access storage medium (RAM), a read only storage medium (ROM), and the like, and a storage element. The computer program can be loaded on a computer-readable storage medium, for example, and loaded and executed in an electronic device through the computer-readable storage medium, so as to implement the corresponding method of the embodiments of the present application.
In other words, the above-mentioned units may be implemented in hardware, may be implemented by instructions in software, and may also be implemented in a combination of hardware and software. Specifically, the steps of the method embodiments in the present application may be implemented by integrated logic circuits of hardware in a processor and/or instructions in the form of software, and the steps of the method disclosed in conjunction with the embodiments in the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software in the decoding processor. Alternatively, the software may reside in random access memory, flash memory, read only memory, programmable read only memory, electrically erasable programmable memory, registers, and the like, as is well known in the art. The storage medium is located in a memory, and a processor reads information in the memory and completes the steps in the above method embodiments in combination with hardware thereof.
Fig. 5 is a schematic structural diagram of an electronic device 500 provided in an embodiment of the present application.
As shown in fig. 5, the electronic device 500 includes at least a processor 510 and a computer-readable storage medium 520. Wherein the processor 510 and the computer-readable storage medium 520 may be connected by a bus or other means. The computer-readable storage medium 520 is used for storing a computer program 521, the computer program 521 comprises computer instructions, and the processor 510 is used for executing the computer instructions stored by the computer-readable storage medium 520. The processor 510 is a computing core and a control core of the electronic device 500, which is adapted to implement one or more computer instructions, in particular to load and execute the one or more computer instructions to implement a corresponding method flow or a corresponding function.
By way of example, processor 510 may also be referred to as a Central Processing Unit (CPU). Processor 510 may include, but is not limited to: general purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, and the like.
By way of example, the computer-readable storage medium 520 may be a high-speed RAM memory or a Non-volatile memory (Non-volatile memory), such as at least one disk memory; alternatively, at least one computer-readable storage medium may be located remotely from the processor 510. In particular, the computer-readable storage medium 520 includes, but is not limited to: volatile memory and/or non-volatile memory. The non-volatile Memory may be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable PROM (EEPROM), or a flash Memory. Volatile Memory can be Random Access Memory (RAM), which acts as external cache Memory. By way of example, but not limitation, many forms of RAM are available, such as Static random access memory (Static RAM, SRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic random access memory (Synchronous DRAM, SDRAM), Double Data Rate Synchronous Dynamic random access memory (DDR SDRAM), Enhanced Synchronous SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), and Direct Rambus RAM (DR RAM).
In one implementation, the electronic device 500 can be the apparatus 400 of the identification tag shown in FIG. 4; the computer readable storage medium 520 has stored therein computer instructions; computer instructions stored in the computer-readable storage medium 520 are loaded and executed by the processor 510 to implement the corresponding steps in the method embodiment shown in FIG. 2; in a specific implementation, the computer instructions in the computer-readable storage medium 520 are loaded by the processor 510 and perform corresponding steps, which are not described herein again to avoid repetition.
According to another aspect of the present application, a computer-readable storage medium (Memory) is provided, which is a Memory device in the electronic device 500 and is used for storing programs and data. Such as computer-readable storage media 520. It is understood that the computer readable storage medium 520 herein may include both built-in storage media in the electronic device 500 and, of course, extended storage media supported by the electronic device 500. The computer readable storage medium provides a storage space that stores an operating system of the electronic device 500. Also stored in the memory space are one or more computer instructions, which may be one or more computer programs 521 (including program code), suitable for loading and execution by processor 510.
According to another aspect of the application, a computer program product or computer program is provided, comprising computer instructions stored in a computer readable storage medium. Such as a computer program 521. At this time, the electronic device 500 may be a computer, and the processor 510 reads the computer instructions from the computer-readable storage medium 520, and the processor 510 executes the computer instructions, so that the computer performs the method of identifying a tag provided in the above-described various alternatives.
In other words, when implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes of the embodiments of the present application are executed in whole or in part or to realize the functions of the embodiments of the present application. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored on a computer readable storage medium or transmitted from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wire (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.).
Those of ordinary skill in the art will appreciate that the various illustrative elements and process steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
Finally, it should be noted that the above is only a specific embodiment of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of changes or substitutions within the technical scope of the present application, and all the changes or substitutions should be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
Claims (14)
1. A method of identifying a tag, comprising:
acquiring a text to be identified;
obtaining a first feature vector of the text to be recognized based on the text to be recognized;
the first feature vector comprises a first sentence vector and a first word vector, the first sentence vector is used for representing sentence level information of the text to be recognized, and each numerical value in the first word vector is used for representing a word in the text to be recognized;
inputting the first feature vector into a recognition model to obtain an intention label of the text to be recognized and an attribute label of each word in the text to be recognized, wherein the intention label of the text to be recognized is recognized based on the first sentence vector, and the attribute label of each word in the text to be recognized is recognized based on the first word vector.
2. The method according to claim 1, wherein the obtaining a first feature vector of the text to be recognized based on the text to be recognized comprises:
performing word segmentation processing on the text to be recognized to obtain a plurality of words;
adding a classification CLS symbol in front of a first word in the plurality of words, and adding a separation SEP symbol behind a last word in the plurality of words;
and matching the words, the CLS symbols and the SEP symbols with words in a dictionary respectively to obtain the first feature vector.
3. The method of claim 2, wherein before the tokenizing the text to be recognized to obtain a plurality of words, the method further comprises:
processing the text to be recognized into a text in a first format, wherein the text in the first format is used for representing the text meeting word segmentation conditions;
and performing word segmentation processing on the text in the first format to obtain a plurality of words.
4. The method of claim 2, wherein the matching the plurality of words, the CLS symbol, and the SEP symbol to words in a dictionary to obtain the first feature vector comprises:
and respectively determining the index numbers of the words, the index numbers of the CLS symbols and the index numbers of the SEP symbols in the dictionary as the numerical values corresponding to the words, the numerical values corresponding to the CLS symbols and the numerical values corresponding to the SEP symbols in the first feature vector to obtain the first feature vector.
5. The method according to claim 1, wherein the inputting the first feature vector into a recognition model to obtain an intention label of the text to be recognized and an attribute label of each word in the text to be recognized comprises:
inputting the first feature vector into an identification model, and encoding the first sentence vector by using the identification model to obtain a semantic vector corresponding to the first sentence vector;
mapping the semantic vector corresponding to the first sentence vector into a first probability distribution vector corresponding to the first sentence vector;
determining an intention label of the text to be recognized based on the first probability distribution vector.
6. The method of claim 5, wherein the determining the intent tag of the text to be recognized based on the first probability distribution vector comprises:
determining a maximum numerical value in the first probability distribution vector based on the first probability distribution vector;
determining an intention label corresponding to a maximum numerical value in the first probability distribution vector in an intention label library;
and determining the intention label corresponding to the maximum numerical value as the intention label of the text to be recognized, wherein the intention label of the text to be recognized is used for representing the intention of the text to be recognized.
7. The method according to claim 1, wherein the inputting the first feature vector into a recognition model to obtain an intention label of the text to be recognized and an attribute label of each word in the text to be recognized comprises:
inputting the first feature vector into an identification model, and encoding the first word vector by using the identification model to obtain a semantic vector corresponding to the first word vector;
mapping the semantic vector corresponding to the first word vector into a vector matrix corresponding to the first word vector;
and determining the attribute labels of all words in the text to be recognized based on the vector matrix.
8. The method of claim 7, wherein the determining attribute labels for respective words in the text to be recognized based on the vector matrix comprises:
determining a second feature vector based on the vector matrix, wherein each numerical value in the second feature vector is used for corresponding to an attribute label;
determining an attribute label corresponding to each numerical value in the second feature vector;
and determining the attribute label corresponding to each numerical value as the attribute label of each word in the text to be recognized.
9. The method of claim 8, wherein determining a second eigenvector based on the vector matrix comprises:
and obtaining the second feature vector of the vector matrix through a conditional random field CRF.
10. The method of claim 8, wherein each value in the second feature vector is an index number of an attribute tag.
11. The method according to claim 1, wherein before obtaining the first feature vector of the text to be recognized based on the text to be recognized, the method further comprises:
acquiring a training text;
obtaining a third feature vector of the training text based on the training text;
the third feature vector comprises a third sentence vector and a third word vector, the third sentence vector is used for representing sentence level information of the training text, and each numerical value in the third word vector is used for representing a word in the training text;
acquiring an intention label of the training text and an attribute label of each word in the training text;
and training by taking the third feature vector, the intention label of the training text and the attribute label of each word in the training text as training samples to obtain the intention recognition model.
12. An apparatus for identifying a tag, comprising:
the acquiring unit is used for acquiring a text to be recognized;
the determining unit is used for obtaining a first feature vector of the text to be recognized based on the text to be recognized;
the first feature vector comprises a first sentence vector and a first word vector, the first sentence vector is used for representing sentence level information of the text to be recognized, and each numerical value in the first word vector is used for representing a word in the text to be recognized;
and the identification unit is used for inputting the first feature vector into an identification model so as to obtain an intention label of the text to be identified and an attribute label of each word in the text to be identified, wherein the intention label of the text to be identified is identified based on the first sentence vector, and the attribute label of each word in the text to be identified is identified based on the first word vector.
13. An electronic device, comprising:
a processor and a memory for storing a computer program, the processor for invoking and executing the computer program stored in the memory to perform the method of any one of claims 1 to 11.
14. A computer-readable storage medium for storing a computer program which causes a computer to perform the method of any one of claims 1 to 11.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110740862.8A CN113657092B (en) | 2021-06-30 | 2021-06-30 | Method, device, equipment and medium for identifying tag |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110740862.8A CN113657092B (en) | 2021-06-30 | 2021-06-30 | Method, device, equipment and medium for identifying tag |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113657092A true CN113657092A (en) | 2021-11-16 |
CN113657092B CN113657092B (en) | 2024-08-09 |
Family
ID=78477834
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110740862.8A Active CN113657092B (en) | 2021-06-30 | 2021-06-30 | Method, device, equipment and medium for identifying tag |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113657092B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114330364A (en) * | 2021-12-27 | 2022-04-12 | 北京百度网讯科技有限公司 | Model training method, intention recognition device and electronic equipment |
CN114912445A (en) * | 2022-04-15 | 2022-08-16 | 北京北大软件工程股份有限公司 | Method and device for identifying case source line text data, storage medium and electronic equipment |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2019024704A1 (en) * | 2017-08-03 | 2019-02-07 | 阿里巴巴集团控股有限公司 | Entity annotation method, intention recognition method and corresponding devices, and computer storage medium |
CN110147445A (en) * | 2019-04-09 | 2019-08-20 | 平安科技(深圳)有限公司 | Intension recognizing method, device, equipment and storage medium based on text classification |
CN111859947A (en) * | 2019-04-24 | 2020-10-30 | 北京嘀嘀无限科技发展有限公司 | Text processing device and method, electronic equipment and storage medium |
CN111985209A (en) * | 2020-03-31 | 2020-11-24 | 北京来也网络科技有限公司 | Text sentence recognition method, device, equipment and storage medium combining RPA and AI |
CN112182217A (en) * | 2020-09-28 | 2021-01-05 | 云知声智能科技股份有限公司 | Method, device, equipment and storage medium for identifying multi-label text categories |
CN112613324A (en) * | 2020-12-29 | 2021-04-06 | 北京中科闻歌科技股份有限公司 | Semantic emotion recognition method, device, equipment and storage medium |
CN112749556A (en) * | 2020-08-04 | 2021-05-04 | 腾讯科技(深圳)有限公司 | Multi-language model training method and device, storage medium and electronic equipment |
-
2021
- 2021-06-30 CN CN202110740862.8A patent/CN113657092B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2019024704A1 (en) * | 2017-08-03 | 2019-02-07 | 阿里巴巴集团控股有限公司 | Entity annotation method, intention recognition method and corresponding devices, and computer storage medium |
CN110147445A (en) * | 2019-04-09 | 2019-08-20 | 平安科技(深圳)有限公司 | Intension recognizing method, device, equipment and storage medium based on text classification |
CN111859947A (en) * | 2019-04-24 | 2020-10-30 | 北京嘀嘀无限科技发展有限公司 | Text processing device and method, electronic equipment and storage medium |
CN111985209A (en) * | 2020-03-31 | 2020-11-24 | 北京来也网络科技有限公司 | Text sentence recognition method, device, equipment and storage medium combining RPA and AI |
CN112749556A (en) * | 2020-08-04 | 2021-05-04 | 腾讯科技(深圳)有限公司 | Multi-language model training method and device, storage medium and electronic equipment |
CN112182217A (en) * | 2020-09-28 | 2021-01-05 | 云知声智能科技股份有限公司 | Method, device, equipment and storage medium for identifying multi-label text categories |
CN112613324A (en) * | 2020-12-29 | 2021-04-06 | 北京中科闻歌科技股份有限公司 | Semantic emotion recognition method, device, equipment and storage medium |
Non-Patent Citations (2)
Title |
---|
周权;陈永生;郭玉臣;: "基于多特征融合的意图识别算法研究", 电脑知识与技术, no. 21, 25 July 2020 (2020-07-25) * |
谢腾;杨俊安;刘辉;: "基于BERT-BiLSTM-CRF模型的中文实体识别", 计算机系统应用, no. 07, 15 July 2020 (2020-07-15) * |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114330364A (en) * | 2021-12-27 | 2022-04-12 | 北京百度网讯科技有限公司 | Model training method, intention recognition device and electronic equipment |
CN114330364B (en) * | 2021-12-27 | 2022-11-11 | 北京百度网讯科技有限公司 | Model training method, intention recognition device and electronic equipment |
CN114912445A (en) * | 2022-04-15 | 2022-08-16 | 北京北大软件工程股份有限公司 | Method and device for identifying case source line text data, storage medium and electronic equipment |
Also Published As
Publication number | Publication date |
---|---|
CN113657092B (en) | 2024-08-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111444340B (en) | Text classification method, device, equipment and storage medium | |
US11501182B2 (en) | Method and apparatus for generating model | |
CN111951805B (en) | Text data processing method and device | |
CN118349673A (en) | Training method of text processing model, text processing method and device | |
CN112131366A (en) | Method, device and storage medium for training text classification model and text classification | |
CN111737476A (en) | Text processing method and device, computer readable storage medium and electronic equipment | |
CN113392209B (en) | Text clustering method based on artificial intelligence, related equipment and storage medium | |
CN110532558B (en) | Multi-intention recognition method and system based on sentence structure deep parsing | |
CN112214593A (en) | Question and answer processing method and device, electronic equipment and storage medium | |
CN113704460B (en) | Text classification method and device, electronic equipment and storage medium | |
CN114972823A (en) | Data processing method, apparatus, equipment and computer medium | |
CN111444715B (en) | Entity relationship identification method and device, computer equipment and storage medium | |
CN112131883B (en) | Language model training method, device, computer equipment and storage medium | |
US20230029759A1 (en) | Method of classifying utterance emotion in dialogue using word-level emotion embedding based on semi-supervised learning and long short-term memory model | |
CN113095086B (en) | Method and system for predicting source meaning | |
CN113779225B (en) | Training method of entity link model, entity link method and device | |
CN111767720B (en) | Title generation method, computer and readable storage medium | |
CN111666500A (en) | Training method of text classification model and related equipment | |
CN117711001A (en) | Image processing method, device, equipment and medium | |
CN113392179A (en) | Text labeling method and device, electronic equipment and storage medium | |
CN113421551A (en) | Voice recognition method and device, computer readable medium and electronic equipment | |
CN110851597A (en) | Method and device for sentence annotation based on similar entity replacement | |
CN113657092B (en) | Method, device, equipment and medium for identifying tag | |
CN113761883A (en) | Text information identification method and device, electronic equipment and storage medium | |
CN114492661B (en) | Text data classification method and device, computer equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |