Machine learning program, machine learning method and natural language processing device

By separating named entity type and range recognition in machine learning models, the accuracy of named entity range estimation is improved, enhancing the performance of natural language processing tasks across different domains.

JP7534673B2Active Publication Date: 2024-08-15FUJITSU LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
JP2022563537
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2020-11-20
Publication Date
2024-08-15
Estimated Expiration
2040-11-20

AI Technical Summary

Technical Problem

Conventional machine learning models for named entity recognition integrate the recognition of named entity types and ranges, leading to insufficient accuracy in identifying the range of named entities, which can degrade the performance of downstream tasks.

Method used

A machine learning program and method that separate the recognition of named entity types from the recognition of their ranges, using training data to improve the accuracy of range estimation through a machine learning model that processes text, class information, and position information.

Benefits of technology

Enhances the recognition accuracy of named entity ranges, allowing for improved performance in natural language processing tasks by focusing on range estimation independently, simplifying the model structure, and accommodating various domains with increased training data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007534673000006
    Figure 0007534673000006
  • Figure 0007534673000001
    Figure 0007534673000001
  • Figure 0007534673000005
    Figure 0007534673000005
Patent Text Reader

Abstract

The present invention improves the accuracy of recognizing the range of a named entity. In this invention, a machine learning device (10) acquires training data (13) including: text (13a); class information (13b) indicating a class associated with one word included in the text (13a); position information (13c) indicating the position of one word in the text (13a); and range information (13d) indicating the range of a named entity including one word in the text (13a). The machine learning device (10) uses the training data (13) to execute machine learning of a machine learning model (14) for estimating range information of a named entity included in text from the text, class information, and position information.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to a machine learning program, a machine learning method, and a natural language processing device. [Background technology]

[0002] A text written in a natural language contains multiple words. A word is sometimes called a token. Two or more of the multiple words in a text may form a named entity (NE). A named entity is a linguistic expression that represents a specific entity. Named entities include proper nouns such as people, organization names, place names, and product names.

[0003] A task of natural language processing by a computer may include a subtask of recognizing a range of words that form a named entity from a string of words contained in text. The range of a named entity is sometimes called a span. For example, named entity recognition (NER), which recognizes the types of named entities contained in text, includes a subtask of recognizing the range of named entities. Named entity recognition is sometimes called named entity extraction. Relation extraction, which extracts relationships between multiple named entities from text, includes a subtask of recognizing the range of each named entity. Semantic role labeling, which recognizes dependency relationships between predicates and named entities, includes a subtask of recognizing the range of a named entity.

[0004] A phrase extraction method has been proposed to extract phrase pairs between an original sentence and a translation sentence. The proposed phrase extraction method selects an original phrase from the original sentence and estimates the boundaries of the translation phrase in the translation sentence based on a comparison between the words in the translation sentence and the words in the original phrase.

[0005] Also, a language processing device has been proposed that searches a term dictionary for term information corresponding to an input string. The proposed language processing device selects a range of a string, normalizes each word included in the selected range, and concatenates the normalized words. The language processing device calculates a hash value from the normalized string, and reads out term information associated with the hash value from the term dictionary.

[0006] Also, an answer generation device that generates an answer to a question has been proposed. The proposed answer generation device converts words contained in the question and words contained in a prepared document into vector expressions using a machine learning model. The answer generation device uses the vector expressions to calculate a score indicating the degree of compatibility with the question for a range of words contained in the document. [Prior art documents] [Patent documents]

[0007] [Patent Document 1] US Patent Application Publication No. 2008 / 0004863 [Patent Document 2] JP 2013-196478 A [Patent Document 3] International Publication No. 2020 / 174826 Summary of the Invention [Problem to be solved by the invention]

[0008] Natural language processing tasks may utilize machine learning models generated from training data by machine learning. The machine learning models may be, for example, neural networks. Traditionally, natural language processing tasks that include the recognition of a range of named entities as a subtask often utilize machine learning models for named entity recognition.

[0009] However, a machine learning model for named entity recognition performs recognition of the range of named entities and recognition of the type of named entities in an integrated manner, without separating them. The recognition accuracy of the range of named entities itself by a machine learning model for named entity recognition may not be sufficiently high. As a result, noise contained in the recognition result of the range of named entities may reduce the accuracy of the main task. Therefore, in one aspect, the present invention aims to improve the recognition accuracy of the range of named entities. [Means for solving the problem]

[0010] In one aspect, a machine learning program is provided that causes a computer to execute a process of acquiring training data including a first text, first class information indicating a class associated with one word included in the first text, first position information indicating a position of the one word in the first text, and first range information indicating a range of a first named entity including the one word in the first text, and executing machine learning of a machine learning model for estimating range information of a named entity included in the text from the text, the class information, and the position information based on the training data. Also, in one aspect, a machine learning method is provided.

[0011] In one aspect, a natural language processing device is provided, comprising: a memory unit that stores text and a machine learning model; and a control unit that generates input data including the text, class information indicating a class associated with a single word contained in the text, and position information indicating the position of the single word in the text, inputs the input data to the machine learning model, and generates range information indicating the range of named entities that include the single word in the text. Effect of the Invention

[0012] In one aspect, it improves recognition accuracy for a range of named entities. The above and other objects, features and advantages of the present invention will become apparent from the following description taken in conjunction with the accompanying drawings illustrating preferred embodiments of the present invention. [Brief description of the drawings]

