Vector acquisition method, vector acquisition apparatus, and recording medium

By generating and adjusting the composite vectors in the learned model, the problem of similarity calculation for words that have not been saved and words with insufficient classification accuracy is solved, and higher accuracy similarity calculation is achieved.

CN115081638BActive Publication Date: 2025-10-24SCREEN HOLDINGS CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202210248213.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2021-03-15
Filing Date
2022-03-14
Publication Date
2025-10-24
Estimated Expiration
2042-03-14

AI Technical Summary

Technical Problem

The existing technology has difficulty in achieving high-precision calculation when calculating the similarity between words that are not stored in the learned model or words with insufficient classification accuracy.

Method used

By using the learned model, the initial vector is obtained and adjusted, the adjusted vector corresponding to the compound word is generated, and it is used to calculate the compound vector. Combined with the similarity calculation method, the classification accuracy is improved.

Benefits of technology

It improves the accuracy of similarity calculation between unsaved words and words with insufficient classification accuracy, and enhances the classification performance of composite vectors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115081638B_ABST
    Figure CN115081638B_ABST
Patent Text Reader

Abstract

The present application provides a vector acquisition method, a vector acquisition device, and a recording medium, which can improve the classification accuracy of vectors corresponding to words. The vector acquisition method takes a word that can be divided into multiple words as a compound word, and includes: a process of inputting at least one sentence containing at least two of the words divided from the compound word into a learned model; a process of outputting, from the learned model, an adjustment vector corresponding to at least one of the words divided from the compound word in the input sentence; and a process of acquiring a vector corresponding to the compound word, i.e., a compound vector, using the adjustment vector output from the learned model.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The technology disclosed in the present application specification relates to acquisition of a vector corresponding to a word. BACKGROUND

[0002] Conventionally, there is known a technology of assigning a vector corresponding to a word, and further calculating similarity between words using the vector (for example, refer to Patent Literature 1).

[0003] Patent Literature 1: Japanese Patent Application Publication No. 2020-74205

[0004] As described above, in a case where similarity between words is calculated, a vector corresponding to each word, which is previously saved in a learned model, can be utilized.

[0005] The learned model generates the above-described vector by learning a large amount of sentences, and therefore, if the above-described vector saved in advance is used, similarity between words can be easily calculated.

[0006] On the other hand, for a word for which a corresponding vector is not saved in the learned model or a word for which classification accuracy of a vector saved in the learned model is insufficient, it can be impossible to calculate similarity between words with high accuracy. SUMMARY

[0007] The technology disclosed in the present application specification is completed in view of the above-described problems, and is a technology for improving classification accuracy of a vector corresponding to a word.

[0008] The vector acquisition method of the first aspect of the technology disclosed in the present application specification is a vector acquisition method using a learned model that saves an initial vector learned in advance corresponding to each of a plurality of words, and is capable of outputting, corresponding to each of the words in an input sentence composed of the plurality of words, an adjustment vector that is the vector in which the initial vector is adjusted, wherein the vector acquisition method includes: a step of inputting, to the learned model, at least one sentence including at least two of the words split from a compound word, the compound word being capable of being split into a plurality of the words; a step of outputting, from the learned model, the adjustment vector corresponding to at least one of the words split from the compound word in the input sentence; and a step of acquiring, using the adjustment vector output from the learned model, a vector corresponding to the compound word, that is, a compound vector.

[0009] The vector acquisition method of the second aspect of the technology disclosed in the specification is associated with the vector acquisition method of the first aspect, and the step of inputting the sentence into the learned model is a step of inputting the sentence including the words segmented from the compound word for which the corresponding initial vector is not stored in the learned model into the learned model.

[0010] The vector acquisition method of the third aspect of the technology disclosed in the specification is associated with the vector acquisition method of the first or second aspect, and further includes a step of calculating a similarity between the plurality of words including the compound word using the vectors corresponding to each of the plurality of words using the compound vectors acquired using the adjustment vectors.

[0011] The vector acquisition method of the fourth aspect of the technology disclosed in the specification is associated with the vector acquisition method of any one of the first to third aspects, and the step of acquiring the compound vector is a step of acquiring the compound vector using an average of the adjustment vectors corresponding to the same word segmented from the compound word included in the plurality of sentences.

[0012] The vector acquisition method of the fifth aspect of the technology disclosed in the specification is associated with the vector acquisition method of any one of the first to fourth aspects, and the step of acquiring the compound vector is a step of acquiring the compound vector by averaging the vectors corresponding to each of the words segmented from the compound word.

