WO2019198618A1 - 単語ベクトル変更装置、方法、及びプログラム - Google Patents

単語ベクトル変更装置、方法、及びプログラム Download PDF

Info

Publication number
WO2019198618A1
WO2019198618A1 PCT/JP2019/015025 JP2019015025W WO2019198618A1 WO 2019198618 A1 WO2019198618 A1 WO 2019198618A1 JP 2019015025 W JP2019015025 W JP 2019015025W WO 2019198618 A1 WO2019198618 A1 WO 2019198618A1
Authority
WO
WIPO (PCT)
Prior art keywords
word
vector
pair
dictionary
concept base
Prior art date
Application number
PCT/JP2019/015025
Other languages
English (en)
French (fr)
Inventor
克人 別所
久子 浅野
準二 富田
Original Assignee
日本電信電話株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 日本電信電話株式会社 filed Critical 日本電信電話株式会社
Priority to US17/046,668 priority Critical patent/US11537790B2/en
Publication of WO2019198618A1 publication Critical patent/WO2019198618A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/237Lexical tools
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/237Lexical tools
    • G06F40/242Dictionaries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis

Definitions

  • the present invention when a set of pairs of a word and a vector representing the concept of the word is given, the distance between vectors of words in the dictionary that are semantically far from each other becomes larger than before.
  • the vector of words is such that the distance of each word vector in a semantically close word pair is smaller than before, and the distance of each word vector in a word pair not in the dictionary is as unchanged as possible.
  • the present invention relates to an apparatus, a method, and a program for changing a word vector.
  • Non-Patent Document 1 and Non-Patent Document 2 There are methods described in Non-Patent Document 1 and Non-Patent Document 2 as a concept base that is a set of pairs of a word and a vector representing the concept of the word.
  • All of these methods generate a word vector using a corpus as an input, and are arranged so that semantically close word vectors are close.
  • the generation algorithm is based on the distribution hypothesis that the concept of each word can be estimated by the appearance pattern (peripheral distribution) of the peripheral words of the word in the corpus.
  • the distance representing the similarity between the texts can be calculated using the concept base generated by these methods.
  • a vector of the text is generated by synthesizing a vector of words in the text (for example, taking the centroid of the word vector).
  • the distance between texts is calculated as the distance between corresponding text vectors.
  • the concept base generated by the above conventional method has the following problems.
  • An antonym pair (eg, good and bad) has a problem that the vector of each word is close because the peripheral distribution of each word is similar. For this reason, the distance relationship between the text vectors becomes inappropriate.
  • the antonym “bad” has a smaller distance between vectors than the synonym “good”. For this reason, although the text C is closer to the following text A than the text B, the text B has a smaller distance between vectors than the text C.
  • Text A This idea is good. Text B: This idea is bad. Text C: This idea is good.
  • a word pair when one word is not a broader word, lower word or synonym of the other word, and there is a common broader word, the pair is called a peer word pair.
  • the word pair “baseball, soccer” is a pair of equivalent words because one word is neither a broader word, a lower word or a synonym of the other word but has a common broader word “sport”.
  • the peer word pair (eg, baseball, soccer) has a problem that the vector of each word is close because the peripheral distribution of each word is similar. For this reason, the distance relationship between the text vectors becomes inappropriate.
  • the equivalent word “soccer” has a smaller distance between vectors than the subordinate word “grass baseball”. For this reason, although the text C is closer to the following text A than the text B, the text B has a smaller distance between vectors than the text C.
  • Text A Watch baseball.
  • Text B Watch soccer.
  • Text C Watch grass baseball.
  • the synonym “baseball” has a greater distance between vectors than the subordinate term “grass baseball”. For this reason, although the text B is closer to the following text A than the text C, the text C has a smaller distance between vectors than the text B.
  • Text A Watch baseball. Text B: Look at the baseball. Text C: Watch grass baseball.
  • the present invention is for solving the above-mentioned problems, and by converting each word vector to a concept base once generated, the word vector arrangement reflects the semantic closeness between the words. It is intended to be what you have done. Specifically, the vector distance of each word pair in a semantically distant word pair such as an antonym or a synonym in the dictionary is larger than before, and each word in a semantically close word pair such as a synonym in the dictionary. The vector distance is made smaller than before. However, if only that is done, for word pairs that are not in the dictionary, the vector distance will be unduly increased or decreased, and the arrangement will not be appropriate.
  • An object of the present invention is to arrange all words so that the distance between arbitrary word pairs is appropriate.
  • a word vector changing device is a set of word pairs that are semantically distant or close to a concept base that is a set of pairs of a word and a vector that represents the concept of the word.
  • the word pair C is in the dictionary with respect to the word pair C, which is a pair of arbitrary words A and B in the concept base, the converted vector of the word A and the word B And a vector kV obtained by multiplying the difference vector V between the vector in the concept base of the word A and the vector in the concept base of the word B by a scalar value k.
  • the magnitude D of the difference vector is associated with the word pair C and the word pair C is not in the dictionary
  • the magnitude D of the difference vector V ′ and the difference vector V is set as the word Match to pair C So that the sum of the magnitude D corresponding to all of the word pairs C as small as possible, characterized in that it comprises a converting means for converting arbitrary vector word in the concept base.
  • the conversion means of the word vector changing device may be configured such that when the word pair C is a semantically distant word pair in the dictionary, the scalar value k is set to 1 or more, and the word pair When C is a semantically close word pair in the dictionary, the scalar value k is a value between 0 and 1.
  • the word vector changing method is a word vector conversion method in a word vector conversion apparatus having a concept base that is a set of pairs of a word and a vector representing the concept of the word, and is semantically distant.
  • a dictionary that is a set of close word pairs is input, and the conversion means has a word pair C that is a pair of arbitrary words A and B in the concept base, the word pair C is in the dictionary.
  • the difference vector V ′ between the converted vector of the word A and the converted vector of the word B, and the difference vector between the vector in the concept base of the word A and the vector in the concept base of the word B When the magnitude D of the difference vector from the vector kV obtained by multiplying V by the scalar value k is associated with the word pair C and the word pair C is not in the dictionary, the difference vector V ′ and the difference vector Any word in the concept base so that the magnitude D of the difference vector from the word V is associated with the word pair C and the sum of the magnitudes D corresponding to all the word pairs C is as small as possible.
  • the program according to the present invention is a program for causing a computer to function as conversion means of the word vector changing device according to the present invention.
  • the difference vector V ′ after conversion is approximately equal to kV obtained by multiplying the difference vector V before conversion by k.
  • word pairs that are semantically distant such as antonyms and synonyms in the dictionary
  • the distance between vectors after conversion becomes larger than the distance between vectors before conversion.
  • word pairs that are semantically close such as certain synonyms
  • the distance between vectors after conversion becomes smaller than the distance between vectors before conversion.
  • the inter-vector distance after conversion is not much different from the inter-vector distance before conversion. In this way, it is possible to generate a post-conversion concept base that realizes the arrangement of all words in which the distance between arbitrary word pairs is appropriate.
  • the specific concept base has a property that the difference vectors of the vectors of the words of the word pairs having the same relationship are almost the same. That is, when the vector of the word x is U x , for the word pair (a, b) and the word pair (c, d) having the same relationship, Holds. For example, a word pair (male, woman) and a word pair (uncle, aunt) have the same relationship, Holds.
  • the antonym “bad” for the word “good” has a greater distance between the vectors than the synonym “good”, so The distance between vectors is smaller than that of text B.
  • the word “baseball” has a larger distance between vectors in the equivalent word “soccer” than in the subordinate word “grass baseball”. However, the distance between vectors is smaller than that of text B.
  • the synonym “baseball” is smaller in the word “baseball” than the subordinate word “grass baseball”, so the distance between the vectors is smaller than the text A. The distance between vectors is smaller than that of text C.
  • FIG. 1 is a configuration example of a word vector changing device according to claim 1 of the present invention.
  • the word vector changing device 100 receives a concept base 22 that is a set of pairs of a word and a vector that represents the concept of the word, and a dictionary 24 that is a set of word pairs that are semantically far or close. If the word pair C is in the dictionary 24 with respect to the word pair C which is a pair of arbitrary words A and B, the difference vector V ′ between the converted vector of the word A and the converted vector of the word B The difference vector V between the vector in the concept base 22 of the word A and the vector in the concept base 22 of the word B multiplied by the scalar value k is associated with the word pair C.
  • To convert any vector of words in the conceptual base 22 comprises conversion means 30 for generating the converted concept base 32.
  • FIG. 2 is an example of the concept base 22.
  • the concept base 22 is generated by, for example, the methods of Non-Patent Document 1 and Non-Patent Document 2.
  • Each word vector is an n-dimensional vector, and semantically close word vectors are arranged nearby.
  • the dictionary 24 it can be configured such that the record groups are divided into record groups relating to antonyms, synonyms, and synonyms.
  • 3 shows an example of a record group related to an antonym
  • FIG. 4 shows an example of a record group related to a synonym
  • FIG. 5 shows an example of a record group related to a synonym.
  • Each record in FIG. 3 includes a base word and a list of antonyms for the base word. A pair of the root word and each antonym in the antonym list becomes an antonym word pair.
  • the word pairs in the antonym record group and the synonym record group are semantically distant word pairs.
  • the word pairs in the synonym record group are word pairs that are semantically close.
  • the dictionary 24 is not limited to the above example, and includes a group of records including a base word and a list of words that are semantically distant to the base word, and a record including a base word and a list of words that are semantically close to the base word. It can also be made up of groups. In this case, a pair of the base word and each word in the semantically distant word list becomes a semantically distant word pair, and a pair of the base word and each word in the semantically close word list becomes a pair. , It becomes a semantically close word pair.
  • the dictionary 24 is usually a group of records of the same type (separately semantically, semantically close, etc.) in the dictionary 24, and if there is a record of the base word A with the word B in the word list, the word A is included in the word list.
  • the configuration is such that there is a record of a base word B.
  • the conversion process of the conversion means 30 is formulated as follows.
  • ⁇ pq is a constant and ⁇ pq is a variable.
  • the scalar value k by which the difference vector ⁇ i - ⁇ j between ⁇ i and ⁇ j is multiplied generally depends on ⁇ i, j ⁇ and k ⁇ i , j ⁇ .
  • the conversion means 30 obtains ( ⁇ pq ) that minimizes the following objective function F.
  • k ⁇ i, j ⁇ may be a constant independent of ⁇ i, j ⁇ . Also, a constant ⁇ > 0 is determined,
  • a constant ⁇ that is greater than or equal to the maximum value of It is good. Also, As k is larger, k ⁇ i, j ⁇ may be decreased so that the converted distance does not become excessively large for a word pair having a large original distance.
  • k ⁇ i, j ⁇ may be a constant independent of ⁇ i, j ⁇ . Also, a constant ⁇ > 0 is determined,
  • the stochastic gradient descent method has the following algorithm.
  • the update part of the (m, n) matrix ( ⁇ pq ) of the above algorithm is performed as follows, for example, with Adgrad.
  • the initial value of the matrix ( ⁇ pq ) is, for example,
  • update (1) The above update will be referred to as update (1).
  • FIG. 6 is a diagram showing an example of a conversion processing routine of the conversion means 30. Hereinafter, the processing content of each step of FIG. 6 will be described.
  • S1 It is determined whether or not to execute a turn including the processes of S2 to S6. If the predetermined number of times has been executed, it is determined that the process has ended, and the conversion processing routine is ended. If the predetermined number of times has not been executed, it is determined to be executed and the process proceeds to S2. Even if it is not already running a predetermined number of times, the matrix of current and (omega pq), previous S1 point in the matrix (omega pq) and is (are i.e. converge) the same case, it is determined that termination, conversion The processing routine may be terminated. When the conversion processing routine is terminated, a set of pairs of each word W p in the concept base 22 and its word vector ⁇ p is output as the converted concept base 32.
  • W 1 , W 2 ,..., W m be a list of words in the concept base 22.
  • W 1 , W 2 ,..., W m W x selected from the unselected words in S2 is set as a processing target word X, and the process proceeds to S3. If there is no unselected word, this turn is finished and the process proceeds to S1.
  • W 1 , W 2 ,..., W m are not W x , are not any W y selected in S 3, are not selected in S 5, and are not selected with word W x W z selected from words satisfying that the pair (as set) is not the pair (as set) processed so far in S4 and S6 of this turn is set as the word Z to be processed, and the process proceeds to S6. If there is no such word, the process proceeds to S2.
  • W 1 , W 2 ,..., W m excluding W x are sorted in ascending order of the distance from W x at the start of the conversion processing routine, and the top G You may make it select the word which satisfy
  • W 1, W 2, except for W x, ⁇ ⁇ ⁇ , in W m the distance between the W x is from among those that are below a certain threshold (less than or), in order of increasing distance in some cases ( The words satisfying the above conditions may be selected in the sorted order.
  • the present invention is applicable to a word vector changing technique for converting a word vector so that a distance between arbitrary word pairs is appropriate when a set of pairs of a word and a vector representing the concept of the word is given. is there.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Machine Translation (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

任意の単語対の距離が適切となるように全単語を配置することを目的とする。 単語と該単語の概念を表すベクトルとの対の集合である概念ベース22と、意味的に遠いまたは近い単語対の集合である辞書24を入力とし、変換手段30が、前記概念ベース22中の任意の単語A、Bの対である単語対Cに対し、前記単語対Cが前記辞書24中にある場合、前記単語Aの変換後のベクトルと前記単語Bの変換後のベクトルとの差ベクトルV'と、前記単語Aの前記概念ベース22中のベクトルと前記単語Bの前記概念ベース22中のベクトルとの差ベクトルVにスカラー値kを乗算したベクトルkVとの差ベクトルの大きさDを前記単語対Cに対応付け、かつ、前記単語対Cが前記辞書24中にない場合、前記差ベクトルV'と前記差ベクトルVとの差ベクトルの大きさDを前記単語対Cに対応付け、全ての単語対Cに対応する前記大きさDの総和が可能な限り小さくなるように、前記概念ベース22中の任意の単語のベクトルを変換する。

Description

単語ベクトル変更装置、方法、及びプログラム
 本発明は、単語と該単語の概念を表すベクトルとの対の集合が与えられたとき、辞書中にある意味的に遠い単語対の各単語のベクトルの距離はこれまでより大きくなり、辞書中にある意味的に近い単語対の各単語のベクトルの距離はこれまでより小さくなり、かつ、辞書中にない単語対の各単語のベクトルの距離は可能な限り変化がないように、単語のベクトルを変換する単語ベクトル変更装置、方法、及びプログラムに関する。
 単語と該単語の概念を表すベクトルとの対の集合である概念ベースとして、非特許文献1や非特許文献2で述べられている手法がある。
 これらの手法はいずれもコーパスを入力として単語のベクトルを生成するものであり、意味的に近い単語のベクトルは近くなるような配置となる。生成アルゴリズムは、各単語の概念は、コーパスにおける該単語の周辺単語の出現パターン(周辺分布)によって推定できるという分布仮説をベースにしている。
 これらの手法により生成した概念ベースを用いて、テキスト間の類似性を表す距離を算出することができる。任意のテキストに対し、該テキスト中の単語のベクトルを合成する(例えば単語ベクトルの重心をとる)ことにより、該テキストのベクトルを生成する。テキスト間の距離を、対応するテキストベクトル間の距離として算出する。
別所克人, 内山俊郎, 内山匡, 片岡良治, 奥雅博,"単語・意味属性間共起に基づくコーパス概念ベースの生成方式,"情報処理学会論文誌, Vol.49, No.12, pp.3997-4006, Dec. 2008. Tomas Mikolov, Kai Chen, Greg Corrado, Jeffrey Dean,"Efficient estimation of word representations in vector space,"ICLR, 2013.
 上記従来手法で生成した概念ベースでは、以下に述べる課題がある。
課題1)
 反義語の対(例:良い、悪い)は、各単語の周辺分布が似ているため、各単語のベクトルが近くなるという課題がある。このため、テキストベクトル間の距離関係が不適切なものになる。
 例えば単語「良い」に対し、その反義語「悪い」の方が、同義語「宜しい」よりも、ベクトル間の距離が小さくなる。このため、以下のテキストAに対し、テキストCの方がテキストBよりも意味が近いにも関わらず、テキストBの方がテキストCよりもベクトル間の距離が小さくなる。
  テキストA:この考えは良い。
  テキストB:この考えは悪い。
  テキストC:この考えは宜しい。
課題2)
 単語の対について、一方の単語が他方の単語の上位語でも下位語でも同義語でもなく、共通の上位語があるとき、該対を同位語の対と呼ぶ。単語の対「野球、サッカー」は、一方の単語が他方の単語の上位語でも下位語でも同義語でもなく、共通の上位語「スポーツ」をもつため、同位語の対となる。
 同位語の対(例:野球、サッカー)は、各単語の周辺分布が似ているため、各単語のベクトルが近くなるという課題がある。このため、テキストベクトル間の距離関係が不適切なものになる。
 例えば単語「野球」に対し、その同位語「サッカー」の方が、下位語「草野球」よりも、ベクトル間の距離が小さくなる。このため、以下のテキストAに対し、テキストCの方がテキストBよりも意味が近いにも関わらず、テキストBの方がテキストCよりもベクトル間の距離が小さくなる。
  テキストA:野球を見る。
  テキストB:サッカーを見る。
  テキストC:草野球を見る。
