CN116167375A - Entity extraction method, entity extraction device, electronic equipment and storage medium - Google Patents

Entity extraction method, entity extraction device, electronic equipment and storage medium Download PDF

Info

Publication number
CN116167375A
CN116167375A CN202211703714.XA CN202211703714A CN116167375A CN 116167375 A CN116167375 A CN 116167375A CN 202211703714 A CN202211703714 A CN 202211703714A CN 116167375 A CN116167375 A CN 116167375A
Authority
CN
China
Prior art keywords
entity
named
candidate
features
named entity
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.)
Pending
Application number
CN202211703714.XA
Other languages
Chinese (zh)
Inventor
李子玄
冯韬
李慧
许胜强
胡加学
赵景鹤
贺志阳
鹿晓亮
魏思
胡国平
赵志伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Iflytek Medical Technology Co ltd
Original Assignee
Iflytek Medical Technology Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Iflytek Medical Technology Co ltd filed Critical Iflytek Medical Technology Co ltd
Priority to CN202211703714.XA priority Critical patent/CN116167375A/en
Publication of CN116167375A publication Critical patent/CN116167375A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/289Phrasal analysis, e.g. finite state techniques or chunking
    • G06F40/295Named entity recognition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing
    • G06F16/334Query execution
    • G06F16/3343Query execution using phonetics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing
    • G06F16/334Query execution
    • G06F16/3344Query execution using natural language analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/35Clustering; Classification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS OR SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING; SPEECH OR AUDIO CODING OR DECODING
    • G10L15/00Speech recognition
    • G10L15/02Feature extraction for speech recognition; Selection of recognition unit
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS OR SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING; SPEECH OR AUDIO CODING OR DECODING
    • G10L15/00Speech recognition
    • G10L15/08Speech classification or search
    • G10L15/16Speech classification or search using artificial neural networks
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS OR SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING; SPEECH OR AUDIO CODING OR DECODING
    • G10L15/00Speech recognition
    • G10L15/08Speech classification or search
    • G10L15/18Speech classification or search using natural language modelling
    • G10L15/1822Parsing for meaning understanding
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS OR SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING; SPEECH OR AUDIO CODING OR DECODING
    • G10L15/00Speech recognition
    • G10L15/26Speech to text systems
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS OR SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING; SPEECH OR AUDIO CODING OR DECODING
    • G10L25/00Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00
    • G10L25/27Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00 characterised by the analysis technique
    • G10L25/30Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00 characterised by the analysis technique using neural networks

Abstract

The application provides an entity extraction method, an entity extraction device, electronic equipment and a storage medium, which can respectively determine the entity characteristics of a named entity and the entity characteristics of each candidate entity of the named entity based on a named entity of a specific type extracted from text data. The candidate entity is an entity with similarity with a named entity in a specific entity library being greater than the set similarity, and the entity characteristics comprise semantic characteristics and voice characteristics of the entity. Then, an entity extraction result is determined from the candidate entities based on the named entity and the entity characteristics of each candidate entity. In the method, semantic features and voice features of the named entity and the candidate entity can be extracted, so that feature contents of the named entity and the candidate entity are enriched, and correct entities can be extracted from the candidate entity under the conditions that the entity description mode of the named entity is not standard and the content is rich and various.

Description