[0013] [Figure 1] FIG. 1 is a diagram for explaining a machine learning device according to a first embodiment. [Diagram 2] FIG. 11 is a diagram for explaining a natural language processing apparatus according to a second embodiment. [Diagram 3] FIG. 13 illustrates an example of hardware of an information processing apparatus according to a third embodiment. [Figure 4] FIG. 13 is a diagram illustrating a first example of relationship extraction using named entity recognition. [Diagram 5] FIG. 13 is a diagram illustrating a second example of relationship extraction using named entity recognition. [Figure 6] FIG. 1 is a diagram illustrating an example of a flow of natural language processing using a span retrieval model. [Figure 7] FIG. 13 is a diagram illustrating an example of training data for generating a span retrieval model. [Figure 8] FIG. 2 is a diagram illustrating an example of the structure of a named entity recognition model. [Figure 9] FIG. 13 is a diagram illustrating an example of the structure of a span search model. [Figure 10] FIG. 2 is a block diagram showing an example of functions of the information processing device; [Figure 11] 1 is a flowchart showing an example of a machine learning procedure. [Figure 12] 1 is a flowchart illustrating an example of a procedure for natural language processing. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0014] Hereinafter, the present embodiment will be described with reference to the drawings. First, a first embodiment will be described. FIG. 1 is a diagram for explaining a machine learning device of the first embodiment. A machine learning device 10 of the first embodiment generates a machine learning model for recognizing a range that forms one named entity from a word string included in a text by machine learning. The range of the named entity recognized by the machine learning model may be called a span. Recognition of a span may be called a span query or span selection. A machine learning model for recognizing a span may be called an SQM (Span Query Model). The machine learning device 10 may be a client device or a server device. The machine learning device 10 may be called a computer, an information processing device, or a natural language processing device.

[0015] The machine learning device 10 has a storage unit 11 and a control unit 12. The storage unit 11 may be a volatile semiconductor memory such as a random access memory (RAM). The storage unit 11 may also be a non-volatile storage such as a hard disk drive (HDD) or a flash memory. The control unit 12 is a processor such as a central processing unit (CPU), a graphics processing unit (GPU), or a digital signal processor (DSP). The control unit 12 may include an electronic circuit for a specific purpose such as an application specific integrated circuit (ASIC) or a field programmable gate array (FPGA). The processor executes a program stored in a memory such as a RAM (which may be the storage unit 11). A set of multiple processors may be called a multiprocessor or simply a "processor."

[0016] The storage unit 11 stores training data 13. The training data 13 may be generated by the control unit 12. The training data 13 includes text 13a, class information 13b, location information 13c, and range information 13d. The text 13a, the class information 13b, and the location information 13c are input data corresponding to explanatory variables of the machine learning model 14. The range information 13d is teacher data corresponding to a target variable of the machine learning model 14.

[0017] The text 13a is a document written in a natural language. The text 13a includes character strings. The character strings are divided into words. The words are sometimes called tokens. For example, the text 13a includes the words w1, w2, w3, w4, w5, and w6.

[0018] The class information 13b indicates a class associated with one word included in the text 13a. For example, the class information 13b indicates a class associated with the word w3. The class indicated by the class information 13b may be a class to be determined by another machine learning model. For example, the class may be a type of named entity recognized by a named entity recognition model, a type of relationship recognized by a relationship extraction model, or a type of role recognized by a semantic role assignment model.

[0019] The position information 13c indicates the position in the text 13a of the same word as the class information 13b. The position information 13c may be a position number indicating the position of the word of interest from the beginning of the text 13a. For example, the position information 13c indicates that the word is the third word.

[0020] The range information 13d indicates the range of the named entity including the word indicated by the position information 13c in the text 13a. A named entity is a linguistic expression that indicates a specific entity. A named entity includes proper nouns such as a person's name, an organization's name, a place name, and a product name. The range of a named entity may be called a span. Two or more words out of a plurality of words included in the text 13a may form one named entity. The range of the named entity indicates those two or more words. The two or more words included in the named entity may be discontinuous in the text 13a.

[0021] The range information 13d may represent the range of the named entity in the BIO format. The range information 13d in the BIO format is a symbol string in which "B", "I", or "O" is assigned to each word included in the text 13a. B (Beginning) indicates that the word is the first word included in the named entity. I (Inside) indicates that the word is the second or higher word included in the named entity. O (Outside) indicates that the word is not included in the named entity. For example, the range information 13d is a symbol string of "OBIIOO". This range information 13d indicates that the words w2, w3, and w4 form one named entity. The training data 13 may include multiple sets of class information 13b, position information 13c, and range information 13d.

[0022] The control unit 12 acquires training data 13. The control unit 12 may generate the training data 13 from text 13a. The control unit 12 may also generate the training data 13 by converting training data for another machine learning model that outputs class information 13b. The control unit 12 executes machine learning of the machine learning model 14 based on the training data 13. The machine learning model 14 is, for example, a neural network. The neural network includes weights of edges between nodes as parameters whose values ​​are determined through machine learning.

[0023] The machine learning model 14 accepts input data including text, class information, and location information. Based on the input data, the machine learning model 14 estimates range information indicating the range of a named entity including a word indicated by the location information. For example, the machine learning model 14 converts each of a plurality of words included in the text 13a into a word vector of a distributed representation. The number of dimensions of the word vector is, for example, about several hundred dimensions, such as 300 dimensions. The machine learning model 14 also converts the class information into a class vector of a distributed representation. The number of dimensions of the class vector is, for example, the same as that of the word vector. The machine learning model 14 concatenates the word vector of each word, the class vector, and the word vector of the word indicated by the location information. The machine learning model 14 converts the concatenated vector into range information.

[0024] In machine learning, the control unit 12 uses the text 13a, the class information 13b, and the position information 13c as input data, and uses the range information 13d as teacher data. For example, the control unit 12 inputs the text 13a, the class information 13b, and the position information 13c to the machine learning model 14, and reads out the estimated range information from the machine learning model 14. The control unit 12 calculates the error between the range information 13d, which is the teacher data, and the estimated range information, and updates the values ​​of the parameters included in the machine learning model 14 so as to reduce the error. For example, the control unit 12 updates the values ​​of the parameters by the error backpropagation method.

[0025] As a result, the control unit 12 generates the machine learning model 14 from the training data 13. The control unit 12 may store the machine learning model 14 in a non-volatile storage. Furthermore, the control unit 12 may display information about the machine learning model 14 on a display device. Furthermore, the control unit 12 may transmit the machine learning model 14 to another information processing device.

[0026] As described above, the machine learning device 10 of the first embodiment acquires training data 13 including text 13a, class information 13b, location information 13c, and range information 13d. The machine learning device 10 executes machine learning of the machine learning model 14 for estimating range information of a named entity from the text, class information, and location information, based on the training data 13. By using the machine learning model 14, the accuracy of recognizing the range of a named entity is improved.