課題3)
 同義語の対(例:野球、ベースボール)は、場合によっては、各単語のベクトルが遠くなるという課題がある。このため、テキストベクトル間の距離関係が不適切なものになる。
 例えば単語「野球」に対し、その同義語「ベースボール」の方が、下位語「草野球」よりも、ベクトル間の距離が大きくなる。このため、以下のテキストAに対し、テキストBの方がテキストCよりも意味が近いにも関わらず、テキストCの方がテキストBよりもベクトル間の距離が小さくなる。
  テキストA:野球を見る。
  テキストB:ベースボールを見る。
  テキストC:草野球を見る。
 本発明は、上記課題を解決するためのものであり、一旦生成した概念ベースに対し、各単語のベクトルを変換することにより、単語のベクトルの配置が、単語間の意味的な近さを反映したものとなるようにするものである。具体的には、辞書中にある反義語や同位語といった意味的に遠い単語対の各単語のベクトルの距離はこれまでより大きくなり、辞書中にある同義語といった意味的に近い単語対の各単語のベクトルの距離はこれまでより小さくなるようにする。ただ、それだけを行うと、辞書中にない単語対については、ベクトルの距離が不当に大きくなったり小さくなったりし、配置が適切なものでなくなる。このため、辞書中にある単語対の距離を適切なものにするのと同時に、辞書中にない単語対の距離は可能な限り変化がないように、各単語のベクトルを変換する必要がある。本発明は、任意の単語対の距離が適切となるように全単語を配置することを目的とする。
 上記目的を達成するために、本発明に係る単語ベクトル変更装置は、単語と該単語の概念を表すベクトルとの対の集合である概念ベースと、意味的に遠いまたは近い単語対の集合である辞書を入力とし、前記概念ベース中の任意の単語A、Bの対である単語対Cに対し、前記単語対Cが前記辞書中にある場合、前記単語Aの変換後のベクトルと前記単語Bの変換後のベクトルとの差ベクトルV’と、前記単語Aの前記概念ベース中のベクトルと前記単語Bの前記概念ベース中のベクトルとの差ベクトルVにスカラー値kを乗算したベクトルkVとの差ベクトルの大きさDを前記単語対Cに対応付け、かつ、前記単語対Cが前記辞書中にない場合、前記差ベクトルV’と前記差ベクトルVとの差ベクトルの大きさDを前記単語対Cに対応付け、全ての単語対Cに対応する前記大きさDの総和が可能な限り小さくなるように、前記概念ベース中の任意の単語のベクトルを変換する変換手段を備えることを特徴とする。
 また、本発明に係る単語ベクトル変更装置の前記変換手段は、前記単語対Cが、前記辞書中の意味的に遠い単語対である場合、前記スカラー値kを1以上の値とし、前記単語対Cが、前記辞書中の意味的に近い単語対である場合、前記スカラー値kを0以上1以下の値とする。
 また、本発明に係る単語ベクトル変更方法は、単語と該単語の概念を表すベクトルとの対の集合である概念ベースを備えた単語ベクトル変換装置における単語ベクトル変換方法であって、意味的に遠いまたは近い単語対の集合である辞書を入力とし、変換手段が、前記概念ベース中の任意の単語A、Bの対である単語対Cに対し、前記単語対Cが前記辞書中にある場合、前記単語Aの変換後のベクトルと前記単語Bの変換後のベクトルとの差ベクトルV’と、前記単語Aの前記概念ベース中のベクトルと前記単語Bの前記概念ベース中のベクトルとの差ベクトルVにスカラー値kを乗算したベクトルkVとの差ベクトルの大きさDを前記単語対Cに対応付け、かつ、前記単語対Cが前記辞書中にない場合、前記差ベクトルV’と前記差ベクトルVとの差ベクトルの大きさDを前記単語対Cに対応付け、全ての単語対Cに対応する前記大きさDの総和が可能な限り小さくなるように、前記概念ベース中の任意の単語のベクトルを変換するステップを備えることを特徴とする。
 本発明に係るプログラムは、コンピュータを、本発明に係る単語ベクトル変更装置の変換手段として機能させるためのプログラムである。
 本発明により、変換後の差ベクトルV’は、変換前の差ベクトルVをk倍したkVにほぼ等しくなる。辞書中にある反義語や同位語といった意味的に遠い単語対に対しては、kをk>1とすることにより、変換後のベクトル間距離は変換前のベクトル間距離より大きくなり、辞書中にある同義語といった意味的に近い単語対に対しては、kをk<1とすることにより、変換後のベクトル間距離は変換前のベクトル間距離より小さくなる。辞書中にない単語対に対しては、変換後のベクトル間距離は変換前のベクトル間距離とあまり変化がないようになる。このようにして任意の単語対の距離が適切となっている全単語の配置を実現した変換後概念ベースを生成できる。
 また、特定の概念ベースには、同一の関係性にある単語対の各単語のベクトルの差ベクトルは、ほぼ同一であるという性質がある。すなわち、単語xのベクトルをUとしたとき、同一の関係性にある単語対(a、b)と単語対(c、d)に対し、