[0013] The vector acquisition method of the sixth aspect of the technology disclosed in the specification is associated with the vector acquisition method of any one of the first to fifth aspects, and the learned model is a transformer-based language encoding model.

[0014] The vector acquisition method of the seventh aspect of the technology disclosed in the specification is associated with the vector acquisition method of any one of the first to sixth aspects, and the step of inputting the sentence into the learned model is a step of inputting the sentence including the compound word into the learned model.

[0015] The vector acquisition device of the eighth aspect of the technology disclosed in the present application specification is a vector acquisition device using a learned model that stores an initial vector that is a vector learned in advance in correspondence with each of a plurality of words, and is capable of outputting, in correspondence with each of the words in a sentence constituted by a plurality of the words, an adjustment vector that is the vector in which the initial vector is adjusted, in response to input of the sentence. The vector acquisition device has an input unit that inputs at least one sentence including at least two of the words split from a compound word to the learned model, and an acquisition unit that acquires the vector corresponding to the compound word, i.e., a compound vector, using the adjustment vector output from the learned model in correspondence with at least one of the words split from the compound word in the input sentence.

[0016] The recording medium of the ninth aspect of the technology disclosed in the present application specification stores a vector acquisition program using a learned model that has a plurality of commands executable by a computer for execution by one or more processors, the learned model storing an initial vector that is a vector learned in advance in correspondence with each of a plurality of words, and being capable of outputting, in correspondence with each of the words in a sentence constituted by a plurality of the words, an adjustment vector that is the vector in which the initial vector is adjusted, in response to input of the sentence. The plurality of commands executed by the processors cause the computer to input at least one sentence including at least two of the words split from a compound word to the learned model, and cause the computer to acquire the vector corresponding to the compound word, i.e., a compound vector, using the adjustment vector output from the learned model in correspondence with at least one of the words split from the compound word in the input sentence.

[0017] According to at least the first, eighth, and ninth aspects of the technology disclosed in the present application specification, since the compound vector corresponding to the compound word can be acquired using the adjustment vector, it is possible to improve the classification accuracy of the compound vector.

[0018] In addition, the objects, features, aspects and advantages of the technology disclosed in the present application specification will become more apparent from the following detailed description and the accompanying drawings. BRIEF DESCRIPTION OF DRAWINGS

[0019] Figure 1 is a diagram showing an example of a hardware structure of a vector acquisition device related to an embodiment.

[0020] Figure 2is a diagram showing an example of a functional configuration of a vector acquisition apparatus relating to an embodiment.

[0021] Figure 3 is a diagram showing an example of a learned model used in an embodiment.

[0022] Figure 4 is a flowchart showing an example of an action of a vector acquisition apparatus.

[0023] Figure 5 is a diagram showing a specific example of an action of acquiring a composite vector and calculating a similarity of a composite word.

[0024] Figure 6 is a diagram showing a specific example of an action of acquiring a composite vector and calculating a similarity of a composite word.

[0025] Figure 7 is a diagram showing a specific example of an action of acquiring a composite vector and calculating a similarity of a composite word.

[0026] Figure 8 is a diagram showing another specific example of an action of acquiring a composite vector and calculating a similarity of a composite word.

[0027] Figure 9 is a diagram showing another specific example of an action of acquiring a composite vector and calculating a similarity of a composite word.

[0028] Explanation of reference numerals:

[0029] 10: learned model

[0030] 12: acquisition section

[0031] 14: similarity calculation section

[0032] 18: input section

[0033] 20: output section

[0034] 22: recording section

[0035] 30: input layer

[0036] 32: embedding layer

[0037] 34: hidden layer

[0038] 36: final hidden layer

[0039] 100: vector acquisition apparatus

[0040] 101: display

[0041] 102: CPU

[0042] 103: memory

[0043] 104: HDD

[0044] 105: program

[0045] 106: external storage medium

[0046] 107: network DETAILED DESCRIPTION

[0047] Hereinafter, the embodiments will be described with reference to the drawings. In the following embodiments, detailed features and the like are also shown for the purpose of explaining the technology, but these are merely examples, and all of these features are not necessarily essential features in order to be able to implement the embodiments.

[0048] Further, the drawings are schematically shown, and in the drawings, omission or simplification of structures is appropriately made for the purpose of explanation. Further, the mutual relationship of the size and the position of the structures and the like shown in different drawings is not necessarily accurately recorded, and can be appropriately changed. Further, in the drawings other than the sectional view, the plan view and the like, hatching is sometimes added for the purpose of easily understanding the contents of the embodiments.