[0027] An information processing device may determine the range of named entities by using a named entity recognition model before executing a main task of natural language processing. However, a typical named entity recognition model performs integrated recognition of named entity classes associated with each word and recognition of the range of words belonging to the same named entity. When focusing on the range of named entities, the accuracy of estimation of the range of named entities by a named entity recognition model may not be sufficiently high. Therefore, the accuracy limit of a named entity recognition model may cause a decrease in the accuracy of the main task.

[0028] Furthermore, named entity recognition models are often specialized for a specific text field in order to improve the accuracy of estimating named entity classes. A text field is sometimes called a domain. Domains include the medical field, the political and economic fields, and the like. For machine learning of a named entity recognition model for a specific domain, text from that domain is used. Therefore, there may be a small amount of training data available for machine learning of the named entity recognition model, and as a result, the accuracy of the named entity recognition model may not be improved sufficiently.

[0029] In contrast, the machine learning model 14 generated by the machine learning device 10 performs recognition of the range of named entities separately from main tasks such as named entity recognition, relation extraction, and semantic role assignment. Therefore, it is easy to improve the recognition accuracy of the range of named entities. In addition, the machine learning model 14 can cooperate with machine learning models of different types of main tasks and can cooperate with machine learning models for different domains. Therefore, the machine learning device 10 can generate training data 13 from texts of various domains, and can increase the size of the training data 13 to improve the accuracy of the machine learning model 14.

[0030] Furthermore, the machine learning model of the main task does not need to estimate the range of named entities, and does not need to output information on the range of named entities. Furthermore, the machine learning model of the main task does not need to assume that the range of named entities is accurately recognized. This makes it easy to implement the machine learning model of the main task, and also makes it easier to improve the accuracy of the main task. Furthermore, the information processing device can also connect the machine learning model 14 to the rear stage of the machine learning model of the main task. The information processing device may input class information output by the machine learning model of the main task to the machine learning model 14. This allows the information processing device to efficiently recognize the range of named entities.

[0031] Next, a second embodiment will be described. FIG. 2 is a diagram for explaining a natural language processing device of the second embodiment. A natural language processing device 20 of the second embodiment uses a machine learning model to recognize a range that forms one named entity from among a string of words contained in a text. The natural language processing device 20 may be a client device or a server device. The natural language processing device 20 may be the same as or different from the machine learning device 10 of the first embodiment. The natural language processing device 20 may be called a computer or an information processing device.

[0032] The natural language processing device 20 has a storage unit 21 and a control unit 22. The storage unit 21 may be a volatile semiconductor memory such as a RAM. The storage unit 21 may also be a non-volatile storage such as a HDD or a flash memory. The control unit 22 is, for example, a processor such as a CPU, a GPU, or a DSP. The control unit 22 may include an electronic circuit for a specific purpose such as an ASIC or an FPGA. The processor executes a program stored in a memory such as a RAM.

[0033] The storage unit 21 stores the text 23a and the machine learning model 24. The text 23a is a document written in a natural language. The text 23a includes a plurality of words. The machine learning model 24 accepts input data including the text, class information, and location information. The machine learning model 24 estimates range information indicating the range of a named entity including a word indicated by the location information based on the input data. The machine learning model 24 may be generated in a similar manner to the machine learning device 10 of the first embodiment. The machine learning model 24 may be the same as the machine learning model 14 of the first embodiment. The natural language processing device 20 may receive the machine learning model 24 from outside the natural language processing device 20.

[0034] The control unit 22 generates input data 23 including text 23a, class information 23b, and position information 23c. The class information 23b indicates a class associated with one word included in the text 23a. The class information 23b may be the output of a machine learning model of the main task. For example, the class information 23b may indicate the type of named entity recognized by a named entity recognition model, may indicate the type of relationship recognized by a relationship extraction model, or may indicate the type of role recognized by a semantic role assignment model. The position information 23c indicates the position in the text 23a of the same word as the class information 23b.

[0035] The control unit 22 inputs the input data 23 to the machine learning model 24 to generate range information 23d. The range information 23d is output from the machine learning model 24. The range information 23d indicates the range of named entities that include the word indicated by the position information 23c. The range information 23d is, for example, a symbol string that represents the range of the named entity in BIO format.

[0036] The control unit 22 may store the range information 23d in a non-volatile storage. The control unit 22 may also display the range information 23d on a display device. The control unit 22 may also transmit the range information 23d to another information processing device. The control unit 22 may also generate a result of natural language processing for the text 23a by synthesizing an output of the machine learning model of the main task and the range information 23d. The control unit 22 may store the synthesized result in a non-volatile storage. The control unit 22 may also display the synthesized result on a display device. The control unit 22 may also transmit the synthesized result to another information processing device.

[0037] As described above, the natural language processing apparatus 20 according to the second embodiment generates input data 23 including text 23a, class information 23b, and location information 23c. The natural language processing apparatus 20 inputs the input data 23 to the machine learning model 24 to generate range information 23d indicating the range of a named entity. This improves the accuracy of recognizing the range of a named entity.

[0038] A string of words forming one named entity may be discontinuous in the text 23a. Also, one word included in the text 23a may belong to two or more named entities. That is, two or more named entities may overlap in the text 23a. Also, two or more named entities may be nested. When using a named entity recognition model to recognize the range of a named entity, the structure of the named entity recognition model becomes complex in order to output information on such a complex named entity.

[0039] In response to this, the machine learning model 24 outputs range information indicating the range of named entities containing one word of interest. When another word is specified, the machine learning model 24 outputs range information indicating the range of named entities containing the other word. Thus, the natural language processing device 20 can generate range information for complex named entities such as discontinuous named entities, multiple overlapping named entities, and multiple nested named entities. In addition, the structure of the machine learning model 24 is simplified, and the accuracy of the machine learning model 24 is improved.

[0040] Next, a third embodiment will be described. Fig. 3 is a diagram showing an example of hardware of an information processing device according to the third embodiment. An information processing device 100 according to the third embodiment includes a CPU 101, a RAM 102, a HDD 103, an image interface 104, an input interface 105, a medium reader 106, and a communication interface 107.