Figure JPOXMLDOC01-appb-M000001

 
が成り立つ。例えば、単語対(男、女)と単語対(おじ、おば)は同一の関係性にあり、
Figure JPOXMLDOC01-appb-M000002

 
が成り立つ。
 本発明においては、単語xの変換後のベクトルをU’としたとき、同一の関係性にある単語対(a、b)と単語対(c、d)に対し、
Figure JPOXMLDOC01-appb-M000003

 
が成り立つ一方で、
Figure JPOXMLDOC01-appb-M000004

 
が成り立つ(但し、kは単語対に依存する)。同一の関係性にある単語対群の各単語対は全て、対応する変換前の差ベクトルの大きさがほぼ同じである。そして、同一の関係性にある単語対群の各単語対は全て、意味的に遠いか、あるいは、意味的に近いか、あるいは、意味的に遠くも近くもないかのいずれかとなる。kは通常、変換前の差ベクトルの大きさに依存して定められる。したがって、同一の関係性にある単語対群の各単語対に対し同一のkの値をとることができる。このため、同一の関係性にある単語対(a、b)と単語対(c、d)に対し、
Figure JPOXMLDOC01-appb-M000005

 
が成り立つ。すなわち、同一の関係性にある単語対の各単語のベクトルの差ベクトルは、ほぼ同一であるという性質を、変換後もなるべく維持することができるという効果もある。
 テキスト間距離算出に、変換後概念ベースを用いることにより、テキストベクトル間の距離関係が適切なものに改善される。
 課題1)の例では、単語「良い」に対し、その反義語「悪い」の方が、同義語「宜しい」よりも、ベクトル間の距離が大きくなるため、テキストAに対し、テキストCの方がテキストBよりもベクトル間の距離が小さくなる。
 課題2)の例では、単語「野球」に対し、その同位語「サッカー」の方が、下位語「草野球」よりも、ベクトル間の距離が大きくなるため、テキストAに対し、テキストCの方がテキストBよりもベクトル間の距離が小さくなる。
 課題3)の例では、単語「野球」に対し、その同義語「ベースボール」の方が、下位語「草野球」よりも、ベクトル間の距離が小さくなるため、テキストAに対し、テキストBの方がテキストCよりもベクトル間の距離が小さくなる。
