Information processing program, information processing method, and information processing device
Patent Information
- Application Number
- PCT/JP2024/002013
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-03-02
- Filing Date
- 2024-01-24
- Publication Date
- 2024-09-06
Smart Images

Figure JP2024002013_06092024_PF_FP
Abstract
Description
Information processing program, information processing method, and information processing device
[0001] The present invention relates to an information processing program, an information processing method, and an information processing device.
[0002] In natural language processing using a machine learning model, character string data such as text that is input to the machine learning model may be divided into smaller units, such as tokens. A token is one or more character strings (phrases, words) obtained by dividing the character string data at one or more positions.
[0003] For example, if the text is "foreigners' right to vote," splitting it in a certain way will yield the tokens "foreigners," "voting," and "rights." Also, if the text is "award for best actor," splitting it in a certain way will yield the tokens "a," "ward," "for," "b," "est," and "actor."
[0004] Hereinafter, for convenience, tokens may be referred to as "words." "Words" may include, for example, general words such as "foreigner" and "award," as well as subwords such as "koku" and "est." The process of dividing character string data into tokens may be referred to as "word division" or "tokenization."
[0005] The way text is divided in word segmentation, in other words, the segmentation pattern, can affect the performance of natural language processing using machine learning models, such as the accuracy of inference results output by the machine learning model. This means that by changing the segmentation pattern, it may be possible to improve the performance of natural language processing without having to adjust the parameters of a trained machine learning model.
[0006] For example, a known technique is to simultaneously optimize (adjust) a word segmentation unit (lexical segmentation unit) that performs word segmentation and a machine learning model that is downstream of the word segmentation unit (hereinafter referred to as the "downstream model") by launching them in parallel.
[0007] In this method, for example, input data containing multiple texts is input into a word segmenter, and the resulting segmented text is input into a subsequent model, and the training results of the subsequent model are fed back to the word segmenter, thereby optimizing the word segmenter.
[0008] Tatsuya Hiraoka, Sho Takase, Kei Uchiumi, Atsushi Keyaki, and Naoaki Okazaki, “Joint Optimization of Tokenization and Downstream Model”, In Findings of the Association for Computational Linguistics: ACL 2021, Association for Computational Linguistics, August 2021
[0009] In the above-described method, the word segmenter and the latter-stage model run in parallel. Therefore, in a computer that runs the word segmenter and the latter-stage model, optimizing the word segmenter may increase the consumption of the computer's computational resources, such as memory usage and processor processing power. For this reason, depending on the performance of the computer, it may be difficult to put the above-described method into practical use.
[0010] In one aspect, the present invention aims to reduce the consumption of computational resources in tuning a lexical segmenter that inputs data into a trained machine learning model.
[0011] In one aspect, an information processing program may cause a computer to execute the following processes. The process may input string data to a first lexical segmenter, thereby acquiring, for each of a plurality of string data included in a dataset, a plurality of first segmented character string data obtained by segmenting the string data using a plurality of different first segmentation patterns corresponding to the string data. The process may use the first segmented character string data as input data and calculate an index indicating the quality of an inference result when the plurality of first segmented character string data for each of the plurality of string data is input to a trained machine learning model that performs an inference process according to the input data. The process may select, for each of the plurality of string data, from the corresponding plurality of first segmented character string data, a piece of first segmented character string data whose index indicating the quality satisfies a predetermined condition. The process may adjust a second lexical segmenter that inputs the input data to the trained machine learning model, based on the first segmented character string data selected for each of the plurality of string data.
[0012] In one aspect, the present invention can reduce the consumption of computational resources in tuning lexical segmenters that input data into trained machine learning models.
[0013] 1 is a diagram showing an example of how the inference result of the latter-stage model changes depending on the word segmentation pattern. FIG. 2 is a diagram showing another example of how the inference result of the latter-stage model changes depending on the word segmentation pattern. FIG. 3 is a diagram for explaining an optimization method for word segmentation according to a comparative example. FIG. 4 is a block diagram showing an example of the hardware (HW) configuration of a computer that realizes the functions of a server as an example of an embodiment. FIG. 5 is a block diagram showing an example of the software configuration of a server as an example of an embodiment. FIG. 6 is a diagram for explaining an example of the operation of the training phase of the latter-stage model and word segmenter B. FIG. 7 is a diagram for explaining an example of the operation of the inference phase using a trained word segmenter B and a trained latter-stage model. FIG. 8 is a diagram showing an example of a training dataset. FIG. 9 is a diagram showing an example of a segmented dataset. FIG. 10 is a diagram showing an example of a segmented dataset of multiple patterns. FIG. 11 is a diagram showing an example of a training segmented dataset. FIG. 12 is a diagram showing an example of a method for selecting segmented data from a segmented dataset. FIG. 13 is a diagram showing an example of a score calculation process in word segmenter B. FIG. 14 is a diagram showing an example of a score calculation method by word segmenter B. FIG. 15 is a diagram showing an example of vocabulary constraints. FIG. 16 is a diagram showing an example of an effect on the performance of the trained latter-stage model by a method according to an embodiment. FIG. 17 is a flowchart for explaining an example of the operation of machine learning processing of the latter-stage model by a server according to an embodiment. 10 is a flowchart illustrating an example of an operation of a machine learning process of a word segmenter B by a server according to an embodiment.
[0014] Hereinafter, embodiments will be described with reference to the drawings. However, the embodiments shown below are merely examples, and are not intended to exclude various modifications or application of techniques not explicitly stated in the embodiments. For example, the present embodiment can be implemented with various modifications within the scope of the spirit thereof. Furthermore, each figure does not intend to include only the components shown in the figure, but may include other functions, etc.
[0015] [A] Explanation of Adjustment of Word Segmentation First, adjustment of word segmentation will be explained. In one embodiment, a word segmenter (lexical segmenter) performs word segmentation on input text, and inputs multiple words resulting from the segmentation to a subsequent model. An example of a word segmenter is a tokenizer. Text is an example of character string data. Furthermore, text segmented into multiple words (tokens) by the word segmenter is an example of segmented character string data.
[0016] The latter-stage model is a machine learning model that performs various AI (Artificial Intelligence) tasks related to natural language processing. In one embodiment, the latter-stage model may be, for example, a topic classifier that performs topic classification of an entire set of input words (string data). Topic classification is an example of a document classification task.
[0017] 1 is a diagram showing an example of how the inference result of the latter model changes depending on the word segmentation pattern. In FIG. 1, when the text "Non-citizen suffrage" is input to the word segmenter 110, the word segmenter 110 segments the text into words using the following two segmentation patterns: Foreign / Carrot / Administration Foreign citizen / Participation in government / Rights
[0018] Hereafter, as in the word patterns above, text divisions resulting from word segmentation are represented by a slash ( / ). Furthermore, parentheses conveniently represent the meaning of the words (tokens) obtained through word segmentation in a language other than the words themselves (English in the example shown in Figure 1). While tokens do not necessarily have to be meaningful units, in the example shown in Figure 1, the corresponding translations are provided for the tokens for interpretation purposes.
[0019] In the following description, the multiple words obtained by word segmentation of text by the word segmenter 110 may be referred to as “segmented text.” Segmented text is an example of decomposed character string data.
[0020] The topic classifier 120 analyzes the latent meaning of the segmented text input from the word segmenter 110 and classifies the segmented text into one of a plurality of predetermined topics.
[0021] In the example of Figure 1, the topic "Non-citizen suffrage" is appropriately classified as a "political topic." For example, the topic classifier 120 classifies the segmented text "foreigners / suffrage / rights" as a "political topic." On the other hand, the topic classifier 120 may classify the segmented text "foreigners / carrots / government" as a "food topic" due to the influence of the word "carrot."
[0022] The occurrence of such improper topic classification is not limited to languages without word separation, such as Japanese and Chinese. In languages with word separation, such as English, the word segmenter 110 may split a word into subwords in addition to spaces between words.
[0023] 2 is a diagram showing another example of changes in the inference results of the subsequent model according to the word segmentation pattern. In FIG. 2, when the text "prime contractor" is input to the word segmenter 110, the word segmenter 110 segments the text into words using the following two segmentation patterns: prime / contract / actor prime / contract / or
[0024] 2, the topic "prime contractor" is appropriately classified as the "Business" topic. For example, the topic classifier 120 classifies the segmented text "prime / contract / or" into the "Business" topic. On the other hand, the topic classifier 120 may classify the segmented text "prime / contr / actor" into the "Movie" topic due to the influence of the subword "actor."
[0025] In training (machine learning) of the topic classifier 120, for example, segmented text output by the word segmenter 110 according to any segmentation pattern for the input text is used as training data. For this reason, the topic classifier 120 may be trained using, for example, "foreign country / ginseng / government" or "prime / contr / actor" as training data.
[0026] Even a trained topic classifier 120 trained with such inappropriately segmented text may be able to output an appropriate topic classification result (inference result) depending on the segmentation pattern of the segmented text, as shown in Figures 1 and 2. In other words, by changing the segmentation pattern used by the word segmenter 110 while leaving the parameters of the topic classifier 120 unchanged (fixed), it may be possible to improve the inference accuracy of the topic classifier 120.
[0027] Therefore, we consider creating a word segmenter 110 that performs appropriate word segmentation that can improve the processing performance of the trained later-stage model, such as word segmentation that will produce correct results when input to the later-stage model, such as ``foreigner / suffrage / rights'' or ``prime / contract / or.''
[0028] 3 is a diagram for explaining a word segmentation optimization method according to a comparative example. As shown in FIG. 3, a training data set 201 including a plurality of training texts is input to a word segmenter 210.
[0029] The word segmenter 210 performs word segmentation on each of the plurality of training texts in the training dataset 201 , and inputs a segmented training dataset 202 containing the plurality of segmented training data to the subsequent model 220 .
[0030] The subsequent model 220 (e.g., a topic classifier) performs inference processing using each of the multiple divided training data included in the divided training dataset 202, and feeds back the inference results to the word divider 210 via a feedback mechanism 230 (optimization mechanism).
[0031] In this way, by incorporating the later-stage model 220 into the word segmenter 210 using an optimization mechanism and retraining the word segmenter 210, the word segmenter 210 can be optimized to perform appropriate word segmentation.
[0032] 3, however, the latter-stage model 220 and the optimization mechanism are started in parallel with the word segmenter 210. As a result, in a computer that executes the word segmenter 210 and the latter-stage model 220, the amount of computational resources, such as memory usage, may increase compared to when only the word segmenter 210 is started. Therefore, depending on the processing performance of the computer, it may be difficult to put the method illustrated in FIG. 3 into practical use.
[0033] 3 employs a simple method, such as a method using a unigram language model, as the word segmenter 210. This may result in limitations on the variations in word segmentation (segmentation patterns) that the word segmenter 210 can learn.
[0034] Such limitations may be overcome by using a word segmenter with high expressive power, such as a neural word segmenter that uses a neural network.
[0035] However, because neural word segmenters have no or a small "vocabulary" used when performing word segmentation, there is a possibility that word segmentation by the neural word segmenter will output "unknown words" that are not actually included in the vocabulary available to the subsequent model 220. "Vocabulary" refers to words obtained by dividing text using word segmentation, such as the above-mentioned phrases (tokens) "foreigner," "suffrage," and "right." "Unknown words" are, for example, words not used in training the subsequent model 220 (not included in the training dataset), such as the word "suffrage."
[0036] Therefore, due to the limited vocabulary available in the subsequent model 220, it may be difficult to simply apply a highly expressive word segmenter such as a neural word segmenter to the technique illustrated in FIG.
[0037] Thus, in one aspect, an embodiment describes an example technique for reducing the computational resource consumption in tuning a word segmenter that inputs data to a trained machine learning model, and in another aspect, describes an example technique for achieving expressive tuning of the word segmenter while satisfying the lexical constraints available in the trained machine learning model.
[0038] [B] Hardware Configuration Example The server 1 (see FIG. 5) according to one embodiment may be a virtual server (VM: Virtual Machine) or a physical server. The functions of the server 1 may be implemented by one computer or two or more computers. Furthermore, at least some of the functions of the server 1 may be implemented using hardware (HW) resources and network (NW) resources provided by a cloud environment.
[0039] 4 is a block diagram showing an example of the hardware (HW) configuration of a computer 10 that realizes the functions of the server 1 according to an embodiment. When multiple computers are used as HW resources that realize the functions of the server 1, each computer may have the HW configuration shown in FIG.
[0040] As shown in FIG. 4, the computer 10 may, as a HW configuration, illustratively include a processor 10a, a graphics processing unit 10b, a memory 10c, a storage unit 10d, an IF (Interface) unit 10e, an IO (Input / Output) unit 10f, and a reading unit 10g.
[0041] The processor 10a is an example of a processing unit that performs various controls and calculations. The processor 10a may be connected to each block in the computer 10 via a bus 10j so that they can communicate with each other. The processor 10a may be a multiprocessor including multiple processors, a multi-core processor having multiple processor cores, or a configuration having multiple multi-core processors.
[0042] Examples of the processor 10a include integrated circuits (ICs) such as a CPU, MPU, APU, DSP, ASIC, and FPGA. Note that the processor 10a may be a combination of two or more of these integrated circuits. CPU is an abbreviation for Central Processing Unit, MPU is an abbreviation for Micro Processing Unit, APU is an abbreviation for Accelerated Processing Unit, DSP is an abbreviation for Digital Signal Processor, ASIC is an abbreviation for Application Specific IC, and FPGA is an abbreviation for Field-Programmable Gate Array.
[0043] The graphics processing device 10b controls screen display for an output device such as a monitor in the IO unit 10f. The graphics processing device 10b may also be configured as an accelerator that executes machine learning processing and inference processing using a machine learning model. The graphics processing device 10b may be any of a variety of arithmetic processing devices, such as a graphics processing unit (GPU), an APU, a DSP, an ASIC, an FPGA, or other integrated circuits (ICs).
[0044] The memory 10c is an example of HW that stores various types of data, programs, and other information. Examples of the memory 10c include one or both of a volatile memory such as a dynamic random access memory (DRAM) and a non-volatile memory such as a persistent memory (PM).
[0045] The storage unit 10d is an example of HW that stores various types of data, programs, and other information. Examples of the storage unit 10d include various storage devices such as a magnetic disk device such as a hard disk drive (HDD), a semiconductor drive device such as a solid state drive (SSD), and a nonvolatile memory. Examples of nonvolatile memory include a flash memory, a storage class memory (SCM), and a read-only memory (ROM).
[0046] The storage unit 10d may store a program 10h (data processing program) that realizes all or part of the various functions of the computer 10.
[0047] For example, the processor 10a of the server 1 can implement the function of a control unit 30 (see FIG. 5) described later by loading a program 10h stored in the storage unit 10d into the memory 10c and executing it.
[0048] The IF unit 10e is an example of a communication IF that controls the connection and communication between the server 1 and other computers. For example, the IF unit 10e may include an adapter that complies with electrical communications (e.g., LAN (Local Area Network)) such as Ethernet (registered trademark) or optical communications such as FC (Fibre Channel). The adapter may support either or both of wireless and wired communication methods.
[0049] The program 10h may be downloaded to the computer 10 from the network via the communication IF and stored in the storage unit 10d.
[0050] The IO unit 10f may include one or both of an input device and an output device. Examples of input devices include a keyboard, a mouse, and a touch panel. Examples of output devices include a monitor, a projector, and a printer. The IO unit 10f may also include a touch panel that combines an input device and a display device. The output device may be connected to the graphics processing device 10b.
[0051] The reading unit 10g is an example of a reader that reads data and program information recorded on the recording medium 10i. The reading unit 10g may include a connection terminal or device to which the recording medium 10i can be connected or inserted. Examples of the reading unit 10g include an adapter compliant with USB (Universal Serial Bus) or the like, a drive device that accesses a recording disk, and a card reader that accesses a flash memory such as an SD card. Note that the recording medium 10i may store the program 10h, and the reading unit 10g may read the program 10h from the recording medium 10i and store it in the memory unit 10d.
[0052] Examples of the recording medium 10i include non-transitory computer-readable recording media such as magnetic / optical disks and flash memories. Examples of magnetic / optical disks include flexible disks, CDs (Compact Discs), DVDs (Digital Versatile Discs), Blu-ray Discs, and HVDs (Holographic Versatile Discs). Examples of flash memories include semiconductor memories such as USB memories and SD cards.
[0053] The above-described HW configuration of the computer 10 is an example. Therefore, the HW in the computer 10 may be increased or decreased (for example, adding or deleting any block), divided, integrated in any combination, or the HW may be added or deleted as needed.
[0054] [C] Software Configuration Example Fig. 5 is a block diagram showing an example of the software configuration of the server 1 as an example of an embodiment. The server 1 is an example of a computer or information processing device that adjusts the word segmenter.
[0055] 5, the server 1 may illustratively include a division control unit 31, a first machine learning unit 32, a generation unit 33, a second machine learning unit 34, and an inference unit 35. The blocks 31 to 35 included in the server 1 are an example of a control unit 30. The functions of the control unit 30 may be realized, for example, by the processor 10a of the computer 10 shown in FIG. 4 executing a program 10h deployed in the memory 10c.
[0056] Furthermore, as shown in Figure 5, the server 1 may, for example, be provided with a memory area capable of storing a training dataset 11, divided datasets 12, 13 and 16, a training divided dataset 14, an inference dataset 15 and an inference result 17.
[0057] Furthermore, the server 1 may be provided with a storage area capable of storing data of the word segmenters 21 and 24, the latter-stage model 22, the trained latter-stage model 23, and the trained word segmenter 25. The trained latter-stage model 23 is the latter-stage model 22 that has been trained by machine learning, and may be considered as a machine learning model in which the parameters of the latter-stage model 22 have been changed. The trained word segmenter 25 is the word segmenter 24 that has been trained by machine learning, and may be considered as a machine learning model in which the parameters of the word segmenter 24 have been changed.
[0058] The storage area of the server 1 may be realized by, for example, one or both of the storage areas of the memory 10c and the storage unit 10d of the computer 10 shown in FIG.
[0059] The server 1 (control unit 30) may, for example, receive at least one of the training dataset 11 and the inference dataset 15 from another computer not shown via the IF unit 10e and the network, and store it in a memory area.
[0060] The server 1 (control unit 30) may also transmit, for example, at least one of the trained subsequent-stage model 23, the trained word segmenter 25, and the inference result 17 stored in the storage area to another computer (not shown) via the IF unit 10e and the network. The server 1 may also transmit intermediate data, for example, at least one of the data 11 to 16, 21, 22, and 24, to another computer (not shown) via the IF unit 10e and the network.
[0061] Hereinafter, word segmenter 21 may be referred to as word segmenter A, word segmenter 24 may be referred to as word segmenter B, and trained word segmenter 25 may be referred to as trained word segmenter B.
[0062] Word segmenter A is an example of a first lexical segmenter. Word segmenter A may be a word segmenter that employs a simple method such as a method using a unigram language model, similar to word segmenter 110 shown in Figures 1 and 2 or word segmenter 210 shown in Figure 3. For example, word segmenter A may refer to a word list 21a that stores vocabulary that word segmenter A can handle, and perform word segmentation using vocabulary included in word list 21a.
[0063] Word segmenter B is an example of a highly expressive word segmenter (lexical segmenter, token segmenter) and is an example of a second lexical segmenter that inputs input data to the trained subsequent model 23. For example, word segmenter B may be a neural word segmenter using a neural network. As an example, word segmenter B may be a neural word segmenter using BiLSTM (Bidirectional Long Short-Term Memory). BiLSTM is an example of LSTM, RNN (Recurrent Neural Network). Note that word segmenter A may be a neural word segmenter similar to word segmenter B.
[0064] The subsequent model 22 may be a machine learning model that executes various document classification tasks, such as a topic classifier or a sentiment classifier, and may be, for example, a document classifier such as an SVM (Support Vector Machine).
[0065] The AI task executed by the subsequent model 22 is not limited to a document classification task, and may be capable of executing various AI tasks related to natural language processing. As an example, the subsequent model 22 may be a machine learning model that can quantitatively measure the quality (e.g., accuracy) of the output result from the subsequent model 22, such as a machine learning model that can calculate the loss for the teacher label.
[0066] Figure 6 is a diagram for explaining an example of operation of the training phase of the subsequent model 22 and word segmenter B, and Figure 7 is a diagram for explaining an example of operation of the inference phase using the trained word segmenter B and the trained subsequent model 23.
[0067] As illustrated in FIG. 6, the segmentation control unit 31 inputs a training data set 11 including a plurality of training data to a word segmenter A (word segmenter 21).
[0068] Fig. 8 is a diagram showing an example of the training dataset 11. As shown in Fig. 8, the training dataset 11 may include, for example, text, which is an example of character string data, as training data, and teacher labels. As shown in Fig. 8, the teacher labels include topics.
[0069] In FIG. 8, it is assumed that the training dataset 11 includes the following training data. Note that the parentheses indicate the teacher labels (topics) of the training data: "Debate about non-citizen suffrage" (Politics) "Prices of carrots, etc. soar" (Economy) "Decided to provide disaster relief to Turkey" (Diplomacy) "Prime contractor information" (Business) "Award for best actor" (Movie)
[0070] The segmentation control unit 31 may input each of the multiple training data into the word segmenter A to obtain a segmented data set 12 that includes segmented data for each training data.
[0071] The segmented data for each training data is an example of segmented character string data obtained by inputting the training data into the word segmenter A and segmenting the training data into words using a predetermined segmentation pattern. The predetermined segmentation pattern is an example of any one of a plurality of first segmentation patterns that the word segmenter A can execute for each of the plurality of training data based on the word list 21 a.
[0072] As an example, the word segmenter A may be capable of segmenting words for each training data set using N (e.g., 100) segmentation patterns using a technique such as N-best segmentation (e.g., N=100). For example, the predetermined segmentation pattern may be the segmentation pattern with the highest score among a plurality of first segmentation patterns, e.g., the N segmentation patterns.
[0073] 9 is a diagram showing an example of the divided data set 12. FIG. 9 shows examples in which the training data shown in FIG. 8 are divided according to the following predetermined division patterns: "foreign country / carrot / government / discussion / about / " (Politics) "price / of / carrots / etc / rises" (Economy) "Turkey / disaster aid / decision / " (Diplomacy) "prime / contr / actor / information / ation" (Business) "award / for / best / actor" (Movie)
[0074] The first machine learning unit 32 inputs the divided dataset 12 , which is an example of a training dataset, to the subsequent model 22 and performs machine learning (training) of the subsequent model 22 using the divided dataset 12 .
[0075] As an example, the first machine learning unit 32 may optimize the parameters of the subsequent model 22 so that a classification result for the topic "politics" is output when "foreign countries / carrots / government / about / discussion" is input to the subsequent model 22. The machine learning of the subsequent model 22 may be realized by various known methods.
[0076] The division control unit 31 and the first machine learning unit 32 perform machine learning processing (see symbol A1) on the above-described subsequent model 22 to obtain a trained subsequent model 23. The trained subsequent model 23 is an example of a trained machine learning model that performs inference processing according to input data.
[0077] Furthermore, the segmentation control unit 31 inputs the training data set 11 to the word segmenter A to obtain multiple patterns of segmented data sets 13. For example, the segmentation control unit 31 may input each of multiple training data sets to the word segmenter A to obtain the segmented data set 13 including multiple segmented data sets for each training data set.
[0078] The multiple divided data for each training data is an example of multiple first divided string data obtained by inputting the training data into a word divider A and dividing the training data using multiple different first division patterns corresponding to the training data.
[0079] For example, the segmentation control unit 31 may obtain multiple patterns of word segmentation results for one training data set by word segmenting the training data set in various variations using the word segmenter A, for each of the multiple training data sets included in the training dataset 11.
[0080] Fig. 10 is a diagram showing an example of a segmented data set 13 with multiple patterns. Fig. 10 shows an example in which word segmenter A performs N-best word segmentation. For simplicity, Fig. 10 shows an example in which N=3, but this is not limited to this and may be, for example, N=100 as described above.
[0081] 10 shows examples in which each of the training data shown in FIG. 8 is segmented using a plurality of segmentation patterns. As an example, from the training data of "discussion on voting rights for foreigners" (politics), the following three segmented data are generated by word segmenter A: "foreign / carrot / government / about / discussion" (politics) "foreigners / voting rights / about / discussion" (politics) "foreigners / voting rights / about / discussion" (politics)
[0082] The generation unit 33 generates a training segmented data set 14 used for training the word segmenter B (word segmenter 24).
[0083] For example, the generation unit 33 performs inference processing using the trained subsequent-stage model 23, using as input data a plurality of divided data sets included in the divided data set 13. The generation unit 33 also calculates an index indicating the quality of the inference result when a plurality of divided data sets for each of a plurality of training data sets are input to the trained subsequent-stage model 23.
[0084] An example of an index indicating the quality of an inference result is a loss based on the output from the trained subsequent-stage model 23 and the teacher labels of the training data. The loss may be calculated using various loss functions, such as cross-entropy error.
[0085] Furthermore, as an indicator of the quality of the inference result, for example, the prediction probability (prediction score) for each label of the trained subsequent-stage model 23 for each piece of segmented data included in the segmented dataset 13 may be used. The prediction probability for each label is information indicating the degree of confidence that each label output by the trained subsequent-stage model 23 through topic classification of the segmented data is correct, and the higher the prediction probability, the higher the probability that the label is correct. Note that the above-mentioned loss may be calculated based on the prediction probability for each label.
[0086] Then, for each of the plurality of training data, the generation unit 33 selects, from the corresponding plurality of divided data, divided data whose index indicating the quality of the inference result satisfies a predetermined condition, thereby obtaining a training divided dataset 14 including the divided data selected for each of the plurality of training data. The predetermined condition may be, for example, that the index indicating the quality of the inference result is optimal, and as one example, that the loss is minimized. Details of the selection process of the training divided dataset 14 by the generation unit 33 will be described later.
[0087] Fig. 11 is a diagram showing an example of the divided training dataset 14. Fig. 11 shows an example in which the following divided data are selected from the plurality of divided data shown in Fig. 10: "Discussion on / about / foreigners' voting rights" (Politics) "Rising prices of carrots, etc." (Economy) "Deciding to support Turkey in a disaster" (Diplomacy) "Price of prime contract or information at / ion" (Business) "Award for best actor" (Movie)
[0088] For example, in the training divided dataset 14, divided data different from "foreign / carrot / government / about / discussion" in the divided dataset 12 is selected as divided data for "discussion about voting rights for foreigners." Also, for example, divided data different from "prime / contr / actor / information / ation" in the divided dataset 12 is selected as divided data for "prime contract or information."
[0089] In one embodiment, the generation unit 33 selects one divided data for one training data as the training divided data set 14, but is not limited to this. For example, the generation unit 33 may select one or more divided data for one training data, for which an index indicating the quality of the inference result satisfies a predetermined condition (for example, the loss is equal to or less than a predetermined value).
[0090] As described above, the division control unit 31 and the generation unit 33 perform the process of generating the divided training data set 14 (see reference symbol A21).
[0091] The second machine learning unit 34 inputs the acquired training segmented dataset 14 to the word segmenter B, and adjusts the word segmenter B, for example, performs machine learning (training or retraining), based on the segmented data included in the training segmented dataset 14. For example, the server 1 may adjust (optimize) the parameters of the word segmenter B by performing machine learning on the word segmenter B.
[0092] As an example, when "Discussion about voting rights for foreigners" (politics), which is one of the training data, is input to word segmenter B, the second machine learning unit 34 may optimize the parameters of word segmenter B so that there is a high probability that the output of word segmenter B will be "Foreigners / voting rights / about / discussion" (politics), which is the segmented data selected by the generation unit 33. Details of the machine learning process of word segmenter B will be described later.
[0093] As described above, the second machine learning unit 34 performs the machine learning process (see reference symbol A22) of the word segmenter B using the training segmented dataset 14.
[0094] The segmentation control unit 31, the generation unit 33, and the second machine learning unit 34 adjust (see symbol A2) the above-mentioned word segmenter B, for example, by training, to obtain a trained word segmenter B (trained word segmenter 25).
[0095] As illustrated in FIG. 7, the inference unit 35 performs inference processing (see symbol A3) for the trained word segmenter B and the trained subsequent-stage model 23.
[0096] For example, the inference unit 35 inputs the inference dataset 15 into a trained word segmenter B to obtain a segmented dataset 16. The inference dataset 15 may include multiple inference data, for example, multiple texts. When the inference unit 35 evaluates the trained subsequent-stage model 23, the inference dataset 15 may include multiple evaluation data.
[0097] For example, the inference unit 35 may input each of the multiple inference data sets into a trained word segmenter B to obtain a segmented dataset 16 that includes segmented data for each of the inference data sets.
[0098] The segmented data for each piece of inference data is an example of segmented character string data obtained by inputting the inference data into a trained word segmenter B and segmenting the inference data using a predetermined segmentation pattern. The predetermined segmentation pattern is an example of any one of a plurality of first segmentation patterns that the trained word segmenter B can execute for each of the plurality of pieces of inference data.
[0099] Furthermore, for example, the inference unit 35 may use multiple divided data included in the divided dataset 16 as input data to perform inference processing using the trained subsequent model 23 and obtain the inference result 17.
[0100] The inference unit 35 may evaluate the trained subsequent-stage model 23 based on the inference dataset 15 and the inference result 17. For example, the inference unit 35 may obtain an index indicating the quality of the inference by the trained subsequent-stage model 23, and evaluate the trained subsequent-stage model 23 based on the index. The server 1 may output the evaluation result together with the inference result 17 to another computer or the like.
[0101] As described above, according to one embodiment of the method, a training segmented data set 14 is created using a trained later-stage model 23 (see symbol A21 in Figure 6), and machine learning of a word segmenter B is performed using the training segmented data set 14 (see symbol A22).
[0102] By optimizing word segmentation through two-stage processing represented by symbols A21 and A22, the trained subsequent-stage model 23 only needs to be activated during the processing represented by symbol A21 of the two-stage processing, and does not need to be activated during the processing represented by symbol A22. Note that the word segmenter B does not need to be activated during the processing represented by symbol A21, and only needs to be activated during the processing represented by symbol A22.
[0103] This makes it possible to suppress (e.g., eliminate) the need for parallel activation of the trained subsequent-stage model 23 and the word segmenter B. This therefore makes it possible to suppress increases in the consumption of computer resources, such as memory usage and processor processing power consumption, and reduces the consumption of computational resources when adjusting the word segmenter B.
[0104] In addition, by creating a new word segmenter B separate from word segmenter A that generated the segmented dataset 12 used to train the subsequent model 22, it becomes possible to adopt various word segmentation methods, for example, a word segmentation method using a neural network.
[0105] [C-1] Example of Processing for Generating Divided Training Data Set Next, an example of processing for generating the divided training data set 14 by the generating unit 33 (see reference symbol A21 in FIG. 6) will be described.
[0106] Fig. 12 is a diagram for explaining an example of a method for selecting segmented data from the segmented dataset 13. Fig. 12 shows the prediction probability (prediction score) for each label of the trained subsequent-stage model 23 when each segmented data of the segmented dataset 13 illustrated in Fig. 10 is input.
[0107] In FIG. 12, for every N pieces of divided data (for example, every N=3 pieces) corresponding to the training data, the predicted probability labels shown in bold are the teacher labels (correct labels).
[0108] In Figure 12, among the N pieces of divided data corresponding to each training data, the divided data with the highest prediction probability, shown in bold, can be said to be the divided data whose index indicating the quality of the inference result satisfies the specified condition.
[0109] Therefore, the generation unit 33 may select (extract) the segmented data with the highest predicted probability, indicated in bold, for each training data, and add it to the training segmented dataset 14. In Figure 12, the segmented data selected by the generation unit 33 is indicated by a check mark added to the "Select" item. In this way, the training segmented dataset 14 (see Figure 11) may be created.
[0110] [C-2] An Example of Word Segmenter B Next, an example of word segmenter B will be described. FIG.
[0111] In one embodiment, a highly expressive word segmenter using a neural network or the like is used as word segmenter B. On the other hand, the trained subsequent-stage model 23 is trained using a segmented data set 12 expressed within the range of vocabulary included in the word list 21a, output from word segmenter A, which has lower expressive power than word segmenter B. Therefore, the segmented data output from trained word segmenter B may include words that the trained subsequent-stage model 23 has not learned, in other words, "unknown words."
[0112] Therefore, in order to satisfy the constraints on the available lexicons of the trained subsequent model 23, the word segmenter B may be trained to suppress the output of segmented data sets resulting from word segmentation including unknown words through a score calculation process.
[0113] The score calculation process is an example of a technique for imposing vocabulary constraints on the word segmenter B. For example, the word segmenter B uses the score calculation process to calculate a probability p(s'|s) for each of multiple segmented data corresponding to the input training data. Here, s is the training data (text) and s' is the segmented data. Note that the probability is an example of a score. The score is not limited to probability, and various indices may be used. Hereinafter, the probability p(s'|s) may be referred to as the score p(s'|s).
[0114] The score p(s'|s) may be calculated by the following formula (1) or (2) depending on the case: If all words included in s' have been used in training the trained later-stage model 23 (if they exist in the word list 21a), then p(s'|s) = f(s', s) (1); If words not used in training the trained later-stage model 23 (words not present in the word list 21a) exist in s', then p(s'|s) = 0.0 (2).
[0115] As an example, assume that the training data is "foreigners' right to vote," the segmented data output from word segmenter B is "foreigners / voting / rights," and the words "foreigners," "voting," and "rights" are included in the word list 21a. In this case, the score p(foreigners, voting, rights | foreigners' right to vote) is calculated as "0.5," which is the result of the predetermined function f("foreigners, voting, rights," "foreigners' right to vote"), according to the above formula (1). Similarly, if the word "voting rights" is also included in the word list 21a, the score p(foreigners, voting rights | foreigners' right to vote) is calculated as "0.3," which is the result of the predetermined function f("foreigners, voting rights," "foreigners' right to vote"), according to the above formula (1).
[0116] On the other hand, suppose the training data is "foreigner's right to vote" and the segmented data output from word segmenter B is "foreigner / suffrage," where the word "foreigner" is present in word list 21a and the word "suffrage" is not present in word list 21a. In this case, the score p(foreigner, suffrage | foreigner's right to vote) is calculated as "0.0" according to the above formula (2).
[0117] The multiple segmented data obtained by inputting training data or inference data into word segmenter B are examples of multiple second segmented string data obtained by segmenting the training data or inference data using multiple different second segmentation patterns corresponding to the training data or inference data.
[0118] For example, the word segmenter B outputs the segmented data with the highest score among multiple segmented data (multiple candidates). Restricted segmented data that includes words that the trained subsequent-stage model 23 has not learned (vocabulary not included in the trained subsequent-stage model 23) will have the lowest score. Therefore, the word segmenter B can suppress the output of restricted segmented data.
[0119] In the above formula (2), the value of the score p(s'|s) of the segmented data to be restricted is not limited to "0.0". For example, instead of the above formula (2), various formulas or methods may be used as long as they are capable of suppressing the output of segmented data to be restricted from the word segmenter B.
[0120] Next, an example of a method for calculating the score p(s'|s) will be described. In the following description, it is assumed that the word segmenter B is a word segmenter that uses BiLSTM as a neural network.
[0121] K characters of training data (text) s = c1...c K For the word w, starting with the i-th letter and ending with the j-th letter i,j The occurrence probability p(w i,j |s) can be calculated using the following formulas (3) to (7). Note that i and j are integers between 1 and K, and i <jである。
[0122] In the above formula (3), BiLSTM(v c1 ...v cK )k is the kth input v ck This is the operation to obtain the output of BiLSTM corresponding to the k-th input v ck is c K In the above formulas (4) and (5), MLP begin and MLP end are different multi-layer perceptrons (MLPs). In the above formula (6), σ(h i (begin)T h j (end) ) is the sigmoid function. h i (begin)T h j (end) is, h i (begin) and h j (end) It is the inner product of V θ is the vocabulary available to the trained subsequent model 23.
[0123] p(w i,j The score p(s'|s) of the segmented data can be expressed as the product of the occurrence probabilities of each word w in the segmented data s'.
[0124] Therefore, for example, if the training data s = "foreigners' right to vote", based on the above formula (3) and the above formulas (6) and (7), the score p(foreigners, suffrage, rights | foreigners' right to vote) can be expressed by the following formulas (8) to (11). Note that in the following formula (8), "foreigners' right to vote" is written as s.
[0125] 14 is a diagram illustrating an example of a method for calculating a score by the word segmenter B. As illustrated in FIG. 14, the word segmenter B acquires character embedding representations of input training data (text) using the character embedding unit 24a, and inputs the character embedding representations to the BiLSTM 24b. The word segmenter B calculates the score by using the output h from the BiLSTM 24b. k (See the above formula (3)) is input to the MLPbegin 24c that calculates the above formula (4) and the MLPend 24d that calculates the above formula (5), and h k (begin) and h k (end) are obtained respectively.
[0126] The word divider B is i,j ∈V θ In this case, the output of MLPbegin24c is h k (begin) and the output of MLPend24d, h k (end) The word segmenter B then inputs the above equation (6) (equations (9) to (11)) to the calculation unit 24e, and calculates the occurrence probability p(w i,j The word segmenter B calculates the score p(s'|s) for the segmented data by multiplying the occurrence probability calculated for each word by the calculation unit 24e.
[0127] On the other hand, the word segmenter B uses w i,j ∈V θ If not, i.e., w i,j is a vocabulary not included in the trained subsequent model 23, the occurrence probability of the word may be determined to be "0.0". For example, the word segmenter B may determine whether each word is w before the calculation unit 24e calculates the sigmoid function. i,j∈V θ Determine whether or not w i,j ∈V θ If it is determined that the word is not a sigmoid function, the calculation of the sigmoid function for the word is omitted, and the occurrence probability p(w i,j You can also find |s)=0.0.
[0128] As mentioned above, the score p(s'|s) is calculated by dividing the probability p(w i,j Therefore, the word segmenter B can be expressed as a product of w |s). i,j ∈V θ When it is detected that this is not the case, the score p(s'|s)=0.0 of the divided data may be calculated.
[0129] The word output from BiLSTM24b is w i,j ∈V θ In other words, w i,j ∈V θ The detection of whether the matrix is not equal to the matrix ##EQU1## can be performed by referring to the upper triangular matrix shown in FIG.
[0130] FIG. 15 is a diagram showing an example of vocabulary constraints. As shown in FIG. 15, table 24f is a table in which the vocabulary constraints shown in the above formulas (6) and (7) are expressed by an upper triangular matrix when the training data s is "foreigners have the right to vote." The vertical axis of table 24f indicates the beginning of a word (token), and the horizontal axis of table 24f indicates the end of the word (token). Table 24f may be stored in a storage area, for example.
[0131] In table 24f, words in shaded boxes are vocabulary not included in the trained later-stage model 23, and words in open boxes are vocabulary included in the trained later-stage model 23.
[0132] For example, the word divider B may refer to the table 24f shown in Fig. 15 and determine the occurrence probability p of the words present in the shaded boxes to be "0.0." In this way, the table 24f is an example of a mask for setting the occurrence probability p of the words present in the shaded boxes to 0.0.
[0133] 13 to 15, the case where the training data s is "foreigner voting rights" (Japanese) is taken as an example, but the same applies when the training data s is text in another language, for example, "prime contractor" (English). For example, the word segmenter B calculates the occurrence probability p(w i,j |s), and calculate the score p(s'|s) for each divided data.
[0134] The second machine learning unit 34 (see FIG. 5) may optimize the parameters of word segmenter B in the machine learning process of word segmenter B (see symbol A22 in FIG. 6) so as to increase the score of the segmented data included in the training segmented dataset 14. For example, the parameters of word segmenter B may be optimized so as to minimize the loss Ls^ shown in the following equation (12) for each training data s^ (s) corresponding to the training segmented dataset 14. Various known methods may be adopted as a method for determining the end of machine learning by word segmenter B.
[0135] In this way, the second machine learning unit 34 trains the word segmenter B so as to prevent the word segmenter B from outputting character strings that match vocabulary that is not included in the segmented dataset 12 used to train the trained subsequent-stage model 23. This makes it possible to restrict the vocabulary that the word segmenter B can use, and to prevent the trained word segmenter B from outputting unknown words.
[0136] For example, in training of word segmenter B by the second machine learning unit 34, word segmenter B adjusts the score of segmented data that includes, as a segmentation result, a character string that matches vocabulary that is not included in the trained subsequent-stage model 23, and sets it to "0.0" as an example. This makes it possible to impose hard (fixed or semi-fixed) constraints on the vocabulary that word segmenter B can use, and further reduces the possibility of unknown words being output from the trained word segmenter B.
[0137] Furthermore, during training of word segmenter B by the second machine learning unit 34, word segmenter B controls the score of segmented data that includes, as a segmentation result, a character string that matches vocabulary not included in the trained subsequent-stage model 23 so that it is smaller than the scores of each of the multiple segmented data. For example, the second machine learning unit 34 optimizes the parameters of word segmenter B for each of the multiple training data so that the score of segmented data that matches the segmented data selected by the generation unit 33 is maximized among the multiple segmented data obtained by inputting the training data to word segmenter B. This allows word segmenter B to be trained to output (reproduce) segmented data selected by the generation unit 33 and resulting from word segmentation that can contribute to improving the performance (e.g., inference accuracy) of the trained subsequent-stage model 23.
[0138] In the inference process (see symbol A3 in FIG. 7), the trained word segmenter B (see FIG. 5) may output segmented data s' that maximizes the following equation (13). As an example, the trained word segmenter B (e.g., the calculation unit 24e) may output segmented data s' that maximizes the following equation (13) using a technique such as the Viterbi algorithm.
[0139] 16 is a diagram illustrating an example of the effect of a method according to an embodiment on the performance of a trained subsequent-stage model 23. The table in FIG. 16 shows, as a comparison with item 4, "a trained subsequent-stage model using a trained word segmenter B according to an embodiment," item 1, "the method shown in FIGS. 1 and 2," item 2, "the comparative example shown in FIG. 3," and item 3, "a trained subsequent-stage model using a trained word segmenter B in which vocabulary constraints are omitted." Item 3 is a method in which the processing for vocabulary constraints described with reference to FIGS. 13 to 15 is omitted.
[0140] In addition, FIG. 16 shows an example in which a later-stage model trained in an emotion classification task is used as the trained later-stage model 23.
[0141] As shown in "Performance (F1 value)" in Figure 16, the performance of the method of item 4 was 45.41%, which shows that it contributes to improving the performance of the trained subsequent model 23 compared to other methods.
[0142] As shown in the "Recall Rate of Learning Data" in Figure 16, the methods of items 3 and 4 have high expressive power because they use neural networks, and the recall rate of the training data is almost 100% in both cases.
[0143] As shown in the "unknown word ratio" in Figure 16, the method of item 4 uses vocabulary constraints to suppress the output of segmented data containing tokens that match unknown words that the trained subsequent model 23 cannot handle in the verification data.
[0144] In addition, in the methods of items 3 and 4, when optimizing word segmenter B, it is possible to prevent the trained subsequent model 23 from being launched in parallel with word segmenter B, thereby reducing the consumption of computational resources.
[0145] For these reasons, the methods of items 3 and 4 can improve the performance of the trained subsequent model 23 at a lower cost than methods that modify the entire parameters, such as retraining or additional learning of the trained subsequent model 23.
[0146] [D] Example of Operation Next, an example of operation of the server 1 as an example of an embodiment configured as described above will be described with reference to FIGS.
[0147] [D-1] Machine Learning Processing Figure 17 is a flowchart for explaining an example of the operation of machine learning processing of the subsequent model 22 by the server 1 in one embodiment, and Figure 18 is a flowchart for explaining an example of the operation of machine learning processing of the word splitter B by the server 1 in one embodiment.
[0148] As illustrated in Figure 17, the segmentation control unit 31 inputs each of the multiple training data sets of the training data set 11 into a word segmenter A to obtain a segmented data set 12 containing segmented data for each training data set (step S1).
[0149] The first machine learning unit 32 performs machine learning of the subsequent model 22 using the divided dataset 12 (step S2), obtains the trained subsequent model 23, and the process ends. Note that various known methods may be adopted as the machine learning method for the subsequent model 22 and the method for determining whether the machine learning has ended.
[0150] As illustrated in Figure 18, the segmentation control unit 31 inputs each of the multiple training data of the training dataset 11 into a word segmenter A and obtains multiple patterns of segmented datasets 13, each of which includes multiple segmented data obtained by segmenting the training data using multiple segmentation patterns (step S11).
[0151] The generation unit 33 obtains the training divided dataset 14 by selecting, for each training data, divided data whose indicator indicating the quality of the inference results from the trained subsequent model 23 to which each of the multiple divided data of the divided dataset 13 has been input satisfies a predetermined condition (step S12).
[0152] The second machine learning unit 34 performs machine learning of word segmenter B using the training segmented dataset 14 (step S13), obtains trained word segmenter B, and the process ends.
[0153] [D-2] Inference Processing FIG. 19 is a flowchart for explaining an example of the operation of the inference processing by the server 1 according to one embodiment.
[0154] As illustrated in FIG. 19, the inference unit 35 inputs the inference dataset 15 to the trained word segmenter B to obtain the segmented dataset 16 (step S21).
[0155] The inference unit 35 executes inference by the trained subsequent model 23 using the divided data set 16 (step S22) and obtains the inference result 17.
[0156] The inference unit 35 evaluates the trained subsequent model 23 based on the inference result 17 (step S23), and the process ends.
[0157] The evaluation result may be output to another computer together with the inference result 17. Also, the process of step S23 may be omitted.
[0158] [E] Others The technology according to the embodiment described above can be implemented with the following modifications and changes.
[0159] For example, the blocks 31 to 35 included in the server 1 shown in FIG. 5 may be merged in any combination, or may be divided into individual blocks.
[0160] 5 may be configured such that each processing function is realized by a plurality of devices cooperating with each other via a network. As an example, each of the blocks 31 to 35 may be an application server or a web server, and the storage areas for storing each of the data 11 to 17 and 21 to 25 may be database (DB) servers. In this case, the web server, application server, and DB server may cooperate with each other via the network to realize the processing functions of the server 1.
[0161] [F] Supplementary Notes The following supplementary notes are further disclosed regarding the above-described embodiments.
[0162] (Supplementary Note 1) An information processing program that causes a computer to execute the following processes: inputting string data into a first lexical segmenter, thereby obtaining, for each of a plurality of string data included in a dataset, a plurality of first segmented character string data obtained by segmenting the string data using a plurality of different first segmentation patterns corresponding to the string data; calculating an index indicating whether an inference result will be good or bad when the plurality of first segmented character string data for each of the plurality of string data is input to a trained machine learning model that performs inference processing according to the input data, using the first segmented character string data as input data; selecting, for each of the plurality of string data, first segmented character string data whose index indicating good or bad satisfies a predetermined condition from the corresponding plurality of first segmented character string data; and adjusting a second lexical segmenter that inputs the input data to the trained machine learning model, based on the first segmented character string data selected for each of the plurality of string data.
[0163] (Supplementary Note 2) The information processing program according to Supplementary Note 1, wherein the process of adjusting includes a process of training the second lexical segmenter so as to suppress output from the second lexical segmenter of strings that match vocabulary that is not included in a training dataset used to train the trained machine learning model.
[0164] (Supplementary Note 3) The information processing program according to Supplementary Note 2, wherein the training process includes a process of adjusting a score of second segmented character string data that includes a character string that matches the vocabulary as a segmentation result, among a plurality of second segmented character string data obtained by inputting the character string data to the second lexical segmenter and segmenting the character string data using a plurality of different second segmentation patterns corresponding to the character string data.
[0165] (Supplementary Note 4) The information processing program according to Supplementary Note 3, wherein the process of adjusting the score includes a process of controlling a score of second segmented character string data that includes a character string that matches the vocabulary as a segmentation result to be smaller than the scores of each of the plurality of second segmented character string data, and the process of training includes a process of optimizing parameters of the second lexical segmenter for each of the plurality of second segmented character string data so that a score of second segmented character string data that matches the first segmented character string data selected for the character string data, among the plurality of second segmented character string data obtained by inputting the character string data to the second lexical segmenter, is maximized.
[0166] (Supplementary Note 5) The information processing program according to any one of Supplementary Note 1 to Supplementary Note 4, wherein the second lexical segmenter is a lexical segmenter that uses BiLSTM (Bidirectional Long Short-Term Memory).
[0167] (Supplementary Note 6) An information processing method in which a computer performs the following processes: inputting character string data into a first lexical segmenter, thereby obtaining, for each of a plurality of character string data included in a dataset, a plurality of first segmented character string data obtained by segmenting the character string data using a plurality of different first segmentation patterns corresponding to the character string data; calculating an index indicating whether an inference result will be good or bad when the plurality of first segmented character string data for each of the plurality of character string data is input to a trained machine learning model that performs inference processing according to the input data, using the first segmented character string data as input data; selecting, for each of the plurality of character string data, first segmented character string data whose index indicating good or bad satisfies a predetermined condition from the corresponding plurality of first segmented character string data; and adjusting a second lexical segmenter that inputs the input data to the trained machine learning model, based on the first segmented character string data selected for each of the plurality of character string data.
[0168] (Supplementary Note 7) The information processing method according to Supplementary Note 6, wherein the process of adjusting includes a process of training the second lexical segmenter so as to suppress output from the second lexical segmenter of strings that match vocabulary that is not included in a training dataset used to train the trained machine learning model.
[0169] (Supplementary Note 8) The information processing method according to Supplementary Note 7, wherein the training process includes a process of adjusting a score of second segmented character string data that includes a character string that matches the vocabulary as a segmentation result, among a plurality of second segmented character string data obtained by inputting the character string data to the second lexical segmenter and segmenting the character string data using a plurality of different second segmentation patterns corresponding to the character string data.
[0170] (Supplementary Note 9) The information processing method according to Supplementary Note 8, wherein the process of adjusting the score includes a process of controlling the score of second segmented character string data that includes a character string that matches the vocabulary as a segmentation result so that it is smaller than the scores of each of the plurality of second segmented character string data, and the process of training includes a process of optimizing parameters of the second lexical segmenter for each of the plurality of second segmented character string data so that the score of second segmented character string data that matches the first segmented character string data selected for the character string data, among the plurality of second segmented character string data obtained by inputting the character string data to the second lexical segmenter, is maximized.
[0171] (Supplementary Note 10) The information processing method according to any one of Supplementary Note 6 to Supplementary Note 9, wherein the second lexical segmenter is a lexical segmenter that uses BiLSTM (Bidirectional Long Short-Term Memory).
[0172] (Supplementary Note 11) An information processing device comprising: a control unit that inputs character string data to a first lexical segmenter, thereby acquiring, for each of a plurality of character string data included in a dataset, a plurality of first segmented character string data obtained by segmenting the character string data using a plurality of different first segmentation patterns corresponding to the character string data; calculates an index indicating whether an inference result will be good or bad when the plurality of first segmented character string data for each of the plurality of character string data is input to a trained machine learning model that performs inference processing according to the input data, using the first segmented character string data as input data; selects, for each of the plurality of character string data, first segmented character string data whose index indicating good or bad satisfies a predetermined condition from the corresponding plurality of first segmented character string data; and adjusts a second lexical segmenter that inputs the input data to the trained machine learning model, based on the first segmented character string data selected for each of the plurality of character string data.
[0173] (Supplementary Note 12) The information processing device according to Supplementary Note 11, wherein, in the adjustment process, the control unit trains the second lexical segmenter so as to suppress output from the second lexical segmenter of character strings that match vocabulary that is not included in a training dataset used to train the trained machine learning model.
[0174] (Supplementary Note 13) The information processing device according to Supplementary Note 12, wherein in the training process, the control unit adjusts a score of second segmented character string data that includes a character string that matches the vocabulary as a segmentation result, among a plurality of second segmented character string data obtained by inputting the character string data to the second lexical segmenter and segmenting the character string data using a plurality of different second segmentation patterns corresponding to the character string data.
[0175] (Supplementary Note 14) The information processing device according to Supplementary Note 13, wherein the control unit, in the score adjustment process, controls the score of second segmented character string data that includes a character string that matches the vocabulary as a segmentation result to be smaller than the scores of each of the plurality of second segmented character string data, and in the training process, optimizes parameters of the second lexical segmenter so that, for each of the plurality of character string data, a score of second segmented character string data that matches the first segmented character string data selected for the character string data, among the plurality of second segmented character string data obtained by inputting the character string data to the second lexical segmenter, is maximized.
[0176] (Supplementary Note 15) The information processing device according to any one of Supplementary Note 11 to Supplementary Note 14, wherein the second lexical segmenter is a lexical segmenter that uses BiLSTM (Bidirectional Long Short-Term Memory).
[0177] REFERENCE SIGNS LIST 1 Server 10 Computer 11 Training dataset 12, 16 Segmented dataset 13 Segmented dataset of multiple patterns 14 Segmented dataset for training 15 Inference dataset 17 Inference result 21, 24, A, B Word segmenter 22 Later model 23 Trained later model 24a Character embedding unit 24b BiLSTM 24c MLPbegin 24d MLPend 24e Calculation unit 24f Table 25, B Trained word segmenter 30 Control unit 31 Segmentation control unit 32 First machine learning unit 33 Generation unit 34 Second machine learning unit 35 Inference unit
Claims
1. An information processing program that causes a computer to execute the following processes: inputting string data into a first lexical segmenter, thereby obtaining, for each of a plurality of string data included in a dataset, a plurality of first divided data pieces obtained by dividing the string data using a plurality of different first division patterns corresponding to the string data; calculating an index indicating whether an inference result will be good or bad when the plurality of first divided string data pieces for each of the plurality of string data pieces are input to a trained machine learning model that uses the first divided string data as input data and performs inference processing according to the input data; selecting, for each of the plurality of string data pieces, first divided string data pieces whose index indicating good or bad satisfies a predetermined condition from among the corresponding plurality of first divided string data pieces; and adjusting a second lexical segmenter that inputs the input data to the trained machine learning model based on the first divided string data selected for each of the plurality of string data pieces.
2. The information processing program of claim 1, wherein the adjustment process includes a process of training the second lexical segmenter so as to suppress output from the second lexical segmenter of strings that match vocabulary not included in a training dataset used to train the trained machine learning model.
3. The information processing program according to claim 2, wherein the training process includes a process of adjusting a score of second segmented character string data that includes a character string matching the vocabulary as a segmentation result, among a plurality of second segmented character string data obtained by inputting the character string data to the second lexical segmenter and segmenting the character string data with a plurality of different second segmentation patterns corresponding to the character string data.
4. The information processing program according to claim 3, wherein the score adjusting process includes a process of controlling a score of second segmented character string data including a character string matching the vocabulary as a segmentation result so as to be smaller than the scores of each of the plurality of second segmented character string data, and the training process includes a process of optimizing parameters of the second lexical segmenter for each of the plurality of character string data so as to maximize a score of second segmented character string data that matches the first segmented character string data selected for the character string data, among the plurality of second segmented character string data obtained by inputting the character string data to the second lexical segmenter.
5. The information processing program according to any one of claims 1 to 4, wherein the second lexical segmenter is a lexical segmenter using BiLSTM (Bidirectional Long Short-Term Memory).
6. An information processing method in which a computer executes the following processes: inputting character string data into a first lexical segmenter, thereby obtaining, for each of a plurality of character string data included in a dataset, a plurality of first divided character string data obtained by dividing the character string data using a plurality of different first division patterns corresponding to the character string data; calculating an index indicating whether an inference result will be good or bad when the plurality of first divided character string data for each of the plurality of character string data is input to a trained machine learning model that uses the first divided character string data as input data and performs inference processing according to the input data; selecting, for each of the plurality of character string data, first divided character string data whose index indicating good or bad satisfies a predetermined condition from among the corresponding plurality of first divided character string data; and adjusting a second lexical segmenter that inputs the input data to the trained machine learning model based on the first divided character string data selected for each of the plurality of character string data.
7. The information processing method of claim 6, wherein the adjustment process includes a process of training the second lexical segmenter so as to suppress output from the second lexical segmenter of strings that match vocabulary not included in a training dataset used to train the trained machine learning model.
8. The information processing method according to claim 7, wherein the training process includes a process of adjusting a score of second segmented character string data that includes a character string matching the vocabulary as a segmentation result, among a plurality of second segmented character string data obtained by inputting the character string data to the second lexical segmenter and segmenting the character string data with a plurality of different second segmentation patterns corresponding to the character string data, for each of the plurality of character string data.
9. The information processing method according to claim 8, wherein the score adjusting process includes a process of controlling a score of second segmented character string data including a character string matching the vocabulary as a segmentation result so as to be smaller than the scores of each of the plurality of second segmented character string data, and the training process includes a process of optimizing parameters of the second lexical segmenter for each of the plurality of character string data so as to maximize a score of second segmented character string data that matches the first segmented character string data selected for the character string data, among the plurality of second segmented character string data obtained by inputting the character string data to the second lexical segmenter.
10. The information processing method according to any one of claims 6 to 9, wherein the second lexical segmenter is a lexical segmenter using BiLSTM (Bidirectional Long Short-Term Memory).
11. An information processing device comprising: a control unit that inputs string data into a first lexical segmenter to obtain, for each of a plurality of string data included in a dataset, a plurality of first divided character string data obtained by dividing the string data using a plurality of different first division patterns corresponding to the string data; calculates an index indicating whether an inference result will be good or bad when the plurality of first divided character string data for each of the plurality of string data is input to a trained machine learning model that uses the first divided character string data as input data and performs inference processing according to the input data; selects, for each of the plurality of string data, first divided character string data whose index indicating good or bad satisfies a predetermined condition from the corresponding plurality of first divided character string data; and adjusts a second lexical segmenter that inputs the input data to the trained machine learning model based on the first divided character string data selected for each of the plurality of string data.
12. The information processing device described in claim 11, wherein, in the adjustment process, the control unit trains the second lexical segmenter so as to suppress output from the second lexical segmenter of strings that match vocabulary not included in a training dataset used to train the trained machine learning model.
13. The information processing device according to claim 12, wherein in the training process, the control unit adjusts a score of second divided character string data that includes a character string matching the vocabulary as a division result, among a plurality of second divided character string data obtained by inputting the character string data to the second lexical divider and dividing the character string data with a plurality of different second division patterns corresponding to the character string data, for each of the plurality of character string data.
14. The information processing device according to claim 13, wherein the control unit, in the score adjustment process, controls the score of second segmented character string data including a character string matching the vocabulary as a segmentation result to be smaller than the scores of each of the plurality of second segmented character string data, and in the training process, optimizes parameters of the second lexical segmenter so that, for each of the plurality of character string data, a score of second segmented character string data matching the first segmented character string data selected for the character string data among the plurality of second segmented character string data obtained by inputting the character string data to the second lexical segmenter is maximized.
15. The information processing device according to any one of claims 11 to 14, wherein the second lexical segmenter is a lexical segmenter using BiLSTM (Bidirectional Long Short-Term Memory).