[0041] The information processing device 100 corresponds to the machine learning device 10 of the first embodiment and the natural language processing device 20 of the second embodiment. The CPU 101 corresponds to the control unit 12 of the first embodiment and the control unit 22 of the second embodiment. The RAM 102 or the HDD 103 corresponds to the storage unit 11 of the first embodiment and the storage unit 21 of the second embodiment.

[0042] The CPU 101 is a processor that executes instructions of a program. The CPU 101 loads at least a part of the program and data stored in the HDD 103 into the RAM 102 and executes the program. The information processing device 100 may have multiple processors. A collection of processors may be called a multiprocessor or simply a "processor."

[0043] The RAM 102 is a volatile semiconductor memory that temporarily stores programs executed by the CPU 101 and data used in calculations by the CPU 101. The information processing device 100 may have a type of volatile memory other than a RAM.

[0044] The HDD 103 is a non-volatile storage that stores software programs such as an OS (Operating System), middleware, and application software, and data. The information processing device 100 may have other types of non-volatile storage, such as a flash memory or an SSD (Solid State Drive).

[0045] The image interface 104 outputs an image to a display device 111 connected to the information processing device 100 in accordance with an instruction from the CPU 101. The display device 111 is, for example, a CRT (Cathode Ray Tube) display, a liquid crystal display, an organic EL (Electro Luminescence) display, or a projector. Other types of output devices such as a printer may be connected to the information processing device 100.

[0046] The input interface 105 receives an input signal from an input device 112 connected to the information processing device 100. The input device 112 is, for example, a mouse, a touch panel, or a keyboard. A plurality of input devices may be connected to the information processing device 100.

[0047] The medium reader 106 is a reading device that reads the program and data recorded on the recording medium 113. The recording medium 113 is, for example, a magnetic disk, an optical disk, or a semiconductor memory. The magnetic disk includes a flexible disk (FD) and a HDD. The optical disk includes a compact disc (CD) and a digital versatile disc (DVD). The medium reader 106 copies the program and data read from the recording medium 113 to another recording medium such as the RAM 102 or the HDD 103. The read program may be executed by the CPU 101.

[0048] The recording medium 113 may be a portable recording medium. The recording medium 113 may be used for distributing programs and data. The recording medium 113 and the HDD 103 may be called computer-readable recording media.

[0049] The communication interface 107 is connected to a network 114. The communication interface 107 communicates with other information processing devices via the network 114. The communication interface 107 may be a wired communication interface connected to a wired communication device such as a switch or a router. The communication interface 107 may also be a wireless communication interface connected to a wireless communication device such as a base station or an access point.

[0050] The information processing device 100 executes natural language processing such as named entity extraction, relation extraction, semantic role assignment, etc. for text written in a natural language. The information processing device 100 also generates a model used in the natural language processing through machine learning.

[0051] FIG. 4 is a diagram showing a first example of relationship extraction using named entity recognition. As natural language processing, the information processing device 100 may perform relationship extraction to extract relationships between multiple named entities. The relationship extraction includes, as a subtask, a span search to recognize spans of named entities to which labels can be assigned from among word strings included in text. The span search may be called a span query or span selection. As one method of implementing relationship extraction, a method in which the information processing device 100 executes named entity recognition as preprocessing can be considered.

[0052] As an example, the information processing device 100 uses a named entity recognition model to perform named entity recognition on the text 31. The named entity recognition model outputs a span of a named entity included in the text 31 and a label indicating a class of the named entity.

[0053] As a result, named entities 32, 33, 34, and 35 are extracted from text 31. Named entity 32 is "hazard ratio" and contains two words. Named entity 32 is assigned the class "Hazard Ratio (undetermined)". Named entity 33 is "low risk group" and contains three words. Named entity 33 is assigned the class "Condition". Named entity 34 is "HR" and contains one word. Named entity 34 is assigned the same class as named entity 32. Named entity 35 is "1.007" and contains one word. Named entity 35 is assigned the class "Unitless".

[0054] The information processing device 100 executes the main task of relationship extraction by inputting the output of the named entity recognition model into the relationship extraction model. The relationship extraction model outputs a label indicating the type of relationship between multiple named entities included in the text 31. As a result, it is extracted that named entities 32 and 35 have a relationship of "IS-A". It is also extracted that named entities 33 and 35 have a relationship of "WHEN". It is also extracted that named entities 34 and 35 have a relationship of "IS-A".

[0055] The named entities 32, 33, 34, and 35 are consecutive word strings in the text 31. However, a discontinuous word string in the text may form one named entity. The named entities 32, 33, 34, and 35 do not overlap in the text 31. However, one word included in the text may belong to multiple named entities, causing the multiple named entities to overlap. The named entities 32, 33, 34, and 35 do not form a nest in the text 31. However, multiple named entities may form a nest when one named entity includes all of the words included in another named entity.

[0056] Fig. 5 is a diagram showing a second example of relationship extraction using named entity recognition. As in Fig. 4, a case will be considered in which the information processing device 100 performs named entity recognition as preprocessing for relationship extraction. The information processing device 100 executes named entity recognition on a text 41.

[0057] As a result, named entities 42, 43, 44, and 45 are extracted from text 41. Named entity 42 is "cumulative incidences of non-relapse mortality" and contains five words. Named entity 42 is assigned to the class "Other endpoints (clinical)". Named entity 43 is "cumulative incidences of relapse" and contains four words. Named entity 43 is assigned to the class "Cumulative incidence of relapse". Named entity 44 is "13" and contains one word. Named entity 45 is "16%" and contains one word. Named entities 44 and 45 are assigned to the class "%".

[0058] The information processing device 100 executes the main task of relationship extraction using the result of named entity recognition. As a result, it is extracted that the named entities 42 and 44 have a relationship of "IS-A", and that the named entities 43 and 45 have a relationship of "IS-A".

[0059] Here, named entity 42 and named entity 43 overlap because they contain the common word sequence "cumulative incidences of." Also, named entity 43 is discontinuous in text 41 because it crosses the word sequence "non-relapse mortality and." As such, text may contain complex named entities.

[0060] In the above example, the information processing device 100 first recognizes the span of a named entity, and executes a main task such as relation extraction using the recognition result of the named entity span. However, a general named entity recognition model executes recognition of a named entity class and recognition of a named entity span in an integrated manner. When focusing on the named entity span, the estimation accuracy of the span by the named entity recognition model may not be sufficiently high. Therefore, the estimation accuracy of the named entity span may cause a decrease in the accuracy of the main task.