本発明の実施の形態に係る単語ベクトル変更装置100の構成を示すブロック図である。 概念ベース22の一例を示す図である。 辞書24の反義語に関するレコード群の一例である。 辞書24の同位語に関するレコード群の一例である。 辞書24の同義語に関するレコード群の一例である。 本発明の実施の形態に係る単語ベクトル変更装置100における変換処理ルーチンの一例を示すフローチャートである。
 以下、図面とともに本発明の実施の形態を説明する。
<本発明の実施の形態に係る単語ベクトル変更装置の構成>
 図1は、本発明の請求項1の単語ベクトル変更装置の構成例である。
 単語ベクトル変更装置100は、単語と該単語の概念を表すベクトルとの対の集合である概念ベース22と、意味的に遠いまたは近い単語対の集合である辞書24を入力とし、概念ベース22中の任意の単語A、Bの対である単語対Cに対し、単語対Cが辞書24中にある場合、単語Aの変換後のベクトルと単語Bの変換後のベクトルとの差ベクトルV’と、単語Aの概念ベース22中のベクトルと単語Bの概念ベース22中のベクトルとの差ベクトルVにスカラー値kを乗算したベクトルkVとの差ベクトルの大きさDを単語対Cに対応付け、かつ、単語対Cが辞書24中にない場合、差ベクトルV’と差ベクトルVとの差ベクトルの大きさDを単語対Cに対応付け、全ての単語対Cに対応する大きさDの総和が可能な限り小さくなるように、概念ベース22中の任意の単語のベクトルを変換し、変換後概念ベース32を生成する変換手段30を備える。
 図2は、概念ベース22の例である。概念ベース22は、例えば、非特許文献1や非特許文献2の手法によって生成する。
 概念ベース22中の単語に重複するものはない。
 各単語のベクトルはn次元ベクトルであり、意味的に近い単語のベクトルは、近くに配置されている。
 概念ベース22には名詞、動詞、形容詞等の内容語のみを登録するというようにしてもよい。概念ベース22において単語を終止形で登録し、概念ベース22を検索する際は、単語の終止形で検索するというようにしてもよい。
 辞書24の例として、レコード群が反義語、同位語、同義語それぞれに関するレコード群に分けられているように構成することができる。図3は反義語に関するレコード群の例、図4は同位語に関するレコード群の例、図5は同義語に関するレコード群の例である。図3の各レコードは、基点語とその基点語にとっての反義語のリストからなる。基点語とその反義語リスト中の各反義語との対が、反義語の単語対となる。図4、図5についても同様である。反義語レコード群及び同位語レコード群における単語対は、意味的に遠い単語対である。同義語レコード群における単語対は、意味的に近い単語対である。
 辞書24は上記例に限らず、基点語とその基点語にとっての意味的に遠い単語のリストからなるレコードの群と、基点語とその基点語にとっての意味的に近い単語のリストからなるレコードの群から構成されているようにとることもできる。この場合、基点語とその意味的に遠い単語のリスト中の各単語との対が、意味的に遠い単語対となり、基点語とその意味的に近い単語のリスト中の各単語との対が、意味的に近い単語対となる。
 辞書24は通常、辞書24の同種(意味的に遠い、意味的に近い等)のレコード群において、単語リスト中に単語Bがある基点語Aのレコードがあれば、単語リスト中に単語Aがある基点語Bのレコードがあるような構成である。
 変換手段30の変換処理を、以下のように定式化する。
 概念ベース22中の単語のリストを、