Entity extraction method, entity extraction device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of entity identification technologies, and in particular, to a method and apparatus for extracting an entity, an electronic device, and a storage medium.
Background
Named entity recognition refers to recognizing named entities with specific meanings in text and classifying the named entities into predefined entity types. Based on named entity recognition, specific types of named entities such as address entities, organization entities and the like can be recognized and extracted from text data, and then correct entities are extracted from a plurality of candidate entities which are the same as or similar to the named entities. However, due to the characteristics of non-standard entity description modes and rich and diverse contents in the text data, the correct entity is difficult to extract from candidate entities in the prior art.
Disclosure of Invention
Based on the above requirements, the application provides an entity extraction method, an entity extraction device, an electronic device and a storage medium, so as to solve the problem that in the prior art, it is difficult to extract correct entities from candidate entities.
The technical scheme provided by the application is as follows:
in one aspect, the present application provides an entity extraction method, including:
determining named entities respectively based on named entities of specific types extracted from text data, and determining entity characteristics of each candidate entity corresponding to the named entities; the entity features comprise semantic features and voice features of the entity; the candidate entity is a candidate named entity with the text similarity with the named entity being greater than a set similarity threshold;
And determining an entity extraction result from the candidate entities according to the named entities and the entity characteristics of each candidate entity.
Further, in the method described above, determining the entity characteristics of the named entity includes:
extracting semantic features and voice features of the named entities;
and carrying out fusion processing on the semantic features and the voice features of the named entity to obtain the entity features of the named entity.
Further, in the above method, extracting the voice feature of the named entity includes:
determining a pronunciation unit sequence forming the named entity by analyzing the pronunciation of the named entity;
and extracting features of the pronunciation unit sequences forming the named entity to obtain the voice features of the named entity.
Further, in the above method, determining the sequence of pronunciation units constituting the named entity by parsing the pronunciation of the named entity includes:
analyzing the pronunciation of the named entity and determining the pinyin and the tone sequence number corresponding to the pronunciation of the named entity;
and forming a pronunciation unit sequence of the named entity by using the pinyin and the tone sequence number corresponding to the pronunciation of the named entity.
Further, in the above method, feature extraction is performed on the pronunciation unit sequence forming the named entity to obtain the voice feature of the named entity, including:
and carrying out convolution and coding processing on the pronunciation unit sequences forming the named entity to obtain the voice characteristics of the named entity.
Further, in the method described above, determining an entity extraction result from the candidate entities according to the named entity and the entity characteristics of each candidate entity, including;
and respectively calculating the similarity of the entity characteristics of each candidate entity and the named entity, and determining the target candidate entity with the highest similarity in all the candidate entities as an entity extraction result.
Further, in the method described above, the method further includes:
inputting the named entity into a specific entity library, wherein the specific entity library stores the entity with the same entity type as the named entity;
and determining an entity with the text similarity with the named entity greater than a set similarity threshold from the specific entity library as the candidate entity.
Further, in the method described above, the named entities of the specific type include address entities, and the specific entity library includes an information point database.
Further, in the method described above, the method further includes: and performing text conversion on the acquired voice data to obtain the text data.
On the other hand, the application also provides an entity extraction device, which comprises:
the determining module is used for respectively determining the named entities based on the named entities of the specific types extracted from the text data and the entity characteristics of each candidate entity corresponding to the named entities; the entity features comprise semantic features and voice features of the entity; the candidate entity is a candidate named entity with the text similarity with the named entity being greater than a set similarity threshold;
and the extraction module is used for determining an entity extraction result from the candidate entities according to the named entities and the entity characteristics of each candidate entity.
In another aspect, the present application further provides an electronic device, including:
a memory and a processor;
wherein the memory is used for storing programs;
the processor is configured to implement the method according to any one of the above by running the program in the memory.
In another aspect, the present application also provides a storage medium, including: the storage medium has stored thereon a computer program which, when executed by a processor, implements a method as described in any of the above.
According to the entity extraction method, the entity characteristics of the named entity and the entity characteristics of each candidate entity of the named entity can be respectively determined based on the named entity of the specific type extracted from the text data. The candidate entity is an entity with similarity with a named entity in a specific entity library being greater than the set similarity, and the entity characteristics comprise semantic characteristics and voice characteristics of the entity. Then, an entity extraction result is determined from the candidate entities based on the named entity and the entity characteristics of each candidate entity. In the method, semantic features and voice features of the named entity and the candidate entity can be extracted, so that feature contents of the named entity and the candidate entity are enriched, and correct entities can be extracted from the candidate entity under the conditions that the entity description mode of the named entity is not standard and the content is rich and various.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present application, and that other drawings may be obtained according to the provided drawings without inventive effort to a person skilled in the art.
Fig. 1 is a schematic flow chart of an entity extraction method according to an embodiment of the present application;
fig. 2 is a schematic flow chart of determining an entity extraction result according to an embodiment of the present application;
FIG. 3 is a schematic flow chart of extracting voice features of named entities according to an embodiment of the present application;
FIG. 4 is a flow chart for extracting entity features of named entities according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of an entity extraction device according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
Summary of the application
The technical scheme of the embodiment of the application is suitable for extracting the application scene of the entity from the text data, and by adopting the technical scheme of the embodiment of the application, even if the entity description mode of the named entity is not standard and the content is rich and various, the correct entity can be extracted from the text data.
In the field of natural language processing, named entity recognition (named entity recognition, NER) is the first key to information extraction. Named entity recognition refers to recognizing named entities in text that have a particular meaning and classifying them as predefined entity types. By named entity recognition, named entities of a specific type can be identified and extracted from the text data. For example, address entities, organization entities, etc. are identified and extracted from the text data by named entity recognition. Based on the extracted named entity, candidate entities with text similarity greater than the set similarity threshold can be determined from the set standard database, and then correct entities can be extracted from the candidate entities. For example, if an organization entity is identified and extracted from text data, a candidate organization entity whose text similarity to the organization entity is greater than a set similarity threshold may be determined from a set organization name database, and the correct organization entity is extracted from the candidate entity.
However, due to the characteristics of non-standard entity description modes and rich and diverse contents in the text data, the correct entity is difficult to extract from candidate entities in the prior art. Based on the above, the application provides an entity extraction method, an entity extraction device, electronic equipment and a storage medium, and the technical scheme can extract semantic features and voice features of named entities and candidate entities, so that feature contents of the named entities and the candidate entities are enriched, and correct entities can be extracted from the candidate entities under the conditions that the entity description modes of the named entities are not standard and the contents are rich and various.
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
Exemplary method
The embodiment of the application provides an entity extraction method, which can be executed by electronic equipment, wherein the electronic equipment can be any equipment with data and instruction processing functions, such as a computer, an intelligent terminal, a server and the like. Referring to fig. 1, the method includes:
S101, determining named entities based on named entities of specific types extracted from text data, and determining entity characteristics of each candidate entity corresponding to the named entities.
The text data refers to a subject from which an entity extraction is performed. That is, the named entity is extracted by analyzing the text data in this embodiment. Specifically, in the embodiment of the present application, the content to be extracted by the entity may be obtained, and if the content to be extracted by the entity is text content, the content to be extracted by the entity may be used as text data; if the content to be extracted is voice content, text recognition can be performed on the voice content, and the content after text recognition is used as text data. For example, in the automatic question-answering scenario, answer information of a question-answering object may be acquired, and text recognition is performed on the answer information of the question-answering object to obtain text data.
The named entity is obtained by recognizing the named entity of the text data. Specifically, named entities of a particular category may be extracted from text data by a BERT-CRF model.
The BERT (Bidirectional Encoder Representations from Transformers) model is a language pre-training model, and the main task of the model is to perform self-supervision training through a large amount of unlabeled data so as to obtain semantic representation of word vectors. In this embodiment, after the text data is obtained, each word in the text data may be converted into a word vector by a word embedding algorithm based on the BERT model, and then the word vector is subjected to addition of relevant information such as location and entity type and dimension unification. After the word vector with uniform dimension is obtained, the word vector is input into a converter structure of the BERT model, and the updated word vector result is obtained after the word vector passes through multiple layers of encoders and decoders in the converter structure. From this, the present embodiment uses the BERT model to derive a semantic representation of the character containing the context.
Because the BRET model only considers character context, dependency between texts cannot be considered. Therefore, conditional random fields (Conditional Random Fields, CRF) are further introduced in this embodiment to extract constraint relations between texts to ensure that the output sequence is reasonable as much as possible. For example, the defined entity must have a start text of B, an end text of E, I can only follow B, etc.
By CRF, given a data sequence x and a corresponding data sequence y, a calculation formula of an evaluation score is defined:
x=(x 1 ,x 2 ,x 3 ,......x n )
y=(y 1 ,y 2 ,y 3 ,,......y n )
Figure BDA0004020255410000061
wherein A represents a conversion matrix, A i,j Representing label transfer score, P i,yi Represents the y i The score of the text, the predictive probability corresponding to the data sequence y, can be expressed as the formula:
Figure BDA0004020255410000062
wherein y is r Representing the true annotation sequence, Y x Representing a collection of text sequences.
It should be noted that, extracting named entities of a specific category from text data by the BERT-CRF model is a well-established technology, and those skilled in the art can refer to the technology for further extraction, and details are not described herein.
The candidate entities refer to candidate named entities whose text similarity to the named entity is greater than a set similarity threshold. The candidate entity may be determined using information on wed, such as entering the named entity into a search engine, and selecting the top ranked entity for inclusion in the candidate entity. Alternatively, an entity database may be constructed in advance, and candidate entities having a text similarity to the named entity greater than a set similarity threshold may be retrieved from the entity database.
The entity features of the named entity include semantic features and speech features of the named entity, and the entity features of each candidate entity include semantic features and speech features of the candidate entity. In the embodiment of the application, after a specific type of named entity is extracted from text data, semantic features and voice features of the named entity are extracted from the named entity to serve as entity features of the named entity, and the semantic features and the voice features of each candidate entity are extracted from each candidate entity corresponding to the named entity to serve as entity features of each candidate entity. Semantic features of named entities can be extracted by using semantic understanding models such as BERT models and the like, semantic features of each candidate entity can be extracted, the named entities can be broadcasted by using set languages, audio corresponding to the named entities can be obtained, and then mel cepstrum coefficients and the like of the audio can be extracted as voice features of the named entities. The extraction manner of the voice features of the candidate entity is the same as that of the named entity, and those skilled in the art only need to refer to the extraction manner of the voice features of the named entity, which is not described herein.
After the semantic features and the voice features of the named entity are obtained, the semantic features and the voice features of the named entity can be connected together to obtain the entity features of the named entity. After the semantic features and the voice features of each candidate entity are obtained, the semantic features and the voice features of each candidate entity can be connected together to obtain the entity features of each candidate entity. When the semantic features and the voice features are connected, the semantic features and the voice features may be fused and connected in a splicing or adding manner, or may be input into a full-connection layer, and the semantic features and the voice features are connected by using the full-connection layer, which is not limited in this embodiment.
S102, determining an entity extraction result from the candidate entities according to the named entities and the entity characteristics of each candidate entity.
In the embodiment of the present application, after obtaining the entity characteristics of the named entity and the entity characteristics of each candidate entity, the entity characteristics of each candidate entity may be compared with the entity characteristics of the named entity, and then the target entity may be selected from the candidate entities as the entity extraction result. Specifically, the similarity between the entity characteristics of each candidate entity and the entity characteristics of the named entity can be calculated, and the candidate entity with the maximum similarity with the entity characteristics of the named entity is determined as the target entity.
Specifically, as shown in fig. 2, in this embodiment, after obtaining text data, named entity recognition may be performed on the text data to obtain a named entity and an entity characteristic of the named entity. And then determining candidate entities according to the named entities, further determining the entity characteristics of each candidate entity, and determining entity extraction results from the candidate entities through the entity characteristics of the named entities and the entity characteristics of each candidate entity.
In the above embodiment, the entity characteristics of the named entity and the entity characteristics of each candidate entity of the named entity can be determined based on the named entity of the specific type extracted from the text data. The candidate entity is an entity with similarity with a named entity in a specific entity library being greater than the set similarity, and the entity characteristics comprise semantic characteristics and voice characteristics of the entity. Then, an entity extraction result is determined from the candidate entities based on the named entity and the entity characteristics of each candidate entity. In the embodiment of the application, semantic features and voice features of the named entity and the candidate entity can be extracted, so that feature contents of the named entity and the candidate entity are enriched, and correct entities can be extracted from the candidate entity under the conditions that the entity description mode of the named entity is not standard and the content is rich and various.
As an alternative implementation manner, in another embodiment of the present application, the determining, by the steps of the above embodiment, the physical characteristics of the named entity may specifically include the following steps:
extracting semantic features and voice features of named entities;
and carrying out fusion processing on the semantic features and the voice features of the named entity to obtain the entity features of the named entity.
In this embodiment, semantic features of the named entity and the candidate entity may be extracted by the BERT model. Specifically, the extracted named entity can be input into the BERT model to obtain semantic features of the named entity output by the BERT model. Similarly, each candidate entity can be input into the BERT model to obtain the semantic feature of each candidate entity output by the BERT model. In addition, as described in the above embodiment, semantic analysis is performed by the BERT model also when the named entity is identified for the text data, so in this embodiment, the semantic features of the named entity portion output by the BERT model during the named entity identification can be determined as the semantic features of the named entity, so as to simplify the flow. In addition to the BERT model, other semantic understanding models in the prior art may be used to extract semantic features of named entities and candidate entities, which is not limited in this embodiment.
The speech features of the named entity refer to features extracted from the pronunciation of the named entity, and the speech features of the candidate entity refer to features extracted from the pronunciation of the candidate entity. For example, in this embodiment, the pronunciation of the named entity may be represented by pinyin, phonetic symbols or phonemes according to the pronunciation rules of the named entity, the pronunciation unit sequence of the named entity is generated, and then the speech features of the named entity are extracted from the pronunciation unit sequence of the named entity.
After the semantic features and the voice features of the named entity are obtained, the semantic features and the voice features of the named entity can be fused to obtain the entity features of the named entity. After the semantic features and the voice features of each candidate entity are obtained, the semantic features and the voice features of each candidate entity can be fused to obtain the entity features of each candidate entity.
In the above embodiment, the entity features of the named entity are obtained by extracting the semantic features and the voice features of the named entity, and the entity features of each candidate entity are obtained by extracting the semantic features and the voice features of each candidate entity. By the arrangement, the dimension of the named entity and the entity characteristics in each candidate entity is increased, and the content of the entity characteristics is enriched, so that the target entity which is really consistent with the named entity can be extracted from the candidate entities as an entity extraction result.
As an alternative implementation manner, as shown in fig. 3, disclosed in another embodiment of the present application, the steps of the above embodiment extract the voice feature of the named entity, and may specifically include the following steps:
s301, analyzing the pronunciation of the named entity to determine a pronunciation unit sequence forming the named entity.
Specifically, in this embodiment, when extracting the voice feature of the named entity, the pronunciation of the named entity is first parsed, and the pronunciation unit sequence of the named entity is determined by the pronunciation mode of the named entity. The pronunciation unit sequence includes phonetic units that affect the pronunciation of the named entity. For example, phonemes of a named entity may be analyzed, and phonemes that make up the named entity are determined to be a sequence of pronunciation units. In the case that the named entity is Chinese, chinese pinyin corresponding to the named entity can be analyzed, and the Chinese pinyin corresponding to the named entity is formed into a pronunciation unit sequence; under the condition that the named entity is English or other languages, phonetic symbols corresponding to the named entity can be analyzed, and phonetic symbols corresponding to the named entity are formed into a pronunciation unit sequence.
For example, if the phonemes constituting the named entity are determined as a pronunciation unit sequence, then in the case where the named entity is "rice", the extracted pronunciation unit sequence is "m", "i", "f", "a", "n"; if the pinyin composing the named entity is determined as the pronunciation unit sequence, the pronunciation unit sequence extracted is "mifan" in the case that the named entity is "rice".
S302, extracting features of the pronunciation unit sequences forming the named entity to obtain voice features of the named entity.
And extracting the characteristics of the pronunciation unit sequences forming the named entity. By way of example, but not limitation, a convolutional neural network (Convolutional Neural Networks, CNN) may be utilized to extract phonetic features of a named entity from a sequence of phonetic units of the named entity.
It should be noted that, the voice feature extraction manner of each candidate entity is the same as the voice feature extraction manner of the named entity, and those skilled in the art need only refer to the voice feature extraction manner of the named entity, and the voice feature extraction manner of the candidate entity is not described here in detail.
In the above embodiment, the voice features of the named entity are determined by analyzing the pronunciation unit sequence of the named entity, so that the dimension of the entity features in the named entity can be increased, and the content of the entity features is enriched.
As an alternative implementation manner, disclosed in another embodiment of the present application, the steps of the above embodiment determine, by parsing the pronunciation of the named entity, a sequence of pronunciation units that form the named entity, and may specifically include the following steps:
Analyzing the pronunciation of the named entity and determining the pinyin and the tone sequence number corresponding to the pronunciation of the named entity; and forming a pronunciation unit sequence of the named entity by using the pinyin and the tone sequence number corresponding to the pronunciation of the named entity.
In the embodiment of the application, the phonetic transcription and the sound tone serial number corresponding to the pronunciation of the named entity are selected to form a pronunciation unit sequence of the named entity. The ordering manner of the pinyin corresponding to the pronunciation of the named entity and the tone sequence number may be determined according to the actual situation, for example, the pinyin corresponding to the pronunciation of the named entity may be set before, the tone sequence number may be set after, or the tone sequence number corresponding to the pronunciation of the named entity may be set before, and the pinyin may be set after.
For example, if the pinyin corresponding to the pronunciation of the named entity is set before and the tone sequence number is set after, the named entity is "cooked rice", the extracted pronunciation unit sequence is "mi3fan4", and if the pinyin corresponding to the pronunciation of the named entity is set before and the pinyin is set after, the named entity is "millet porridge", the extracted pronunciation unit sequence is "3xiao3 mil.
Specifically, as shown in fig. 4, in this embodiment, after obtaining text data, named entity recognition may be performed on the text data to obtain a named entity and semantic features of the named entity; and then analyzing the pinyin and the tone sequence number corresponding to the pronunciation of the named entity to obtain a pronunciation unit sequence of the named entity, extracting features of the pronunciation unit sequence through a CNN network to obtain a voice unit of the named entity, and fusing the voice unit of the named entity and the semantic unit to obtain the entity features of the named entity.
In the above embodiment, the pinyin and the tone sequence corresponding to the pronunciation of the named entity are formed into the pronunciation unit sequence of the named entity, so as to facilitate extracting the sound features of the named entity from the pronunciation unit sequence. It should be noted that, the determining manner of the pronunciation unit sequence of each candidate entity is the same as that of the pronunciation unit sequence of the named entity, and those skilled in the art only need to refer to the determining manner of the pronunciation unit sequence of the named entity, and the determining manner of the pronunciation unit sequence of the candidate entity is not repeated here.
As an alternative implementation manner, in another embodiment of the present application, the steps of the above embodiment perform feature extraction on a pronunciation unit sequence that forms a named entity to obtain a voice feature of the named entity, and may specifically include the following steps:
and carrying out convolution and coding processing on the pronunciation unit sequences forming the named entity to obtain the voice characteristics of the named entity.
In this embodiment, the feature matrix of pinyin and the sequence number of the intonation units of the named entity can be obtained by passing the sequence of the pronunciation units of the named entity through a convolutional neural network, then the corresponding feature vector is obtained by encoding according to the feature matrix, and the feature vector is determined as the voice feature of the named entity.
Further, the voice features and the semantic features of the named entity can be input into the full-connection layer together for fusion, so that the entity features containing the voice features and the semantic features of the named entity are obtained. Similarly, the voice feature and the semantic feature of each candidate entity can be input into the full-connection layer together for fusion, so that the entity features containing the voice feature and the semantic feature of the candidate entity can be obtained.
The above embodiment extracts the voice features of the named entity by performing convolution and encoding processing on the pronunciation unit sequence of the named entity.
As an optional implementation manner, in another embodiment of the present application, the entity extraction method of the above embodiment is disclosed, and further includes:
inputting the named entity into a specific entity library, wherein the specific entity library stores the entities with the same entity type as the named entity;
and determining the entity with the text similarity greater than the set similarity threshold value as a candidate entity from the specific entity library.
In the embodiment, when determining the candidate entity, the named entity is input into a specific entity library for searching, so that an entity with the text similarity greater than the set similarity threshold value is determined from the specific entity library as the candidate entity, wherein the specific entity library stores the entity with the same entity type as the named entity.
For example, if a particular type of named entity includes an address entity, a particular entity library may include a base address library. The base address library is a postal communication address formed by layering and segmenting according to a certain rule by taking the national standard place name as a basis and combining the characteristics of postal itself. It contains the most basic address information of administrative division, street, house number, unit room number, the number of the section where the house is located, the nature and type of the district and building, etc. After the address entity is extracted, an entity with a text similarity greater than a set similarity threshold value with the address entity can be retrieved from the base address library as a candidate address entity. For example, 10 entities having the highest text similarity with the address entity are retrieved from the base address library as candidate address entities, so that the target entity is determined as an extraction result from the candidate address entities based on the method in the above embodiment.
In the above embodiment, it is possible to determine, as the candidate entity, an entity whose text similarity to the named entity is greater than the set similarity threshold from a specific entity library storing entities of the same entity type as the named entity.
As an alternative implementation, in another embodiment of the present application, it is disclosed that the specific type of named entity of the above embodiment includes an address entity, and the specific entity library includes a point-of-information database.
The Point of interest (POI) database contains and can distinguish addresses where people are more popular or more interesting. Under the condition that the named entity is an address entity, the quality of the address candidate item can be further improved by using the database containing POI information, and the overall address extraction accuracy is improved. In addition, the information point database contains more information, and the information used in this embodiment is a specific name of an address in the address library.
Specifically, in embodiments of the present application, a particular type of named entity includes an address entity. That is, the embodiments of the present application may extract an address entity from text data, and then extract, from the information point database, an address entity whose text similarity to the address entity is greater than a set similarity threshold, as a candidate address entity, based on the address entity extracted from the text data. For example, 10 entities having the highest text similarity with the address entity may be retrieved from the information point database as candidate address entities, so as to determine the target entity from the candidate address entities as the extraction result based on the method in the above embodiment.
In the above embodiment, when the named entity is an address entity, the information point database is used as the specific entity library, so that the overall address extraction accuracy can be improved.
As an optional implementation manner, in another embodiment of the present application, the entity extraction method of the above embodiment may specifically include the following steps: and performing text conversion on the acquired voice data to obtain text data.
In the embodiment of the present application, if the obtained content to be extracted from the entity is voice data, text conversion may be performed on the voice data, and then the entity extraction may be performed after the voice data is converted into text data.
In the above embodiment, text conversion can be automatically performed after voice data is acquired to obtain text data, so that entity extraction can be performed on the basis of the text data to obtain a correct extraction result.
In an exemplary case, in a medical outbound scenario, a call voice of a call object may be acquired, and text data may be obtained by performing text conversion on the call voice of the call object. And then extracting the address entity from the text data on the basis of the BERT-CRF model by using a named entity recognition method. Then, searching is carried out in the information point database, and 10 entities with highest text similarity with the address entities are determined as address candidate entities. And respectively extracting semantic features and voice features of each address entity and each candidate address entity, further determining the entity features of the address entity and the entity features of each candidate address entity, comparing the similarity between the entity features of each candidate address entity and the entity features of the address entity, and determining the candidate address entity with the highest similarity as an address entity extraction result.
Exemplary apparatus, electronic device, computer program product, and storage Medium
Corresponding to the above entity extraction method, the embodiment of the application also discloses an entity extraction device, as shown in fig. 5, which includes:
a determining module 100, configured to determine named entities based on named entities of a specific type extracted from the text data, and entity features of each candidate entity corresponding to the named entities, respectively; the entity features include semantic features and speech features of the entity; the candidate entity is a candidate named entity with the text similarity with the named entity being greater than a set similarity threshold;
the extraction module 110 is configured to determine an entity extraction result from the candidate entities according to the named entity and the entity characteristics of each candidate entity.
As an alternative implementation, disclosed in another embodiment of the present application, the determining module 100 of the above embodiment includes:
the extraction unit is used for extracting semantic features and voice features of the named entity;
and the fusion unit is used for carrying out fusion processing on the semantic features and the voice features of the named entity to obtain the entity features of the named entity.
As an optional implementation manner, in another embodiment of the present application, it is disclosed that when the extracting unit of the above embodiment extracts a voice feature of a named entity, the extracting unit is specifically configured to:
Determining a pronunciation unit sequence forming the named entity by analyzing the pronunciation of the named entity;
and extracting features of the pronunciation unit sequences forming the named entity to obtain the voice features of the named entity.
As an optional implementation manner, in another embodiment of the present application, the extracting unit of the above embodiment is disclosed, when determining a sequence of pronunciation units forming a named entity by analyzing a pronunciation of the named entity, specifically configured to:
analyzing the pronunciation of the named entity and determining the pinyin and the tone sequence number corresponding to the pronunciation of the named entity;
and forming a pronunciation unit sequence of the named entity by using the pinyin and the tone sequence number corresponding to the pronunciation of the named entity.
As an optional implementation manner, in another embodiment of the present application, it is disclosed that the extracting unit of the above embodiment performs feature extraction on a pronunciation unit sequence that forms a named entity, and is specifically configured to:
and carrying out convolution and coding processing on the pronunciation unit sequences forming the named entity to obtain the voice characteristics of the named entity.
As an alternative implementation manner, in another embodiment of the present application, the extracting module 110 of the above embodiment is specifically configured to, when determining, according to a named entity and an entity feature of each candidate entity, an entity extraction result from the candidate entities:
And respectively calculating the similarity of the entity characteristics of each candidate entity and the named entity, and determining the target candidate entity with the highest similarity in all the candidate entities as an entity extraction result.
As an optional implementation manner, in another embodiment of the present application, an entity extraction apparatus of the above embodiment is disclosed, and further includes:
the input module is used for inputting the named entity into a specific entity library, wherein the specific entity library stores the entity with the same entity type as the named entity;
and the candidate entity determining module is used for determining an entity, the text similarity of which with the named entity is greater than the set similarity threshold, from the specific entity library as a candidate entity.
As an alternative implementation, in another embodiment of the present application, it is disclosed that the specific type of named entity comprises an address entity and the specific entity library comprises a database of information points.
As an optional implementation manner, in another embodiment of the present application, an entity extraction apparatus of the above embodiment is disclosed, and further includes:
the conversion module is used for carrying out text conversion on the acquired voice data to obtain text data.
Specifically, for the specific working content of each unit of the above-mentioned entity extraction device, please refer to the content of the above-mentioned method embodiment, and the description is omitted here.
Another embodiment of the present application further provides an electronic device, referring to fig. 6, including:
a memory 200 and a processor 210;
wherein the memory 200 is connected to the processor 210 for storing a program;
the processor 210 is configured to implement the entity extraction method disclosed in any of the above embodiments by running a program stored in the memory 200.
Specifically, the electronic device may further include: a bus, a communication interface 220, an input device 230, and an output device 240.
The processor 210, the memory 200, the communication interface 220, the input device 230, and the output device 240 are interconnected by a bus. Wherein:
a bus may comprise a path that communicates information between components of a computer system.
Processor 210 may be a general-purpose processor, such as a general-purpose Central Processing Unit (CPU), microprocessor, etc., or may be an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of programs in accordance with aspects of the present application. But may also be a Digital Signal Processor (DSP), application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components.
Processor 210 may include a main processor, and may also include a baseband chip, modem, and the like.
The memory 200 stores programs for executing the technical solutions of the present application, and may also store an operating system and other critical services. In particular, the program may include program code including computer-operating instructions. More specifically, the memory 200 may include read-only memory (ROM), other types of static storage devices that may store static information and instructions, random access memory (random access memory, RAM), other types of dynamic storage devices that may store information and instructions, disk storage, flash, and the like.
The input device 230 may include means for receiving data and information entered by a user, such as a keyboard, mouse, camera, scanner, light pen, voice input device, touch screen, pedometer, or gravity sensor, among others.
Output device 240 may include means, such as a display screen, printer, speakers, etc., that allow information to be output to a user.
The communication interface 220 may include devices using any transceiver or the like for communicating with other devices or communication networks, such as ethernet, radio Access Network (RAN), wireless Local Area Network (WLAN), etc.
The processor 210 executes the program stored in the memory 200 and invokes other devices that can be used to implement the steps of the entity extraction method provided in the above embodiments of the present application.
In addition to the methods and apparatus described above, embodiments of the present application may also be a computer program product comprising computer program instructions which, when executed by the processor 210, cause the processor 210 to perform the steps of the entity extraction methods provided by the embodiments described above.
The computer program product may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server.
Furthermore, embodiments of the present application may also be a computer-readable storage medium, on which computer program instructions are stored, which, when executed by a processor, cause the processor 210 to perform the steps of the entity extraction method provided by the above embodiments.
The computer readable storage medium may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may include, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium would include the following: an electrical connection having one or more wires, a portable disk, a hard disk, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
In particular, the specific working content of each portion of the electronic device, the computer program product, and the storage medium, and the specific processing content of the computer program product or the computer program on the storage medium when executed by the processor may refer to the content of each embodiment of the entity extraction method, which is not described herein.
For the foregoing method embodiments, for simplicity of explanation, the methodologies are shown as a series of acts, but one of ordinary skill in the art will appreciate that the present application is not limited by the order of acts described, as some acts may, in accordance with the present application, occur in other orders or concurrently. Further, those skilled in the art will also appreciate that the embodiments described in the specification are all preferred embodiments, and that the acts and modules referred to are not necessarily required in the present application.
It should be noted that, in the present specification, each embodiment is described in a progressive manner, and each embodiment is mainly described as different from other embodiments, and identical and similar parts between the embodiments are all enough to be referred to each other. For the apparatus class embodiments, the description is relatively simple as it is substantially similar to the method embodiments, and reference is made to the description of the method embodiments for relevant points.
The steps in the method of each embodiment of the application can be sequentially adjusted, combined and deleted according to actual needs, and the technical features described in each embodiment can be replaced or combined.
In the embodiments of the present application, the modules and sub-modules in the terminal may be combined, divided, and pruned according to actual needs.
In the embodiments provided in the present application, it should be understood that the disclosed terminal, apparatus and method may be implemented in other manners. For example, the above-described terminal embodiments are merely illustrative, and for example, the division of modules or sub-modules is merely a logical function division, and there may be other manners of division in actual implementation, for example, multiple sub-modules or modules may be combined or integrated into another module, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or modules, which may be in electrical, mechanical, or other forms.
The modules or sub-modules illustrated as separate components may or may not be physically separate, and components that are modules or sub-modules may or may not be physical modules or sub-modules, i.e., may be located in one place, or may be distributed over multiple network modules or sub-modules. Some or all of the modules or sub-modules may be selected according to actual needs to achieve the purpose of the embodiment.
In addition, each functional module or sub-module in each embodiment of the present application may be integrated in one processing module, or each module or sub-module may exist alone physically, or two or more modules or sub-modules may be integrated in one module. The integrated modules or sub-modules may be implemented in hardware or in software functional modules or sub-modules.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative elements and steps are described above generally in terms of functionality in order to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. 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.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software unit executed by a processor, or in a combination of the two. The software elements may be disposed in Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
Finally, it is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (12)

