WO2021169400A1 - 基于人工智能的命名实体识别方法、装置及电子设备 - Google Patents

基于人工智能的命名实体识别方法、装置及电子设备 Download PDF

Info

Publication number
WO2021169400A1
WO2021169400A1 PCT/CN2020/127737 CN2020127737W WO2021169400A1 WO 2021169400 A1 WO2021169400 A1 WO 2021169400A1 CN 2020127737 W CN2020127737 W CN 2020127737W WO 2021169400 A1 WO2021169400 A1 WO 2021169400A1
Authority
WO
WIPO (PCT)
Prior art keywords
text
candidate entity
recognized
named entity
word
Prior art date
Application number
PCT/CN2020/127737
Other languages
English (en)
French (fr)
Inventor
慕福楠
吴晨光
王莉峰
Original Assignee
腾讯科技(深圳)有限公司
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 腾讯科技(深圳)有限公司 filed Critical 腾讯科技(深圳)有限公司
Publication of WO2021169400A1 publication Critical patent/WO2021169400A1/zh
Priority to US17/685,283 priority Critical patent/US20220188521A1/en

Links

Images

Classifications

    • 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/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/36Creation of semantic tools, e.g. ontology or thesauri
    • G06F16/367Ontology
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2415Classification 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/044Recurrent networks, e.g. Hopfield networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/048Activation functions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N5/00Computing arrangements using knowledge-based models
    • G06N5/02Knowledge representation; Symbolic representation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • This application relates to artificial intelligence technology, in particular to a named entity recognition method, device, electronic equipment, and computer-readable storage medium based on artificial intelligence.
  • AI Artificial Intelligence
  • NLP Nature Language Processing
  • Named entity recognition is an important research branch of natural language processing, which aims to locate and classify named entities in texts into predefined categories, such as persons, organizations, locations, or numbers.
  • a certain part of a named entity may also be a named entity, that is, there are multiple levels of nesting. Therefore, there is a need to identify multiple levels of nested named entities.
  • the embodiment of the present application provides an artificial intelligence-based named entity recognition method, including:
  • the embodiment of the present application provides a named entity recognition device based on artificial intelligence, including:
  • the vector conversion module is configured to perform vector conversion processing on the text element in the text to be recognized to obtain the text representation of the text element;
  • a construction module configured to construct candidate entity words according to the text elements whose total number does not exceed the element number threshold in the text to be recognized;
  • An integration module configured to perform integration processing on the text representation corresponding to the text element in the candidate entity word to obtain the text representation of the candidate entity word
  • the classification module is configured to classify the text representation of the candidate entity word to determine the category to which the candidate entity word belongs among the non-named entity category and multiple named entity categories.
  • An embodiment of the application provides an electronic device, including:
  • Memory used to store executable instructions
  • the processor is configured to implement the artificial intelligence-based named entity recognition method provided in the embodiment of the present application when executing the executable instructions stored in the memory.
  • the embodiment of the present application provides a computer-readable storage medium storing executable instructions for causing a processor to execute, to implement the artificial intelligence-based named entity recognition method provided by the embodiment of the present application.
  • FIG. 1 is a schematic diagram of an architecture of a named entity recognition system based on artificial intelligence provided by an embodiment of the present application
  • FIG. 2 is a schematic diagram of an architecture of a server provided by an embodiment of the present application.
  • FIG. 3 is a schematic diagram of an architecture of an artificial intelligence-based named entity recognition device provided by an embodiment of the present application
  • FIG. 4A is a schematic flowchart of a named entity recognition method based on artificial intelligence provided by an embodiment of the present application
  • 4B is a schematic flowchart of a named entity recognition method based on artificial intelligence provided by an embodiment of the present application
  • FIG. 4C is a schematic flowchart of a named entity recognition method based on artificial intelligence provided by an embodiment of the present application.
  • FIG. 4D is a schematic flowchart of a named entity recognition method based on artificial intelligence provided by an embodiment of the present application.
  • FIG. 5 is a schematic diagram of an architecture for using a recurrent neural network model for named entity recognition according to an embodiment of the present application
  • FIG. 6 is a schematic diagram of an architecture for using a convolutional neural network model for named entity recognition according to an embodiment of the present application
  • Fig. 7 is a schematic flowchart of a question and answer scenario provided by an embodiment of the present application.
  • first ⁇ second involved only distinguishes similar objects, and does not represent a specific order for the objects. Understandably, “first ⁇ second” can be used if permitted. The specific order or sequence is exchanged, so that the embodiments of the present application described herein can be implemented in a sequence other than those illustrated or described herein.
  • plural refers to at least two.
  • Natural language processing It is an important direction of artificial intelligence, studying language problems in human-to-human communication and human-computer communication.
  • natural language processing we mainly develop models that express language capabilities (Linguistic Competence) and language applications (Linguistic Performance), establish a computing framework to implement such language models, and propose corresponding methods to continuously improve such language models.
  • the language model designs various practical systems and discusses the evaluation techniques of these practical systems.
  • Convolutional Neural Network (CNN, Convolutional Neural Network) model a feedforward neural network model in which artificial neurons can respond to surrounding units.
  • the convolutional neural network model usually includes a convolutional layer and a pooling layer.
  • Recurrent Neural Network (RNN, Recurrent Neural Network) model a type of neural network model used to process sequence data.
  • the internal state of this model can show dynamic timing behavior, and can use internal memory to process variable-length input sequences .
  • the cyclic update processing can be implemented through the RNN model.
  • Named Entity An entity with a specific meaning in the text. According to different actual application scenarios, named entities can have different categories and regulations. For example, named entities can include persons, organizations, locations, time expressions, quantities, currency values, and percentages.
  • Multi-category named entities Named entities that belong to multiple named entity categories at the same time.
  • Multi-level nested named entities A certain part of a named entity is also a named entity, which is called multi-level nesting. For example, in the text "Glorious People's Liberation Army of a certain country”, “People's Liberation Army of a certain country” is a named entity of the "army” category, and "a country” nested in the named entity “People's Liberation Army of a certain country” is also a named entity of the category “country” .
  • Sequence Tagging usually refers to the process of tagging each element in the sequence with a certain tag in the tag set for a linear input sequence.
  • Named Entity Recognition aims to locate and classify named entities in the text into predefined categories, such as persons, organizations, and locations.
  • NER Named Entity Recognition
  • the results of NER can be applied to application scenarios such as information extraction, question answering systems, syntax analysis, and machine translation.
  • Nested NER Traditional NER can only roughly identify text with a flat structure from the text. Unlike traditional NER, Nested NER’s task goal is to identify multiple categories of named entities and multiple levels of nesting from the text. Named entity.
  • Text representation is a high-level cognitive abstract entity produced in the process of human cognition. In natural language processing, text needs to be converted into a data type that can be processed by a computer, that is, it is converted into a vector form of text representation.
  • Text element In the embodiment of the present application, the text element can be a character or a word, that is, the number of characters included in the text element is not limited.
  • the related technology mainly provides the Nested NE BILOU coding and decoding scheme to realize it.
  • the scheme mainly performs sequence labeling of tokens and performs coding and decoding processing based on the sequence-to-sequence model structure.
  • a labeling coding method similar to BILOU is adopted.
  • this scheme allows multi-layer token labeling.
  • the solution formulates certain rules to process these multi-layer label results, such as nearest matching.
  • the following coding example table is provided:
  • B means the starting position of the named entity
  • I means the middle of the named entity
  • L means the end of the named entity
  • O means not belonging to the named entity
  • U means a separate named entity.
  • ORG means an organization
  • GPE means a geopolitical entity.
  • the embodiments of the present application provide an artificial intelligence-based named entity recognition method, device, electronic device, and computer-readable storage medium, which can improve the efficiency and accuracy of named entity recognition.
  • the electronic device provided by the embodiment of the application may be a server, such as a server deployed in the cloud, and provide users with remote named entity recognition based on the acquired text to be recognized. Function; it can also be a terminal device, such as a question and answer device, which expands the knowledge graph based on the named entity recognized by the named entity, and realizes intelligent question answering based on the knowledge graph; it can even be a handheld terminal and other devices.
  • a server such as a server deployed in the cloud, and provide users with remote named entity recognition based on the acquired text to be recognized.
  • Function can also be a terminal device, such as a question and answer device, which expands the knowledge graph based on the named entity recognized by the named entity, and realizes intelligent question answering based on the knowledge graph; it can even be a handheld terminal and other devices.
  • FIG. 1 is a schematic diagram of an optional architecture of an artificial intelligence-based named entity recognition system 100 provided by an embodiment of the present application.
  • the terminal device 400 is connected through the network 300
  • the server 200 and the network 300 may be a wide area network or a local area network, or a combination of the two.
  • the artificial intelligence-based named entity recognition method provided in the embodiments of the present application may be implemented by the terminal device.
  • the terminal device 400 obtains the text to be recognized entered or automatically selected by the user, and determines the text representation of the text element in the text to be recognized. Then, based on the text elements in the text to be recognized, the terminal device 400 constructs multiple candidate entity words according to the set element number threshold, and for each candidate entity word obtained, integrates the text representations corresponding to the text elements in the candidate entity words Processing, and classifying the obtained text representation of the candidate entity word, so as to obtain the category to which the candidate entity word belongs.
  • the artificial intelligence-based named entity recognition method provided in the embodiments of the present application may also be implemented by the server.
  • the server 200 obtains the text to be recognized from the database, and constructs multiple candidate entity words according to a set threshold of the number of elements. For each candidate entity word, the text representation of the candidate entity word is classified, so as to obtain the category to which the candidate entity word belongs.
  • the artificial intelligence-based named entity recognition method provided in the embodiments of the present application may also be implemented by a terminal device and a server in cooperation.
  • the server 200 obtains the to-be-recognized text sent by the terminal device 400, and after a series of processing, sends the identified candidate entity words belonging to the named entity category to the terminal device 400 so that the user of the terminal device 400 can be informed. That is, the server 200 is configured to execute the Nested NER task, and the terminal device 400 is configured to collect the processing object of the Nested NER task (that is, the text to be recognized), and present the execution result of the Nested NER task.
  • the terminal device 400 can display various results of the named entity recognition process in the graphical interface 410, such as candidate entity words belonging to the category of named entities.
  • candidate entity words belonging to the category of named entities In FIG. 1, the text "Glorious People's Liberation Army of a certain country" to be recognized is taken as an example.
  • Candidate entity words belonging to the category of named entities in the text to be recognized are listed, including "a certain country”, “a certain countryman” and "a certain country's People's Liberation Army”.
  • the results of named entity recognition can be applied to various application scenarios in the NLP field, such as the scenarios of summary determination, object recommendation, text classification, and question answering system shown in Figure 1, and the scenarios of information extraction, syntax analysis, and machine translation. An example application of named entities will be explained later.
  • the terminal device may run a computer program to implement the artificial intelligence-based named entity recognition method provided in the embodiments of the present application.
  • the computer program may be a native program or a software module in the operating system; it may be a local ( Native) application (APP, Application), that is, a program that needs to be installed in the operating system to run; it can also be a small program, that is, a program that only needs to be downloaded to the browser environment to run; it can also be embedded in any Small programs in the APP.
  • APP Native
  • the above-mentioned computer program may be any form of application, module or plug-in.
  • Cloud technology refers to a kind of hosting that unifies a series of resources such as hardware, software, and network in a wide area network or a local area network to realize the calculation, storage, processing and sharing of data.
  • cloud technology is also a general term for network technology, information technology, integration technology, management platform technology, and application technology based on the application of cloud computing business models. It can form a resource pool, which can be used on demand and is flexible and convenient. Cloud computing technology will become an important support. The background service of the technical network system requires a lot of computing and storage resources.
  • the above-mentioned server may be an independent physical server, or a server cluster or a distributed system composed of multiple physical servers, or it may provide cloud services, cloud databases, cloud computing, cloud functions, and cloud storage.
  • Cloud servers for basic cloud computing services such as network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms.
  • cloud services can be named entity recognition services for terminal devices transfer.
  • the terminal device can be a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart watch, a smart TV, etc., but it is not limited to this.
  • the terminal device and the server can be directly or indirectly connected through wired or wireless communication, which is not limited in the embodiment of the present application.
  • FIG. 2 is a schematic structural diagram of a server 200 (for example, the server 200 shown in FIG. 1) provided by an embodiment of the present application.
  • the server 200 shown in FIG. 2 includes: at least one processor 210, a memory 240, and At least one network interface 220.
  • the various components in the server 200 are coupled together through the bus system 230.
  • the bus system 230 is used to implement connection and communication between these components.
  • the bus system 230 also includes a power bus, a control bus, and a status signal bus.
  • various buses are marked as the bus system 230 in FIG. 2.
  • the processor 210 may be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP, Digital Signal Processor), or other programmable logic devices, discrete gates or transistor logic devices, or discrete hardware Components, etc., where the general-purpose processor may be a microprocessor or any conventional processor.
  • DSP Digital Signal Processor
  • the memory 240 may be removable, non-removable, or a combination thereof.
  • Exemplary hardware devices include solid-state memory, hard disk drives, optical disk drives, and so on.
  • the memory 240 optionally includes one or more storage devices that are physically remote from the processor 210.
  • the memory 240 includes volatile memory or nonvolatile memory, and may also include both volatile and nonvolatile memory.
  • the non-volatile memory may be a read only memory (ROM, Read Only Memory), and the volatile memory may be a random access memory (RAM, Random Access Memory).
  • ROM read only memory
  • RAM random access memory
  • the memory 240 described in the embodiment of the present application is intended to include any suitable type of memory.
  • the electronic device may also include a user interface.
  • the user interface may include one or more output devices that enable the presentation of media content, including One or more speakers and/or one or more visual display screens.
  • the user interface may also include one or more input devices, including user interface components that facilitate user input, such as a keyboard, a mouse, a microphone, a touch screen display, a camera, and other input buttons and controls.
  • the memory 240 can store data to support various operations. Examples of these data include programs, modules, and data structures, or a subset or superset thereof, as illustrated below.
  • the operating system 241 includes system programs for processing various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and processing hardware-based tasks;
  • the network communication module 242 is used to reach other computing devices via one or more (wired or wireless) network interfaces 220.
  • Exemplary network interfaces 220 include: Bluetooth, Wireless Compatibility Authentication (WiFi), and Universal Serial Bus ( USB, Universal Serial Bus), etc.
  • the memory 240 may further include a presentation module and an input processing module.
  • the presentation module is used to enable presentation of information (for example, a user interface for operating peripheral devices and displaying content and information) via one or more output devices (for example, a display screen, a speaker, etc.) associated with a user interface;
  • the input processing module is used to detect one or more user inputs or interactions from one of the one or more input devices and translate the detected inputs or interactions.
  • the artificial intelligence-based named entity recognition device provided by the embodiments of the present application can be implemented in software.
  • FIG. 2 shows the artificial intelligence-based named entity recognition device 243 stored in the memory 240, which may be Software in the form of programs and plug-ins, including the following software modules: vector conversion module 2431, building module 2432, integration module 2433, and classification module 2434. These modules are logical, so they can be combined or further based on the implemented functions. Split. The function of each module will be explained below.
  • Figure 3 is a schematic diagram of the architecture of an artificial intelligence-based named entity recognition device 243 provided in an embodiment of the present application, showing the process of implementing named entity recognition through a series of modules.
  • Figure 4A is an embodiment of the present application. The provided flow chart of the artificial intelligence-based named entity recognition method will describe the steps shown in FIG. 4A in conjunction with FIG. 3.
  • step 101 the text element in the text to be recognized is subjected to vector conversion processing to obtain the text representation of the text element.
  • the text to be recognized is obtained, where the text to be recognized can be entered by the user, such as by voice, handwriting or other means, or automatically selected, such as electronic
  • the device can use the locally stored text as the text to be recognized.
  • multiple text elements in the text to be recognized are determined, where the type of the text element can be a character or a word.
  • vector conversion processing is performed on the text element, that is, embedding processing is performed to map the text element to the vector space to obtain a text representation in the form of a vector, which is convenient for subsequent processing.
  • the method before step 101, further includes: performing any one of the following operations to obtain text elements in the text to be recognized: treating each word in the text to be recognized as a text element; performing word segmentation processing on the text to be recognized , The word obtained by word segmentation processing is used as a text element.
  • the embodiments of the present application provide different determination methods.
  • the type of text element to be determined is a word
  • each word in the text to be recognized can be used as a text element.
  • the number of text elements determined in this way is large, and the subsequent calculations are relatively large.
  • the accuracy of entity recognition is high.
  • word segmentation processing can be performed on the text to be recognized, and each word obtained by the word segmentation processing can be used as a text element.
  • the word segmentation processing can be implemented through a language technology platform (LTP, Language Technology Platform) tool or other tools, which is not limited.
  • LTP Language Technology Platform
  • the number of text elements obtained in this way is small, that is, the amount of subsequent calculations is small, and the efficiency of named entity recognition is high. Either of the above two methods can be selected according to the requirements in the actual application scenario.
  • the text to be recognized can be segmented first, for example, using punctuation marks (such as commas and periods, etc.) in the text to be recognized as the segmentation position for segmentation. Obtain multiple sentences in the text to be recognized, and then perform word segmentation processing on each sentence to determine the text element in each sentence.
  • the above-mentioned segmentation processing method is suitable for the case where the text to be recognized includes multiple sentences.
  • step 102 candidate entity words are constructed according to the text elements whose total number does not exceed the element number threshold in the text to be recognized.
  • each candidate entity word obtained is a part of the text to be recognized. For example, if the text to be recognized is "Glorious People's Liberation Army of a certain country", then a certain candidate entity word "People's Liberation Army of a certain country” is a part of the text to be recognized.
  • the element number threshold can be manually set. For example, if it is set to 7, the named entity with the most text elements included in the database can also be obtained, and the number of text elements included in the named entity can be determined as the element number threshold.
  • step 103 the text representation corresponding to the text element in the candidate entity word is integrated to obtain the text representation of the candidate entity word.
  • step 102 multiple candidate entity words may be obtained.
  • the text representations corresponding to all text elements in the candidate entity words are integrated to obtain the text representation of the candidate entity word.
  • the embodiment of the present application does not limit the way of integration processing. For example, it may be weighted processing (such as weighted summation), etc., depending on the way of constructing candidate entity words.
  • step 104 the text representation of the candidate entity word is classified, so as to determine the category to which the candidate entity word belongs among the non-named entity category and multiple named entity categories.
  • the text representation of the candidate entity word can accurately and effectively represent the semantics of the candidate entity word. Therefore, the text representation of the candidate entity word can be classified to determine the category of the candidate entity word. For example, the text representation of the candidate entity word can be fully connected, and then the text representation after the fully connected process can be mapped to the probability corresponding to the non-named entity category and the probability of one-to-one correspondence with multiple named entity categories. According to these The probability determines the category to which the candidate entity word belongs. It is worth noting that in the embodiments of the present application, the non-named entity is also regarded as a category, and is treated the same as the named entity category.
  • the candidate entity word belonging to the named entity category (herein refers to any named entity category) in the text to be recognized can be applied to natural language processing application scenarios, including but not limited to Figure 3
  • the application scenarios of summary determination, object recommendation, text classification and question answering are shown.
  • the method further includes: segmenting the text to be recognized to obtain multiple sentences; determining the candidate entity words belonging to any named entity category and whose appearance frequency meets the frequency condition as abstract keywords; The number of summary keywords included in the sentence determines the score of the sentence; the sentence whose score meets the scoring condition is determined as the text summary of the text to be recognized.
  • the text summary of the text to be recognized can be determined according to the result of named entity recognition.
  • the text to be recognized can be a paper, news, or review article, etc., which is not limited.
  • punctuation marks such as commas and periods
  • the segmentation processing operation can also be performed before step 101. The application embodiment does not limit this.
  • the candidate entity words belonging to any named entity category in the text to be recognized are named as keywords, and the frequency of occurrence of the keywords in the text to be recognized is determined.
  • the keyword is determined as an abstract keyword.
  • the K keywords with the highest frequency of occurrence are determined as summary keywords, where K is an integer greater than 0.
  • the keywords corresponding to the frequency of occurrence exceeding the frequency threshold can also be determined as summary keywords.
  • the frequency threshold can be determined according to Actual application scenario setting.
  • the number of summary keywords included in the sentence is determined, and the score of the sentence is determined according to the number.
  • the number of summary keywords included in the sentence can be directly used as the score of the sentence, or the number of summary keywords included in the sentence can be divided by the total number of text elements included in the sentence to obtain the score of the sentence.
  • the sentence whose score meets the scoring conditions is determined as the text summary of the text to be recognized.
  • the L sentences with the highest score can be determined as the text summary of the text to be recognized, where L is an integer greater than 0, or the score
  • the sentence that exceeds the scoring threshold is determined as a text summary of the text to be recognized.
  • step 104 after step 104, it further includes: when the text to be recognized is used to represent the object to be recommended, determining the candidate entity word belonging to any named entity category as the keyword of the object to be recommended; obtaining the key to the user portrait The keyword coincidence degree between the keyword of the user portrait and the keyword of the object to be recommended is determined; when the degree of keyword coincidence exceeds the first coincidence degree threshold, the operation of recommending the object to be recommended is performed.
  • the text to be recognized is used to indicate the object to be recommended, and the embodiment of this application does not limit the type of the object to be recommended.
  • the object to be recommended can be a product, and the text to be recognized is the product description of the product; the object to be recommended can also be It is a movie, and the text to be recognized is a summary description of the movie.
  • targeted smart object recommendation can be realized.
  • the candidate entity words belonging to any named entity category in the text to be recognized are determined as the keywords of the object to be recommended, and at the same time, user portrait keywords are obtained, such as obtaining user portraits of all registered users in an application Key words. Then, determine the degree of keyword overlap between the user portrait keywords of each user and the keywords to be recommended.
  • the user portrait keywords can be set by the user, or they can be the key to the user's historical browsing records Word statistics.
  • the intersection and union between the user profile keywords and the keywords to be recommended can be determined, and the first number of keywords included in the intersection and the second number of keywords included in the union can be determined Divide, get the keyword coincidence degree.
  • the keywords in the text to be recognized include “love”, “artistic” and “story”
  • the keywords of the user portrait include “love”, “science fiction” and For “comedy”
  • the keyword overlap is 1/5.
  • the first coincidence degree threshold is set to determine whether to recommend, for example, when the keyword coincidence degree between the user portrait keyword of a certain user and the keyword to be recommended exceeds the first coincidence degree threshold (For example, 80%), the operation of recommending the object to be recommended to the user is performed.
  • the embodiment of the application does not limit the specific method of recommendation, for example, it may be email recommendation, SMS recommendation, or front-end pop-up recommendation.
  • the recommended object is made more in line with the user's portrait, that is, in line with the user's interest, the accuracy of the recommendation is increased, and the actual utilization of the computing resources consumed by the electronic device when making the recommendation is improved.
  • the method further includes: determining a candidate entity word belonging to any named entity category as a keyword; determining the degree of keyword overlap between the first text to be recognized and the second text to be recognized; When the keyword coincidence degree exceeds the second coincidence degree threshold, the first to-be-recognized text and the second to-be-recognized text are classified into the same text category.
  • the result of named entity recognition can also be used in text classification application scenarios.
  • the candidate entity words belonging to any named entity category in the text to be recognized are determined as keywords
  • the first text to be recognized and the second text to be recognized are determined
  • the degree of overlap of keywords between texts are determined.
  • the intersection and union between the keywords of the first text to be recognized and the keywords of the second text to be recognized can also be determined according to the above method, and the number of keywords included in the intersection Divide by the number of keywords included in the union to obtain the keyword overlap between the first text to be recognized and the second text to be recognized.
  • a second coincidence degree threshold is also set.
  • the keyword coincidence degree exceeds the second coincidence degree threshold (such as 80%)
  • Texts classified into the same text category can be used for similar text recommendation. For example, when the query target of a text query request is the first text to be recognized, the first text to be recognized and the first text in the same text category as the first text to be recognized are returned. Second, the text to be recognized in response to the text query request.
  • the keyword coincidence degree is regarded as the similarity between the texts, and the text classification is carried out to improve the accuracy of the classification.
  • the classified texts can be used for similar text recommendation, that is, the texts belonging to the same text category Co-recommend to users, which can effectively improve user experience.
  • step 104 further includes: adding candidate entity words belonging to any named entity category to the knowledge graph; wherein the knowledge graph is used to respond to category queries for candidate entity words belonging to any named entity category ask.
  • the result of named entity recognition can be used for new word discovery.
  • the candidate entity words belonging to any named entity category in the text to be recognized are determined as keywords, and the keywords and the category to which the keywords belong are added to the knowledge graph together.
  • the knowledge graph can be used to respond to the category query request for the candidate entity words belonging to the named entity category.
  • a certain candidate entity word added to the knowledge graph is "a country”, and its category is named entity category "country”.
  • a category query request including "a country” is received, it can be searched in the knowledge graph , Respond to the query request of the category according to the "country” category obtained in the query, that is, respond.
  • step 104 after step 104, it further includes: determining a candidate entity word belonging to any named entity category as a keyword; performing syntactic analysis on the text to be recognized to obtain subject keywords, relational words, and words in the text to be recognized Object keywords; among them, relative words are used to express the relationship between subject keywords and object keywords; construct triples according to subject keywords, relative words and object keywords, and add the triples to the knowledge graph; , The knowledge graph is used to respond to object query requests including subject keywords and relative words.
  • the relationship between keywords can also be added to the knowledge graph.
  • the text to be recognized can be syntactically analyzed.
  • syntactic analysis can be performed through LTP tools or other tools.
  • the subject keywords, relative words, and object keywords in the text to be recognized are obtained, where the relative words are used to express the relationship between the subject keywords and the object keywords.
  • the text to be recognized is "Zhang San borrows money from Li Si”
  • the keywords include "Zhang San" and "Li Si”
  • the subject keyword is "Zhang San” and the relative word is "Zhang San”.
  • “Borrow money” the object keyword is "Li Si”.
  • the knowledge graph can be used to respond to object query requests that include subject keywords and relational words. For example, when the object query request is used to query the object of Zhang San's loan, it can be searched in the knowledge graph and the result is "Li Si". .
  • the object query request is used to query the object of Zhang San's loan, it can be searched in the knowledge graph and the result is "Li Si". .
  • the embodiment of the application constructs candidate entity words whose total number of text elements does not exceed the element number threshold, which can effectively cope with the situation where named entities have multiple levels of nesting, greatly improving the efficiency and flexibility of named entity recognition. sex.
  • FIG. 4B is an optional flowchart of the artificial intelligence-based named entity recognition method provided by an embodiment of the present application.
  • Step 102 shown in FIG. 4A can be implemented through step 201 to step 202. , Will be described in conjunction with each step.
  • step 201 traversal processing is performed on the text elements in the text to be recognized.
  • the traversal processing and the scanning loop can be combined to obtain the candidate entity words.
  • the traversal processing is performed on the text elements in the text to be recognized.
  • the embodiment of the present application does not limit the sequence of the traversal processing.
  • the sequence of the traversal processing can be from the first text element to the last text element in the text to be recognized.
  • the order can also be the order from the last text element to the first text element in the text to be recognized.
  • step 202 for the traversed text elements, a scanning loop including multiple scanning processes is executed, and the traversed text elements and the text elements obtained from each scanning process are combined into candidate entity words; wherein, the candidate entity words include The total number of text elements does not exceed the element number threshold.
  • a scan cycle is executed, and the scan cycle includes multiple scan processing.
  • the traversed text elements and the text elements obtained from the scanning process are combined into candidate entity words.
  • a candidate entity word can be obtained, where the candidate entity word The total number of included text elements does not exceed the element number threshold.
  • the execution of the scanning cycle including multiple scanning processes described above can be implemented in such a way: according to the number of scanning processes that have been executed in the scanning cycle, the number of scans to be increased or decreased simultaneously is determined, according to The number of scans executes the scanning process starting from the traversed text elements, and combines the traversed text elements and the text elements obtained by the scanning process into candidate entity words, until the initial zero scan number increases to the scan number threshold, or the initial The number of scans, which is the threshold of the number of scans, is reduced to zero; where the threshold of the number of scans is the result obtained by subtracting one from the threshold of the number of elements.
  • the description is divided into two cases.
  • the first case is that the number of scans is initially 0, and the number of scans increases synchronously with the number of scans that have been executed in the scan cycle. For example, each time the number of scans that have been executed increases, the number of scans is increased by 1 accordingly. .
  • the second cycle the number of scanning processes that have been executed is 0, the number of scans is 0, and the scanning process starting from "light” is executed according to the number of scans.
  • the second case is that the number of scans is initially the threshold of the number of scans, and the number of scans decreases synchronously with the number of scans that have been executed in the scan cycle. For example, each time the number of scans that have been executed increases, the number of scans is reduced by 1 accordingly. operate. Take the text to be recognized as "Glorious People's Liberation Army", and the element number threshold is 7 for example. If the traversed text element is "light" (that is, the type of text element is a word), then it will be the first in the scanning cycle. In the second cycle, the number of scanning processes that have been executed is 0, and the number of scans is 6.
  • the scanning process starting from “light” is executed to obtain "the convinced people of a certain country", and the combination of "glorious people of a certain country” "As a candidate entity word; in the second cycle of the scanning cycle, the number of scanning processes that have been executed is 1, the number of scans is 5, and the scanning process starting from "light” is executed according to the number of scans. People", and use the combination of "a elite countryman” as the candidate entity word, and so on, until the number of scans is equal to 0.
  • the process of scanning according to the number of scans can be as follows: starting from the traversed text element, select the text element in the text to be recognized (the selected text element does not include the traversed text element), and use it as the scanning process. Until the total number of scanned text elements is equal to the number of scanned text elements. Wherein, when the number of scans on which a certain scan process is based is 0, since the text element obtained by the scan process is empty, the traversed text element itself can be used as the candidate entity word.
  • the order of scanning processing can be from the first text element in the text to be recognized to the last text element (in the above example, this order is used as an example), or from the last text in the text to be recognized The order of the elements in turn to the first text element.
  • the multiple candidate entity words obtained in step 202 may include duplicate candidate entity words. Therefore, all candidate entity words obtained can be deduplicated, that is, only one of the same multiple candidate entity words is retained to ensure After the deduplication process, the remaining multiple candidate entity words are different from each other, thereby saving subsequent computing resources.
  • step 103 shown in FIG. 4A can be implemented through step 203 to step 204, which will be described in combination with each step.
  • step 203 according to the sequence of the first text element in the to-be-recognized text to the last text element, the text representations of the multiple text elements in the candidate entity word are sequentially updated cyclically to obtain each text in the candidate entity word
  • the text of the element represents the update result.
  • the text representations of multiple text elements in the candidate entity word are sequentially updated cyclically to obtain each The update result of the text representation of the text element.
  • the cyclic update process refers to the text representation of any text element in the candidate entity word, combined with the text representation of adjacent text elements, to update the text representation of any text element, and obtain the text representation of any text element
  • the update result in this way, can improve the comprehensiveness and accuracy of the information contained in the obtained update result.
  • adjacent can refer to the previous one, and can also include the previous one and the next one.
  • the text representations of multiple text elements in the candidate entity words can be sequentially input into the RNN model, and the cyclic update processing is implemented based on the forward propagation process of the RNN model. Strong sequence memory performance and semantic representation ability, so it can improve the accuracy of the update results obtained.
  • the RNN model can be a one-way RNN model or a two-way RNN model.
  • the adjacent text element refers to the previous text element; in the two-way RNN model, the adjacent text element includes the previous text element And the next text element.
  • the above-mentioned cyclic update processing of the text representations of multiple text elements in the candidate entity word can be implemented in this way to obtain the update result of the text representation of each text element in the candidate entity word:
  • For the text representation of any text element in the candidate entity word perform the following operations: perform fusion processing on the first hidden state of the text representation of any text element and the text representation of the previous text element to obtain the text representation of any text element The first hidden layer state of any text element; the text representation of any text element and the second hidden layer state of the text representation of the following text element are fused to obtain the second hidden layer state of the text representation of any text element; for any text element The first hidden layer state and the second hidden layer state of the text representation of a text element are fused to obtain an update result of the text representation of any text element.
  • cyclic update processing For ease of understanding, the process of performing cyclic update processing on the text representation of any text element in the candidate entity word is described.
  • the text representation of any text element and the first hidden state (hidden state) of the text representation of the previous text element are fused to obtain the text representation of any text element
  • the first hidden layer state of the fusion process can be a weighted summation, of course, it can also include other processing, such as adding a bias term to the result of the weighted summation, and then activate the result (by activating Function to realize activation processing, activation function such as hyperbolic tangent function, etc.).
  • the text representation of any text element and the second hidden layer state of the text representation of the following text element are fused to obtain the second hidden layer state of the text representation of any text element.
  • the first hidden layer state and the second hidden layer state of the text representation of any text element are fused to obtain the update result of the text representation of any text element.
  • the text representation of the previous text element can be the first hidden state Set to zero; for the text representation of the last text element in the candidate entity word, since there is no text representation of the next text element, the second hidden layer state of the text representation of the next text element can be set to zero.
  • step 204 the update result of the text representation of the last text element in the candidate entity word is used as the text representation of the candidate entity word.
  • the update result of the text representation of the last text element in the candidate entity word it combines more information in the candidate entity word. Therefore, the update result is used as the text representation of the candidate entity word, so that the text of the candidate entity word It means that it can fully and effectively express the semantics of the candidate entity words.
  • the embodiment of the present application constructs candidate entity words by traversing and scanning loops, which can be applied to the situation of multi-level nesting, and by performing loop update processing, the text representation of the obtained candidate entity words can be improved Accuracy and effectiveness.
  • Figure 4C is an optional flowchart of the artificial intelligence-based named entity recognition method provided by an embodiment of the present application.
  • Step 102 shown in Figure 4A can be updated to step 301.
  • the following operations are performed according to multiple convolution windows of different lengths: perform a sliding operation of the convolution window in the text to be recognized, and the amplitude of each sliding operation is a text element;
  • the covered text elements are combined into candidate entity words, and the text elements covered by the convolution window when the sliding stops are combined into candidate entity words; wherein the length of the convolution window is less than or equal to the element number threshold.
  • the length of the convolution window Refers to the total number of text elements that can be covered by the convolution window.
  • the length can be increased from the convolution window of length 1 until the convolution window whose length reaches the threshold of the number of elements is obtained. If the threshold of the number of elements is 7, set the length to 1 in turn 2.
  • the convolution window of >, 7.
  • a sliding operation of the convolution window is performed in the text to be recognized, and the amplitude of each sliding operation is one text element.
  • the embodiment of the application does not limit the sequence of performing the sliding operation. For example, it may start from the first text element in the text to be recognized and slide to the last text element in the text to be recognized.
  • the stop condition of the sliding operation ( Stop here refers to no more sliding operation) is the last text element in the text to be recognized by the convolution window; for example, it can also start from the last text element in the text to be recognized and move to the text to be recognized.
  • the first text element of the sliding here, the stopping condition of the sliding operation is that the convolution window covers the first text element in the text to be recognized.
  • the text to be recognized is "Glorious People's Liberation Army of a certain country", and the length of a certain convolution window is 3.
  • the convolution window starting from the first text element in the text to be recognized, Slide the last text element, and before the first slide, use the “glorious” covered by the convolution window as the candidate entity word; before the second slide, the “glory” covered by the convolution window "Certain” as a candidate entity word, and so on.
  • the convolution window covers "Liberation Army”
  • step 103 shown in FIG. 4A can be updated to step 302.
  • step 302 the text representation corresponding to the text element in the candidate entity word is convolved to obtain the text representation of the candidate entity word; where The size of the convolution kernel used for convolution processing is the same as the length of the convolution window used to construct the candidate entity words.
  • convolution processing is performed on the text representations corresponding to all text elements in the candidate entity words to obtain the text representation of the candidate entity words, where the size of the convolution kernel used for the convolution processing (size) is consistent with the length of the convolution window used to construct the candidate entity words.
  • the integration module 2433 for each convolution window, the text representations corresponding to all text elements in the candidate entity words constructed based on the convolution window are input into the CNN model, and the CNN model The output obtained by the forward propagation process is determined as the textual representation of the candidate entity word, where the size of the convolution kernel of the CNN model is consistent with the length of the convolution window.
  • the embodiment of the present application constructs the candidate entity words by sliding the convolution window, realizes the construction of the candidate entity words from another angle, and convolves the text representations corresponding to the text elements in the candidate entity words. Processing to obtain the textual representation of the candidate entity word can improve the accuracy and effectiveness of the obtained textual representation of the candidate entity word.
  • FIG. 4D is an optional flowchart of the artificial intelligence-based named entity recognition method provided in an embodiment of the present application.
  • Step 104 shown in FIG. 4A can be implemented through steps 401 to 405 , Will be described in conjunction with each step.
  • step 401 full connection processing is performed on the textual representation of the candidate entity word.
  • the text representation of the candidate entity word is fully connected through the fully connected layer.
  • the purpose of the full connection process is to extract and integrate the effective information in the text representation of the candidate entity word. Facilitate subsequent classification.
  • step 402 the text representation of the candidate entity word after the fully connected process is mapped by the first classification function to obtain the probability corresponding to the non-named entity category and the probability of one-to-one correspondence with multiple named entity categories; where , The first classification function is used to classify the candidate entity words twice.
  • the first classification function is used to map the text representations of the candidate entity words after the fully-connected process to obtain the NAND
  • the second classification in the embodiment of the present application refers to the case where there are no named entities of multiple types, and it is judged whether the candidate entity word belongs to the non-named entity category or the named entity category.
  • step 403 the category corresponding to the probability with the largest numerical value is determined as the category to which the candidate entity word belongs.
  • the category corresponding to the probability with the largest numerical value is determined as the category to which the candidate entity word belongs, that is, the category to which the candidate entity word belongs can only be a non-named entity category or a named entity category.
  • a second classification function is used to perform a mapping process on the text representation of the candidate entity word after the fully connected process, to obtain the probability corresponding to the non-named entity category and the probability of one-to-one correspondence with multiple named entity categories.
  • the second classification function is used to map the text representations of the candidate entity words after the fully connected process, and the The probability corresponding to the entity category and the probability corresponding to multiple named entity categories one-to-one, wherein the second classification function may be a Sigmoid classification function.
  • the multi-category in the embodiment of the present application refers to the case where there are multiple categories of named entities, and it is judged whether the candidate entity word belongs to a non-named entity category or at least one named entity category.
  • step 405 the category corresponding to the probability exceeding the probability threshold is determined as the category to which the candidate entity word belongs.
  • a probability threshold is set, and the category corresponding to the probability exceeding the probability threshold is determined as the category to which the candidate entity word belongs.
  • the candidate entity word may belong to one or more categories.
  • the embodiment of the present application uses different classification functions for classification processing for the two-classification and multi-classification situations, which improves the flexibility of named entity recognition.
  • the embodiment of the present application provides an optional schematic diagram of the architecture of using the recurrent neural network model for named entity recognition as shown in FIG.
  • This module generally refers to the NLP model structure with text representation capabilities and other extensions based on the representation structure, which can be set according to actual application scenarios. For example, the module can apply the BERT model and its improvements. Input the text to be recognized into the module to obtain the text representation of the text element in the text to be recognized, where the type of the text element is a word or word, and the case where the type of the text element is a word is illustrated in FIG. 5 as an example.
  • the text to be recognized is "Glorious People's Liberation Army of a certain country”.
  • the text representation of each word in the text to be recognized is obtained in the form of a vector.
  • the box is an example.
  • the RNN model in the embodiments of the present application generally refers to the RNN model and its variants, such as the Long Short-Term Memory (LSTM) model and the Gated Recurrent Unit (GRU) model.
  • LSTM Long Short-Term Memory
  • GRU Gated Recurrent Unit
  • a two-way RNN model is taken as an example.
  • Each circle in the model represents a cell at a certain moment, where the input of the cell is a text representation of a text element.
  • it is used to pass the first hidden layer state of the input text to the next cell, and it is also used to pass the second hidden layer state of the input text to the previous cell.
  • the process of constructing candidate entity words can be divided into two layers of processing, the first layer is traversal processing, and the second layer is scanning loop.
  • the traversal processing is performed in the order from the first text element to the last text element in the text to be recognized.
  • the purpose of the traversal processing is to completely cover the beginning of all possible candidate entity words in the text to be recognized .
  • the text representation corresponding to the traversed text element is used as the input vector at the first moment (step) in the RNN model. It is worth noting that for the different text elements traversed, the input to the RNN model is performed independently of each other, that is, the text representation corresponding to the text element traversed before will not be used as the input of the next RNN model. The text representation corresponding to a traversed text element will reuse the RNN model, that is, as the input vector at the first moment of the new RNN model.
  • the traversed text element is " ⁇ "
  • the text corresponding to " ⁇ ” is used as the input vector at the first moment in the RNN model
  • the traversed text element is " ⁇ "
  • the corresponding text representation is used as the input vector at the first moment in another RNN model.
  • the scanning cycle refers to the beginning of the candidate entity word with the beginning of the word, and according to the gradually increasing number of scans (the number of scans is initially 0), the cycle scans each candidate entity word starting with the beginning of the word, until the number of scans reaches the scan The number threshold, where the scan number threshold is the result of the element number threshold minus one. For example, if the traversed text element (the beginning of the word) is "some", the scanning cycle is started, that is, the word "some” is used as the beginning of the candidate entity word, and the number of scans is gradually expanded.
  • While constructing the candidate entity words input the text representations corresponding to the scanned words one by one into the RNN model one by one, and use the output of the RNN time corresponding to the currently scanned word (corresponding to the update result above) , As the textual representation of the candidate entity words from the "first word” to the current scanned word. For example, for the candidate entity word "a person from a country”, the text representations corresponding to "some", “country” and “person” are input into the RNN model one by one in turn, and the output at the time corresponding to "people” is outputted. Determined as the textual representation of the candidate entity word "a person from a certain country”.
  • the sequence memory performance and semantic representation ability of the RNN model can be better utilized, so that the obtained text representation of the candidate entity word can accurately and effectively represent the semantics of the candidate entity word.
  • Figure 5 shows multiple candidate entity words constructed after traversal processing and scanning loops. For each candidate entity word, the forward propagation processing of the RNN model can be used to obtain the textual representation of the candidate entity word.
  • the classification layer is used to classify the text representations of multiple candidate entity words output by the RNN model.
  • the embodiment of the present application provides two classification methods, using two activation (classification) functions, Softmax and Sigmoid, respectively.
  • the Softmax activation function can be used, and the text representation of each candidate entity word obtained is used to classify using a structure such as a fully connected layer and the Softmax activation function. , And finally get a category to which the candidate entity word is most likely to belong.
  • the Sigmoid activation function can be used, and the fully connected layer and other structures are combined with the Sigmoid activation function for classification. Finally, the candidate entity is obtained by setting the probability threshold. The category to which the word may belong. It is worth noting that in the classification process, non-named entity categories can be treated equally with other named entity categories.
  • the category to which the candidate entity word "some” belongs is a non-named entity category
  • the category to which the candidate entity word "some country” belongs is a country name category
  • the candidate entity word The category to which "people from a certain country” belongs is a group category
  • the category to which the candidate entity word "People's Liberation Army of a certain country” belongs is an army category.
  • the obtained named entity can be applied to various application scenarios in the NLP field. For example, in the scene of new word discovery, the obtained named entity can be used Add to the knowledge graph to realize automatic mining of new named entities.
  • the embodiment of the present application also provides an optional schematic diagram of the architecture of using the convolutional neural network model for named entity recognition as shown in FIG. 6, which will be explained in order from bottom to top.
  • the content is similar to the corresponding content in FIG. 5.
  • the CNN model in this part generally refers to the CNN model and its variants.
  • Figure 6 takes the original CNN model as an example.
  • a CNN model with multiple convolution kernel sizes is used to perform one-dimensional CNN processing on the text representation of the text elements in the candidate entity words.
  • the sizes are from 1 to 7.
  • the number of convolution kernels can be set according to specific actual application scenarios. Convolutions of different sizes The number of cores can be set to be the same.
  • set a convolution window with the same length as the size of the convolution kernel and perform a sliding operation on the convolution window according to the sequence of the first text element in the text to be recognized to the last text element.
  • the text elements covered by the convolution window before each sliding are combined as candidate entity words, and the text elements covered by the convolution window when the sliding stops are combined as candidate entity words.
  • the text representations corresponding to the text elements in the candidate entity words are uniformly input to the CNN model with the corresponding size of the convolution kernel, and the convolution output result of the CNN model is the text representation of the candidate entity words.
  • candidate entity words constructed by "a certain”, “a certain country”, and “a certain country person” are shown.
  • the Softmax/Sigmoid classification layer in Figure 6 is similar to the corresponding content in Figure 5, and different activation functions can also be used for different classification tasks.
  • the artificial intelligence-based named entity recognition method provided by the embodiments of this application eliminates the need to manually formulate complex coding and decoding rules, which improves the efficiency and flexibility of named entity recognition.
  • the embodiments of the present application also have certain advantages.
  • the model structure of the embodiment of the present application is simpler, and at the same time, it can more effectively enhance the semantic expression ability of candidate entity words.
  • Improve the performance indicators of the model Experiments have verified that it is tested under the same text representation structure based on language model embedding (ELMo, Embedding from Language Models). The indicators of the two schemes are compared as follows:
  • the F1 score of the MGNER model scheme is 79.5%, and the F1 score of the method provided in the embodiment of this application is 83.7%; under the ACE2005 public data set, the F1 score of the MGNER model scheme is 78.2%.
  • the F1 score of the method provided in the application example is 82.4%, where the F1 score is the harmonic average of the precision rate and the recall rate.
  • machine reading comprehension can also be used to realize named entity recognition, but this solution requires a model to be run independently for each type of named entity. It takes a long time.
  • all possible candidate entity words and their categories in the text to be recognized can be generated in one run, which is more efficient.
  • the ACL-NNE public data set with 115 named entity types is used for testing, and when the MRC framework solution is also based on the BERT model, compared with the MRC framework solution, the method provided in the embodiments of this application can save about 90% %time.
  • the results of named entity recognition can be applied to various application scenarios in the field of NLP, such as summary determination, object recommendation, text classification, and Q&A system scenarios, as well as information extraction, grammatical analysis and machine translation scenarios, here is the Q&A system scenario Give a detailed description.
  • the embodiment of the present application provides a schematic diagram of the question and answer process as shown in FIG. 7.
  • the terminal device 400-1 and the terminal device 400-2 are held by different users.
  • the terminal device 400- 1 is named the first terminal device
  • the terminal device 400-2 is named the second terminal device.
  • the question and answer process will be described in conjunction with the steps shown in FIG. 7.
  • step 501 the first terminal device sends the text to be recognized to the server.
  • the user of the first terminal device sends the text to be recognized to the server through the first terminal device.
  • the source of the text to be recognized is not limited here.
  • the text to be recognized can be the entry text of a certain person or the description of a certain product. Text etc.
  • step 502 the server constructs a candidate entity word according to the text elements in the text to be recognized, and determines the category to which the candidate entity word belongs.
  • the server can construct all possible candidate entity words in an exhaustive manner, and determine the category to which each candidate entity word belongs. Refer to the above step 101 to step 104.
  • the server determines the candidate entity words belonging to the named entity category as keywords, and performs syntactic analysis on the text to be recognized to obtain subject keywords, relation words, and object keywords.
  • the server determines all candidate entity words belonging to any named entity category as keywords, and further performs syntactic analysis on the text to be recognized to obtain subject keywords, relative words, and object keywords that have dependencies in the text to be recognized , Among them, the relative words are used to express the relationship between the subject keywords and the object keywords. For example, if the text to be recognized is "Zhang San borrows money from Li Si", through syntactic analysis, the subject keyword is "Zhang San", the relative word is "borrow money”, and the object keyword is "Li Si”.
  • step 504 the server constructs a triplet according to the subject keywords, relative words, and object keywords, and adds the triples to the knowledge graph.
  • the subject-predicate-object triples are constructed according to the subject keywords, relative words, and object keywords.
  • the subject-predicate-object triplet is "Zhang San-Borrow Money-Li Si".
  • the server adds the constructed subject-predicate-object triples to the knowledge graph.
  • "Zhang San” and “Li Si” can also be added to the knowledge graph as named entities.
  • step 505 the second terminal device sends an object query request including subject keywords and related words to the server.
  • the second terminal device sends an object query request of "Zhang San borrowed money from?” to the server.
  • step 506 the server determines the semantics of the object query request through the knowledge graph, and performs a query in the knowledge graph according to the semantics to obtain the query result.
  • the server can match the object query request with the named entity in the knowledge graph, for example, match "Zhang San borrowed money from?” with the named entity in the knowledge graph to obtain the name matching the knowledge graph in the object query request The entity is "Zhang San”.
  • the server can also apply the method of step 101 to step 104 to obtain the category to which the candidate entity word in the object query request belongs, and match the candidate entity word belonging to the named entity category with the knowledge graph.
  • the server further performs syntactic analysis and processing according to the named entity matching the knowledge graph in the object query request to obtain the semantics of the query request, such as "Zhang San-borrow money-?".
  • the server performs a query in the knowledge graph according to the semantics of the object query request, obtains the corresponding query result, and sends the query result to the second terminal device to complete the question and answer, for example, the object keyword "Li Si" is sent as the query result to The second terminal device.
  • the embodiment of the present application expands the knowledge graph based on the result of named entity recognition, which improves the accuracy of knowledge in the knowledge graph, and also improves the accuracy of the question answering system based on the knowledge graph, so that users can participate in question and answer Get a good user experience.
  • the artificial intelligence-based named entity recognition device 243 may include: a vector conversion module 2431, configured to perform vector conversion processing on text elements in the text to be recognized, to obtain a text representation of the text elements; a construction module 2432, configured to vary according to the total number of text to be recognized The text elements that exceed the threshold of the number of elements are used to construct candidate entity words; the integration module 2433 is configured to integrate the text representations corresponding to the text elements in the candidate entity words to obtain the text representations of the candidate entity words; the classification module 2434 is configured to The text representation of the entity word is classified to determine the category to which the candidate entity word belongs among the non-named entity category and multiple named entity categories.
  • the construction module 2432 is configured to: perform traversal processing on the text elements in the text to be recognized; perform a scanning cycle including multiple scanning processing for the traversed text elements: according to the scans that have been performed in the scanning cycle The number of processing, determine the number of scans to be increased or decreased simultaneously, execute the scan processing from the traversed text element according to the scan number, and combine the traversed text element and the text element obtained by the scanning process into candidate entity words, The number of scans until the initial zero is increased to the threshold of the scan number, or the number of scans that is initially the threshold of the scan number is reduced to zero; wherein the threshold of the number of scans is the result obtained by subtracting one from the threshold of the number of elements.
  • the integration module 2433 is configured to: according to the sequence of the first text element in the to-be-recognized text to the last text element, the text representations of the multiple text elements in the candidate entity word are sequentially updated cyclically, Obtain the update result of the text representation of each text element in the candidate entity word; take the update result of the text representation of the last text element in the candidate entity word as the text representation of the candidate entity word.
  • the integration module 2433 is configured to perform the following operations for the text representation of any text element in the candidate entity word: the text representation of any text element and the first hidden text representation of the previous text element
  • the layer state is fused to obtain the first hidden layer state of the text representation of any text element; the text representation of any text element and the second hidden layer state of the text representation of the following text element are fused to obtain any one
  • the second hidden layer state of the text representation of the text element; the first hidden layer state and the second hidden layer state of the text representation of any text element are fused to obtain the update result of the text representation of any text element.
  • the construction module 2432 is configured to select the text elements in the text to be recognized starting from the traversed text elements as the text elements obtained by the scanning process, until the total number of the text elements obtained by the scanning process is equal to the scanning process. quantity.
  • the construction module 2432 is configured to: perform the following operations according to multiple convolution windows of different lengths: perform a sliding operation of the convolution window in the text to be recognized, and the amplitude of each sliding operation is one text element ; Combine the text elements covered by the convolution window before each sliding as candidate entity words, and combine the text elements covered by the convolution window when sliding is stopped as candidate entity words; where the length of the convolution window is less than or equal to the element The number threshold.
  • the integration module 2433 is configured to: perform convolution processing on the text representation corresponding to the text element in the candidate entity word to obtain the text representation of the candidate entity word; wherein, the size of the convolution kernel used for the convolution processing Consistent with the length of the convolution window used to construct candidate entity words.
  • the classification module 2434 is configured to: perform full connection processing on the text representation of the candidate entity word; perform mapping processing on the text representation of the candidate entity word after the full connection processing through the first classification function, to obtain the ND
  • the probability corresponding to the entity category and the probability corresponding to multiple named entity categories one-to-one; the category corresponding to the probability with the largest numerical value is determined as the category to which the candidate entity word belongs; where the first classification function is used to perform the classification of the candidate entity word Two classification.
  • the classification module 2434 is configured to: perform full connection processing on the text representation of the candidate entity word; perform mapping processing on the text representation of the candidate entity word after the full connection processing through the second classification function, to obtain the NAND and non-named
  • the probability corresponding to the entity category and the probability of one-to-one correspondence with multiple named entity categories; the category corresponding to the probability exceeding the probability threshold is determined as the category to which the candidate entity word belongs; where the second classification function is used to compare the candidate entity word Perform multiple classifications.
  • the named entity recognition device 243 based on artificial intelligence further includes: a segmentation module configured to perform segmentation processing on the text to be recognized to obtain a plurality of sentences; , And the candidate entity words whose appearance frequency meets the frequency condition are determined as summary keywords; the score determination module is configured to determine the score of the sentence according to the number of summary keywords included in the sentence; the summary determination module is configured to determine the score that meets the scoring condition The sentence is determined as the text summary of the text to be recognized.
  • the named entity recognition device 243 based on artificial intelligence further includes: a first keyword determination module configured to identify candidate entity words belonging to any named entity category when the text to be recognized is used to represent the object to be recommended , Determine as the keyword of the object to be recommended; the user portrait acquisition module, configured to acquire the keyword of the user portrait, and determine the degree of keyword overlap between the keyword of the user portrait and the keyword of the object to be recommended; the recommendation module, configured to When the keyword coincidence degree exceeds the first coincidence degree threshold, the operation of recommending the object to be recommended is performed.
  • a first keyword determination module configured to identify candidate entity words belonging to any named entity category when the text to be recognized is used to represent the object to be recommended , Determine as the keyword of the object to be recommended
  • the user portrait acquisition module configured to acquire the keyword of the user portrait, and determine the degree of keyword overlap between the keyword of the user portrait and the keyword of the object to be recommended
  • the recommendation module configured to When the keyword coincidence degree exceeds the first coincidence degree threshold, the operation of recommending the object to be recommended is performed.
  • the user portrait acquisition module is configured to: determine the intersection between the user portrait keywords and the keywords of the object to be recommended, and determine the first number of keywords included in the intersection; determine the user portrait keywords and the keywords to be recommended. The union between the keywords of the recommended object, and the second number of keywords included in the union is determined; the ratio between the first number and the second number is determined as the keyword of the user portrait and the keyword of the object to be recommended The degree of overlap between keywords.
  • the named entity recognition device 243 based on artificial intelligence further includes: a second keyword determination module configured to determine candidate entity words belonging to any named entity category as keywords; and a coincidence degree calculation module configured to Determine the keyword overlap between the first text to be recognized and the second text to be recognized; the classification module is configured to compare the first text to be recognized with the second text to be recognized when the keyword overlap exceeds the second overlap threshold. The text is divided into the same text category.
  • the named entity recognition device 243 based on artificial intelligence further includes: a third keyword determination module configured to determine candidate entity words belonging to any named entity category as keywords; a syntax analysis module configured to treat Recognize the text for syntactic analysis to obtain the subject keywords, relative words and object keywords in the text to be recognized; among them, the relative words are used to express the relationship between the subject keywords and the object keywords; add a module and configure it according to the subject Keywords, relative words, and object keywords construct triples, and add the triples to the knowledge graph; among them, the knowledge graph is used to respond to object query requests including subject keywords and relative words.
  • a third keyword determination module configured to determine candidate entity words belonging to any named entity category as keywords
  • a syntax analysis module configured to treat Recognize the text for syntactic analysis to obtain the subject keywords, relative words and object keywords in the text to be recognized; among them, the relative words are used to express the relationship between the subject keywords and the object keywords
  • the named entity recognition device 243 based on artificial intelligence further includes: an entity adding module configured to add candidate entity words belonging to any named entity category to the knowledge graph; wherein the knowledge graph is used to respond to the The category query request of the candidate entity word of the entity category.
  • the named entity recognition device 243 based on artificial intelligence further includes: an element recognition module configured to perform any one of the following operations to obtain text elements in the text to be recognized: each word in the text to be recognized They are all used as text elements; the text to be recognized is subjected to word segmentation processing, and the words obtained by word segmentation processing are used as text elements.
  • an element recognition module configured to perform any one of the following operations to obtain text elements in the text to be recognized: each word in the text to be recognized They are all used as text elements; the text to be recognized is subjected to word segmentation processing, and the words obtained by word segmentation processing are used as text elements.
  • the embodiment of the present application provides a computer-readable storage medium storing executable instructions, and the executable instructions are stored therein.
  • the processor will cause the processor to execute the method provided in the embodiments of the present application, for example, , As shown in FIG. 4A, FIG. 4B, FIG. 4C, or FIG. 4D, a named entity recognition method based on artificial intelligence.
  • computers include various computing devices including terminal devices and servers.
  • the computer-readable storage medium may be FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface memory, optical disk, or CD-ROM, etc.; it may also include one or any combination of the foregoing memories.
  • FRAM fast access memory
  • ROM read-only memory
  • PROM PROM
  • EPROM erasable programmable read-only memory
  • EEPROM electrically erasable programmable read-only memory
  • flash memory magnetic surface memory
  • optical disk optical disk
  • CD-ROM compact flash memory
  • the executable instructions may be in the form of programs, software, software modules, scripts or codes, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and their It can be deployed in any form, including being deployed as an independent program or as a module, component, subroutine or other unit suitable for use in a computing environment.
  • executable instructions may but do not necessarily correspond to files in the file system, and may be stored as part of files that store other programs or data, for example, in a HyperText Markup Language (HTML, HyperText Markup Language) document
  • HTML HyperText Markup Language
  • One or more scripts in are stored in a single file dedicated to the program in question, or in multiple coordinated files (for example, a file storing one or more modules, subroutines, or code parts).
  • executable instructions can be deployed to be executed on one computing device, or on multiple computing devices located in one location, or on multiple computing devices that are distributed in multiple locations and interconnected by a communication network Executed on.
  • the embodiment of the application provides a refined and easy-to-use method for constructing candidate entity words, which integrates sequence information in the text to be recognized one by one and in different spans in a specific order, and can fully enumerate the words in the text to be recognized.
  • candidate entity words The model of the embodiment of the present application has a simple structure and strong flexibility, which is convenient for further improvement according to the needs in actual application scenarios, and is also easy to be transplanted to more deep learning models.
  • the embodiments of this application conform to the application characteristics of the RNN model and the CNN model in the NLP field.
  • the relevant structure of the RNN model or the CNN model is used to integrate the text representations of the text elements in the text to be recognized to obtain candidates
  • the text representation of entity words can more simply and effectively enhance the semantic expression ability of candidate entity words, improve the performance indicators of the model, and give consideration to simplicity and effectiveness.
  • the embodiments of the present application use corresponding classification functions for classification processing, which improves the applicability to different application scenarios.
  • the importance of each sentence can be determined according to the candidate entity words belonging to the named entity category, so as to filter out the text abstract and improve the selection of abstract accuracy.
  • the embodiment of this application matches the keywords in the text to be recognized with the keywords of the user portrait, so as to recommend objects that meet the user's preferences as much as possible, which improves the user experience and the recommended The conversion rate of the object.
  • the embodiment of the application compares the keywords between the two texts, and judges whether to classify the two texts into one category according to the obtained keyword overlap, which improves the accuracy of text classification.
  • candidate entity words belonging to the named entity category can be added to the knowledge graph to improve the accuracy of new word discovery.
  • relationship between named entities appearing in the text to be recognized can also be added to the knowledge graph, so that the expanded knowledge graph can be better applied to scenarios such as question answering.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Evolutionary Computation (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Computing Systems (AREA)
  • Biophysics (AREA)
  • Molecular Biology (AREA)
  • Biomedical Technology (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Databases & Information Systems (AREA)
  • Probability & Statistics with Applications (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Animal Behavior & Ethology (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

一种基于人工智能的命名实体识别方法、装置、电子设备及计算机可读存储介质;方法包括:电子设备对待识别文本中的文本元素进行向量转换处理,得到所述文本元素的文本表示;根据所述待识别文本中总数量不超过元素数量阈值的文本元素,构建候选实体词;对所述候选实体词中文本元素对应的文本表示进行整合处理,得到所述候选实体词的文本表示;对所述候选实体词的文本表示进行分类处理,以在非命名实体类别和多个命名实体类别中,确定所述候选实体词所属的类别。

Description

基于人工智能的命名实体识别方法、装置及电子设备
相关申请的交叉引用
本申请基于申请号为202010127101.0、申请日为2020年02月28日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本申请作为参考。
技术领域
本申请涉及人工智能技术,尤其涉及一种基于人工智能的命名实体识别方法、装置、电子设备及计算机可读存储介质。
背景技术
人工智能(AI,Artificial Intelligence)是利用数字计算机或者数字计算机控制的机器模拟、延伸和扩展人的智能,感知环境、获取知识并使用知识获得最佳结果的理论、方法和技术及应用系统。自然语言处理(NLP,Nature Language Processing)是人工智能中的一个重要方向,主要研究能实现人与计算机之间用自然语言进行有效通信的各种理论和方法。
命名实体识别是自然语言处理的一个重要研究分支,旨在对文本中的命名实体进行定位并分类为预先定义的类别,命名实体如人员、组织、位置或数量等。在一些情况中,某个命名实体中的某一部分可能也是命名实体,即存在多层嵌套,因此,存在对多层嵌套的命名实体进行识别的需求。
发明内容
本申请实施例提供一种基于人工智能的命名实体识别方法,包括:
对待识别文本中的文本元素进行向量转换处理,得到所述文本元素的文本表示;
根据所述待识别文本中总数量不超过元素数量阈值的文本元素,构建候选实体词;
对所述候选实体词中文本元素对应的文本表示进行整合处理,得到所述候选实体词的文本表示;
对所述候选实体词的文本表示进行分类处理,以在非命名实体类别和多个命名实体类别中,确定所述候选实体词所属的类别。
本申请实施例提供一种基于人工智能的命名实体识别装置,包括:
向量转换模块,配置为对待识别文本中的文本元素进行向量转换处理,得到所述文本元素的文本表示;
构建模块,配置为根据所述待识别文本中总数量不超过元素数量阈值的文本元素,构建候选实体词;
整合模块,配置为对所述候选实体词中文本元素对应的文本表示进行整合处理,得到所述候选实体词的文本表示;
分类模块,配置为对所述候选实体词的文本表示进行分类处理,以在非命名实体类别和多个命名实体类别中,确定所述候选实体词所属的类别。
本申请实施例提供一种电子设备,包括:
存储器,用于存储可执行指令;
处理器,用于执行所述存储器中存储的可执行指令时,实现本申请实施例提供的基于人工智能的命名实体识别方法。
本申请实施例提供一种计算机可读存储介质,存储有可执行指令,用于引起处理器执行时,实现本申请实施例提供的基于人工智能的命名实体识别方法。
附图说明
图1是本申请实施例提供的基于人工智能的命名实体识别系统的一个架构示意图;
图2是本申请实施例提供的服务器的一个架构示意图;
图3是本申请实施例提供的基于人工智能的命名实体识别装置的一个架构示意图;
图4A是本申请实施例提供的基于人工智能的命名实体识别方法的一个流程示意图;
图4B是本申请实施例提供的基于人工智能的命名实体识别方法的一个流程示意图;
图4C是本申请实施例提供的基于人工智能的命名实体识别方法的一个流程示意图;
图4D是本申请实施例提供的基于人工智能的命名实体识别方法的一个流程示意图;
图5是本申请实施例提供的使用循环神经网络模型进行命名实体识别的一个架构示意图;
图6是本申请实施例提供的使用卷积神经网络模型进行命名实体识别的一个架构示意图;
图7是本申请实施例提供的问答场景的一个流程示意图。
具体实施方式
为了使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请作进一步地详细描述,所描述的实施例不应视为对本申请的限制, 本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其它实施例,都属于本申请保护的范围。
在以下的描述中,涉及到“一些实施例”,其描述了所有可能实施例的子集,但是可以理解,“一些实施例”可以是所有可能实施例的相同子集或不同子集,并且可以在不冲突的情况下相互结合。
在以下的描述中,所涉及的术语“第一\第二”仅仅是是区别类似的对象,不代表针对对象的特定排序,可以理解地,“第一\第二”在允许的情况下可以互换特定的顺序或先后次序,以使这里描述的本申请实施例能够以除了在这里图示或描述的以外的顺序实施。在以下的描述中,所涉及的术语“多个”是指至少两个。
除非另有定义,本文所使用的所有的技术和科学术语与属于本申请的技术领域的技术人员通常理解的含义相同。本文中所使用的术语只是为了描述本申请实施例的目的,不是旨在限制本申请。
对本申请实施例进行进一步详细说明之前,对本申请实施例中涉及的名词和术语进行说明,本申请实施例中涉及的名词和术语适用于如下的解释。
1)自然语言处理:是人工智能的一个重要方向,研究在人与人交际中以及人与计算机交际中的语言问题。在自然语言处理中,主要研制表示语言能力(Linguistic Competence)和语言应用(Linguistic Performance)的模型,建立计算框架来实现这样的语言模型,提出相应的方法来不断完善这样的语言模型,根据这样的语言模型设计各种实用系统,并探讨这些实用系统的评测技术。
2)卷积神经网络(CNN,Convolutional Neural Network)模型:一种前馈神经网络模型,人工神经元可以响应周围单元,卷积神经网络模型通常包括卷积层和池化层。
3)循环神经网络(RNN,Recurrent Neural Network)模型:一类用于处理序列数据的神经网络模型,这种模型的内部状态可以展示动态时序行为,可以利用内部的记忆来处理变长的输入序列。在本申请实施例中,可以通过RNN模型来实现循环更新处理。
4)命名实体(Named Entity):文本中具有特定意义的实体,根据实际应用场景的不同,命名实体可以具有不同的类别和规定。例如,命名实体可以包括人员、组织、位置、时间表达式、数量、货币值及百分比等。
5)多重类别的命名实体:即同时属于多个命名实体类别的命名实体。
6)多层嵌套的命名实体:某个命名实体中的某一部分也是命名实体,则称为多层嵌套。例如在文本“光荣的某国人民解放军”中,“某国人民解放军”是“军队”类别的命名实体,嵌套在命名实体“某国人民解放军”内的“某国”也是一个“国家”类别的命名实体。
7)序列标注(Sequence Tagging):通常是指对于一个线性输入序列, 给序列中的每个元素打上标签集合中的某个标签的过程。
8)命名实体识别(NER,Named Entity Recognition):旨在将文本中的命名实体定位并分类为预先定义的类别,如人员、组织及位置等。在本申请实施例中,NER的结果可以应用于信息提取、问答系统、句法分析及机器翻译等应用场景。
9)Nested NER:传统的NER通常只能从文本中粗糙地识别出平面结构的文本,不同于传统的NER,Nested NER的任务目标是从文本中识别出多重类别的命名实体以及多层嵌套的命名实体。
10)文本表示:文字是人类认知过程中产生的高层认知抽象实体,在自然语言处理中,需要将文字转换为计算机可以处理的数据类型,即是转换为向量形式的文本表示。
11)文本元素:在本申请实施例中,文本元素可以是字,也可以是词,即对文本元素包括的字的数量不做限定。
对于Nested NER任务,相关技术主要提供了Nested NE BILOU编解码方案来实现,该方案主要对字(token)进行序列标注,并基于序列到序列的模型结构来进行编解码处理。在编码过程中,采用类似BILOU的标注编码方式,为了适应多层嵌套以及多重类别的情况,该方案允许多层的字(token)标签标注。在解码过程中,为了应对编码得到的多层标签,该方案通过制定一定的规则来处理这些多层标签结果,例如就近匹配等。作为示例,提供了如下所示的编码示例表:
In O
the B-ORG
US I-ORG|U-GPE
Federal I-ORG
District I-ORG|U-GPE
Court I-ORG
of I-ORG
New I-ORG|B-GPE
Mexico I-ORG|L-GPE
. O
其中,“B”表示命名实体的起始位置,“I”表示命名实体的中间,“L”表示命名实体的结尾,“O”表示不属于命名实体,“U”表示一个单独的命名实体,“ORG”表示组织机构,“GPE”表示地理政治实体。
但是,该方案由于需要根据数据的标签内容制定好一定的解码规则,这就使得在命名实体类别的数量较多时,解码规则将会变得难以设计和实现,在Nested NER任务中,进行命名实体识别的效率和灵活性差。
本申请实施例提供一种基于人工智能的命名实体识别方法、装置、电 子设备及计算机可读存储介质,能够提升命名实体识别的效率和精度。
下面说明本申请实施例提供的电子设备的示例性应用,本申请实施例提供的电子设备可以是服务器,例如部署在云端的服务器,根据获取到的待识别文本,向用户提供远程的命名实体识别功能;也可以是终端设备,例如问答设备,根据命名实体识别得到的命名实体扩充知识图谱,并根据知识图谱实现智能问答;甚至可以是手持终端等设备。
参见图1,图1是本申请实施例提供的基于人工智能的命名实体识别系统100的一个可选的架构示意图,为实现支撑一个基于人工智能的命名实体识别应用,终端设备400通过网络300连接服务器200,网络300可以是广域网或者局域网,又或者是二者的组合。
在一些实施例中,以电子设备是终端设备为例,本申请实施例提供的基于人工智能的命名实体识别方法可以由终端设备实现。例如,终端设备400获取用户录入或自动选择的待识别文本,确定待识别文本中的文本元素的文本表示。然后,基于待识别文本中的文本元素,终端设备400根据设定的元素数量阈值构建多个候选实体词,针对得到的每个候选实体词,对候选实体词中文本元素对应的文本表示进行整合处理,并对得到的候选实体词的文本表示进行分类处理,从而得到候选实体词所属的类别。
在一些实施例中,以电子设备是服务器为例,本申请实施例提供的基于人工智能的命名实体识别方法也可以由服务器实现。例如,服务器200从数据库中获取待识别文本,并根据设定的元素数量阈值构建多个候选实体词。针对每个候选实体词,对候选实体词的文本表示进行分类处理,从而得到候选实体词所属的类别。
在一些实施例中,本申请实施例提供的基于人工智能的命名实体识别方法也可以由终端设备和服务器协同实现。例如,服务器200获取终端设备400发送的待识别文本,经一系列处理后,将识别出的属于命名实体类别的候选实体词发送至终端设备400,以使终端设备400的用户知悉。即服务器200配置为执行Nested NER任务,终端设备400配置为采集Nested NER任务的处理对象(即待识别文本),并且呈现Nested NER任务的执行结果。
终端设备400可以在图形界面410中显示命名实体识别过程中的各种结果,例如属于命名实体类别的候选实体词等,在图1中以待识别文本“光荣的某国人民解放军”为例,示出了待识别文本中属于命名实体类别的候选实体词,包括“某国”、“某国人”及“某国人民解放军”。命名实体识别的结果可应用于NLP领域的各个应用场景,例如图1所示的摘要确定、对象推荐、文本归类及问答系统的场景,又例如信息抽取、语法分析及机器翻译的场景,将在后文阐述命名实体的示例应用。
在一些实施例中,终端设备可以通过运行计算机程序来实现本申请实施例提供的基于人工智能的命名实体识别方法,例如,计算机程序可以是 操作系统中的原生程序或软件模块;可以是本地(Native)应用程序(APP,Application),即需要在操作系统中安装才能运行的程序;也可以是小程序,即只需要下载到浏览器环境中就可以运行的程序;还可以是能够嵌入至任意APP中的小程序。总而言之,上述计算机程序可以是任意形式的应用程序、模块或插件。
本申请实施例可以借助于云技术(Cloud Technology)实现,云技术是指在广域网或局域网内将硬件、软件、网络等系列资源统一起来,实现数据的计算、储存、处理和共享的一种托管技术。在另一种意义上,云技术也是基于云计算商业模式应用的网络技术、信息技术、整合技术、管理平台技术、以及应用技术等的总称,可以组成资源池,按需所用,灵活便利。云计算技术将变成重要支撑。技术网络系统的后台服务需要大量的计算、存储资源。
在一些实施例中,上述的服务器可以是独立的物理服务器,也可以是多个物理服务器构成的服务器集群或者分布式系统,还可以是提供云服务、云数据库、云计算、云函数、云存储、网络服务、云通信、中间件服务、域名服务、安全服务、CDN、以及大数据和人工智能平台等基础云计算服务的云服务器,例如,云服务可以是命名实体识别服务,以供终端设备调用。终端设备可以是智能手机、平板电脑、笔记本电脑、台式计算机、智能手表、智能电视等,但并不局限于此。终端设备以及服务器可以通过有线或无线通信方式进行直接或间接地连接,本申请实施例中不做限制。
下面,以电子设备为服务器为例进行说明。参见图2,图2是本申请实施例提供的服务器200(例如,可以是图1所示的服务器200)的架构示意图,图2所示的服务器200包括:至少一个处理器210、存储器240和至少一个网络接口220。服务器200中的各个组件通过总线系统230耦合在一起。可理解,总线系统230用于实现这些组件之间的连接通信。总线系统230除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图2中将各种总线都标为总线系统230。
处理器210可以是一种集成电路芯片,具有信号的处理能力,例如通用处理器、数字信号处理器(DSP,Digital Signal Processor),或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等,其中,通用处理器可以是微处理器或者任何常规的处理器等。
存储器240可以是可移除的,不可移除的或其组合。示例性的硬件设备包括固态存储器,硬盘驱动器,光盘驱动器等。存储器240可选地包括在物理位置上远离处理器210的一个或多个存储设备。
存储器240包括易失性存储器或非易失性存储器,也可包括易失性和非易失性存储器两者。非易失性存储器可以是只读存储器(ROM,Read Only Memory),易失性存储器可以是随机存取存储器(RAM,Random Access  Memory)。本申请实施例描述的存储器240旨在包括任意适合类型的存储器。
在一些实施例中,对于电子设备是终端设备的情况,在图2示出的结构的基础上,还可以包括用户接口,用户接口可以包括使得能够呈现媒体内容的一个或多个输出装置,包括一个或多个扬声器和/或一个或多个视觉显示屏。用户接口还可以包括一个或多个输入装置,包括有助于用户输入的用户接口部件,比如键盘、鼠标、麦克风、触屏显示屏、摄像头、其他输入按钮和控件。
在一些实施例中,存储器240能够存储数据以支持各种操作,这些数据的示例包括程序、模块和数据结构或者其子集或超集,下面示例性说明。
操作系统241,包括用于处理各种基本系统服务和执行硬件相关任务的系统程序,例如框架层、核心库层、驱动层等,用于实现各种基础业务以及处理基于硬件的任务;
网络通信模块242,用于经由一个或多个(有线或无线)网络接口220到达其他计算设备,示例性的网络接口220包括:蓝牙、无线相容性认证(WiFi)、和通用串行总线(USB,Universal Serial Bus)等。
在一些实施例中,对于电子设备是终端设备的情况,存储器240还可以包括呈现模块和输入处理模块。其中,呈现模块用于经由一个或多个与用户接口相关联的输出装置(例如,显示屏、扬声器等)使得能够呈现信息(例如,用于操作外围设备和显示内容和信息的用户接口);输入处理模块用于对一个或多个来自一个或多个输入装置之一的一个或多个用户输入或互动进行检测以及翻译所检测的输入或互动。
在一些实施例中,本申请实施例提供的基于人工智能的命名实体识别装置可以采用软件方式实现,图2示出了存储在存储器240中的基于人工智能的命名实体识别装置243,其可以是程序和插件等形式的软件,包括以下软件模块:向量转换模块2431、构建模块2432、整合模块2433及分类模块2434,这些模块是逻辑上的,因此根据所实现的功能可以进行任意的组合或进一步拆分。将在下文中说明各个模块的功能。
下面将结合上文记载的电子设备的示例性应用和结构,说明电子设备中通过嵌入的基于人工智能的命名实体识别装置,而实现基于人工智能的命名实体识别方法的过程。
参见图3和图4A,图3是本申请实施例提供的基于人工智能的命名实体识别装置243的架构示意图,示出了通过一系列模块实现命名实体识别的流程,图4A是本申请实施例提供的基于人工智能的命名实体识别方法的流程示意图,将结合图3对图4A示出的步骤进行说明。
在步骤101中,对待识别文本中的文本元素进行向量转换处理,得到文本元素的文本表示。
作为示例,参见图3,在向量转换模块2431中,获取待识别文本,其中,待识别文本可以是由用户录入的,如通过语音、手写或其他方式录入,也可以是自动选择的,例如电子设备可以将本地存储的文本作为待识别文本。然后,确定待识别文本中的多个文本元素,其中,文本元素的类型可以是字,也可以是词。对于待识别文本中的每个文本元素,对文本元素进行向量转换处理,即进行嵌入(Embedding)处理,以将文本元素映射至向量空间,得到向量形式的文本表示,便于后续处理。
在一些实施例中,步骤101之前,还包括:执行以下任意一种操作,以得到待识别文本中的文本元素:将待识别文本中的每个字均作为文本元素;对待识别文本进行分词处理,将分词处理得到的词作为文本元素。
对于不同类型的文本元素,本申请实施例提供了不同的确定方式。在需要确定的文本元素的类型为字的情况下,可以将待识别文本中的每个字均作为文本元素,通过该种方式确定出的文本元素的数量较多,后续计算量较大,命名实体识别的精度较高。
在需要确定的文本元素的类型为词的情况下,可以对待识别文本进行分词处理,并将分词处理得到的每个词均作为文本元素。其中,分词处理可通过语言技术平台(LTP,Language Technology Platform)工具或其他工具实现,对此不做限定。通过该种方式得到的文本元素的数量较少,即后续的计算量较小,命名实体识别的效率较高。可以根据实际应用场景中的需求,选用上述两种方式的任意一种。
值得说明的是,在需要确定的文本元素的类型为词的情况下,可以先对待识别文本进行分割处理,例如以待识别文本中的标点符号(如逗号和句号等)为分割位置进行分割,得到待识别文本中的多个语句,再对每个语句进行分词处理,以确定每个语句中的文本元素。上述的分割处理的方式适用于待识别文本包括多个语句的情况。
在步骤102中,根据待识别文本中总数量不超过元素数量阈值的文本元素,构建候选实体词。
例如,可以通过穷举的方式,确定出待识别文本中所有可能出现的候选实体词,其中每个候选实体词包括的文本元素的总数量均不超过元素数量阈值,从而适用于存在多层嵌套的命名实体的情况。其中,得到的每个候选实体词均为待识别文本的一部分,例如待识别文本为“光荣的某国人民解放军”,则得到的某个候选实体词“某国人民解放军”是待识别文本的一部分。
值得说明的是,元素数量阈值可由人为设定,如设定为7,也可获取数据库中包括的文本元素最多的命名实体,并将该命名实体包括的文本元素的数量确定为元素数量阈值。
在步骤103中,对候选实体词中文本元素对应的文本表示进行整合处理,得到候选实体词的文本表示。
通过步骤102可能会得到多个候选实体词,对于其中的每个候选实体词,对候选实体词中所有文本元素对应的文本表示进行整合处理,得到该候选实体词的文本表示。本申请实施例对整合处理的方式不做限定,例如可以是加权处理(如加权求和)等,根据构建候选实体词的方式而定。
在步骤104中,对候选实体词的文本表示进行分类处理,以在非命名实体类别和多个命名实体类别中,确定候选实体词所属的类别。
候选实体词的文本表示能够准确、有效地表示候选实体词的语义,因此,可以对候选实体词的文本表示进行分类处理,进而确定候选实体词所属的类别。例如,可以对候选实体词的文本表示进行全连接处理,再将全连接处理后的文本表示映射为与非命名实体类别对应的概率、以及与多个命名实体类别一一对应的概率,根据这些概率确定候选实体词所属的类别。值得说明的是,在本申请实施例中,将非命名实体同样作为一个类别,与命名实体类别同等对待。
在得到候选实体词所属的类别后,可将待识别文本中属于命名实体类别(这里指属于任意一个命名实体类别)的候选实体词,应用于自然语言处理的应用场景,包括但不限于图3所示的摘要确定、对象推荐、文本归类及问答的应用场景。
在一些实施例中,步骤104之后,还包括:对待识别文本进行分割处理得到多个语句;将属于任意一个命名实体类别的、且出现频率满足频率条件的候选实体词确定为摘要关键词;根据语句包括的摘要关键词的数量,确定语句的评分;将评分满足评分条件的语句,确定为待识别文本的文本摘要。
在本申请实施例中,可根据命名实体识别的结果,来确定待识别文本的文本摘要,例如,待识别文本可以是论文、新闻或评论文章等,对此不做限定。首先,对待识别文本进行分割处理,例如以标点符号(如逗号和句号)为分割位置进行分割,得到待识别文本中的多个语句,当然,分割处理的操作也可在步骤101之前进行,本申请实施例对此不做限定。
为了便于区分,将待识别文本中属于任意一个命名实体类别的候选实体词命名为关键词,并确定关键词在待识别文本中的出现频率。当某个关键词的出现频率满足频率条件时,将该关键词确定为摘要关键词。例如,将出现频率最高的K个关键词确定为摘要关键词,其中K为大于0的整数,当然,也可将超过频率阈值的出现频率对应的关键词确定为摘要关键词,频率阈值可根据实际应用场景设定。
对于待识别文本包括的每个语句,确定语句包括的摘要关键词的数量,并根据该数量确定语句的评分。例如,可直接将语句包括的摘要关键词的数量作为该语句的评分,也可将语句包括的摘要关键词的数量与该语句包括的文本元素的总数量相除,得到该语句的评分。最后,将评分满足评分条件的语句,确定为待识别文本的文本摘要,例如可以将评分最高的L个 语句,确定为待识别文本的文本摘要,其中L为大于0的整数,也可以将评分超过评分阈值的语句,确定为待识别文本的文本摘要。通过上述方式,提升了确定摘要的准确性,使得确定出的文本摘要能够较好地表示待识别文本的整体语义。
在一些实施例中,步骤104之后,还包括:当待识别文本用于表示待推荐对象时,将属于任意一个命名实体类别的候选实体词,确定为待推荐对象的关键词;获取用户画像关键词,并确定用户画像关键词与待推荐对象的关键词之间的关键词重合度;当关键词重合度超过第一重合度阈值时,执行推荐待推荐对象的操作。
这里,待识别文本用于表示待推荐对象,本申请实施例对待推荐对象的类型不做限定,例如,待推荐对象可以是一个商品,待识别文本是该商品的商品描述;待推荐对象也可以是一部电影,待识别文本是该电影的梗概描述。
根据对待识别文本进行命名实体识别的结果,可实现针对性的智能对象推荐。例如,将待识别文本中属于任意一个命名实体类别的候选实体词,均确定为待推荐对象的关键词,同时,获取用户画像关键词,如获取某个应用程序中所有已注册用户的用户画像关键词。然后,确定每个用户的用户画像关键词与待推荐对象的关键词之间的关键词重合度,其中,用户画像关键词可以是用户设定的,也可以是对用户的历史浏览记录进行关键词统计得到的。
在确定关键词重合度时,可确定用户画像关键词与待推荐对象的关键词之间的交集和并集,将交集包括的关键词的第一数量与并集包括的关键词的第二数量相除,得到关键词重合度。以待识别文本是某部电影的描述性文本的情况举例,待识别文本中的关键词包括“爱情”、“文艺”和“剧情”,而用户画像关键词包括“爱情”、“科幻”和“喜剧”,则可得到关键词重合度为1/5。
对于关键词重合度,通过设定第一重合度阈值判断是否进行推荐,例如,当某个用户的用户画像关键词与待推荐对象的关键词之间的关键词重合度超过第一重合度阈值(如80%)时,执行向该用户推荐待推荐对象的操作。本申请实施例对推荐的具体方式不做限定,例如可以是邮件推荐、短信推荐或前端弹窗推荐等。通过上述方式,使得推荐的对象更加符合用户画像,即符合用户兴趣,增加了推荐的准确性,提升了电子设备进行推荐时所耗费的计算资源的实际利用率。
在一些实施例中,步骤104之后,还包括:将属于任意一个命名实体类别的候选实体词确定为关键词;确定第一待识别文本与第二待识别文本之间的关键词重合度;当关键词重合度超过第二重合度阈值时,将第一待识别文本与第二待识别文本划分为同一个文本类。
命名实体识别的结果也可用于文本归类的应用场景,例如,将待识别 文本中属于任意一个命名实体类别的候选实体词均确定为关键词,并确定第一待识别文本与第二待识别文本之间的关键词重合度。这里,在计算关键词重合度时,也可按照上述方式,确定第一待识别文本的关键词与第二待识别文本的关键词之间的交集和并集,将交集包括的关键词的数量与并集包括的关键词的数量相除,得到第一待识别文本与第二待识别文本之间的关键词重合度。
在文本归类的应用场景中,还设定第二重合度阈值,当关键词重合度超过第二重合度阈值(如80%)时,证明第一待识别文本与第二待识别文本较为相似,将第一待识别文本与第二待识别文本划分为同一个文本类。划分为同一个文本类的文本可用于进行相似文本推荐,例如当文本查询请求的查询目标是第一待识别文本时,返回第一待识别文本以及与第一待识别文本属于同一文本类的第二待识别文本,以响应该文本查询请求。通过上述方式,将关键词重合度作为文本之间的相似度,进行文本归类,提升了归类的准确性,归类后的文本可用于相似文本推荐,即是将属于同一文本类的文本共同推荐至用户,能够有效提升用户体验。
在一些实施例中,步骤104之后,还包括:将属于任意一个命名实体类别的候选实体词添加至知识图谱;其中,知识图谱用于响应针对属于任意一个命名实体类别的候选实体词的类别查询请求。
命名实体识别的结果可用于新词发现,例如,将待识别文本中属于任意一个命名实体类别的候选实体词均确定为关键词,并将关键词及关键词所属的类别共同添加至知识图谱,如此,可以通过知识图谱来响应针对属于命名实体类别的候选实体词的类别查询请求。例如,添加至知识图谱的某个候选实体词为“某国”,其所属的类别是命名实体类别“国家”,当接收到包括“某国”的类别查询请求时,即可在知识图谱中进行查询,根据查询得到的“国家”类别响应该类别查询请求,即进行应答。通过上述方式,能够实现知识图谱中命名实体的有效扩充及不断增长,提升根据知识图谱进行应答的准确性。
在一些实施例中,步骤104之后,还包括:将属于任意一个命名实体类别的候选实体词确定为关键词;对待识别文本进行句法分析处理,得到待识别文本中的主语关键词、关系词及宾语关键词;其中,关系词用于表示主语关键词与宾语关键词之间的关系;根据主语关键词、关系词及宾语关键词构建三元组,并将三元组添加至知识图谱;其中,知识图谱用于响应包括主语关键词及关系词的宾语查询请求。
在本申请实施例中,还可将关键词之间的关系添加至知识图谱,例如,基于已识别出的关键词,对待识别文本进行句法分析处理,例如可通过LTP工具或其他工具进行句法分析处理,得到待识别文本中的主语关键词、关系词及宾语关键词,其中,关系词用于表示主语关键词与宾语关键词之间的关系。例如,待识别文本为“张三向李四借钱”,关键词包括“张三”及 “李四”,则通过句法分析处理,可得到主语关键词为“张三”,关系词为“借钱”,宾语关键词为“李四”。
根据得到的主语关键词、关系词及宾语关键词构建主语-谓语-宾语(SPO,Subject-Predication-Object)三元组,并将SPO三元组添加至知识图谱,成为知识图谱中的一条知识。知识图谱可用于响应包括主语关键词及关系词的宾语查询请求,例如当宾语查询请求用于查询张三借钱的对象时,可在知识图谱中进行查询,并根据结果“李四”进行应答。通过上述方式,实现了命名实体之间关系的有效扩充,扩充后的知识图谱可用于进行更加精确的问答。
如图4A所示,本申请实施例通过构建包括文本元素的总数量不超过元素数量阈值的候选实体词,能够有效应对命名实体存在多层嵌套的情况,大大提升命名实体识别的效率和灵活性。
在一些实施例中,参见图4B,图4B是本申请实施例提供的基于人工智能的命名实体识别方法的一个可选的流程示意图,图4A示出的步骤102可以通过步骤201至步骤202实现,将结合各步骤进行说明。
在步骤201中,对待识别文本中的文本元素进行遍历处理。
作为示例,参见图3,在构建模块2432中,可结合遍历处理和扫描循环的方式,来得到候选实体词。首先,对待识别文本中的文本元素进行遍历处理,本申请实施例对遍历处理的顺序不做限定,例如遍历处理的顺序可以是从待识别文本中第一个文本元素依次到最后一个文本元素的顺序,也可以是从待识别文本中最后一个文本元素依次到第一个文本元素的顺序。
在步骤202中,针对遍历到的文本元素,执行包括多次扫描处理的扫描循环,将遍历到的文本元素和每次扫描处理得到的文本元素组合为候选实体词;其中,候选实体词包括的文本元素的总数量不超过元素数量阈值。
这里,针对遍历到的文本元素,执行扫描循环,扫描循环包括多次扫描处理。在每一次扫描处理完成时,将遍历到的文本元素和该次扫描处理得到的文本元素组合为候选实体词,如此,对于每一次扫描处理,均可得到一个候选实体词,其中,候选实体词包括的文本元素的总数量不超过元素数量阈值。
在一些实施例中,可以通过这样的方式来实现上述的执行包括多次扫描处理的扫描循环:根据在扫描循环中已经执行的扫描处理的次数,确定同步增大或减小的扫描数量,根据扫描数量执行从遍历到的文本元素开始的扫描处理,并将遍历到的文本元素和扫描处理得到的文本元素组合为候选实体词,直至初始为零的扫描数量增大至扫描数量阈值、或者初始为扫描数量阈值的扫描数量减小至零;其中,扫描数量阈值为元素数量阈值减一后得到的结果。
为了便于理解,分为两种情况进行说明。第一种情况是,扫描数量初 始为0,且扫描数量与扫描循环中已经执行的扫描处理的次数同步增大,例如已经执行的扫描处理的次数每增加一次,扫描数量相应地执行加1操作。以待识别文本为“光荣的某国人民解放军”,元素数量阈值为7进行举例说明,若遍历到的文本元素是“光”(即文本元素的类型是字),则在扫描循环中的第一次循环时,已经执行的扫描处理的次数为0,扫描数量为0,根据扫描数量执行从“光”开始的扫描处理,由于扫描处理得到的文本元素为空,故将“光”作为候选实体词;在扫描循环中的第二次循环时,已经执行的扫描处理的次数为1,扫描数量为1,根据扫描数量执行从“光”开始的扫描处理,得到“荣”,进而将“光”和“荣”组合为“光荣”,并将“光荣”作为候选实体词,以此类推,直至扫描数量等于6。
第二种情况是,扫描数量初始为扫描数量阈值,且扫描数量与扫描循环中已经执行的扫描处理的次数同步减少,例如已经执行的扫描处理的次数每增加一次,扫描数量相应地执行减1操作。以待识别文本为“光荣的某国人民解放军”,元素数量阈值为7进行举例说明,若遍历到的文本元素是“光”(即文本元素的类型是字),则在扫描循环中的第一次循环时,已经执行的扫描处理的次数为0,扫描数量为6,根据扫描数量执行从“光”开始的扫描处理,得到“荣的某国人民”,并将组合得到的“光荣的某国人民”作为候选实体词;在扫描循环中的第二次循环时,已经执行的扫描处理的次数为1,扫描数量为5,根据扫描数量执行从“光”开始的扫描处理,得到“荣的某国人”,并将组合得到的“光荣的某国人”作为候选实体词,以此类推,直至扫描数量等于0。
值得说明的是,根据扫描数量进行扫描处理的过程可以是:从遍历到的文本元素开始选取待识别文本中的文本元素(选取的文本元素不包括遍历到的文本元素),以作为扫描处理得到的文本元素,直至扫描处理得到的文本元素的总数量等于扫描数量。其中,当某次扫描处理所依据的扫描数量为0时,由于扫描处理得到的文本元素为空,故可以将遍历到的文本元素本身作为候选实体词。另外,扫描处理的顺序可以是从待识别文本中第一个文本元素依次到最后一个文本元素的顺序(上述例子中便是以此顺序进行举例),也可以是从待识别文本中最后一个文本元素依次到第一个文本元素的顺序。
通过步骤202得到的多个候选实体词中可能包括重复的候选实体词,因此,可以对得到的所有候选实体词进行去重处理,即在相同的多个候选实体词中仅保留一个,以保证去重处理后剩余的多个候选实体词互不相同,从而节省后续的计算资源。
在图4B中,图4A示出的步骤103可以通过步骤203至步骤204实现,将结合各步骤进行说明。
在步骤203中,根据待识别文本中第一个文本元素依次到最后一个文本元素的顺序,对候选实体词中多个文本元素的文本表示依次进行循环更 新处理,得到候选实体词中每个文本元素的文本表示的更新结果。
这里,针对每一个候选实体词,根据从待识别文本中第一个文本元素依次到最后一个文本元素的顺序,对候选实体词中多个文本元素的文本表示依次进行循环更新处理,得到每个文本元素的文本表示的更新结果。其中,循环更新处理是指针对候选实体词中任意一个文本元素的文本表示,结合相邻的文本元素的文本表示,对任意一个文本元素的文本表示进行更新,得到任意一个文本元素的文本表示的更新结果,如此,能够提升得到的更新结果所包含信息的全面性和准确性。其中,相邻可以是指前一个,也可以包括前一个和后一个。
作为示例,参见图3,在整合模块2433中,可以将候选实体词中多个文本元素的文本表示依次输入RNN模型,基于RNN模型的前向传播过程来实现循环更新处理,由于RNN模型具有较强的序列记忆性能及语义表示能力,故能够提升得到的更新结果的准确性。其中,RNN模型可以是单向RNN模型或者双向RNN模型,在单向RNN模型中,相邻的文本元素是指前一个文本元素;在双向RNN模型中,相邻的文本元素包括前一个文本元素和后一个文本元素。
在一些实施例中,可以通过这样的方式来实现上述的对候选实体词中多个文本元素的文本表示依次进行循环更新处理,得到候选实体词中每个文本元素的文本表示的更新结果:针对候选实体词中任意一个文本元素的文本表示,执行以下操作:对任意一个文本元素的文本表示与前一个文本元素的文本表示的第一隐层状态进行融合处理,得到任意一个文本元素的文本表示的第一隐层状态;对任意一个文本元素的文本表示与后一个文本元素的文本表示的第二隐层状态进行融合处理,得到任意一个文本元素的文本表示的第二隐层状态;对任意一个文本元素的文本表示的第一隐层状态及第二隐层状态进行融合处理,得到任意一个文本元素的文本表示的更新结果。
这里,提供了循环更新处理的一种示例,为了便于理解,以对候选实体词中任意一个文本元素的文本表示进行循环更新处理的过程进行说明。在循环更新处理的过程中,对任意一个文本元素的文本表示与前一个文本元素的文本表示的第一隐层状态(隐层状态即hidden state)进行融合处理,得到任意一个文本元素的文本表示的第一隐层状态,其中,融合处理可以是加权求和,当然还可以包括其他的处理,例如将加权求和的结果加上一个偏置项,再对得到的结果进行激活处理(通过激活函数来实现激活处理,激活函数如双曲正切函数等)。同时,对任意一个文本元素的文本表示与后一个文本元素的文本表示的第二隐层状态进行融合处理,得到任意一个文本元素的文本表示的第二隐层状态。然后,对任意一个文本元素的文本表示的第一隐层状态及第二隐层状态进行融合处理,得到任意一个文本元素的文本表示的更新结果。值得说明的是,上述方式可以通过双向RNN模型 来实现,通过上述方式,能够综合两个方向的信息,提升更新结果所包含信息的全面性和准确性。
值得说明的是,对于候选实体词中的第一个文本元素的文本表示来说,由于不存在前一个文本元素的文本表示,因此,可以将前一个文本元素的文本表示的第一隐层状态置零;对于候选实体词中的最后一个文本元素的文本表示来说,由于不存在后一个文本元素的文本表示,因此,可以将后一个文本元素的文本表示的第二隐层状态置零。
在步骤204中,将候选实体词中最后一个文本元素的文本表示的更新结果,作为候选实体词的文本表示。
对于候选实体词中最后一个文本元素的文本表示的更新结果来说,其融合了候选实体词中的较多信息,因此,将该更新结果作为候选实体词的文本表示,使得候选实体词的文本表示能够全面、有效地表示候选实体词的语义。
如图4B所示,本申请实施例通过遍历及扫描循环的方式构建候选实体词,能够适用于多层嵌套的情况,并且,通过进行循环更新处理,能够提升得到的候选实体词的文本表示的准确性和有效性。
在一些实施例中,参见图4C,图4C是本申请实施例提供的基于人工智能的命名实体识别方法的一个可选的流程示意图,图4A示出的步骤102可更新为步骤301,在步骤301中,根据多个不同长度的卷积窗口执行以下操作:在待识别文本中执行卷积窗口的滑动操作,且每次滑动操作的幅度为一个文本元素;将每次滑动前卷积窗口所覆盖的文本元素组合为候选实体词,并将停止滑动时卷积窗口所覆盖的文本元素组合为候选实体词;其中,卷积窗口的长度小于或等于元素数量阈值。
作为示例,参见图3,在构建模块2432中,根据元素数量阈值设置多个不同长度的卷积窗口,其中每个卷积窗口的长度均小于或等于元素数量阈值,这里,卷积窗口的长度是指卷积窗口可覆盖的文本元素的总数量。为了提升构建出的候选实体的全面性,可从长度为1的卷积窗口开始递增长度,直至得到长度达到元素数量阈值的卷积窗口,如元素数量阈值为7,则设置长度依次为1、2、……、7的卷积窗口。
对于每个卷积窗口,在待识别文本中执行卷积窗口的滑动操作,且每次滑动操作的幅度为一个文本元素。本申请实施例对执行滑动操作的顺序不做限定,例如可以是从待识别文本中的第一个文本元素开始,向待识别文本中的最后一个文本元素滑动,这里,滑动操作的停止条件(这里的停止是指不再进行滑动操作)是卷积窗口覆盖到待识别文本中的最后一个文本元素;又例如,也可以是从待识别文本中的最后一个文本元素开始,向待识别文本中的第一个文本元素滑动,这里,滑动操作的停止条件是卷积窗口覆盖到待识别文本中的第一个文本元素。在每次执行滑动操作前,将 卷积窗口所覆盖的文本元素组合为候选实体词,并且,当满足滑动操作的停止条件时,将卷积窗口当前所覆盖的文本元素组合为候选实体词。
举例来说,待识别文本为“光荣的某国人民解放军”,某个卷积窗口的长度为3,根据该卷积窗口从待识别文本中的第一个文本元素开始,向待识别文本中的最后一个文本元素进行滑动,则在第一次滑动前,将该卷积窗口所覆盖的“光荣的”作为候选实体词;在第二次滑动前,将该卷积窗口所覆盖的“荣的某”作为候选实体词,以此类推。当卷积窗口覆盖的是“解放军”时,停止滑动,将“解放军”同样作为候选实体词。
在图4C中,图4A示出的步骤103可更新为步骤302,在步骤302中,对候选实体词中文本元素对应的文本表示进行卷积处理,得到候选实体词的文本表示;其中,用于进行卷积处理的卷积核尺寸与用于构建候选实体词的卷积窗口的长度一致。
这里,对于得到的每个候选实体词,对候选实体词中所有文本元素对应的文本表示共同进行卷积处理,得到候选实体词的文本表示,其中,用于进行卷积处理的卷积核尺寸(size)与用于构建候选实体词的卷积窗口的长度一致。
作为示例,参见图3,在整合模块2433中,对于每个卷积窗口,将基于卷积窗口所构建出的候选实体词中所有文本元素对应的文本表示输入至CNN模型中,并将CNN模型经前向传播处理得到的输出,确定为候选实体词的文本表示,其中,该CNN模型的卷积核尺寸与卷积窗口的长度一致。
如图4C所示,本申请实施例通过滑动卷积窗口的方式构建候选实体词,从另一个角度实现了候选实体词的构建,并且,对候选实体词中文本元素对应的文本表示进行卷积处理,得到候选实体词的文本表示,能够提升得到的候选实体词的文本表示的准确性和有效性。
在一些实施例中,参见图4D,图4D是本申请实施例提供的基于人工智能的命名实体识别方法的一个可选的流程示意图,图4A示出的步骤104可以通过步骤401至步骤405实现,将结合各步骤进行说明。
在步骤401中,对候选实体词的文本表示进行全连接处理。
作为示例,参见图3,在分类模块2434中,通过全连接层对候选实体词的文本表示进行全连接处理,全连接处理的目的在于,提取、整合候选实体词的文本表示中有效的信息,便于后续进行分类。
在步骤402中,通过第一分类函数对全连接处理后的候选实体词的文本表示进行映射处理,得到与非命名实体类别对应的概率、以及与多个命名实体类别一一对应的概率;其中,第一分类函数用于对候选实体词进行二分类。
作为示例,参见图3,在分类模型2434中,当命名实体识别的任务是二分类任务时,通过第一分类函数对全连接处理后的候选实体词的文本表 示进行映射处理,得到与非命名实体类别对应的概率、以及与多个命名实体类别一一对应的概率,其中,第一分类函数可以是Softmax分类函数。值得说明的是,本申请实施例中的二分类是指针对不存在多重类别的命名实体的情况,判断候选实体词是属于非命名实体类别还是命名实体类别。
在步骤403中,将数值最大的概率对应的类别,确定为候选实体词所属的类别。
这里,将数值最大的概率对应的类别,确定为候选实体词所属的类别,即候选实体词所属的类别只会是非命名实体类别或命名实体类别。
在步骤404中,通过第二分类函数对全连接处理后的候选实体词的文本表示进行映射处理,得到与非命名实体类别对应的概率、以及与多个命名实体类别一一对应的概率。
作为示例,参见图3,在分类模型2434中,当命名实体识别的任务是多分类任务时,通过第二分类函数对全连接处理后的候选实体词的文本表示进行映射处理,得到与非命名实体类别对应的概率、以及与多个命名实体类别一一对应的概率,其中,第二分类函数可以是Sigmoid分类函数。值得说明的是,本申请实施例中的多分类是指针对存在多重类别的命名实体的情况,判断候选实体词是属于非命名实体类别,还是属于至少一个命名实体类别。
在步骤405中,将超过概率阈值的概率对应的类别,确定为候选实体词所属的类别。
在多分类的情况下,设定概率阈值,并将超过概率阈值的概率对应的类别,确定为候选实体词所属的类别,此时,候选实体词所属的类别可能是一个或多个。
如图4D所示,本申请实施例对于二分类和多分类的情况,使用不同的分类函数进行分类处理,提升了命名实体识别的灵活性。
下面,将说明本申请实施例在实际的应用场景中的示例性应用。
本申请实施例提供了如图5所示的使用循环神经网络模型进行命名实体识别的一个可选的架构示意图,下面按照由底向上的顺序进行依次解释。
1)文本输入模块&文本表示模块。
该模块泛指具备文本表示能力的NLP模型结构以及基于表示结构的其他扩展,可根据实际应用场景进行设定,例如该模块可应用BERT模型及其改进等。将待识别文本输入至该模块,得到待识别文本中文本元素的文本表示,其中,文本元素的类型为字或词,在图5中以文本元素的类型为字的情况进行举例说明。
2)文本表示模块。
在图5中,待识别文本为“光荣的某国人民解放军”,经文本输入模块&文本表示模块处理后,得到的待识别文本中每个字的向量形式的文本表示, 在图5中以方框为示例。
3)循环神经网络模型。
本申请实施例中的RNN模型泛指RNN模型及其变种,例如长短时记忆网络(LSTM,Long Short-Term Memory)模型及门控循环单元(GRU,Gated Recurrent Unit)模型等。图5中以双向RNN模型举例,模型中的每一个圆表示某一个时刻的细胞(cell),其中,细胞的输入为文本元素的文本表示。针对双向RNN模型中的任意一个细胞来说,其用于向后一个细胞传递输入的文本表示的第一隐层状态,还用于向前一个细胞传递输入的文本表示的第二隐层状态。
对于构建候选实体词的过程,可划分为两层处理,第一层是遍历处理,第二层是扫描循环。在第一层的遍历处理中,按照待识别文本中第一个文本元素到最后一个文本元素的顺序进行遍历处理,遍历处理的目的是完整覆盖待识别文本中所有可能的候选实体词的词首。以上述的待识别文本举例来说,遍历处理过程中所遍历到的文本元素(即候选实体词的词首)依次为:
光->荣->的->某->国->人->民->解->放->军
将遍历到的文本元素对应的文本表示,作为RNN模型中第一时刻(step)的输入向量。值得说明的是,对于遍历到的不同文本元素,其对RNN模型的输入均彼此独立进行,即前一个遍历到的文本元素对应的文本表示,将不再作为后一次的RNN模型的输入,后一个遍历到的文本元素对应的文本表示,将重新使用RNN模型,即作为新的RNN模型的第一时刻的输入向量。例如,当遍历到的文本元素是“光”时,将“光”对应的文本表示,作为RNN模型中第一时刻的输入向量;当遍历到的文本元素是“荣”时,将“荣”对应的文本表示,作为另一个RNN模型中第一时刻的输入向量。
在确定出遍历到的文本元素,即确定了词首之后,执行一次完整的扫描循环。扫描循环是指,以词首为候选实体词的开始,根据逐渐增大的扫描数量(扫描数量初始为0),循环扫描以该词首为开始的每一个候选实体词,直到扫描数量达到扫描数量阈值,其中,扫描数量阈值为元素数量阈值减一后的结果。举例来说,若遍历到的文本元素(词首)为“某”,则开始执行扫描循环,即以“某”这个字为候选实体词的词首,逐渐扩大扫描数量。以元素数量阈值为7举例,那么在扫描循环中,首先根据值为0的扫描数量进行扫描处理,将“某”作为一个候选实体词,再根据值为1的扫描数量进行扫描处理,得到候选实体词“某国”,再根据值为2的扫描数量进行扫描处理,得到候选实体词“某国人”,以此类推,直至扫描数量的值为6,得到包括文本元素的数量达到元素数量阈值的候选实体词,即“某国人民解放军”为止,以此为一次扫描循环。
在构建候选实体词的同时,将逐一扫描到的字对应的文本表示依次按照逐个时刻输入至RNN模型中,并且以当前扫描到的字所对应的RNN时 刻的输出(对应上文的更新结果),作为从“词首”到当前扫描字所构成的候选实体词的文本表示。举例来说,对于候选实体词“某国人”,将“某”、“国”和“人”对应的文本表示依次按照逐个时刻输入至RNN模型中,并将与“人”对应时刻的输出,确定为候选实体词“某国人”的文本表示。通过上述的遍历处理和扫描循环,能够较好地利用RNN模型的序列记忆性能及语义表示能力,使得到的候选实体词的文本表示能够准确、有效地表示候选实体词的语义。
4)候选实体词。
图5中示出了经过遍历处理及扫描循环后,构建出的多个候选实体词,对于每个候选实体词,可以通过RNN模型的前向传播处理,得到候选实体词的文本表示。
5)Softmax/Sigmoid分类层。
该分类层用于对RNN模型输出的多个候选实体词的文本表示分别进行分类处理。本申请实施例提供了两种分类方式,分别使用Softmax和Sigmoid两种激活(分类)函数。当待识别文本中不存在多重类别的命名实体,即为二分类任务时,可以采用Softmax激活函数,将得到的每一个候选实体词的文本表示,使用全连接层等结构结合Softmax激活函数进行分类,最后得出候选实体词最有可能所属的一个类别。当待识别文本中存在多重类别的实体,即为多分类任务时,可以采用Sigmoid激活函数,同样使用全连接层等结构结合Sigmoid激活函数进行分类,最后通过设置概率阈值的方式,得出候选实体词可能所属的类别。值得说明的是,在分类过程中,非命名实体类别可与其他的命名实体类别平等看待。
举例来说,如图5所示,经分类层进行分类处理后,得到候选实体词“某”所属的类别是非命名实体类别,候选实体词“某国”所属的类别是国家名称类别,候选实体词“某国人”所属的类别是群体类别,候选实体词“某国人民解放军”所属的类别是军队类别。完成命名实体识别后,可将得到的命名实体(即属于任意一个命名实体类别的候选实体词)应用于NLP领域的各种应用场景,例如在新词发现的场景中,可将得到的命名实体添加至知识图谱中,实现新的命名实体的自动挖掘。
本申请实施例还提供了如图6所示的使用卷积神经网络模型进行命名实体识别的一个可选的架构示意图,下面按照由底向上的顺序进行依次解释。
1)文本输入模块&文本表示模块。
2)文本表示模块。
对于图6中的文本输入模块&文本表示模块、以及文本表示模块来说,与图5中对应的内容类似。
3)CNN模型。
此部分的CNN模型泛指CNN模型及其变种等。图6中以原始的CNN模型进行举例,针对预设的元素数量阈值,使用多种卷积核尺寸(size)的CNN模型,对候选实体词中文本元素的文本表示进行一维CNN处理。
举例来说,在元素数量阈值为7的情况下,设置7种尺寸的卷积核,尺寸依次为1至7,卷积核的数量可根据具体实际应用场景进行设定,不同尺寸的卷积核的数量可设置为相同。同时,设置长度与卷积核尺寸相同的卷积窗口,并根据待识别文本中第一个文本元素依次到最后一个文本元素的顺序,对卷积窗口执行滑动操作。将每次滑动前卷积窗口所覆盖的文本元素组合为候选实体词,并将停止滑动时卷积窗口所覆盖的文本元素组合为候选实体词。然后,将候选实体词中文本元素对应的文本表示,统一输入至拥有对应尺寸的卷积核的CNN模型,CNN模型的卷积输出结果即为候选实体词的文本表示。
如图6所示,当长度为3的卷积窗口覆盖在“某国人”上时,将“某”的文本表示、“国”的文本表示以及“人”的文本表示输入至CNN模型(这里指具有尺寸为3的卷积核的CNN模型)中,将该CNN模型进行卷积处理所得到的输出结果,作为“某国人”这个候选实体词的文本表示。
4)候选实体词。
如图6所示,示出了“某”、“某国”及“某国人”等构建出的候选实体词。
5)Softmax/Sigmoid分类层。
图6中的Softmax/Sigmoid分类层与图5中对应的内容类似,同样可针对不同的分类任务采用不同的激活函数。
相较于相关技术提供的Nested NE BILOU编解码方案,通过本申请实施例提供的基于人工智能的命名实体识别方法,无需人为制定复杂的编解码规则,提升了命名实体识别的效率和灵活性。并且相较于相关技术提供的其他方案,本申请实施例也具有一定优势。
例如,相较于用于进行命名实体识别,且采用复杂结构的深度学习模型的MGNER方案,本申请实施例的模型结构更为简单,同时能够更加有效地增强对于候选实体词的语义表达能力,改善模型的性能指标。经实验验证,在基于语言模型嵌入(ELMo,Embedding from Language Models)的相同文本表示结构下进行测试,两个方案的指标对比如下:
在开源的ACE2004公开数据集下,MGNER模型方案的F1分数为79.5%,本申请实施例提供方法的F1分数为83.7%;在ACE2005公开数据集下,MGNER模型方案的F1分数为78.2%,本申请实施例提供方法的F1分数为82.4%,其中,F1分数为精确率和召回率的调和平均。
另外,在相关技术提供的方案中,还可通过机器阅读理解(MRC,Machine Reading Comprehension)的思路来实现命名实体识别,但该方案针对每一种命名实体类别,均需要独立运行一次模型,所花费时间较长。而 通过本申请实施例提供的方法,一次运行即可产出待识别文本中所有可能的候选实体词及其所属的类别,效率较高。使用具有115种命名实体类型的ACL-NNE公开数据集进行测试,并且在与MRC框架方案同样基于BERT模型的情况下,相较于MRC框架方案,本申请实施例提供的方法大约能够节省超过90%的时间。
命名实体识别的结果可应用于NLP领域的各个应用场景,例如摘要确定、对象推荐、文本归类及问答系统的场景,又例如信息抽取、语法分析及机器翻译的场景,这里以问答系统的场景进行详细说明。
本申请实施例提供了如图7所示的进行问答的流程示意图,在图7中,终端设备400-1和终端设备400-2由不同的用户持有,为了便于区分,将终端设备400-1命名为第一终端设备,将终端设备400-2命名为第二终端设备,将结合图7示出的各个步骤说明问答的过程。
在步骤501中,第一终端设备将待识别文本发送至服务器。
第一终端设备的用户通过第一终端设备,将待识别文本发送至服务器,这里对待识别文本的来源不做限定,例如待识别文本可以是某个人物的词条文本,或某个商品的说明文本等。
在步骤502中,服务器根据待识别文本中的文本元素构建候选实体词,并确定候选实体词所属的类别。
例如,服务器可以通过穷举的方式构建所有可能出现的候选实体词,并确定每个候选实体词所属的类别,可以参见上述的步骤101~步骤104。
在步骤503中,服务器将属于命名实体类别的候选实体词确定为关键词,并对待识别文本进行句法分析处理,得到主语关键词、关系词及宾语关键词。
这里,服务器将属于任意一个命名实体类别的候选实体词,均确定为关键词,并进一步对待识别文本进行句法分析处理,得到待识别文本中存在依存关系的主语关键词、关系词及宾语关键词,其中,关系词用于表示主语关键词与宾语关键词之间的关系。例如,待识别文本为“张三向李四借钱”,则通过句法分析处理,得到主语关键词为“张三”,关系词为“借钱”,宾语关键词为“李四”。
在步骤504,服务器根据主语关键词、关系词及宾语关键词构建三元组,并将三元组添加至知识图谱。
这里,根据主语关键词、关系词及宾语关键词构建主-谓-宾三元组,例如主-谓-宾三元组为“张三-借钱-李四”。然后,服务器将构建的主-谓-宾三元组添加至知识图谱,同时,“张三”和“李四”也可作为命名实体添加在知识图谱中。
在步骤505中,第二终端设备将包括主语关键词及关系词的宾语查询请求发送至服务器。
例如,第二终端设备将“张三向谁借钱?”的宾语查询请求发送服务器。
在步骤506中,服务器通过知识图谱确定宾语查询请求的语义,并根据语义在知识图谱中进行查询,得到查询结果。
这里,服务器可以将宾语查询请求与知识图谱中的命名实体进行匹配,例如将“张三向谁借钱?”与知识图谱中的命名实体进行匹配,得到宾语查询请求中与知识图谱匹配的命名实体为“张三”。除了这种方式外,服务器还可以应用步骤101~步骤104的方式,得到宾语查询请求中的候选实体词所属的类别,并将属于命名实体类别的候选实体词与知识图谱进行匹配。
然后,服务器根据宾语查询请求中与知识图谱匹配的命名实体,进一步进行句法分析处理,得到查询请求的语义,例如“张三-借钱-?”。服务器根据宾语查询请求的语义,在知识图谱中进行查询,得到相应的查询结果,并将查询结果发送至第二终端设备,完成问答,例如将宾语关键词“李四”作为查询结果,发送至第二终端设备。
如图7所示,本申请实施例根据命名实体识别结果进行知识图谱的扩充,提升了知识图谱中知识的准确性,也提升了基于知识图谱的问答系统的精度,使得用户在参与问答时能够得到良好的用户体验。
下面继续说明本申请实施例提供的基于人工智能的命名实体识别装置243实施为软件模块的示例性结构,在一些实施例中,如图2所示,存储在存储器240的基于人工智能的命名实体识别装置243中的软件模块可以包括:向量转换模块2431,配置为对待识别文本中的文本元素进行向量转换处理,得到文本元素的文本表示;构建模块2432,配置为根据待识别文本中总数量不超过元素数量阈值的文本元素,构建候选实体词;整合模块2433,配置为对候选实体词中文本元素对应的文本表示进行整合处理,得到候选实体词的文本表示;分类模块2434,配置为对候选实体词的文本表示进行分类处理,以在非命名实体类别和多个命名实体类别中,确定候选实体词所属的类别。
在一些实施例中,构建模块2432,配置为:对待识别文本中的文本元素进行遍历处理;针对遍历到的文本元素,执行包括多次扫描处理的扫描循环:根据在扫描循环中已经执行的扫描处理的次数,确定同步增大或减小的扫描数量,根据扫描数量执行从遍历到的文本元素开始的扫描处理,并将遍历到的文本元素和扫描处理得到的文本元素组合为候选实体词,直至初始为零的扫描数量增大至扫描数量阈值、或者初始为扫描数量阈值的扫描数量减小至零;其中,扫描数量阈值为元素数量阈值减一后得到的结果。
在一些实施例中,整合模块2433,配置为:根据待识别文本中第一个文本元素依次到最后一个文本元素的顺序,对候选实体词中多个文本元素 的文本表示依次进行循环更新处理,得到候选实体词中每个文本元素的文本表示的更新结果;将候选实体词中最后一个文本元素的文本表示的更新结果,作为候选实体词的文本表示。
在一些实施例中,整合模块2433,配置为:针对候选实体词中任意一个文本元素的文本表示,执行以下操作:对任意一个文本元素的文本表示与前一个文本元素的文本表示的第一隐层状态进行融合处理,得到任意一个文本元素的文本表示的第一隐层状态;对任意一个文本元素的文本表示与后一个文本元素的文本表示的第二隐层状态进行融合处理,得到任意一个文本元素的文本表示的第二隐层状态;对任意一个文本元素的文本表示的第一隐层状态及第二隐层状态进行融合处理,得到任意一个文本元素的文本表示的更新结果。
在一些实施例中,构建模块2432,配置为:从遍历到的文本元素开始选取待识别文本中的文本元素,以作为扫描处理得到的文本元素,直至扫描处理得到的文本元素的总数量等于扫描数量。
在一些实施例中,构建模块2432,配置为:根据多个不同长度的卷积窗口执行以下操作:在待识别文本中执行卷积窗口的滑动操作,且每次滑动操作的幅度为一个文本元素;将每次滑动前卷积窗口所覆盖的文本元素组合为候选实体词,并将停止滑动时卷积窗口所覆盖的文本元素组合为候选实体词;其中,卷积窗口的长度小于或等于元素数量阈值。
在一些实施例中,整合模块2433,配置为:对候选实体词中文本元素对应的文本表示进行卷积处理,得到候选实体词的文本表示;其中,用于进行卷积处理的卷积核尺寸与用于构建候选实体词的卷积窗口的长度一致。
在一些实施例中,分类模块2434,配置为:对候选实体词的文本表示进行全连接处理;通过第一分类函数对全连接处理后的候选实体词的文本表示进行映射处理,得到与非命名实体类别对应的概率、以及与多个命名实体类别一一对应的概率;将数值最大的概率对应的类别,确定为候选实体词所属的类别;其中,第一分类函数用于对候选实体词进行二分类。
在一些实施例中,分类模块2434,配置为:对候选实体词的文本表示进行全连接处理;通过第二分类函数对全连接处理后的候选实体词的文本表示进行映射处理,得到与非命名实体类别对应的概率、以及与多个命名实体类别一一对应的概率;将超过概率阈值的概率对应的类别,确定为候选实体词所属的类别;其中,第二分类函数用于对候选实体词进行多分类。
在一些实施例中,基于人工智能的命名实体识别装置243还包括:分割模块,配置为对待识别文本进行分割处理得到多个语句;摘要关键词确定模块,配置为将属于任意一个命名实体类别的、且出现频率满足频率条件的候选实体词确定为摘要关键词;评分确定模块,配置为根据语句包括的摘要关键词的数量,确定语句的评分;摘要确定模块,配置为将评分满足评分条件的语句,确定为待识别文本的文本摘要。
在一些实施例中,基于人工智能的命名实体识别装置243还包括:第一关键词确定模块,配置为当待识别文本用于表示待推荐对象时,将属于任意一个命名实体类别的候选实体词,确定为待推荐对象的关键词;用户画像获取模块,配置为获取用户画像关键词,并确定用户画像关键词与待推荐对象的关键词之间的关键词重合度;推荐模块,配置为当关键词重合度超过第一重合度阈值时,执行推荐待推荐对象的操作。
在一些实施例中,用户画像获取模块,配置为:确定用户画像关键词与待推荐对象的关键词之间的交集,并确定交集包括的关键词的第一数量;确定用户画像关键词与待推荐对象的关键词之间的并集,并确定并集包括的关键词的第二数量;将第一数量与第二数量之间的比值,确定为用户画像关键词与待推荐对象的关键词之间的关键词重合度。
在一些实施例中,基于人工智能的命名实体识别装置243还包括:第二关键词确定模块,配置为将属于任意一个命名实体类别的候选实体词确定为关键词;重合度计算模块,配置为确定第一待识别文本与第二待识别文本之间的关键词重合度;归类模块,配置为当关键词重合度超过第二重合度阈值时,将第一待识别文本与第二待识别文本划分为同一个文本类。
在一些实施例中,基于人工智能的命名实体识别装置243还包括:第三关键词确定模块,配置为将属于任意一个命名实体类别的候选实体词确定为关键词;句法分析模块,配置为对待识别文本进行句法分析处理,得到待识别文本中的主语关键词、关系词及宾语关键词;其中,关系词用于表示主语关键词与宾语关键词之间的关系;添加模块,配置为根据主语关键词、关系词及宾语关键词构建三元组,并将三元组添加至知识图谱;其中,知识图谱用于响应包括主语关键词及关系词的宾语查询请求。
在一些实施例中,基于人工智能的命名实体识别装置243还包括:实体添加模块,配置为将属于任意一个命名实体类别的候选实体词添加至知识图谱;其中,知识图谱用于响应针对属于命名实体类别的候选实体词的类别查询请求。
在一些实施例中,基于人工智能的命名实体识别装置243还包括:元素识别模块,配置为执行以下任意一种操作,以得到待识别文本中的文本元素:将待识别文本中的每个字均作为文本元素;对待识别文本进行分词处理,将分词处理得到的词作为文本元素。
本申请实施例提供一种存储有可执行指令的计算机可读存储介质,其中存储有可执行指令,当可执行指令被处理器执行时,将引起处理器执行本申请实施例提供的方法,例如,如图4A、图4B、图4C或图4D示出的基于人工智能的命名实体识别方法。值得说明的是,计算机包括终端设备和服务器在内的各种计算设备。
在一些实施例中,计算机可读存储介质可以是FRAM、ROM、PROM、 EPROM、EEPROM、闪存、磁表面存储器、光盘、或CD-ROM等存储器;也可以是包括上述存储器之一或任意组合的各种设备。
在一些实施例中,可执行指令可以采用程序、软件、软件模块、脚本或代码的形式,按任意形式的编程语言(包括编译或解释语言,或者声明性或过程性语言)来编写,并且其可按任意形式部署,包括被部署为独立的程序或者被部署为模块、组件、子例程或者适合在计算环境中使用的其它单元。
作为示例,可执行指令可以但不一定对应于文件系统中的文件,可以可被存储在保存其它程序或数据的文件的一部分,例如,存储在超文本标记语言(HTML,Hyper Text Markup Language)文档中的一个或多个脚本中,存储在专用于所讨论的程序的单个文件中,或者,存储在多个协同文件(例如,存储一个或多个模块、子程序或代码部分的文件)中。
作为示例,可执行指令可被部署为在一个计算设备上执行,或者在位于一个地点的多个计算设备上执行,又或者,在分布在多个地点且通过通信网络互连的多个计算设备上执行。
综上,通过本申请实施例能够实现以下技术效果:
1)本申请实施例提供了一种精炼且易用的候选实体词构建方式,按照特定顺序逐一地、不同跨度地整合待识别文本中的序列信息,能够完备地穷举出待识别文本中的候选实体词。本申请实施例的模型结构简单,灵活性强,便于根据实际应用场景中的需要进行进一步改进,同时也易于移植到更多的深度学习模型中。
2)本申请实施例契合了RNN模型及CNN模型在NLP领域中的应用特点,按照特定顺序,使用RNN模型或CNN模型的相关结构,对待识别文本中文本元素的文本表示进行整合处理,得到候选实体词的文本表示,能够更加简单有效地增强对于候选实体词的语义表达能力,改善模型的性能指标,兼顾简洁性和有效性。
3)通过本申请实施例,一次运行即可产出待识别文本中所有的候选实体词及其所属的类别,能够节省较多时间,较快地得到候选实体词所属的类别。
4)本申请实施例针对具体的分类任务(二分类/多分类),采用对应的分类函数进行分类处理,提升了对于不同应用场景的适用性。
5)在待识别文本包括多个语句的情况下,通过本申请实施例,能够根据属于命名实体类别的候选实体词,确定每个语句的重要程度,从而筛选出文本摘要,提升了摘要选取的准确性。
6)在对象推荐的场景下,本申请实施例通过将待识别文本中的关键词与用户画像关键词进行匹配,从而尽量推荐符合用户喜好的对象,提升了用户体验,也提升了被推荐的对象的转化率。
7)本申请实施例通过比对两个文本之间的关键词,根据得到的关键词 重合度判断是否将两个文本归为一类,提升了文本归类的精度。
8)本申请实施例在进行了命名实体识别后,可将属于命名实体类别的候选实体词添加至知识图谱,提升新词发现的准确度。除此之外,还可将待识别文本中出现的命名实体之间的关系添加至知识图谱,使得扩充后的知识图谱能够更好地应用于问答等场景。
以上,仅为本申请的实施例而已,并非用于限定本申请的保护范围。凡在本申请的精神和范围之内所作的任何修改、等同替换和改进等,均包含在本申请的保护范围之内。