Figure JPOXMLDOC01-appb-M000006

 
とする。
 Wの概念ベース22中のベクトルを
Figure JPOXMLDOC01-appb-M000007

 
とし、Wの変換後概念ベース32中のベクトルを
Figure JPOXMLDOC01-appb-M000008

 
とする。
 τpqは定数であり、ωpqは変数である。
 概念ベース22中の単語対W,Wに対し、τとτとの差ベクトルτ-τに乗算するスカラー値kは、一般に{i,j}に依存し、k{i,j}と表す。
 変換手段30では、以下の目的関数Fを最小化する(ωpq)を求める。
Figure JPOXMLDOC01-appb-M000009

 
は、L2ノルムを表す。
Figure JPOXMLDOC01-appb-M000010

 
 あるいは、以下の目的関数Fを最小化する(ωpq)を求める。
Figure JPOXMLDOC01-appb-M000011

 
 あるいは、F{i,j}
Figure JPOXMLDOC01-appb-M000012

 
のその他の何らかの大きさとし、F{i,j}の総和である目的関数Fを最小化する(ωpq)を求める。
 k{i,j}は下記のように設定することとする。
 k{i,j}は、単語対W,Wが辞書24中の意味的に遠い単語対の場合、k{i,j}≧1として定めておき、単語対W,Wが辞書24中の意味的に近い単語対の場合、0≦k{i,j}≦1として定めておき、単語対W,Wが辞書24中にない場合、k{i,j}=1として定めておく。なお、単語対W,Wが辞書24中の意味的に遠い単語対の場合、k{i,j}≧1と定めたが、k{i,j}>1としてもよい。また、単語対W,Wが辞書24中の意味的に近い単語対の場合、0≦k{i,j}≦1と定めたが、0≦k{i,j}<1としてもよい。
 単語対W,Wが辞書24中の意味的に遠い単語対の場合、k{i,j}を{i,j}に依存しない定数としてもよい。また、定数α>0を定め、