1. An entity extraction method, comprising:
determining named entities respectively based on named entities of specific types extracted from text data, and determining entity characteristics of each candidate entity corresponding to the named entities; the entity features comprise semantic features and voice features of the entity; the candidate entity is a candidate named entity with the text similarity with the named entity being greater than a set similarity threshold;
and determining an entity extraction result from the candidate entities according to the named entities and the entity characteristics of each candidate entity.
2. The method of claim 1, wherein determining the entity characteristics of the named entity comprises:
Extracting semantic features and voice features of the named entities;
and carrying out fusion processing on the semantic features and the voice features of the named entity to obtain the entity features of the named entity.
3. The method of claim 2, wherein extracting the phonetic features of the named entity comprises:
determining a pronunciation unit sequence forming the named entity by analyzing the pronunciation of the named entity;
and extracting features of the pronunciation unit sequences forming the named entity to obtain the voice features of the named entity.
4. A method according to claim 3, wherein determining the sequence of pronunciation units that make up the named entity by parsing the pronunciation of the named entity comprises:
analyzing the pronunciation of the named entity and determining the pinyin and the tone sequence number corresponding to the pronunciation of the named entity;
and forming a pronunciation unit sequence of the named entity by using the pinyin and the tone sequence number corresponding to the pronunciation of the named entity.
5. A method according to claim 3, wherein feature extraction of the sequence of phonetic units comprising the named entity results in phonetic features of the named entity, comprising:
And carrying out convolution and coding processing on the pronunciation unit sequences forming the named entity to obtain the voice characteristics of the named entity.
6. The method of claim 1, wherein determining entity extraction results from the candidate entities based on the named entity and the entity characteristics of each candidate entity comprises;
and respectively calculating the similarity of the entity characteristics of each candidate entity and the named entity, and determining the target candidate entity with the highest similarity in all the candidate entities as an entity extraction result.
7. The method as recited in claim 1, further comprising:
inputting the named entity into a specific entity library, wherein the specific entity library stores the entity with the same entity type as the named entity;
and determining an entity with the text similarity with the named entity greater than a set similarity threshold from the specific entity library as the candidate entity.
8. The method of claim 7, wherein the particular type of named entity comprises an address entity and the particular entity library comprises a point of information database.
9. The method as recited in claim 1, further comprising: and performing text conversion on the acquired voice data to obtain the text data.
10. An entity extraction device, comprising:
the determining module is used for respectively determining the named entities based on the named entities of the specific types extracted from the text data and the entity characteristics of each candidate entity corresponding to the named entities; the entity features comprise semantic features and voice features of the entity; the candidate entity is a candidate named entity with the text similarity with the named entity being greater than a set similarity threshold;
and the extraction module is used for determining an entity extraction result from the candidate entities according to the named entities and the entity characteristics of each candidate entity.
11. An electronic device, comprising:
a memory and a processor;
wherein the memory is used for storing programs;
the processor is configured to implement the method according to any one of claims 1 to 9 by running a program in the memory.
12. A storage medium, comprising: the storage medium having stored thereon a computer program which, when executed by a processor, implements the method of any of claims 1 to 9.
CN202211703714.XA 2022-12-27 2022-12-27 Entity extraction method, entity extraction device, electronic equipment and storage medium Pending CN116167375A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211703714.XA CN116167375A (en) 2022-12-27 2022-12-27 Entity extraction method, entity extraction device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211703714.XA CN116167375A (en) 2022-12-27 2022-12-27 Entity extraction method, entity extraction device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116167375A true CN116167375A (en) 2023-05-26