Claims (19)

  1. 一种基于人工智能的命名实体识别方法,由电子设备执行,包括:
    对待识别文本中的文本元素进行向量转换处理,得到所述文本元素的文本表示;
    根据所述待识别文本中总数量不超过元素数量阈值的文本元素,构建候选实体词;
    对所述候选实体词中文本元素对应的文本表示进行整合处理,得到所述候选实体词的文本表示;
    对所述候选实体词的文本表示进行分类处理,以在非命名实体类别和多个命名实体类别中,确定所述候选实体词所属的类别。
  2. 根据权利要求1所述的命名实体识别方法,其中,所述根据所述待识别文本中总数量不超过元素数量阈值的文本元素,构建候选实体词,包括:
    对所述待识别文本中的文本元素进行遍历处理;
    针对遍历到的文本元素,执行包括多次扫描处理的扫描循环:
    根据在所述扫描循环中已经执行的扫描处理的次数,确定同步增大或减小的扫描数量,根据所述扫描数量执行从所述遍历到的文本元素开始的扫描处理,并
    将所述遍历到的文本元素和扫描处理得到的文本元素组合为候选实体词,直至初始为零的所述扫描数量增大至扫描数量阈值、或者初始为所述扫描数量阈值的所述扫描数量减小至零;
    其中,所述扫描数量阈值为所述元素数量阈值减一后得到的结果。
  3. 根据权利要求2所述的命名实体识别方法,其中,所述对所述候选实体词中文本元素对应的文本表示进行整合处理,得到所述候选实体词的文本表示,包括:
    根据所述待识别文本中第一个文本元素依次到最后一个文本元素的顺序,对所述候选实体词中多个文本元素的文本表示依次进行循环更新处理,得到所述候选实体词中每个文本元素的文本表示的更新结果;
    将所述候选实体词中最后一个文本元素的文本表示的更新结果,作为所述候选实体词的文本表示。
  4. 根据权利要求3所述的命名实体识别方法,其中,所述对所述候选实体词中多个文本元素的文本表示依次进行循环更新处理,得到所述候选实体词中每个文本元素的文本表示的更新结果,包括:
    针对所述候选实体词中任意一个文本元素的文本表示,执行以下操作:
    对所述任意一个文本元素的文本表示与前一个文本元素的文本表示的第一隐层状态进行融合处理,得到所述任意一个文本元素的文本表示的第一隐层状态;
    对所述任意一个文本元素的文本表示与后一个文本元素的文本表示的第二隐层状态进行融合处理,得到所述任意一个文本元素的文本表示的第二隐层状态;
    对所述任意一个文本元素的文本表示的第一隐层状态及第二隐层状态进行融合处理,得到所述任意一个文本元素的文本表示的更新结果。
  5. 根据权利要求2所述的命名实体识别方法,其中,所述根据所述扫描数量执行从所述遍历到的文本元素开始的扫描处理,包括:
    从所述遍历到的文本元素开始选取所述待识别文本中的文本元素,以作为扫描处理得到的文本元素,直至扫描处理得到的文本元素的总数量等于所述扫描数量。
  6. 根据权利要求1所述的命名实体识别方法,其中,所述根据所述待识别文本中总数量不超过元素数量阈值的文本元素,构建候选实体词,包括:
    根据多个不同长度的卷积窗口执行以下操作:
    在所述待识别文本中执行所述卷积窗口的滑动操作,且每次滑动操作的幅度为一个文本元素;
    将每次滑动前所述卷积窗口所覆盖的文本元素组合为候选实体词,并将停止滑动时所述卷积窗口所覆盖的文本元素组合为候选实体词;
    其中,所述卷积窗口的长度小于或等于所述元素数量阈值。
  7. 根据权利要求6所述的命名实体识别方法,其中,所述对所述候选实体词中文本元素对应的文本表示进行整合处理,得到所述候选实体词的文本表示,包括:
    对所述候选实体词中文本元素对应的文本表示进行卷积处理,得到所述候选实体词的文本表示;
    其中,用于进行卷积处理的卷积核尺寸与用于构建所述候选实体词的所述卷积窗口的长度一致。
  8. 根据权利要求1所述的命名实体识别方法,其中,所述对所述候选实体词的文本表示进行分类处理,以在非命名实体类别和多个命名实体类别中,确定所述候选实体词所属的类别,包括:
    对所述候选实体词的文本表示进行全连接处理;
    通过第一分类函数对全连接处理后的所述候选实体词的文本表示进行映射处理,得到与所述非命名实体类别对应的概率、以及与所述多个命名实体类别一一对应的概率;
    将数值最大的概率对应的类别,确定为所述候选实体词所属的类别;
    其中,所述第一分类函数用于对所述候选实体词进行二分类。
  9. 根据权利要求1所述的命名实体识别方法,其中,所述对所述候选实体词的文本表示进行分类处理,以在非命名实体类别和多个命名实体类别中,确定所述候选实体词所属的类别,包括:
    对所述候选实体词的文本表示进行全连接处理;
    通过第二分类函数对全连接处理后的所述候选实体词的文本表示进行映射处理,得到与所述非命名实体类别对应的概率、以及与所述多个命名实体类别一一对应的概率;
    将超过概率阈值的概率对应的类别,确定为所述候选实体词所属的类别;
    其中,所述第二分类函数用于对所述候选实体词进行多分类。
  10. 根据权利要求1至9任一项所述的命名实体识别方法,其中,还包括:
    对所述待识别文本进行分割处理得到多个语句;
    将属于任意一个所述命名实体类别的、且出现频率满足频率条件的候选实体词确定为摘要关键词;
    根据所述语句包括的摘要关键词的数量,确定所述语句的评分;
    将评分满足评分条件的语句,确定为所述待识别文本的文本摘要。
  11. 根据权利要求1至9任一项所述的命名实体识别方法,其中,还包括:
    当所述待识别文本用于表示待推荐对象时,将属于任意一个所述命名实体类别的候选实体词,确定为所述待推荐对象的关键词;
    获取用户画像关键词,并确定所述用户画像关键词与所述待推荐对象的关键词之间的关键词重合度;
    当所述关键词重合度超过第一重合度阈值时,执行推荐所述待推荐对象的操作。
  12. 根据权利要求11所述的命名实体识别方法,其中,所述确定所述用户画像关键词与所述待推荐对象的关键词之间的关键词重合度,包括:
    确定所述用户画像关键词与所述待推荐对象的关键词之间的交集,并确定所述交集包括的关键词的第一数量;
    确定所述用户画像关键词与所述待推荐对象的关键词之间的并集,并确定所述并集包括的关键词的第二数量;
    将所述第一数量与所述第二数量之间的比值,确定为所述用户画像关键词与所述待推荐对象的关键词之间的关键词重合度。
  13. 根据权利要求1至9任一项所述的命名实体识别方法,其中,还包括:
    将属于任意一个所述命名实体类别的候选实体词确定为关键词;
    确定第一待识别文本与第二待识别文本之间的关键词重合度;
    当所述关键词重合度超过第二重合度阈值时,将所述第一待识别文本与所述第二待识别文本划分为同一个文本类。
  14. 根据权利要求1至9任一项所述的命名实体识别方法,其中,还包括:
    将属于任意一个所述命名实体类别的候选实体词确定为关键词;
    对所述待识别文本进行句法分析处理,得到所述待识别文本中的主语关键词、关系词及宾语关键词;其中,所述关系词用于表示所述主语关键词与所述宾语关键词之间的关系;
    根据所述主语关键词、所述关系词及所述宾语关键词构建三元组,并将所述三元组添加至知识图谱;
    其中,所述知识图谱用于响应包括所述主语关键词及所述关系词的宾语查询请求。
  15. 根据权利要求1至9任一项所述的命名实体识别方法,其中,还包括:
    将属于任意一个所述命名实体类别的候选实体词添加至知识图谱;
    其中,所述知识图谱用于响应针对属于任意一个所述命名实体类别的候选实体词的类别查询请求。
  16. 根据权利要求1至9任一项所述的命名实体识别方法,其中,还包括:
    执行以下任意一种操作,以得到所述待识别文本中的文本元素:
    将所述待识别文本中的每个字均作为文本元素;
    对所述待识别文本进行分词处理,将分词处理得到的词作为文本元素。
  17. 一种基于人工智能的命名实体识别装置,包括:
    向量转换模块,配置为对待识别文本中的文本元素进行向量转换处理,得到所述文本元素的文本表示;
    构建模块,配置为根据所述待识别文本中总数量不超过元素数量阈值的文本元素,构建候选实体词;
    整合模块,配置为对所述候选实体词中文本元素对应的文本表示进行整合处理,得到所述候选实体词的文本表示;
    分类模块,配置为对所述候选实体词的文本表示进行分类处理,以在非命名实体类别和多个命名实体类别中,确定所述候选实体词所属的类别。
  18. 一种电子设备,包括:
    存储器,用于存储可执行指令;
    处理器,用于执行所述存储器中存储的可执行指令时,实现权利要求1至16任一项所述的基于人工智能的命名实体识别方法。
  19. 一种计算机可读存储介质,存储有可执行指令,用于引起处理器执行时,实现权利要求1至16任一项所述的基于人工智能的命名实体识别方法。