[0061] Furthermore, named entity recognition models are often specialized for a specific domain in order to improve the accuracy of estimating named entity classes. For machine learning of a named entity recognition model for a specific domain, text from that domain is used. Therefore, there may be a small amount of training data available for machine learning of the named entity recognition model, and as a result, the accuracy of span estimation by the named entity recognition model may not be improved sufficiently. Furthermore, in order for the named entity recognition model to output information on complex named entities as described above, the structure of the named entity recognition model becomes complex.

[0062] Therefore, the information processing device 100 of the third embodiment defines a general-purpose span search model for recognizing spans of named entities, separate from the named entity recognition model and other main task models. The span search model may be called a span query model (SQM) or a span selection model. The span search model is a neural network. The information processing device 100 generates the span search model by machine learning.

[0063] The span retrieval model is connected to the rear stage of the main task model. The span retrieval model uses the class estimation result by the main task model in addition to the text to determine the span of the named entity after the fact. The main task model does not need to accurately estimate the span of the named entity. The information processing device 100 generates a task result of natural language processing by combining the output of the main task model and the output of the span retrieval model.

[0064] 6 is a diagram showing an example of the flow of natural language processing using a span retrieval model. Information processing device 100 has a plurality of main task models such as main task models 51, 52, 53, 54, 55, and 56, and a span retrieval model 58. Main task models 51, 52, 53, 54, 55, and 56 are neural networks.

[0065] The main task model 51 is a named entity recognition model for domain A. The main task model 52 is a named entity recognition model for domain B. The main task model 53 is a relationship extraction model for domain A. The main task model 54 is a relationship extraction model for domain B. The main task model 55 is a semantic role assignment model for domain A. The main task model 56 is a semantic role assignment model for domain B. The span search model 58 can be combined with any of the main task models 51, 52, 53, 54, 55, and 56. That is, the span search model 58 can be combined with main task models for various purposes or main task models for various domains.

[0066] When analyzing text 57, information processing device 100 selects a main task model that matches the analysis purpose and the domain of text 57, and inputs text 57 to the selected main task model. The selected main task model assigns classes to some or all of the words included in text 57, and outputs class information.

[0067] For example, the named entity recognition model assigns a named entity class indicating the type of named entity to some of the words included in the text 57. The relationship extraction model assigns a relationship class indicating the type of relationship to some of the words included in the text 57. The semantic role assignment model assigns a role class indicating the type of dependency relationship with a predicate to some of the words included in the text 57.

[0068] In this case, the main task model does not need to output span information indicating the span of the named entity. Even if the task goal is to ultimately recognize a class on a named entity basis, the main task model only needs to assign a class to at least one word belonging to the named entity. Therefore, the main task model does not need to be aware of the boundaries of the span of the named entity, and does not need to generate accurate span information.

[0069] The information processing device 100 generates an input dataset for the span retrieval model 58 based on the output from the main task model. The input dataset includes multiple pairs of position information and class information. The position information indicates the position of a word to which a class is assigned by the main task model. The class information indicates the class assigned by the main task model. The main task model may assign two or more classes to the same word. Thus, the input dataset may include two or more records with the same position information but different class information. This makes it possible to define complex named entities such as overlapping and nesting.

[0070] The information processing device 100 extracts one pair of location information and class information from the input data set. The information processing device 100 inputs the extracted location information and class information and text 57 to a span search model 58. The span search model 58 identifies a word indicated by the location information from the text 57, estimates the span of a named entity to which the identified word belongs, and outputs span information. The information processing device 100 inputs different pairs of location information and class information to the span search model 58 to obtain span information of different named entities.

[0071] The span search model 58 estimates the span of named entities including a word of interest one by one, instead of estimating the spans of all named entities included in the text 57 at once. This simplifies the structure of the span search model 58. The span search model 58 can also accurately estimate the span of complex named entities such as overlapping and nesting.

[0072] The information processing device 100 generates a task result 59 by combining the output from the main task model and the output from the span retrieval model 58. For example, the main task model assigns labels that include class information but do not include span information to words included in the text 57. The information processing device 100 generates the task result 59 by adding the span information output by the span retrieval model 58 to the labels output by the main task model.

[0073] If the main task is named entity recognition, the task result 59 indicates the span of named entities and the class of named entities contained in the text 57. If the main task is relation extraction, the task result 59 indicates the span of each named entity and the class of relations between multiple named entities contained in the text 57. If the main task is semantic role assignment, the task result 59 indicates the span of named entities contained in the text 57 and the class of dependency relations between named entities and predicates.

[0074] The main task models 51, 52, 53, 54, 55, and 56 and the span retrieval model 58 are generated by machine learning. The information processing device 100 can generate both training data for the main task models and training data for the span retrieval model 58 from a common text to which a teacher label is added. The teacher label added to the text indicates the span of a named entity and a class associated with the named entity.

[0075] The training data for the main task model includes text as input data, and includes position information of words belonging to the named entity and class information of the class associated with the named entity as teacher data. The training data for the span retrieval model 58 includes text, position information, and class information as input data, and includes span information indicating the span of the named entity as teacher data.

[0076] FIG. 7 is a diagram showing an example of training data for generating a span search model. The training data includes text 61. The character string of text 61 is the same as text 41 of FIG. 5. Information processing device 100 divides the character string included in text 61 into words, and assigns a natural number position number in ascending order to each word from the beginning of text 61. "cumulative" is at position #15, "incidences" at position #16, "of" at position #17, "non-relapse" at position #18, "mortality" at position #19, "and" at position #20, "relapse" at position #21, "were" at position #22, "13" at position #23, "and" at position #24, and "16%" at position #25.

[0077] The training data also includes a table 62. The table 62 includes a number of records that associate a position number with a class and a span. The position number indicates one word in the text 61. The class is a class of named entities that includes the word indicated by the position number. The span indicates whether each word in the text 61 belongs to a named entity or not. The span is represented by a symbol string in the BIO format. The length of the symbol string is the same as the number of words included in the text 61. The first word of a named entity is represented by "B", words other than the first word included in the named entity are represented by "I", and words not included in the named entity are represented by "O".