Family

ID=86410586

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211703714.XA Pending CN116167375A (en) 2022-12-27 2022-12-27 Entity extraction method, entity extraction device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116167375A (en)

Similar Documents

Publication Publication Date Title
WO2019153737A1 (en) Comment assessing method, device, equipment and storage medium
KR20180005850A (en) Automatic interpretation method and apparatus, and machine translation method and apparatus
CN112712804A (en) Speech recognition method, system, medium, computer device, terminal and application
US20220092276A1 (en) Multimodal translation method, apparatus, electronic device and computer-readable storage medium
CN111695345B (en) Method and device for identifying entity in text
CN108304375A (en) A kind of information identifying method and its equipment, storage medium, terminal
CN110415679B (en) Voice error correction method, device, equipment and storage medium
JP2020030408A (en) Method, apparatus, device and medium for identifying key phrase in audio
KR102041621B1 (en) System for providing artificial intelligence based dialogue type corpus analyze service, and building method therefor
CN110414004A (en) A kind of method and system that core information extracts
KR102267561B1 (en) Apparatus and method for comprehending speech
WO2020077825A1 (en) Forum/community application management method, apparatus and device, as well as readable storage medium
US20060290709A1 (en) Information processing method and apparatus
WO2019201024A1 (en) Method, apparatus and device for updating model parameter, and storage medium
WO2023124648A1 (en) Text summary generation method and apparatus, device and storage medium
US11170765B2 (en) Contextual multi-channel speech to text
CN107424612A (en) Processing method, device and machine readable media
CN111460224B (en) Comment data quality labeling method, comment data quality labeling device, comment data quality labeling equipment and storage medium
US7197494B2 (en) Method and architecture for consolidated database search for input recognition systems
CN116167375A (en) Entity extraction method, entity extraction device, electronic equipment and storage medium
CN114490946A (en) Xlnet model-based class case retrieval method, system and equipment
CN114722832A (en) Abstract extraction method, device, equipment and storage medium
CN115115984A (en) Video data processing method, apparatus, program product, computer device, and medium
CN111489742B (en) Acoustic model training method, voice recognition device and electronic equipment
CN114626388A (en) Intention recognition method and device, electronic 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