PCT/CN2020/127737 2020-02-28 2020-11-10 基于人工智能的命名实体识别方法、装置及电子设备 WO2021169400A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US17/685,283 US20220188521A1 (en) 2020-02-28 2022-03-02 Artificial intelligence-based named entity recognition method and apparatus, and electronic device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010127101.0A CN111353310B (zh) 2020-02-28 2020-02-28 基于人工智能的命名实体识别方法、装置及电子设备
CN202010127101.0 2020-02-28

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/685,283 Continuation US20220188521A1 (en) 2020-02-28 2022-03-02 Artificial intelligence-based named entity recognition method and apparatus, and electronic device

Publications (1)

Publication Number Publication Date
WO2021169400A1 true WO2021169400A1 (zh) 2021-09-02

Family

ID=71194185

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/127737 WO2021169400A1 (zh) 2020-02-28 2020-11-10 基于人工智能的命名实体识别方法、装置及电子设备

Country Status (3)

Country Link
US (1) US20220188521A1 (zh)
CN (1) CN111353310B (zh)
WO (1) WO2021169400A1 (zh)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114036933A (zh) * 2022-01-10 2022-02-11 湖南工商大学 基于法律文书的信息抽取方法
CN114048293A (zh) * 2022-01-11 2022-02-15 广东拓思软件科学园有限公司 一种缺陷报告融合方法、装置、电子设备及存储介质
CN114841163A (zh) * 2022-03-31 2022-08-02 阿里巴巴(中国)有限公司 实体识别方法、装置、设备及存储介质
CN116822632A (zh) * 2023-08-28 2023-09-29 腾讯科技(深圳)有限公司 一种文本数据的推理方法、装置、存储介质和电子设备