Figure JPOXMLDOC01-appb-M000013

 
としてもよい。また、
Figure JPOXMLDOC01-appb-M000014

 
の最大値以上である定数βを定め、
Figure JPOXMLDOC01-appb-M000015

 
としてもよい。また、
Figure JPOXMLDOC01-appb-M000016

 
が大きい程、k{i,j}を小さくして、元々の距離が大きい単語対に対しては、変換後の距離が過度に大きくならないようにしてもよい。
 単語対W,Wが辞書24中の意味的に近い単語対の場合、k{i,j}を{i,j}に依存しない定数としてもよい。また、定数α>0を定め、
Figure JPOXMLDOC01-appb-M000017

 
のとき
Figure JPOXMLDOC01-appb-M000018

 
とし、
Figure JPOXMLDOC01-appb-M000019

 
のとき
Figure JPOXMLDOC01-appb-M000020

 
としてもよい。また、
Figure JPOXMLDOC01-appb-M000021

 
の最小値以下である定数β≧0を定め、
Figure JPOXMLDOC01-appb-M000022

 
としてもよい。また、
Figure JPOXMLDOC01-appb-M000023

 
が小さい程、k{i,j}を大きくして、元々の距離が小さい単語対に対しては、変換後の距離が過度に小さくならないようにしてもよい。
目的関数Fを最小化する(ωpq)を、例えば確率的勾配降下法を用いて求める。(別の最適化手法でもよい。)確率的勾配降下法は以下のアルゴリズムとなる。
Figure JPOXMLDOC01-appb-M000024

 
 上記アルゴリズムの(m,n)行列(ωpq)の更新部分を、例えばAdagradにより以下のようにして行う。
 上記アルゴリズム開始前に、行列(ωpq)の初期値を例えば、
Figure JPOXMLDOC01-appb-M000025

 
として設定する。
 (m,n)行列(rpq)をとる。上記アルゴリズム開始前に、行列(rpq)の初期値を例えば、
Figure JPOXMLDOC01-appb-M000026

 
として設定する。
 上記アルゴリズムの(m,n)行列(ωpq)の更新部分において、任意の
Figure JPOXMLDOC01-appb-M000027

 
に対し、以下のように更新する。
Figure JPOXMLDOC01-appb-M000028

 
 上記更新を更新(1)と呼ぶことにする。
 目的関数Fが数式1の場合、
Figure JPOXMLDOC01-appb-M000029

 
の計算は以下のようにする。
 1.1)p=iかつF{i,j}≠0のとき
Figure JPOXMLDOC01-appb-M000030

 
 1.2)p=jかつF{i,j}≠0のとき
Figure JPOXMLDOC01-appb-M000031

 
 1.3) 1.1),1.2)以外のとき
Figure JPOXMLDOC01-appb-M000032

 
 目的関数Fが数式2の場合、
Figure JPOXMLDOC01-appb-M000033

 
の計算は以下のようにする。
 2.1)p=iのとき
Figure JPOXMLDOC01-appb-M000034

 
 2.2)p=jのとき
Figure JPOXMLDOC01-appb-M000035

 
 2.3) 2.1),2.2)以外のとき
Figure JPOXMLDOC01-appb-M000036

 
<本発明の実施の形態に係る単語ベクトル変更装置の作用>
 図6は、変換手段30の変換処理ルーチンの一例を示す図である。以下、図6の各ステップの処理内容を述べる。
S1)
 S2~S6の処理からなるターンを実行するか否かを判断する。
 所定の回数を実行済みの場合は、終了と判断して、変換処理ルーチンを終了する。
 所定の回数を実行済みでない場合は、実行すると判断してS2に進む。
 所定の回数を実行済みでない場合でも、現時点の行列(ωpq)と、一つ前のS1時点の行列(ωpq)とが同じ(すなわち収束している)場合、終了と判断して、変換処理ルーチンを終了してもよい。
 変換処理ルーチンを終了する場合、概念ベース22中の各単語Wとその単語ベクトルωとの対の集合を、変換後概念ベース32として出力する。