[0078] Text 61 contains named entity 42 "cumulative incidences of non-relapse mortality" whose class is "Other endpoints (clinical)". Thus, table 62 contains a record with position number #15, class "Other endpoints (clinical)", and span "BIIIIOOOOOO". Similarly, table 62 contains records with the same class and span as above, and position numbers #16, #17, #18, and #19, respectively.

[0079] Also, text 61 includes named entity 43 "cumulative incidences of relapse" whose class is "Cumulative incidence of relapse". Therefore, table 62 includes a record whose position number is #15, whose class is "Cumulative incidence of relapse", and whose span is "BIIOOOIOOOO". Similarly, table 62 includes records whose class and span are the same as above, and whose position numbers are #16, #17, and #21, respectively.

[0080] Next, the structures of the named entity recognition model and span search model 58 will be described. Fig. 8 is a diagram showing an example of the structure of the named entity recognition model. The named entity recognition model includes a distributed representation model 131, an encoder 132, and a feedforward neural network 133. The named entity recognition model extracts multiple consecutive words from text. The number N of words extracted at one time is, for example, 128, 256, 512, etc.

[0081] The named entity recognition model inputs multiple words into the distributed representation model 131, and generates distributed representation word vectors w1, w2, ..., w i ,…,w N The word vector is a column vector in which multiple numerical values ​​are listed. The number of dimensions of the word vector is, for example, several hundred dimensions, such as 300 dimensions. The word vector output by the distributed representation model 131 is a word vector that does not take into account the context.

[0082] The distributed representation model 131 is a neural network generated through machine learning. For example, the distributed representation model 131 accepts a one-hot vector in which the value of the dimension corresponding to the word of interest is 1 and the values ​​of the other dimensions are 0. The distributed representation model 131 converts the one-hot vector into a word vector with a number of dimensions of about several hundred.

[0083] The named entity recognition model is a set of word vectors w1, w2, …, w i ,…,wN is input to the encoder 132, the word vectors e1, e2, ..., e i ,…,e N Unlike the distributed representation model 131, N word vectors are input to the encoder 132 at the same time. The word vectors output by the encoder 132 are word vectors that take into account the context. Therefore, even for the same word, different word vectors can be generated depending on the words before and after it. The encoder 132 is a neural network generated through machine learning. The encoder 132 is, for example, BERT (Bidirectional Encoder Representations from Transformers). BERT includes 24 layers of Transformers stacked in series. Each Transformer converts the input vector into another vector.

[0084] The named entity recognition model is a set of word vectors e1, e2, …, e i ,…,e N The tag scores s1, s2, ..., s are obtained by inputting the i ,…,s N N word vectors are input to the feedforward neural network 133 at the same time. Therefore, the input to the feedforward neural network 133 is the word vectors e1, e2, ..., e i ,…,e N The feedforward neural network 133 is a forward neural network that does not include a feedback path.

[0085] The tag score for a word includes multiple non-negative integers corresponding to multiple classes. The number of a class indicates the probability that the word belongs to that class. A typical named entity recognition model uses tag scores s1,s2,…,s i ,…,s N Based on this, the class and span of each named entity are determined so as to maximize the overall probability.

[0086] On the other hand, the named entity recognition model does not need to determine the span of the named entity. The named entity recognition model may assign two or more classes to the same word. For example, the named entity recognition model selects all classes whose probabilities exceed a threshold from the tag scores for each of multiple words, and assigns the selected class to the word. Thus, the named entity recognition model can also recognize classes of overlapping or nested named entities.

[0087] 9 is a diagram showing an example of the structure of a span retrieval model. The span retrieval model 58 includes a distributed representation model 141, an encoder 142, a distributed representation model 143, a feedforward neural network 144, and a conditional random field (CRF) model 145. The span retrieval model 58 extracts multiple consecutive words from text. The number N of words extracted at one time is the same as that of the named entity recognition model.

[0088] The span search model 58 inputs multiple words into the distributed representation model 141, and obtains word vectors w1, w2, ..., w i ,…,w N The distributed representation model 141 may be the same as the distributed representation model 131. The span search model 58 generates a word vector w1, w2, ..., w i ,…,w N is input to the encoder 142, the word vectors e1, e2, ..., e i ,…,e N The encoder 142 may be the same as the encoder 132.

[0089] The span retrieval model 58 considers word vectors e1, e2, …, e i ,…,e N The word vector e corresponding to the specified position number #i is i Select the word vector e iis the word vector of the i-th word. The span search model 58 generates a class vector c of the distributed representation by inputting the specified class to the distributed representation model 143. The class vector c is a column vector that lists multiple numerical values. The number of dimensions of the class vector c is, for example, several hundred dimensions, such as 300 dimensions. The number of dimensions of the class vector c is the number of dimensions of the word vectors e1, e2, ..., e i ,…,e N The number of dimensions may be the same as that of

[0090] The distributed representation model 131 is a neural network generated through machine learning. For example, the distributed representation model 143 accepts a one-hot vector in which the numerical value of a dimension corresponding to a specified class is 1 and the numerical values ​​of other dimensions are 0. The distributed representation model 143 converts the one-hot vector into a class vector c having several hundred dimensions. The structure of the distributed representation model 143 may be the same as that of the distributed representation model 141.

[0091] The span retrieval model 58 considers word vectors e1, e2, …, e i ,…,e N and the word vector e i and class vector c are input to the feedforward neural network 144. N+2 vectors are input to the feedforward neural network 144 at the same time. Therefore, the input to the feedforward neural network 144 is the word vectors e1, e2, ..., e i ,…,e N and the word vector e i and the class vector c. The feedforward neural network 144 is a forward neural network that does not include a feedback path.

[0092] The feedforward neural network 144 generates N tag scores corresponding to the N words. The tag score for a word includes non-negative integers corresponding to span tags. The span tags are B, I, and O. The numeric value of a span tag indicates the probability that the word is given that span tag.