Families Citing this family (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111353310B (zh) * 2020-02-28 2023-08-11 腾讯科技(深圳)有限公司 基于人工智能的命名实体识别方法、装置及电子设备
CN111930939A (zh) * 2020-07-08 2020-11-13 泰康保险集团股份有限公司 一种文本检测的方法及装置
CN111914101B (zh) * 2020-08-17 2023-10-20 南方电网数字电网研究院有限公司 档案关联关系的异常识别方法、装置和计算机设备
RU2760637C1 (ru) * 2020-08-31 2021-11-29 Публичное Акционерное Общество "Сбербанк России" (Пао Сбербанк) Способ и система извлечения именованных сущностей
CN112560459B (zh) * 2020-12-04 2023-10-20 北京百度网讯科技有限公司 用于模型训练的样本筛选方法、装置、设备及存储介质
CN112528600B (zh) * 2020-12-15 2024-05-07 北京百度网讯科技有限公司 文本数据处理方法、相关装置及计算机程序产品
CN114722817A (zh) * 2020-12-22 2022-07-08 北京金山数字娱乐科技有限公司 事件处理方法及装置
US11675978B2 (en) * 2021-01-06 2023-06-13 International Business Machines Corporation Entity recognition based on multi-task learning and self-consistent verification
CN112765994A (zh) * 2021-01-26 2021-05-07 武汉大学 一种基于深度学习的信息要素联合抽取方法及系统
CN113326701A (zh) * 2021-06-17 2021-08-31 广州华多网络科技有限公司 嵌套实体识别方法、装置、计算机设备及存储介质
CN113378572B (zh) * 2021-06-22 2023-11-10 云知声智能科技股份有限公司 一种命名实体识别方法、装置、电子设备和存储介质
CN113516129B (zh) * 2021-07-15 2024-07-16 广州云从鼎望科技有限公司 名片的识别方法及装置、计算机可读存储介质、控制装置
CN113642331B (zh) * 2021-08-10 2022-05-03 东方财富信息股份有限公司 金融命名实体识别方法及系统、存储介质及终端
CN113377930B (zh) * 2021-08-13 2021-11-30 中国科学院自动化研究所 面向中文短文本的实体识别与实体链接方法
CN113836874A (zh) * 2021-09-16 2021-12-24 北京小米移动软件有限公司 文本纠错方法及装置
CN113887232B (zh) * 2021-12-07 2022-02-22 北京云迹科技有限公司 一种对话信息的命名实体识别方法、装置和电子设备
US20230359820A1 (en) * 2022-05-03 2023-11-09 Sap Se Natural language processing to extract skills characterization
CN115221882B (zh) * 2022-07-28 2023-06-20 平安科技(深圳)有限公司 命名实体识别方法、装置、设备及介质
CN116092493B (zh) * 2023-04-07 2023-08-25 广州小鹏汽车科技有限公司 语音交互方法、服务器和计算机可读存储介质
KR102674954B1 (ko) * 2023-10-20 2024-06-14 주식회사 마인즈앤컴퍼니 거대 언어 모델과 딥러닝을 이용한 검색 서비스를 제공하는 방법 및 장치
CN117609403A (zh) * 2023-10-30 2024-02-27 合肥工业大学 一种应用于服务热线智能派单的地名识别方法及系统
CN118114675B (zh) * 2024-04-29 2024-07-26 支付宝(杭州)信息技术有限公司 基于大语言模型的医疗命名实体识别方法和装置

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106547733A (zh) * 2016-10-19 2017-03-29 中国国防科技信息中心 一种面向特定文本的命名实体识别方法
CN109101481A (zh) * 2018-06-25 2018-12-28 北京奇艺世纪科技有限公司 一种命名实体识别方法、装置及电子设备
CN110232183A (zh) * 2018-12-07 2019-09-13 腾讯科技(深圳)有限公司 关键词提取模型训练方法、关键词提取方法、装置及存储介质
CN110502738A (zh) * 2018-05-18 2019-11-26 阿里巴巴集团控股有限公司 中文命名实体识别方法、装置、设备和查询系统
CN110688854A (zh) * 2019-09-02 2020-01-14 平安科技(深圳)有限公司 命名实体识别方法、装置及计算机可读存储介质
CN111353310A (zh) * 2020-02-28 2020-06-30 腾讯科技(深圳)有限公司 基于人工智能的命名实体识别方法、装置及电子设备

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8316030B2 (en) * 2010-11-05 2012-11-20 Nextgen Datacom, Inc. Method and system for document classification or search using discrete words
US9087297B1 (en) * 2010-12-17 2015-07-21 Google Inc. Accurate video concept recognition via classifier combination
US9971763B2 (en) * 2014-04-08 2018-05-15 Microsoft Technology Licensing, Llc Named entity recognition
CN109388793B (zh) * 2017-08-03 2023-04-07 阿里巴巴集团控股有限公司 实体标注方法、意图识别方法及对应装置、计算机存储介质
US10482179B2 (en) * 2017-10-09 2019-11-19 Raytheon Company Requirement document language quality feedback and improvement
RU2679988C1 (ru) * 2017-12-11 2019-02-14 Общество с ограниченной ответственностью "Аби Продакшн" Извлечение информационных объектов с помощью комбинации классификаторов
US11010561B2 (en) * 2018-09-27 2021-05-18 Apple Inc. Sentiment prediction from textual data
CN110209812B (zh) * 2019-05-07 2022-04-22 北京地平线机器人技术研发有限公司 文本分类方法和装置
CN110569366B (zh) * 2019-09-09 2023-05-23 腾讯科技(深圳)有限公司 文本的实体关系抽取方法、装置及存储介质
US11095600B2 (en) * 2019-12-09 2021-08-17 Oracle International Corporation End-to-end email tag prediction

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106547733A (zh) * 2016-10-19 2017-03-29 中国国防科技信息中心 一种面向特定文本的命名实体识别方法
CN110502738A (zh) * 2018-05-18 2019-11-26 阿里巴巴集团控股有限公司 中文命名实体识别方法、装置、设备和查询系统
CN109101481A (zh) * 2018-06-25 2018-12-28 北京奇艺世纪科技有限公司 一种命名实体识别方法、装置及电子设备
CN110232183A (zh) * 2018-12-07 2019-09-13 腾讯科技(深圳)有限公司 关键词提取模型训练方法、关键词提取方法、装置及存储介质
CN110688854A (zh) * 2019-09-02 2020-01-14 平安科技(深圳)有限公司 命名实体识别方法、装置及计算机可读存储介质
CN111353310A (zh) * 2020-02-28 2020-06-30 腾讯科技(深圳)有限公司 基于人工智能的命名实体识别方法、装置及电子设备

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114036933A (zh) * 2022-01-10 2022-02-11 湖南工商大学 基于法律文书的信息抽取方法
CN114048293A (zh) * 2022-01-11 2022-02-15 广东拓思软件科学园有限公司 一种缺陷报告融合方法、装置、电子设备及存储介质
CN114841163A (zh) * 2022-03-31 2022-08-02 阿里巴巴(中国)有限公司 实体识别方法、装置、设备及存储介质
CN116822632A (zh) * 2023-08-28 2023-09-29 腾讯科技(深圳)有限公司 一种文本数据的推理方法、装置、存储介质和电子设备
CN116822632B (zh) * 2023-08-28 2024-01-05 腾讯科技(深圳)有限公司 一种文本数据的推理方法、装置、存储介质和电子设备

Also Published As

Publication number Publication date
CN111353310A (zh) 2020-06-30
CN111353310B (zh) 2023-08-11
US20220188521A1 (en) 2022-06-16

Similar Documents

Publication Publication Date Title
WO2021169400A1 (zh) 基于人工智能的命名实体识别方法、装置及电子设备
US10534863B2 (en) Systems and methods for automatic semantic token tagging
WO2022007823A1 (zh) 一种文本数据处理方法及装置
WO2020237856A1 (zh) 基于知识图谱的智能问答方法、装置及计算机存储介质
WO2023065211A1 (zh) 一种信息获取方法以及装置
US8577938B2 (en) Data mapping acceleration
KR102179890B1 (ko) 텍스트 데이터 수집 및 분석을 위한 시스템
CN111539197A (zh) 文本匹配方法和装置以及计算机系统和可读存储介质
CN107844533A (zh) 一种智能问答系统及分析方法
WO2024098524A1 (zh) 文本视频的互检索及模型训练方法、装置、设备及介质
CN108763202A (zh) 识别敏感文本的方法、装置、设备及可读存储介质
KR20150041908A (ko) 정답 유형 자동 분류 방법 및 장치, 이를 이용한 질의 응답 시스템
CN113704420A (zh) 文本中的角色识别方法、装置、电子设备及存储介质
CN116975199A (zh) 一种文本预测方法、装置、设备和存储介质
KR20240020166A (ko) Esg 보조 툴을 이용하여 정형화된 esg 데이터로 기계학습 모델을 학습하는 방법 및 기계학습 모델로 자동완성된 esg 문서를 생성하는 서비스 서버
CN115730597A (zh) 多级语义意图识别方法及其相关设备
CN114911915A (zh) 一种基于知识图谱的问答搜索方法、系统、设备和介质
CN114841138A (zh) 行间的机器阅读
CN112487154B (zh) 一种基于自然语言的智能搜索方法
US11501071B2 (en) Word and image relationships in combined vector space
CN112925983A (zh) 一种电网资讯信息的推荐方法及系统
US20240095445A1 (en) Systems and methods for language modeling with textual clincal data
CN114491076B (zh) 基于领域知识图谱的数据增强方法、装置、设备及介质
CN112347289B (zh) 一种图像管理方法及终端
CN118535715B (zh) 一种基于树状结构知识库的自动回复方法、设备及存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20921215

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20921215

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 16.02.2023)

122 Ep: pct application non-entry in european phase

Ref document number: 20921215

Country of ref document: EP

Kind code of ref document: A1