[0049] Further, in the explanation given below, the same reference numerals are attached to the same structural elements, and the name and the function thereof are also considered to be the same. Therefore, detailed explanation thereof is sometimes omitted in order to avoid repetition.

[0050] Further, in the explanation given in the present application specification, in the case where it is recorded as "provided with", "including" or "having" a certain structural element and the like, this is not an exclusive expression that excludes the presence of other structural elements, unless otherwise stated.

[0051] Further, in the explanation given in the present application specification, even in the case where ordinal numbers such as "first" or "second" are used, these terms are used for the purpose of easily understanding the contents of the embodiments, and the contents of the embodiments are not limited to the order and the like generated by these ordinal numbers.

[0052] <EMBODIMENT>

[0053] Hereinafter, a vector acquisition device, a vector acquisition method and a vector acquisition program related to the present embodiment will be described.

[0054] <Structure of Vector Acquisition Device>

[0055] Figure 1 is a drawing showing an example of the hardware structure of the vector acquisition device 100 related to the present embodiment.

[0056] As shown in FIG. 1, the vector acquisition device 100 includes a CPU 101, a ROM 102, a RAM 103, a hard disk drive (HDD) 104, a drive 105, a communication interface (I / F) 106, an input / output interface 107, a display 108, a keyboard 109, a mouse 110 and a bus 111. Figure 1As shown in the example of , the vector acquisition device 100 is a computer having installed therein at least a program 105 used for acquiring vectors corresponding to words, and the vector acquisition device 100 includes a central processing unit (CPU) 102, a memory 103, a hard disk drive (HDD) 104, and a display 101.

[0057] In the vector acquisition device 100, a corresponding program 105 is installed in the HDD 104. The program 105 can be installed by writing data read from an external storage medium 106 such as a compact disc (CD), a digital versatile disc (DVD), or a universal serial bus (USB) memory into the HDD 104, or by writing data received via a network 107 into the HDD 104.

[0058] Furthermore, the HDD 104 may be replaced with another type of auxiliary storage device, such as a solid state drive (SSD), a random access memory (RAM), or a disk.

[0059] In the vector acquisition device 100 , a program 105 installed in the HDD 104 is loaded into the memory 103 , and the loaded program 105 is executed by the CPU 102 . Thus, the computer executes the program 105 and functions as the vector acquisition device 100 .

[0060] Furthermore, at least a portion of the processing executed by CPU 102 may be performed by a processor other than CPU 102. For example, at least a portion of the processing executed by CPU 102 may be performed by a graphics processing unit (GPU) or the like. Furthermore, at least a portion of the processing executed by CPU 102 may be performed by hardware that does not execute a program.

[0061] Figure 2 1 is a diagram showing an example of the functional configuration of the vector acquisition device 100 according to the present embodiment.

[0062] like Figure 2 As shown in the example of FIG, the vector acquisition device 100 includes at least an input unit 18 and an acquisition unit 12. In addition, the vector acquisition device 100 can include: a learned model 10, a similarity calculation unit 14, a recording unit 22, and an output unit 20. The input unit 18 and the output unit 20 are connected by Figure 1the display 101 and the like. In addition, the recording section 22 is realized by, for example, at least one of the memory 103 and the HDD 104 of the vector acquisition apparatus 100. In addition, the learned model 10, the acquisition section 12, and the similarity calculation section 14 are realized by, for example, causing the CPU 102 of the vector acquisition apparatus 100 to execute the program 105. Figure 1 the memory 103 and the HDD 104. In addition, the learned model 10, the acquisition section 12, and the similarity calculation section 14 are realized by, for example, causing the CPU 102 to execute the program 105. Figure 1

[0063] The input section 18 inputs data of a sentence composed of a plurality of words into the learned model 10. It is assumed that a word that can be divided into a plurality of words, that is, a compound word is included in the input sentence.

[0064] The learned model 10 is a learning model that performs machine learning in advance using a neural network or the like. The learned model 10 has an input layer into which data of a sentence divided into words or the like by preprocessing such as morphological analysis is input, an embedding layer that assigns (embeds) a multidimensional vector as a dispersed representation to each word in data output from the input layer, and a hidden layer that adjusts a vector (weight) assigned to each word output from the embedding layer.

[0065] A vector (that is, an initial vector) of each word acquired by learning using a large amount of learning data is held in the embedding layer.