[0093] The span retrieval model 58 retrieves span tags t1, t2, ..., t corresponding to N words by inputting N tag scores to the CRF model 145. i ,…,t N The CRF model 145 is a neural network. The string of span tags must contain only one "B", with the constraint that "I" does not appear before "B". However, "O" may exist between "B" and "I", and "O" may exist between "I" and "I". In other words, two or more words contained in a named entity may be discontinuous. The CRF model 145 generates span tags t1, t2, ..., t that maximize the probability within the range that satisfies the constraints, based on the tag scores of N words. i ,…,t N Explore combinations of.

[0094] Next, a description will be given of functions and processing procedures of the information processing device 100. Fig. 10 is a block diagram showing an example of functions of the information processing device. The information processing device 100 has a text storage unit 121, a model storage unit 122, a task result storage unit 123, a training data generation unit 124, a model generation unit 125, a task execution unit 126, and a span estimation unit 127.

[0095] The text storage unit 121, the model storage unit 122, and the task result storage unit 123 are implemented, for example, using the storage areas of the RAM 102 or the HDD 103. The training data generation unit 124, the model generation unit 125, the task execution unit 126, and the span estimation unit 127 are implemented, for example, using a program executed by the CPU 101.

[0096] The text storage unit 121 stores text written in a natural language. The text storage unit 121 stores text for machine learning to which a teacher label has been added. The text storage unit 121 also stores text to be analyzed to which a teacher label has not been added.

[0097] The model storage unit 122 stores a main task model and a span search model. The model storage unit 122 may store a plurality of types of main task models. The main task model may be generated by the information processing device 100 or may be generated by another information processing device. The span search model is generated by the information processing device 100.

[0098] The task result storage unit 123 stores task results indicating the results of natural language processing tasks executed on the text to be analyzed. The task results are, for example, the results of named entity recognition, the results of relation extraction, or the results of semantic role assignment. The task results include labels associated with words in the text. The labels include class information and span information.

[0099] The training data generation unit 124 generates training data for machine learning of the span retrieval model. The training data generation unit 124 reads the teacher-labeled text from the text storage unit 121. The training data generation unit 124 extracts words belonging to named entities from the teacher-labeled text, and comprehensively generates pairs of the position numbers of the words and classes associated with the named entities. The training data generation unit 124 also generates a BIO representation of the span of the named entity. The training data generation unit 124 generates training data including the text, the position numbers, the classes, and the spans.

[0100] The model generation unit 125 executes machine learning of the span retrieval model using the training data generated by the training data generation unit 124. For example, the model generation unit 125 optimizes the weights of edges included in the neural network by backpropagation. The model generation unit 125 inputs the text, position number, and class included in the training data to the span retrieval model. The model generation unit 125 calculates the error between the estimated span output by the span retrieval model and the correct span included in the training data, and updates the parameter values ​​so as to reduce the error. The model generation unit 125 stores the generated span retrieval model in the model storage unit 122.

[0101] Task execution unit 126 reads out text to be analyzed from text storage unit 121. Task execution unit 126 also reads out a main task model from model storage unit 122. The text to be analyzed and the main task are specified by the user. Task execution unit 126 inputs the text to the main task model, and passes the text and the output of the main task model to span estimation unit 127. Task execution unit 126 obtains span information from span estimation unit 127, and generates a task result by combining the output of the main task model and the span information.

[0102] The task execution unit 126 outputs the task result. For example, the task execution unit 126 stores the task result in the task result storage unit 123. Also, for example, the task execution unit 126 displays the task result on the display device 111. Also, for example, the task execution unit 126 transmits the task result to another information processing device.

[0103] The span estimation unit 127 reads out the span retrieval model from the model storage unit 122. The span estimation unit 127 generates an input data set including text, position numbers, and classes. The span estimation unit 127 inputs pairs of position numbers and classes, in addition to the text, one by one into the span retrieval model to generate span information of a named entity including a word indicated by the position number. The span estimation unit 127 passes the generated set of span information to the task execution unit 126.

[0104] 11 is a flowchart showing an example of a machine learning procedure. The training data generation unit 124 reads out text to which a teacher label indicating the span of a named entity and a class assigned to the named entity is added (S10). The training data generation unit 124 selects one word included in the named entity from the teacher label text. The training data generation unit 124 calculates a position number indicating the position of the selected word in the text. In addition, the training data generation unit 124 identifies a class associated with the named entity to which the selected word belongs (S11).

[0105] The training data generation unit 124 generates a BIO representation of the span of the named entity to which the selected word belongs. The BIO representation of the span has a length corresponding to the number of words contained in the text. The first word of the span is represented by "B", words contained in the span other than the first word are represented by "I", and words not contained in the span are represented by "O" (S12). The training data generation unit 124 adds a record including the position number and class of step S11 and the BIO representation of the span of step S12 to the training data (S13).

[0106] The training data generation unit 124 judges whether all words belonging to the named entity have been selected from the teacher-labeled text. If all words have been selected, the process proceeds to step S15; otherwise, the process returns to step S11 (S14).

[0107] The model generation unit 125 converts each of the multiple words included in the text into a word vector of a distributed representation. The word vector generated here is preferably a word vector that takes into account the context (S15). The model generation unit 125 selects one record from the training data. The model generation unit 125 selects one word vector from the multiple word vectors of step S15 according to the position number included in the selected record (S16).

[0108] The model generation unit 125 converts the classes included in the selected records into class vectors of the distributed representation (S17). The model generation unit 125 generates a concatenated vector by concatenating the multiple word vectors generated in step S15, the word vector selected in step S16, and the class vector generated in step S17. The model generation unit 125 estimates the BIO representation of the span from the concatenated vector (S18).

[0109] The model generation unit 125 evaluates the error between the estimated span in step S18 and the correct span included in the selected record. The model generation unit 125 updates the parameter values ​​of the span retrieval model so as to reduce the error (S19). The model generation unit 125 determines whether the iterations of steps S16 to S19 have reached a predetermined number of times. If the iterations have reached the predetermined number of times, the process proceeds to step S21, otherwise the process returns to step S16. The model generation unit 125 saves the span retrieval model (S21).

[0110] 12 is a flowchart showing an example of a procedure for natural language processing. The task execution unit 126 reads out the text to be analyzed and the main task model (S30). The task execution unit 126 inputs the text into the main task model and executes the main task. The output of the main task model does not need to include span information of named entities (S31).