S2)
 概念ベース22中の単語のリストを、W,W,・・・,Wとする。W,W,・・・,Wの中で、S2で未選定の単語から一つ選定したWを処理対象の単語Xとし、S3に進む。未選定の単語がなければ、本ターンを終了し、S1に進む。
S3)
 辞書24中のWが基点語であるレコード(複数ありえる)中の、対応する単語リストの中で、概念ベース22中にあり、かつ、S3で未選定であり、かつ、単語Wとの(集合としての)対が、本ターンのS4、S6においてこれまで処理をした(集合としての)対でないことを満たす単語から一つ選定したWを処理対象の単語Yとし、S4に進む。そのような単語がなければ、S5に進む。
S4)
 x<yのときi=x,j=yとし、y<xのときi=y,j=xとした上で、{i,j}に対し、上記更新(1)を行う。この際に、
Figure JPOXMLDOC01-appb-M000037

 
を求め、
Figure JPOXMLDOC01-appb-M000038

 
をもとに適切なk{i,j}を求めた上で、上記更新(1)を行うというようにしてもよい。S3に進む。
S5)
 W,W,・・・,Wの中で、Wでなく、かつ、S3で選定したいずれのWでもなく、かつ、S5で未選定であり、かつ、単語Wとの(集合としての)対が、本ターンのS4、S6においてこれまで処理をした(集合としての)対でないことを満たす単語から一つ選定したWを処理対象の単語Zとし、S6に進む。そのような単語がなければ、S2に進む。
 S6の計算量を低減するために、Wを除くW,W,・・・,Wを、変換処理ルーチン開始時のWとの距離の昇順にソートし、その上位G個の中から、(場合によってはソートした順序で)、上記条件を満たす単語を選定するというようにしてもよい。あるいは、Wを除くW,W,・・・,Wの中で、Wとの距離が、ある閾値以下(あるいは未満)であるものの中から、(場合によっては距離の昇順にソートした順序で)、上記条件を満たす単語を選定するというようにしてもよい。
S6)
 x<zのときi=x,j=zとし、z<xのときi=z,j=xとした上で、{i,j}に対し、上記更新(1)を行う。S5に進む。
 上記変換処理ルーチンを行う前に、S2で選定する各Wに対し、S3で選定することになるWと距離
Figure JPOXMLDOC01-appb-M000039

 
の組や、S5で選定することになるWと距離
Figure JPOXMLDOC01-appb-M000040

 
の組のリストを求め、距離
Figure JPOXMLDOC01-appb-M000041

 
をもとに、各単語対(W,W)に対応するスカラー値kを求めておき、変換処理ルーチンでは、そのリストの順序に従ってS3やS5における選定をし、スカラー値kの計算はせず、既に求めたスカラー値kを参照するという構成にしてもよい。
 これまで述べた処理をプログラムとして構築し、当該プログラムを通信回線または記録媒体からインストールし、CPU等の手段で実施することが可能である。
 なお、本発明は、上記の実施例に限定されることなく、特許請求の範囲内において、種々変更・応用が可能である。
 本発明は、単語と該単語の概念を表すベクトルとの対の集合が与えられたとき、任意の単語対の距離が適切となるように単語のベクトルを変換する単語ベクトル変更技術に適用可能である。
22 概念ベース
24 辞書
30 変換手段
32 変換後概念ベース
100 単語ベクトル変更装置

Claims (4)

  1.  単語と該単語の概念を表すベクトルとの対の集合である概念ベースと、
     意味的に遠いまたは近い単語対の集合である辞書を入力とし、
     前記概念ベース中の任意の単語A、Bの対である単語対Cに対し、前記単語対Cが前記辞書中にある場合、前記単語Aの変換後のベクトルと前記単語Bの変換後のベクトルとの差ベクトルV’と、前記単語Aの前記概念ベース中のベクトルと前記単語Bの前記概念ベース中のベクトルとの差ベクトルVにスカラー値kを乗算したベクトルkVとの差ベクトルの大きさDを前記単語対Cに対応付け、かつ、前記単語対Cが前記辞書中にない場合、前記差ベクトルV’と前記差ベクトルVとの差ベクトルの大きさDを前記単語対Cに対応付け、全ての単語対Cに対応する前記大きさDの総和が可能な限り小さくなるように、前記概念ベース中の任意の単語のベクトルを変換する変換手段を備えることを特徴とする単語ベクトル変更装置。
  2.  前記変換手段は、前記単語対Cが、前記辞書中の意味的に遠い単語対である場合、前記スカラー値kを1以上の値とし、前記単語対Cが、前記辞書中の意味的に近い単語対である場合、前記スカラー値kを0以上1以下の値とする請求項1記載の単語ベクトル変更装置。
  3.  単語と該単語の概念を表すベクトルとの対の集合である概念ベースを備えた単語ベクトル変換装置における単語ベクトル変換方法であって、
     意味的に遠いまたは近い単語対の集合である辞書を入力とし、
     変換手段が、前記概念ベース中の任意の単語A、Bの対である単語対Cに対し、前記単語対Cが前記辞書中にある場合、前記単語Aの変換後のベクトルと前記単語Bの変換後のベクトルとの差ベクトルV’と、前記単語Aの前記概念ベース中のベクトルと前記単語Bの前記概念ベース中のベクトルとの差ベクトルVにスカラー値kを乗算したベクトルkVとの差ベクトルの大きさDを前記単語対Cに対応付け、かつ、前記単語対Cが前記辞書中にない場合、前記差ベクトルV’と前記差ベクトルVとの差ベクトルの大きさDを前記単語対Cに対応付け、全ての単語対Cに対応する前記大きさDの総和が可能な限り小さくなるように、前記概念ベース中の任意の単語のベクトルを変換するステップを備えることを特徴とする単語ベクトル変更方法。
  4.  コンピュータを、請求項1又は請求項2に記載の単語ベクトル変更装置の変換手段として機能させるためのプログラム。