[0066] The hidden layer is divided into a plurality of layers, and a vector (weight) is adjusted in each layer of the hidden layer. Among them, the hidden layer corresponding to the final layer in the plurality of layers is taken as a final hidden layer.

[0067] In the learned model 10, for example, a language encoding model based on Transformers, that is, a BERT model can be used. In addition, the learned model 10 is not limited to the BERT model, and can be OpenAIGPT, ALBERT, XLNet, or the like based on Transformers.

[0068] In addition, although the learned model 10 is described as being provided in the vector acquisition apparatus 100 in the present embodiment, it can be provided outside the vector acquisition apparatus 100 and referred to in accordance with the operation of the vector acquisition apparatus 100.

[0069] In addition, although the learned model 10 has the hidden layer in the present embodiment, it can also have an output layer that outputs an arbitrary task using an adjusted vector described later.

[0070] The acquisition section 12 acquires vectors (including initial vectors and adjusted vectors) from the learned model 10. The acquisition section 12 can acquire an initial vector from the embedding layer in the learned model 10. In addition, the acquisition section 12 can acquire an adjusted vector from the hidden layer (mainly the final hidden layer) in the learned model 10. Furthermore, the acquired vectors can be recorded in the recording section 22.​

[0071] Further, the acquisition unit 12 can generate and acquire a vector corresponding to a compound word, i.e., a compound vector, based on the vector acquired from the learned model 10. In addition, the acquired compound vector can be recorded in the recording unit 22.

[0072] The similarity calculation unit 14 can calculate the similarity between words. Specifically, the similarity calculation unit 14 can calculate the cos similarity between vectors corresponding to each word. In addition, in a case where the calculated value is greater than a threshold value set in advance, the similarity calculation unit 14 can determine that the words are similar to each other. Further, the calculated similarity and the corresponding determination result can be recorded in the recording unit 22.

[0073] The output unit 20 can output at least one of the vector (including the compound vector) acquired in the acquisition unit 12, the similarity calculated in the similarity calculation unit 14, and the corresponding determination result.

[0074] Here, an example of the learned model 10 will be described. Figure 3 is a diagram illustrating an example of the learned model 10 used in the present embodiment.

[0075] As illustrated in Figure 3 , the learned model 10 has an input layer 30 that inputs data of a sentence that has been divided into words and the like, an embedding layer 32 that assigns a multi-dimensional vector to each word in the data output from the input layer 30, and a hidden layer 34 (including a final hidden layer 36) that adjusts the vector (weight) assigned to each word output from the embedding layer 32.

[0076] As illustrated in Figure 3 , the hidden layer 34 is divided into a plurality of layers, and the vector (weight) is adjusted step by step in the hidden layer 34 of each layer. Among them, the hidden layer as the final layer is set as the final hidden layer 36.

[0077] <About the Action of the Vector Acquisition Device>

[0078] Next, the action (the action of acquiring a compound vector, and the action of calculating the similarity between words) of the vector acquisition device 100 will be described with reference to Figure 4 , Figure 5 , Figure 6 , and Figure 7 . Further, Figure 4 is a flowchart illustrating an example of the action of the vector acquisition device 100.

[0079] As illustrated in the example of Figure 4 , first, the input unit 18 inputs data of a sentence composed of a plurality of words to the input layer 30 of the learned model 10 (step S101). Figure 4In step ST01 of the embodiment, the input sentence data is pre-divided into words and the like through pre-processing such as morpheme analysis.

[0080] As described above, it is assumed that the input sentence contains words that can be divided into multiple words, namely compound words. Furthermore, in this embodiment, it is assumed that the compound words contain words for which the learned model 10 does not store corresponding initial vectors (hereinafter also referred to as non-stored words). Furthermore, non-stored words do not need to be included in the input sentence data.