[0111] The span estimation unit 127 reads out the span search model (S32). The span estimation unit 127 generates a data set that associates position numbers indicating the positions of words with classes assigned to the words from the output of the main task model in step S31. The data set includes a plurality of records with different combinations of position numbers and classes (S33).

[0112] The span estimation unit 127 converts each of the multiple words included in the text into a word vector of the distributed representation. The word vector generated here is preferably a word vector that takes into account the context (S34). The span estimation unit 127 selects one record from the dataset. From the multiple word vectors of step S34, the span estimation unit 127 selects one word vector according to the position number included in the selected record (S35).

[0113] The span estimation unit 127 converts the classes included in the selected records into class vectors of the distributed representation (S36). The span estimation unit 127 generates a concatenated vector by concatenating the multiple word vectors generated in step S34, the word vector selected in step S35, and the class vector generated in step S36. The span estimation unit 127 estimates the BIO representation of the span from the concatenated vector (S37).

[0114] The span estimation unit 127 determines whether all records have been selected from the data set. If all records have been selected, the process proceeds to step S39; otherwise, the process returns to step S35 (S38). The task execution unit 126 combines the output of the main task model with the BIO representation of the span estimated in step S37 (S39).

[0115] For example, suppose that a certain word is given a label of "class X" by the main task model and a label of "I" by the span search model. In this case, the task execution unit 126 combines the two labels to generate a label of "I-class X." In addition, suppose that a word preceding the word "I-class X" is not given a label by the main task model and is given a label of "B" by the span search model. In this case, the task execution unit 126 gives the word a label of "B-class X." In this way, the task execution unit 126 complements the output of the main task model, which does not represent an accurate span, with information on the span estimated by the span search model.

[0116] The task execution unit 126 outputs the task result combined in step S39. For example, the task execution unit 126 stores the task result in the task result storage unit 123. Also, for example, the task execution unit 126 displays the task result on the display device 111. Also, for example, the task execution unit 126 transmits the task result to another information processing device (S40).

[0117] As described above, the information processing device 100 of the third embodiment generates a span search model that estimates the span of a named entity to which a word belongs from a text, a word position number, and a class associated with the word through machine learning. The information processing device 100 then estimates the span of the named entity by connecting the span search model to the rear stage of the main task model. By using the span search model separated from various main task models, the information processing device 100 can accurately estimate the span of the named entity.

[0118] The information processing device 100 can use texts for various tasks and texts from various domains as training data for machine learning of the span search model. Therefore, the information processing device 100 can increase the amount of training data and improve the accuracy of the span search model. For example, the information processing device 100 can improve the accuracy of the span search model by using both texts in the medical field and texts in the political and economic fields.

[0119] Furthermore, the information processing device 100 can improve the accuracy of span estimation without being affected by the accuracy of main tasks such as named entity recognition, relation extraction, and semantic role assignment. Also, it is possible to prevent the accuracy of the main task from being reduced due to the accuracy of span estimation. Furthermore, by separating span estimation from various main task models, it becomes easier to implement the main task model, and the accuracy of the main task itself is improved. In particular, since span estimation is performed after the fact, the main task model does not need to be aware of the boundaries of spans of named entities.

[0120] In addition, the span search model estimates the span of named entities that contain a single word of interest. Therefore, the span search model can accurately estimate the span of complex named entities, such as named entities that are discontinuous in the text, overlapping named entities, and nested named entities. In addition, the structure of the span search model is simplified.

[0121] The foregoing merely illustrates the principles of the present invention. Further, since numerous modifications and changes are possible to those skilled in the art, the present invention is not limited to the exact construction and application shown and described above, and all corresponding modifications and equivalents are deemed to be within the scope of the present invention according to the appended claims and their equivalents. [Explanation of symbols]

[0122] 10 Machine Learning Device 11,21 Storage section 12,22 Control section 13 Training data 13a,23a Text 13b,23b Class Information 13c,23c Location information 13d,23d range information 14,24 Machine learning models 20 Natural Language Processing Device 23 Input Data

Claims

1. acquiring training data including a first text, first class information indicating a class associated with one word included in the first text, first position information indicating a position of the one word in the first text, and first range information indicating a range of a first named entity including the one word in the first text; Executing machine learning of a machine learning model for estimating range information of a named entity contained in the text from the text, class information, and position information based on the training data; A machine learning program that causes a computer to execute processing.

2. The first class information indicates a class assigned to the one word based on the first text by another machine learning model different from the machine learning model.

2. The machine learning program according to claim 1 .

3. the first range information is a code string indicating whether each of a plurality of words included in the first text belongs to a range of the first named entity; 2. The machine learning program according to claim 1 .

4. the machine learning model is a neural network for generating the range information based on a plurality of word vectors calculated from a plurality of words included in the text, a class vector calculated from the class information, and one word vector among the plurality of word vectors that corresponds to a word indicated by the position information; 2. The machine learning program according to claim 1 .

5. acquiring training data including a first text, first class information indicating a class associated with one word included in the first text, first position information indicating a position of the one word in the first text, and first range information indicating a range of a first named entity including the one word in the first text; Executing machine learning of a machine learning model for estimating range information of a named entity contained in the text from the text, class information, and position information based on the training data; A machine learning method characterized in that processing is executed by a computer.

6. A storage unit that stores text and a machine learning model; a control unit that generates input data including the text, class information indicating a class associated with one word included in the text, and position information indicating a position of the one word in the text, and inputs the input data to the machine learning model to generate range information indicating a range of named entities including the one word in the text; A natural language processing device comprising:

7. The control unit further executes a process of inputting the text to another machine learning model different from the machine learning model to generate the class information and the position information, and a process of synthesizing the range information and an output of the other machine learning model. The natural language processing apparatus according to claim 6 .

Citation Information

Patent Citations

  • Language processing apparatus, program and method

    JP2013196478A

  • JPP7440797B

  • Efficient phrase pair extraction from bilingual word alignments

    US20080004863A1

  • Smart selection of text spans

    US20150100524A1

  • Answer generating device, answer learning device, answer generating method, and answer generating program

    WO2020174826A1