PCT/JP2019/015025 2018-04-11 2019-04-04 単語ベクトル変更装置、方法、及びプログラム WO2019198618A1 (ja)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US17/046,668 US11537790B2 (en) 2018-04-11 2019-04-04 Word vector changing device, method, and program

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2018076253A JP6973255B2 (ja) 2018-04-11 2018-04-11 単語ベクトル変更装置、方法、及びプログラム
JP2018-076253 2018-04-11

Publications (1)

Publication Number Publication Date
WO2019198618A1 true WO2019198618A1 (ja) 2019-10-17

Family

ID=68163178

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2019/015025 WO2019198618A1 (ja) 2018-04-11 2019-04-04 単語ベクトル変更装置、方法、及びプログラム

Country Status (3)

Country Link
US (1) US11537790B2 (ja)
JP (1) JP6973255B2 (ja)
WO (1) WO2019198618A1 (ja)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11416684B2 (en) 2020-02-06 2022-08-16 Adobe Inc. Automated identification of concept labels for a set of documents
US11354513B2 (en) * 2020-02-06 2022-06-07 Adobe Inc. Automated identification of concept labels for a text fragment
CN113268565B (zh) * 2021-04-27 2022-03-25 山东大学 一种基于概念文本的词向量快速生成方法和装置
WO2023148948A1 (ja) * 2022-02-07 2023-08-10 三菱電機株式会社 情報処理装置、更新方法、及び更新プログラム

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130197900A1 (en) * 2010-06-29 2013-08-01 Springsense Pty Ltd Method and System for Determining Word Senses by Latent Semantic Distance
CN106484682B (zh) * 2015-08-25 2019-06-25 阿里巴巴集团控股有限公司 基于统计的机器翻译方法、装置及电子设备
US11023685B2 (en) * 2019-05-15 2021-06-01 Adobe Inc. Affect-enriched vector representation of words for use in machine-learning models

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
BESSHO, KATSUJI ET AL.: "A Study of Word Vector Conversion Method Reflecting Antonym", SIG-KBS-112-B508, 10 November 2017 (2017-11-10), pages 7 - 12 *
KASAHARA, KANAME: "Thesaurus-based Adjustment of Arranging Words in a Multi-dimensional Space", THE 17TH ANNUAL CONFERENCE OF THE JAPANESE SOCIETY FOR ARTIFICIAL INTELLIGENCE, 13 February 2008 (2008-02-13) *
MACHIDA, ATSUSHI ET AL.: "Refining Method of A Knowledge Base for Measuring Semantic Similarity between Words", PROCEEDINGS OF THE 60TH NATIONAL CONVENTION OF IPSJ, vol. 12, no. 2, 14 March 2000 (2000-03-14), pages 273 - 274 *

Also Published As

Publication number Publication date
JP2019185439A (ja) 2019-10-24
US20210034822A1 (en) 2021-02-04
JP6973255B2 (ja) 2021-11-24
US11537790B2 (en) 2022-12-27

Similar Documents

Publication Publication Date Title
WO2019198618A1 (ja) 単語ベクトル変更装置、方法、及びプログラム
WO2020182122A1 (zh) 用于生成文本匹配模型的方法和装置
CN109783817B (zh) 一种基于深度强化学习的文本语义相似计算模型
JP2022050379A (ja) 意味検索方法、装置、電子機器、記憶媒体およびコンピュータプログラム
WO2020143320A1 (zh) 文本词向量获取方法、装置、计算机设备及存储介质
CN108399213B (zh) 一种面向用户个人文件的聚类方法及系统
KR101939209B1 (ko) 신경망 기반의 텍스트의 카테고리를 분류하기 위한 장치, 이를 위한 방법 및 이 방법을 수행하기 위한 프로그램이 기록된 컴퓨터 판독 가능한 기록매체
JP2016207141A (ja) 要約生成装置、要約生成方法、及び要約生成プログラム
CN112434134B (zh) 搜索模型训练方法、装置、终端设备及存储介质
JP2018180789A (ja) クエリクラスタリング装置、方法、及びプログラム
CN115374362A (zh) 多路召回模型训练方法、多路召回方法、装置及电子设备
JP6698061B2 (ja) 単語ベクトル変換装置、方法、及びプログラム
US20220222442A1 (en) Parameter learning apparatus, parameter learning method, and computer readable recording medium
CN107239554A (zh) 一种基于匹配度检索英文文本的方法
JP2018173909A (ja) 学習プログラム、学習方法および学習装置
Wang et al. Reproducibility, Replicability, and Insights into Dense Multi-Representation Retrieval Models: from ColBERT to Col
JP6586026B2 (ja) 単語ベクトル学習装置、自然言語処理装置、方法、及びプログラム
Schamoni et al. A dataset and reranking method for multimodal MT of user-generated image captions
CN111785274A (zh) 一种针对语音识别系统的黑盒对抗样本攻击方法
US11947589B2 (en) Web-scale personalized visual search recommendation service
JP6495206B2 (ja) 文書概念ベース生成装置、文書概念検索装置、方法、及びプログラム
CN111723179B (zh) 基于概念图谱的反馈模型信息检索方法、系统及介质
JP2011039977A (ja) 単語クラスタリング装置及び方法及びプログラム及びプログラムを格納した記録媒体
US20210192139A1 (en) Language processing device, language processing system and language processing method
CN111078886B (zh) 基于dmcnn的特殊事件提取系统

Legal Events

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

Ref document number: 19785884

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19785884

Country of ref document: EP

Kind code of ref document: A1