[0081] Next, in the embedding layer 32, a vector ( Figure 4 In the present embodiment, it is assumed that a vector (ie, an initial vector) is assigned to each word acquired by learning using a large amount of learning data. However, the initial vector may be updated by adjusting the vector.

[0082] Here, since the input sentence contains a compound word which is an unstored word, the initial vector corresponding to the compound word is not stored in the learned model 10. Therefore, the compound word is further divided to generate words, and an initial vector is assigned to each of the divided words.

[0083] Furthermore, even when the compound word in the input sentence is not an unsaved word (i.e., when the corresponding compound vector is saved as the initial vector in the learned model 10), initial vectors corresponding to the individual words obtained by segmenting the compound word can be assigned. For example, when compound vectors specific to compound words in sentences used in a specific field are desired, the initial vectors of the individual words segmented from sentences using that field can be further adjusted, and the already registered compound vectors can be updated to vectors appropriate for the specific field.

[0084] Next, in the hidden layer 34 composed of multiple layers, the vector of each word ( Figure 4 By performing this adjustment, the context of the input sentence is reflected, and an adjusted vector is generated for each word by adjusting the initial vector.

[0085] Next, the acquisition unit 12 acquires the vector ( Figure 4 Step ST04 in the process).

[0086] The acquisition unit 12 can acquire vectors corresponding to all words in the input sentence, but acquires at least one adjusted vector corresponding to a word separated from a compound word. In addition, the adjusted vector is mainly acquired from the final hidden layer 36.

[0087] Next, the acquisition unit 12 generates and acquires a compound vector corresponding to the compound word based on the vectors (including at least one adjustment vector) corresponding to the respective words divided from the compound word (step ST05 in FIG. 8). Figure 4

[0088] By the above, the vector acquisition apparatus 100 can acquire a compound vector corresponding to a compound word.

[0089] Further, in the above example, although a case where the compound word itself is included in the input sentence is shown, the words obtained by dividing the compound word can be recorded dispersedly from each other in the input sentence, or can be recorded in a different order from the compound word in the input sentence.

[0090] Further, in the input sentence, at least two of the words obtained by dividing the compound word can be included. Also, the input sentence does not have to be one, and other words obtained by dividing can be included in other input sentences.

[0091] Further, the acquisition unit 12 can not acquire adjustment vectors for all the words obtained by dividing the compound word. That is, the acquisition unit 12 can acquire corresponding initial vectors for some of the words obtained by dividing the compound word, and generate a compound vector using the initial vectors.

[0092] Further, the acquisition unit 12 can generate adjustment vectors corresponding to the same word obtained by dividing the compound word multiple times. Also, the acquisition unit 12 can use multiple adjustment vectors corresponding to the same word, for example, combine the vectors and use as a unique corresponding vector, for generating a compound vector.

[0093] Also, the similarity calculation unit 14 can calculate the similarity between one word in the above input sentence and other words in the above input sentence (step ST06 in FIG. 8). Figure 4 Further, in the above, although the words for which the similarity is calculated are limited to the words within the same sentence, the words for which the similarity is calculated can also span multiple sentences.

[0094]

[0095] ​​Moreover, the output unit 20 can output at least one of the vectors (including composite vectors) obtained by the acquisition unit 12, the similarity calculated by the similarity calculation unit 14, and the corresponding determination result, which can be recorded together in the recording unit 22. Figure 4 (Step ST07 in). For example, it can be displayed on the display 101 in the order of words from the highest similarity to the lowest.

[0096] Figure 5 , Figure 6 and Figure 7 are diagrams showing specific examples of the actions of obtaining the composite vector as described above and then calculating the similarity of compound words.

[0097] First, vectors are assigned to each word in the statement data input to the input layer 30 of the learned model 10. In Figure 5 , among the individual words segmented by morphological analysis or the like, the vector T1 is assigned to "printer", the vector T2 is assigned to "circuit", the vector T3 is assigned to "base", the vector T4 is assigned to "board", the vector T5 is assigned to "no", the vector T6 is assigned to "trace", the vector T7 is assigned to "wo", the vector T8 is assigned to "form", and the vector T9 is assigned to ". ".

[0098] Among them, "circuit", "base", and "board" are words generated by further segmenting the original compound word "circuit board".

[0099] Next, these vectors are adjusted respectively in the multiple layers of the hidden layer 34 of the learned model 10.

[0100] Next, the acquisition unit 12 obtains vectors from the learned model 10. In particular, as Figure 6 shown, the acquisition unit 12 obtains the adjusted vectors corresponding to the words segmented from the compound word (vectors T2, vector T3, and vector T4 in Figure 5 ).

[0101] Next, the acquisition unit 12 generates a vector corresponding to the compound word (i.e., circuit board) based on vectors T2, vector T3, and vector T4.

[0102] Next, the similarity calculation unit 14 calculates the similarity between one word and other words.

[0103] Figure 8 and Figure 9 are diagrams showing other specific examples of the actions of obtaining the composite vector as described above and then calculating the similarity of compound words.

[0104] First, a vector is assigned to each word in the data of the sentence input to the input layer 30 of the learned model 10. In Figure 8 In the example shown in FIG. 6, among the words divided by morphological analysis, the vector Tl is assigned to "Traces", the vector T2 is assigned to "are", the vector T3 is assigned to "formed", the vector T4 is assigned to "on", the vector T5 is assigned to "a", the vector T6 is assigned to "printed", the vector T7 is assigned to "circuit", and the vector T8 is assigned to "board".

[0105] In the example shown in FIG. 6, among the words divided by morphological analysis, the vector Tl is assigned to "Traces", the vector T2 is assigned to "are", the vector T3 is assigned to "formed", the vector T4 is assigned to "on", the vector T5 is assigned to "a", the vector T6 is assigned to "printed", the vector T7 is assigned to "circuit", and the vector T8 is assigned to "board".

[0106] Next, in the plurality of layers of the hidden layer 34 of the learned model 10, the vectors are adjusted respectively.

[0107] Next, the acquisition unit 12 acquires the vectors from the learned model 10. In particular, as shown in Figure 9 , the acquisition unit 12 acquires the adjusted vectors (the vector T6, the vector T7, and the vector T8) corresponding to the words divided from the compound word. Figure 8

[0108] Next, the acquisition unit 12 generates a vector corresponding to the compound word (i.e., printed-circuit-board) on the basis of the vector T6, the vector T7, and the vector T8.

[0109] Next, the similarity calculation unit 14 calculates the similarity between one word and other words.

[0110] Figure 7 is an example of a graph showing the result of the similarity calculated by the similarity calculation unit 14. In Figure 7 , the upper layer shows the plurality of synonyms for the compound word when the vectors of the words divided from the compound word are the corresponding initial vectors stored in the learned model 10, and the lower layer shows the plurality of synonyms for the compound word when the vectors of the words divided from the compound word are the adjusted vectors output from the learned model 10 by the above-described action. Here, the synonyms refer to words whose similarity is above a threshold value set in advance.

[0111] As shown in the example of Figure 7 , if the upper layer and the lower layer are compared, the lower layer lists words that are more suitable as synonyms of the compound word (not only words that are similar in string, but also words that are similar in the meaning content of the compound word), it is known that, by Figure 4 ​The action shown, the compound vector corresponding to the compound word reflects the relationship before and after in the sentence, and improves the classification accuracy.

[0112] <Effects produced by the above-described embodiments>

[0113] Next, examples of effects produced by the above-described embodiments will be shown. Furthermore, in the following description, although the effects are described based on the specific structures exemplified in the above-described embodiments, other specific structures exemplified in the present specification can be substituted within a range where the same effects are produced. That is, the following description is sometimes representative of any one of the corresponding specific structures for convenience, but the representative specific structure can be substituted for the corresponding other specific structure.

[0114] According to the above-described embodiments, in the vector acquisition method, a word that can be divided into a plurality of words is treated as a compound word. Furthermore, at least one sentence including at least two of the words divided from the compound word is input to the learned model 10. Furthermore, at least one adjustment vector corresponding to at least one of the words divided from the compound word in the input sentence is output from the learned model 10. Furthermore, using the adjustment vector output from the learned model 10, a vector corresponding to the compound word, that is, a compound vector is acquired.

[0115] According to such a structure, since the compound vector corresponding to the compound word can be acquired using the adjustment vector, the relationship between the words divided from the compound word in the input sentence can be reflected to the compound vector. Therefore, the classification accuracy (expression accuracy) of the compound vector can be improved.

[0116] Furthermore, the order of executing each process can be changed without particular limitation.

[0117] In addition, even in a case where the above-described structure is appropriately supplemented with other structures exemplified in the present specification, that is, even in a case where the above-described structure is appropriately supplemented with other structures in the present specification that are not mentioned above, the same effects can be produced.

[0118] In addition, according to the above-described embodiments, the process of inputting a sentence to the learned model 10 is a process of inputting a sentence including a word divided from a compound word for which a corresponding initial vector is not stored in the learned model 10 to the learned model 10. According to such a structure, the compound vector for which the initial vector is not stored can be acquired using the adjustment vector. Therefore, compared to a case where the corresponding initial vector is acquired from the embedding layer 32 and the compound vector is generated based on the initial vector, the relationship between the words divided from the compound word in the sentence is reflected to the compound vector. Therefore, the classification accuracy (expression accuracy) of the compound vector can be improved.

[0119] Further, according to the above-described embodiment, in the vector acquisition method, the process of calculating the similarity between the plurality of words including the compound word using the vector corresponding to each of the plurality of words including the composite vector acquired using the adjustment vector. According to such a structure, since the similarity between the words can be calculated using the composite vector that improves the classification accuracy (performance accuracy), the calculation accuracy of the similarity can be improved.

[0120] Further, according to the above-described embodiment, the process of acquiring the composite vector is a process of acquiring the composite vector using an average of adjustment vectors corresponding to the same word included in a plurality of sentences and divided from the compound word. According to such a structure, considering the difference between the same words in the plurality of sentences, the classification accuracy (performance accuracy) of the resulting composite vector can be improved.

[0121] Further, according to the above-described embodiment, the process of acquiring the composite vector is a process of acquiring the composite vector by averaging the vectors corresponding to each of the words divided from the compound word. According to such a structure, since the composite vector is acquired by synthesizing a plurality of vectors, the classification accuracy (performance accuracy) of the resulting composite vector can be improved.

[0122] Further, according to the above-described embodiment, the learning completed model 10 is a language encoding model based on a transformer. According to such a structure, considering the context in the sentence, the classification accuracy of the generated vector can be improved.

[0123] Further, according to the above-described embodiment, the process of inputting the sentence into the learning completed model 10 is a process of inputting the sentence including the compound word into the learning completed model 10. According to such a structure, since all the words divided from the compound word are included in one sentence, the adjustment vectors corresponding to these words can be effectively output. Further, since the compound word is directly used in the sentence, the relationship between the words divided from the compound word in the sentence also follows the meaning of the compound word, and the classification accuracy (performance accuracy) of the output adjustment vector can be improved.

[0124] According to the above-described embodiment, the vector acquisition device is a vector acquisition device that uses a learned model 10 that stores an initial vector that is a vector that is learned in advance in correspondence with each of a plurality of words, and is capable of outputting, in correspondence with each word in a sentence composed of a plurality of words, an adjustment vector that is a vector in which the initial vector is adjusted for input of the sentence. The vector acquisition device has an input section 18 and an acquisition section 12. The input section 18 inputs at least one sentence that contains at least two of the words split from the compound word into the learned model 10. The acquisition section 12 acquires a vector corresponding to the compound word, that is, a compound vector, using the adjustment vector corresponding to at least one of the words split from the compound word in the input sentence that is output from the learned model 10.

[0125] In addition, according to the above-described embodiment, the vector acquisition device has a processing circuit that executes a program, that is, a CPU 102, and a storage device that stores the executed program 105, that is, an HDD 104. Furthermore, by the CPU 102 executing the program 105, the following actions can be implemented.

[0126] That is, at least one sentence that contains at least two of the words split from the compound word is input into the learned model 10. Furthermore, a vector corresponding to the compound word, that is, a compound vector, is acquired using the adjustment vector corresponding to at least one of the words split from the compound word in the input sentence that is output from the learned model 10.

[0127] According to such a structure, since the compound vector corresponding to the compound word can be acquired using the adjustment vector, the classification accuracy (expression accuracy) of the compound vector can be improved.

[0128] Further, even in the case where the above-described structure is appropriately supplemented with other structures exemplified in the present specification, that is, even in the case where the above-described structure is appropriately supplemented with other structures in the present specification that are not mentioned above, the same effects can be produced.

[0129] According to the above-described embodiment, the vector acquisition program causes a computer to input, by a plurality of commands executed by a processor (CPU 102), at least one sentence that contains at least two of the words split from the compound word into the learned model 10. Furthermore, the computer is caused to acquire a vector corresponding to the compound word, that is, a compound vector, using the adjustment vector corresponding to at least one of the words split from the compound word in the input sentence that is output from the learned model 10.

[0130] According to such a structure, since the compound vector corresponding to the compound word can be acquired using the adjustment vector, the classification accuracy (expression accuracy) of the compound vector can be improved.

[0131] Moreover, even if other structures exemplified in the present specification are appropriately added to the above-described structure, that is, even if other structures in the present specification not mentioned as the above-described structure are appropriately added, the same effects can be produced.

[0132] In addition, the above program can also be stored in a computer-readable removable recording medium such as a magnetic disk, a floppy disk, an optical disk, a compact disc, a Blu-ray (registered trademark) disc, or a DVD. Also, the removable recording medium storing the program that realizes the above-described function can be circulated on the market.

[0133] <Modifications of the above-described embodiments>

[0134] In the above-described embodiments, the dimensions, shapes, relative positional relationships, or conditions for implementation of each structural element are sometimes described, but these are one example in all aspects and are not limited thereto.

[0135] Therefore, within the technical scope disclosed in the present specification, countless modifications and equivalents thereof can be foreseen. For example, cases of changing at least one structural element, cases of adding, or cases of omitting are included.

[0136] Moreover, in the above-described embodiments, in cases where a material name or the like is described without being specifically designated, an alloy or the like obtained by containing other additives in the material is included as long as there is no contradiction.

[0137] In addition, each structural element described in the above-described embodiments can be conceived as software or firmware, or as hardware corresponding thereto, and each structural element is referred to as a "unit" or a "circuitry" or the like in the concept of both.

Claims

1. A vector acquisition method using a learned model that stores, in correspondence with each of a plurality of words, a vector that is learned in advance, that is, an initial vector, and that is capable of outputting, in correspondence with each of the words in a sentence composed of a plurality of the words, an adjustment vector that is the vector in which the initial vector is adjusted, in response to input of the sentence, wherein a word that can be divided into a plurality of the words is treated as a compound word, the vector acquisition method comprising: a step of inputting, into the learned model, at least one sentence that includes at least two of the words divided from the compound word; a step of outputting, from the learned model, the adjustment vector in correspondence with at least one of the words divided from the compound word in the input sentence; and a step of acquiring a vector in correspondence with the compound word, that is, a compound vector, using the vectors in correspondence with each of the words divided from the compound word, respectively, that include the adjustment vector output from the learned model.

2. The vector acquisition method according to claim 1, wherein the step of inputting the sentence into the learned model is a step of inputting, into the learned model, the sentence that includes the words divided from the compound word for which the corresponding initial vector is not stored in the learned model.

3. The vector acquisition method according to claim 1 or 2, wherein the vector acquisition method further comprises: a step of calculating a similarity between a plurality of the words including the compound word, using the vectors in correspondence with each of a plurality of the words that include the compound vector acquired using the adjustment vector.

4. The vector acquisition method according to claim 1 or 2, wherein the step of acquiring the compound vector is a step of acquiring the compound vector using an average of the adjustment vectors in correspondence with the same word divided from the compound word included in a plurality of the sentences, respectively.

5. The vector acquisition method according to claim 1 or 2, wherein the step of acquiring the compound vector is a step of acquiring the compound vector by averaging the vectors in correspondence with each of the words divided from the compound word.

6. The vector acquisition method according to claim 1 or 2, wherein the learned model is a language encoder model based on a transformer.

7. The vector acquisition method according to claim 1 or 2, wherein the step of inputting the sentence into the learned model is a step of inputting the sentence including the compound word into the learned model.

8. A vector acquisition apparatus using a learned model that stores, in correspondence with each of a plurality of words, a vector that is learned in advance, that is, an initial vector, and that is capable of outputting, in correspondence with each of the words in a sentence composed of a plurality of the words, an adjustment vector that is the vector in which the initial vector is adjusted, in response to input of the sentence, wherein a word that can be divided into a plurality of the words is treated as a compound word, the vector acquisition apparatus comprising: ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ inputting, by the input unit, at least one of the sentences including at least two of the words segmented from the compound word into the learned model; and acquiring, by the acquisition unit, the vector corresponding to the compound word, i.e., a compound vector, using the vectors corresponding to each of the words segmented from the compound word, respectively, included in the adjustment vector corresponding to at least one of the words segmented from the compound word in the inputted sentence and outputted from the learned model.

9. A recording medium storing a vector acquisition program using a learned model, the vector acquisition program having a plurality of computer-executable commands for execution by one or more processors, the learned model holding, in correspondence with each of a plurality of words, a vector learned in advance, i.e., an initial vector, and being capable of outputting, in correspondence with each of the words in a sentence composed of the plurality of words, an adjustment vector, which is the vector in which the initial vector is adjusted, in response to an input of the sentence, wherein, The vector acquisition program is installed in a computer and executed, and the word capable of being segmented into a plurality of words is used as a compound word, using a plurality of commands executed by the processor, causing the computer to input at least one of the sentences including at least two of the words segmented from the compound word into the learned model, causing the computer to acquire the vector corresponding to the compound word, i.e., a compound vector, using the vectors corresponding to each of the words segmented from the compound word, respectively, included in the adjustment vector corresponding to at least one of the words segmented from the compound word in the inputted sentence and outputted from the learned model.

Citation Information

Patent Citations

  • Answer candidate generation device, answer candidate generation method, and program

    JP2020074205A

  • Synonym determination method and device

    CN110852082A

  • Word vector dynamic adjustment processing method, system and device and medium

    CN111881690A

  • Synonym dictionary creation apparatus, non-transitory computer-readable recording medium storing synonym dictionary creation program, and synonym dictionary creation method

    US20200285808A1