WO2020009067A1 - テキスト類似度算出装置、テキスト類似度算出方法、及びプログラム - Google Patents

テキスト類似度算出装置、テキスト類似度算出方法、及びプログラム Download PDF

Info

Publication number
WO2020009067A1
WO2020009067A1 PCT/JP2019/026132 JP2019026132W WO2020009067A1 WO 2020009067 A1 WO2020009067 A1 WO 2020009067A1 JP 2019026132 W JP2019026132 W JP 2019026132W WO 2020009067 A1 WO2020009067 A1 WO 2020009067A1
Authority
WO
WIPO (PCT)
Prior art keywords
text
vector
similarity
image
image information
Prior art date
Legal status (The legal status 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 status listed.)
Ceased
Application number
PCT/JP2019/026132
Other languages
English (en)
French (fr)
Inventor
済央 野本
久子 浅野
準二 富田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NTT Inc
Original Assignee
Nippon Telegraph and Telephone Corp
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 Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Publication of WO2020009067A1 publication Critical patent/WO2020009067A1/ja
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/35Clustering; Classification
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/58Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually

Definitions

  • the present invention relates to a text similarity calculating device, a text similarity calculating method, and a program, and particularly to a text similarity calculating device, a text similarity calculating method, and a program for calculating similarity between texts.
  • AI services related to natural language processing that handles text include FAQ search, chatbots, and interactive systems.
  • the meaning of a word or sentence can be mechanically calculated by vectorizing the meaning of a word into a high-dimensional real number vector expression (word vector) by a technology.
  • word vector a high-dimensional real number vector expression
  • Patent Document 1 there is a technique for estimating an appropriate corresponding concept vector for an arbitrary word in a text for evaluation.
  • word vectors also called word meaning vectors, concept vectors, word distribution expressions, etc.
  • word vectors based on co-occurrence are based on the hypothesis that words used in similar contexts must have similar meanings.
  • words that are grammatically close are vectors that are close in the vector space.
  • the present invention has been made in view of the above points, and has as its object to provide a text similarity calculating apparatus, a text similarity calculating method, and a program that can accurately calculate similarity between texts. .
  • a text similarity calculating device is a text similarity calculating device that calculates a similarity between an input first text and an input second text, wherein the first text is the first text.
  • An image information conversion unit configured to convert the second text into second image information corresponding to the second text while converting the first image information into first image information corresponding to the text, the first image information, and the second image
  • An image similarity calculation unit that calculates an image similarity that is a similarity with information; and a first text vector representing the first text based on the first text, and based on the second text.
  • a text vector generation unit that generates a second text vector representing the second text, and a text vector that is a similarity between the first text vector and the second text vector.
  • a text vector similarity calculation unit that calculates a similarity between the first text and the second text based on the image similarity and the text vector similarity. And a calculation unit.
  • a text similarity calculation method is a text similarity calculation method for calculating a similarity between an input first text and an input second text, wherein the image information conversion unit includes: The first text is converted to first image information corresponding to the first text, and the second text is converted to second image information corresponding to the second text.
  • the image information conversion unit converts the first text into first image information corresponding to the first text, and converts the second text into The image data is converted into the second image information corresponding to the second text, and the image similarity calculation unit calculates the image similarity which is the similarity between the first image information and the second image information.
  • the text vector generation unit generates a first text vector representing the first text based on the first text, and generates a second text vector representing the second text based on the second text.
  • a vector similarity calculation unit calculates a text vector similarity, which is a similarity between the first text vector and the second text vector, and the text similarity calculation unit calculates the text vector similarity based on the image similarity and the text vector similarity. Then, the similarity between the first text and the second text is calculated.
  • the image similarity which is the similarity between the first image information corresponding to the first text obtained by converting the first text and the second image information corresponding to the second text obtained by converting the second text
  • calculating a text vector similarity which is a similarity between the first text vector representing the first text and the second text vector representing the second text, based on the image similarity and the text vector similarity.
  • the text similarity calculating apparatus estimates the degree of inclusion of universal visual information, which is universal visual information, in the first image information, and includes the universal visual information in the second image information.
  • a visual information estimating unit that estimates a degree at which the first text and the second text are similar to each other based on the degree estimated by the visual information estimating unit. The degree can be calculated.
  • a text similarity calculating device is a text similarity calculating device that calculates a similarity between an input first text and an input second text, wherein the first text is the first text.
  • An image information conversion unit configured to convert the second text into second image information corresponding to the second text while converting the first text information into first image information corresponding to the text;
  • An image vector generating unit that generates a first image vector representing one image information, and generates a second image vector representing the second image information based on the second image information; and Generating a first text vector representing the first text, and generating a second text vector representing the second text based on the second text.
  • a generating unit configured to generate a first mixed vector obtained by mixing the first image vector and the first text vector, and to generate a second mixed vector obtained by mixing the second image vector and the second text vector.
  • a generated image / text mixed vector generation unit, and a vector similarity that is a similarity between the first mixed vector and the second mixed vector is calculated as a similarity between the first text and the second text.
  • a text similarity calculator configured to calculate a text similarity between the first text and the second text vector.
  • a text similarity calculation method is a text similarity calculation method for calculating a similarity between an input first text and an input second text
  • the image information conversion unit includes: The first text is converted into first image information corresponding to the first text, and the second text is converted into second image information corresponding to the second text. A first image vector representing the first image information is generated based on one image information, and a second image vector representing the second image information is generated based on the second image information to generate a text vector. Unit generates a first text vector representing the first text based on the first text, and generates a second text representing the second text based on the second text.
  • a vector, and an image text mixed vector generating unit generates a first mixed vector obtained by mixing the first image vector and the first text vector, and generates the second image vector and the second text vector.
  • the text similarity calculator calculates a vector similarity, which is a similarity between the first mixed vector and the second mixed vector, with the first text and the second mixed vector. It is calculated as the similarity with two texts.
  • the image information conversion unit converts the first text into first image information corresponding to the first text, and converts the second text into An image vector generating unit that converts the image data into second image information corresponding to the second text generates a first image vector representing the first image information based on the first image information, and generates the first image vector based on the second image information.
  • a second image vector representing the second image information is generated, and the text vector generation unit generates a first text vector representing the first text based on the first text, and generates a second text vector based on the second text.
  • the image text mixed vector generation unit generates a first mixed vector obtained by mixing the first image vector and the first text vector, and generates a second mixed vector obtained by mixing the second image vector and the second text vector.
  • a vector is generated, and the text similarity calculation unit calculates a vector similarity, which is a similarity between the first mixed vector and the second mixed vector, as a similarity between the first text and the second text.
  • the first mixed vector is generated by mixing the first image vector representing the first image information corresponding to the first text and the first text vector representing the first text.
  • the vector similarity which is the similarity between the vector and the second mixed vector, as the similarity between the first text and the second text, it is possible to accurately calculate the similarity between the texts.
  • the text similarity calculating apparatus estimates the degree of inclusion of universal visual information, which is universal visual information, in the first image information, and includes the universal visual information in the second image information.
  • a visual information estimating unit that estimates a degree at which the first text and the second text are similar to each other based on the degree estimated by the visual information estimating unit. The degree can be calculated.
  • the text similarity calculating apparatus includes an image information conversion unit that converts an input text into image information corresponding to the text, and the image information includes universal visual information that is universal visual information.
  • a visual information estimating unit for estimating a degree to be obtained, an image vector generating unit for generating an image vector representing the image information based on the image information, and a text generating a text vector representing the text based on the text.
  • a vector generating unit based on the degree of the universal visual information included in the image information estimated by the visual information estimating unit, the image vector, and the text vector, an image text for generating a mixed vector. And a mixed vector generation unit.
  • the image information conversion unit converts the input text into image information corresponding to the text
  • the visual information estimating unit uses a universal visual information for the image information. Estimating the degree to which universal visual information that is information is included, an image vector generation unit generates an image vector representing the image information based on the image information, and a text vector generation unit generates a text vector based on the text. Generating a text vector representing the text, the image text mixed vector generation unit, estimated by the visual information estimating unit, the degree to which the universal visual information is included in the image information, the image vector, A mixed vector is generated based on the text vector.
  • a program according to the present invention is a program for functioning as each unit of the above-described text similarity calculation device.
  • the text similarity calculation device According to the text similarity calculation device, the text similarity calculation method, and the program of the present invention, the similarity between texts can be calculated with high accuracy.
  • FIG. 1 is a block diagram illustrating a configuration of a text similarity calculation device according to a first embodiment of the present invention.
  • 5 is a flowchart illustrating a text similarity calculation processing routine of the text similarity calculation device according to the first embodiment of the present invention. It is a block diagram showing the composition of the text similarity calculation device concerning a 2nd embodiment of the present invention.
  • 9 is a flowchart illustrating a text similarity calculating process routine of the text similarity calculating device according to the second embodiment of the present invention. It is a block diagram showing the composition of the text similarity calculation device concerning a 3rd embodiment of the present invention.
  • 15 is a flowchart illustrating a text similarity calculation processing routine of the text similarity calculation device according to the third embodiment of the present invention.
  • FIG. 13 is a block diagram showing a configuration in which a configuration using universal visual information is applied to the text similarity calculation device according to the third embodiment of the present invention.
  • FIG. 13 is a block diagram illustrating a first modification of the text similarity calculation device according to the third embodiment of the present invention.
  • FIG. 14 is a block diagram illustrating a second modification of the text similarity calculation device according to the third embodiment of the present invention.
  • This embodiment uses features other than the wording in combination to make it possible to identify words that are close in wording but have different meanings.
  • image information is used as a feature other than the wording.
  • the task is solved by using visual differences that cannot be captured by grammatical similarity.
  • the text image information conversion uses, for example, a web search.
  • the degree of having universal visual information is estimated, and the image information is used according to the degree.
  • it is estimated whether or not the text has universal visual information and only the text information estimated to have universal visual information uses image information.
  • the case where the degree of having the universal visual information is low indicates a case where the visual feature is unstable, and the text having no universal visual information is, for example, “you / me” or “ “/ Bottom” or other text that has no visual entity in the real world.
  • the estimation of the presence or absence of universal visual information is performed, for example, by (1) estimating whether the obtained image data is a photograph or an illustration. It is presumed that what is a photograph has universal visual information, and what is an illustration does not have universal visual information. Illustrations include a lot of abstract things, and the impression of an abstract concept varies from person to person. Since it is considered that there is no merit of using image information for such an abstract concept, illustrations are regarded as having no universal visual information.
  • the magnitude of the variance of the feature amounts of the obtained plurality of image data is used (the smaller the variance of the feature amounts, the more stable the visual It can be estimated by using a feature amount.
  • FIG. 1 is a block diagram showing a configuration of a text similarity calculating device 10 according to the first embodiment of the present invention.
  • the text similarity calculation device 10 is configured by a computer including a CPU, a RAM, and a ROM that stores a program for executing a text similarity calculation processing routine described later. It is configured.
  • a text similarity calculation device 10 includes an input unit 100, an image information conversion unit 110, an image similarity calculation unit 120, a text vector generation unit 130, a text vector similarity It comprises a degree calculation unit 140, a text similarity calculation unit 150, and an output unit 160.
  • the input unit 100 receives input of the first text and the second text.
  • the text is written in a natural sentence and includes one or more words.
  • the text may be one word, a sentence, a document, or the like.
  • the input unit 100 passes the received first text and second text to the image information conversion unit 110 and the text vector generation unit 130.
  • the image information conversion unit 110 converts the first text into first image information corresponding to the first text, and converts the second text into second image information corresponding to the second text.
  • the image information conversion unit 110 to convert text to image information
  • web-api for example, web-api or the like
  • an image search is performed by a web search, and the image data that is the search result and the top n search data items obtained are used as image information.
  • the image information conversion unit 110 performs an image search on the first text by web search, and obtains, as the first image information, the image data obtained as a search result in the top n search results. Similarly, the image information conversion unit 110 performs an image search for the second text by a web search, and obtains, as the second image information, the image data obtained as the search result in the top n search results.
  • the image information conversion unit 110 passes the first image information and the second image information to the image similarity calculation unit 120.
  • the image similarity calculator 120 calculates an image similarity S i that is a similarity between the first image information and the second image information.
  • the image similarity calculation unit 120 calculates the image similarity S i that is the similarity between the first image information and the second image information by using an arbitrary image similarity calculation method.
  • the image similarity S i is calculated using an existing method such as weighting the feature points according to the degree of attention around the feature points and obtaining a weighted similarity.
  • an existing method such as weighting the feature points according to the degree of attention around the feature points and obtaining a weighted similarity.
  • the image similarity calculation unit 120 compares the plurality of image data with the other image data. Are calculated for all the combinations of the first and second image information, and the average is set as the image similarity S i between the first image information and the second image information.
  • the image similarity calculation unit 120 passes the calculated image similarity S i to the text similarity calculation unit 150.
  • the text vector generating unit 130 generates a first text vector representing the first text based on the first text, and generates a second text vector representing the second text based on the second text.
  • the number of dimensions of the text vector is a predetermined number of dimensions, and is the same for all text vectors.
  • the text vector generation unit 130 learns a word vector from a large amount of text corpus (not shown) collected in advance to generate a text vector corresponding to the text. It is not necessary to perform the learning each time the processing is performed, and a word vector that has been learned in advance may be used. Further, as a method of learning a word vector, an existing method may be used.
  • the text vector generation unit 130 generates a text vector corresponding to the text using a word vector corresponding to each word included in the text.
  • a method of generating a text vector corresponding to a text an existing method such as the method of Reference Document 2 can be used.
  • Reference Document 2 Katsuhito Bessho, 3 others, "Study of Document Summarization Using Word Vector (Life Intelligence and Office Information System)", IEICE Technical Report: IEICE technical report: IEICE Technical Report 114 (32), May 2014.
  • the text vector generation unit 130 passes the generated first text vector and second text vector to the text vector similarity calculation unit 140.
  • Text vector similarity calculation unit 140 calculates a first text vector, the text vector similarity S t is the similarity between the second text vector.
  • a text vector similarity S t is a similarity between the text vector is calculated by using the existing methods of calculation methods such as the vector similarity references 2.
  • the similarity may be calculated using the Euclidean distance between text vectors or the cosine similarity.
  • the text vector similarity calculator 140 passes the calculated text vector similarity St to the text similarity calculator 150.
  • Text similarity calculation unit 150 an image similarity S i, based on the text vector similarity S t, is calculated with the first text, the similarity S of the second text.
  • text similarity calculation unit 150 a first text, a similarity S of the second text, the linear sum of the image similarity S i and text vector similarity S t (the following formula (1) ).
  • is a weight, which is determined in advance by using an evaluation set or the like. ⁇ is determined, for example, as follows.
  • a plurality of texts B are prepared for a certain text A.
  • Each of the plurality of texts B is manually ranked based on the similarity of the meaning with the text A. That is, the higher the rank, the higher the semantic similarity between the text A and the text B.
  • is determined based on this parameter. For example, the obtained parameter can be directly used as ⁇ . Note that ⁇ may be set to any value manually.
  • the text similarity calculation unit 150 passes the calculated similarity S between the first text and the second text to the output unit 160.
  • the output unit 160 outputs the similarity S between the first text and the second text.
  • FIG. 2 is a flowchart showing a text similarity calculation processing routine according to the embodiment of the present invention.
  • the text similarity calculation device 10 executes a text similarity calculation processing routine shown in FIG.
  • step S100 the input unit 100 receives input of the first text and the second text.
  • step S110 the text vector generation unit 130 generates a first text vector representing the first text based on the first text, and generates a second text vector representing the second text based on the second text. I do.
  • step S120 the text vector similarity calculation unit 140 calculates a first text vector, the text vector similarity S t is the similarity between the second text vector.
  • step S130 the image information conversion unit 110 converts the first text into first image information corresponding to the first text, and converts the second text into second image information corresponding to the second text.
  • step S140 the image similarity calculation unit 120 calculates an image similarity S i that is a similarity between the first image information and the second image information.
  • step S150 the text similarity calculation unit 150, an image similarity S i, based on the text vector similarity S t, is calculated with the first text, the similarity S of the second text.
  • step S160 the output unit 160 outputs the similarity S between the first text and the second text.
  • the first image information corresponding to the first text is converted, and the second image information corresponding to the first text is converted.
  • An image similarity which is a similarity with the second image information corresponding to the text
  • a text vector similarity which is a similarity between the first text vector representing the first text and the second text vector representing the second text
  • the degree of similarity between the texts can be accurately calculated.
  • FIG. 3 is a block diagram showing a configuration of the text similarity calculating device 20 according to the second embodiment of the present invention.
  • the text similarity calculation device 20 is configured by a computer including a CPU, a RAM, and a ROM storing a program for executing a text similarity calculation processing routine to be described later. It is configured.
  • the text similarity calculating device 20 includes an input unit 100, an image information converting unit 110, a visual information estimating unit 212, an image information use determining unit 214,
  • the calculation unit 220 includes a text vector generation unit 130, a text vector similarity calculation unit 140, a text similarity calculation unit 250, and an output unit 160.
  • the image information conversion unit 110 passes the first image information and the second image information to the visual information estimation unit 212 and the image similarity calculation unit 220.
  • the visual information estimation unit 212 estimates the degree to which the first image information includes universal visual information, which is universal visual information, and estimates the degree to which the second image information includes universal visual information.
  • the visual information estimation unit 212 estimates whether each of the plurality of image data included in the first image information has universal visual information. Whether to have universal visual information is determined based on whether the obtained image data is a photograph or an illustration.
  • Reference 3 an existing technology such as Reference 3 can be used.
  • Reference 3 Kazuki Otsuka, 3 others, "Identification of Pictures, Paintings and Illustrations Using Deep Learning", Information Processing Society of Japan, Proc. Of the 79th Annual Conference, March 2017, p. p. 371-372.
  • the visual information estimating unit 212 estimates a ratio of image data determined to be a photograph among a plurality of image data included in the first image information as a degree at which the universal visual information is included in the first image information. I do.
  • the visual information estimating unit 212 sets the ratio of the image data determined to be a photograph among the plurality of image data included in the second image information to a universal It is estimated as the degree to which visual information is included.
  • the visual information estimating unit 212 passes the estimated first image information having the universal visual information and the second image information having the universal visual information to the image information use determining unit 214 as the estimation result.
  • the image information use determination unit 214 determines a text based on the degree of the universal visual information included in the first image information estimated by the visual information estimating unit 212 and the degree of the universal visual information included in the second image information.
  • the similarity calculation unit 250 determines whether to use the image similarity S i .
  • the image information use determination unit 214 determines that the text similarity calculation unit determines that at least one of the first image information and the second image information includes universal visual information less than a predetermined threshold. 250 determines not to use the image similarity S i . That is, the image information is not used for the subsequent processing.
  • the image information use determination unit 214 250 decides to use the image similarity S i .
  • the image information use determination unit 214 passes the fact to the text similarity calculation unit 250.
  • the image information use determination unit 214 notifies the image similarity calculation unit 220 and the text similarity calculation unit 250 of that fact. hand over.
  • Image similarity calculation unit 220 image information utilization judging unit 214, if it is decided to use an image similarity S t, the first image information, the image similarity S is a similarity between the second image information Calculate i .
  • the image similarity calculation unit 220 passes the calculated image similarity S i to the text similarity calculation unit 250.
  • the text similarity calculation unit 250 calculates the text similarity S i based on the image similarity S i and the text vector similarity S t .
  • the similarity S between the first text and the second text is calculated. In this case, the same processing as the text similarity calculation unit 150 is performed.
  • the text similarity calculation unit 250 determines the first text and the second text based on the text vector similarity S t . A similarity S with two texts is calculated.
  • the text similarity calculator 250 sets the text vector similarity S i as the similarity S between the first text and the second text.
  • 0 may be set.
  • the image information use determination unit 214 determines based on the degree of the universal visual information included in the first image information estimated by the visual information estimation unit 212 and the degree of the universal visual information included in the second image information. , ⁇ may be adjusted.
  • the estimated value of the degree at which the universal visual information is included is normalized to 1, and a method of using a larger value, using a smaller value, or using an average as a value of ⁇ is used. Is also good.
  • the value of ⁇ can be between 0 and 1.
  • the text similarity calculator 250 passes the calculated similarity S between the first text and the second text to the output unit 160.
  • FIG. 4 is a flowchart showing a text similarity calculation processing routine according to the second embodiment of the present invention. Note that the same processing as the text similarity calculation processing routine according to the first embodiment is denoted by the same reference numeral, and detailed description is omitted.
  • step S232 the visual information estimating unit 212 estimates the degree at which the first image information includes universal visual information, which is universal visual information, and determines the degree at which the second image information includes universal visual information. presume.
  • step S234 the image information use determining unit 214 determines that the degree of the universal visual information included in the first image information, which is estimated by the visual information estimating unit 212, is less than the threshold, or that the universal If the degree at which the visual information is included is less than the threshold, the text similarity calculating unit 250 determines not to use the image similarity S i .
  • step S234 If it is determined that the image similarity S i is to be used (YES in step S234), the processing in steps S140 to S160 is performed.
  • step S250 text similarity calculation unit 250, based on the text vector similarity S t, the first text, the A similarity S with two texts is calculated.
  • the degree to which the universal visual information is included in the first image information is estimated, and the universal visual information is included in the second image information. Estimating the degree, if it is estimated that the degree to which the universal visual information is included in the first image information is less than the threshold, or if it is estimated that the universal visual information is not included in the second image information, the image similarity Is determined not to be used, and the similarity between texts can be calculated with high accuracy because the text vector similarity is set as the similarity between the first text and the second text.
  • FIG. 5 is a block diagram showing a configuration of a text similarity calculating device 30 according to the third embodiment of the present invention.
  • the text similarity calculation device 30 is configured by a computer including a CPU, a RAM, and a ROM storing a program for executing a text similarity calculation processing routine to be described later. It is configured.
  • the text similarity calculating device 30 includes an input unit 100, an image information converting unit 110, an image vector generating unit 315, a text vector generating unit 130, and an image text mixed vector. It comprises a generation unit 335, a text similarity calculation unit 350, and an output unit 160.
  • the text vector generation unit 130 passes the first text vector and the second text vector to the image text mixed vector generation unit 335.
  • the image vector generation unit 315 generates a first image vector representing the first image information based on the first image information, and generates a second image vector representing the second image information based on the second image information. I do.
  • the number of dimensions of an image vector is a predetermined number of dimensions, and is the same for all image vectors. Note that the number of dimensions of the image vector need not be the same as the number of dimensions of the text vector.
  • the image vector generation unit 315 uses, for example, an existing technology such as Reference Document 4 to generate an image vector corresponding to the image data for each of n pieces of image data included in the first image information. Generate.
  • Reference Document 4 Seiichi Konya and two others, "Classification of cooking images by visual words integrating multiple features", IEICE technical report. LOIS, Life Intelligence and Office Information Systems, July 2010, p. p. 35-39.
  • taking the center of gravity of the n image vectors may destroy the originally provided visual information.
  • the image vector closest to the barycenter vector among the image vectors for each of the n pieces of image data included in the first image information may be set as the first image vector.
  • the image vector generation unit 315 generates a second image vector representing the second image information.
  • the image vector generation unit 315 passes the first image vector and the second image vector to the image text mixed vector generation unit 335.
  • the image text mixed vector generation unit 335 generates a first mixed vector obtained by mixing the first image vector and the first text vector, and generates a second mixed vector obtained by mixing the second image vector and the second text vector.
  • the image text mixed vector generation unit 335 generates a first mixed vector by combining the first text vector and the first image vector.
  • An existing method can be used as the combining method. For example, a method of directly connecting the first image vector to the end of the first text vector may be adopted.
  • the first text vector is (a, b, c) and the first image vector is (d, e, f, g)
  • the first mixed vector combining these is (a, b, c).
  • D, e, f, g D, e, f, g.
  • the image text mixed vector generation unit 335 generates a second mixed vector obtained by mixing the second image vector and the second text vector.
  • the image / text mixed vector generation unit 335 passes the first mixed vector and the second mixed vector to the text similarity calculation unit 350.
  • the text similarity calculator 350 calculates the mixed vector similarity, which is the similarity between the first mixed vector and the second mixed vector, as the similarity S between the first text and the second text.
  • the text similarity calculation unit 350 calculates the mixed vector similarity, which is the similarity between the first mixed vector and the second mixed vector, by a method such as calculating the Euclidean distance or the cosine similarity. I do.
  • the text similarity calculator 350 passes the calculated similarity S between the first text and the second text to the output unit 160.
  • FIG. 6 is a flowchart illustrating a text similarity calculation processing routine according to the third embodiment of the present invention. Note that the same processing as the text similarity calculation processing routine according to the first embodiment is denoted by the same reference numeral, and detailed description is omitted.
  • step S335 the image vector generation unit 315 generates a first image vector representing the first image information based on the first image information, and generates a second image vector representing the second image information based on the second image information. Generate an image vector.
  • step S340 the image text mixed vector generation unit 335 generates a first mixed vector obtained by mixing the first image vector and the first text vector, and mixes the second image vector and the second text vector. Generate a second mixture vector.
  • step S350 the text similarity calculation unit 350 calculates a mixed vector similarity, which is a similarity between the first mixed vector and the second mixed vector, as a similarity S between the first text and the second text. .
  • the first text vector converted from the first text and representing the first image information corresponding to the first text is represented by the first text vector.
  • Generating a first mixed vector obtained by mixing the first text vector and the second text vector, and converting the second text, the second image vector representing the second image information corresponding to the second text, and the second text representing the second text Generating a second mixed vector obtained by mixing the first and second vectors, and calculating a vector similarity that is a similarity between the first mixed vector and the second mixed vector as a similarity between the first text and the second text;
  • the visual information estimation unit 212 has universal visual information by using the magnitude of the variance of the feature amounts of the obtained plurality of image data (determining the variance of the feature amounts at an arbitrary threshold). The degree may be estimated. In this case, since a plurality of image data are used, the number n of image data included in each of the first image information and the second image information is set to n> 1. Further, the determination of whether to use the image information by the image information use determination unit 214 is omitted.
  • the image similarity calculator 220 calculates an image similarity S i that is a similarity between the first image information and the second image information.
  • text similarity calculation unit 250 an image similarity S i, and text vector similarity S t, based on the degree estimated by visual information estimating unit 212, a first text and the second text The similarity S is calculated.
  • the text similarity calculation unit 250 changes the value of the weight ⁇ according to the first degree and the second degree.
  • the visual information estimating unit 212 estimates whether the first image information includes universal visual information, which is universal visual information, and determines whether the second image information includes universal visual information. May be estimated.
  • FIG. 7 is a block diagram showing a configuration in which a configuration using universal visual information is applied to the text similarity calculation device 30 according to the third embodiment.
  • the text similarity calculation unit 350 calculates the similarity
  • the similarity calculation of the image text mixed vector is performed based on the estimation result of the visual information estimation unit 212.
  • An example of the calculation method is shown below.
  • the image information use determining unit 214 determines that the degree of inclusion of universal visual information in the first image information estimated by the visual information estimating unit 212 is less than a threshold, or that universal image information is included in the second image information. If the degree of the occurrence is less than the threshold, the image text mixed vector generation unit 335 determines not to use the image vector.
  • the image information use determining unit 214 uses the image text mixed vector generation unit 335 to use the image vector. To decide.
  • the image information use determination unit 214 passes the fact to the image text mixed vector generation unit 335.
  • the image information use determination unit 214 passes the fact to the image / vector generation unit 315 and the image / text mixed vector generation unit 335.
  • the image text mixed vector generation unit 335 sets the first text vector as the first mixed vector, and sets the second text vector as the second mixed vector. Vector.
  • the first mixed vector and the second mixed vector are generated for the input first text and the second text.
  • the present invention is not limited to this.
  • a plurality of mixed vectors for a plurality of texts are generated in advance, and a first mixed vector and a second mixed vector corresponding to each of the input first text and the second text are searched, and the obtained first mixed vector is obtained.
  • the vector similarity which is the similarity between the vector and the second mixed vector, may be calculated as the similarity S between the first text and the second text.
  • the text similarity calculating device 30 according to the third embodiment can be modified as follows.
  • FIG. 8 is a block diagram showing a first modification of the text similarity calculating device 30 according to the third embodiment of the present invention.
  • the text similarity calculation device 30 further includes an image / text mixed vector DB 370 and an input unit 400.
  • the input unit 100 receives input of a plurality of texts for generating a plurality of mixed vectors.
  • the image text mixed vector DB 370 stores a plurality of mixed vectors generated for a plurality of texts received by the input unit 100.
  • the input unit 400 receives the input of the first text and the second text, and passes the input to the text similarity calculation unit 350.
  • the text similarity calculation unit 350 searches the image text mixed vector DB 370 for the first mixed vector and the second mixed vector corresponding to the first text and the second text, using the first text and the second text as a query.
  • the text similarity calculator 350 calculates the vector similarity, which is the similarity between the first mixed vector and the second mixed vector obtained by the search, as the similarity S between the first text and the second text. I do.
  • the text similarity calculator 350 passes the calculated similarity S to the output unit 160.
  • FIG. 9 is a block diagram showing a second modification of the text similarity calculation device 30 according to the third embodiment of the present invention.
  • the text similarity calculation device 30 includes a word DB 305 instead of the input unit 100, unlike the first modification.
  • the word DB 305 stores, for each of a plurality of words as text, a word vector representing the word.
  • a word vector representing the word For example, it is configured as a database composed of words and their distributed expressions (text vectors) created by a conventional technique.
  • the image information conversion unit 110 and the image vector generation unit 315 perform processing on the word, and generate an image vector representing image information obtained by converting the word. Generate.
  • the image text mixed vector generation unit 335 generates, for each of a plurality of words, a mixed vector obtained by mixing an image vector corresponding to the word and a word vector.
  • the image text mixed vector generation unit 335 stores the generated plurality of mixed vectors in the image text mixed vector DB 370.
  • the visual information estimation unit 212 may be provided.
  • the image text mixed vector DB 370 holds the estimation result of the visual information estimation unit 212 for each of a plurality of texts or each of a plurality of words.
  • the similarity calculation is performed by the text similarity calculation unit 350, the similarity calculation of the image text mixed vector is performed based on the estimation result of the visual information estimation unit 212 held for the first text and the second text. I do.
  • the text similarity calculation unit 350 calculates the image similarity based on the value of the estimation result of the visual information estimation unit 212 stored for the first text and the second text stored in the image text mixture vector DB 370. It is determined which of the values of the text mixture vector should be used to calculate the similarity. That is, according to the value of the estimation result of the visual information estimation unit 212, it is determined whether the similarity calculation is performed only on the text vector portion of the image text mixed vector or the similarity calculation is performed using the image vector portion. Alternatively, when calculating the similarity of the image text mixed vector, weighting may be performed in accordance with the value of the estimation result of the visual information estimation unit 212.
  • the text similarity calculating unit 350 determines information representing what each dimension represents (a text vector is a ⁇ to ⁇ ⁇ dimension, an image vector is a ⁇ to ⁇ ⁇ dimension, ⁇ is a ⁇ dimension, etc.). ) Is acquired in advance.
  • the program has been described as being installed in advance, but the program may be stored in a computer-readable recording medium and provided.
  • Text similarity calculating device 20 Text similarity calculating device 30 Text similarity calculating device 100 Input unit 110 Image information converting unit 120 Image similarity calculating unit 130 Text vector generating unit 140 Text vector similarity calculating unit 150 Text similarity calculating unit 160 output unit 212 visual information estimation unit 214 image information use determination unit 220 image similarity calculation unit 250 text similarity calculation unit 305 word DB 315 Image vector generation unit 335 Image text mixed vector generation unit 350 Text similarity calculation unit 370 Image text mixed vector DB 400 input section

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Library & Information Science (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

精度よくテキスト間の類似度を算出することができるようにする。 画像類似度計算部120が、第1テキストを変換した、第1テキストに対応する第1画像情報と、第2テキストを変換した、第2テキストに対応する第2画像情報との類似度である画像類似度を算出し、テキストベクトル類似度計算部140が、第1テキストを表す第1テキストベクトルと、第2テキストを表す第2テキストベクトルとの類似度であるテキストベクトル類似度を算出し、テキスト類似度計算部150が、画像類似度と、テキストベクトル類似度とに基づいて、第1テキストと、第2テキストとの類似度を算出する。

Description

テキスト類似度算出装置、テキスト類似度算出方法、及びプログラム
 本発明は、テキスト類似度算出装置、テキスト類似度算出方法、及びプログラムに係り、特に、テキスト間の類似度を算出するためのテキスト類似度算出装置、テキスト類似度算出方法、及びプログラムに関する。
 ディープラーニングに代表される昨今の機械学習技術の発展に伴い、AIを活用した多くのサービスが注目されている。例えば、テキストを扱う自然言語処理に関するAIサービスとして、FAQ検索やチャットボット、対話システムなどがある。
 これらサービスにおいて、単語の意味をコンピュータ上で扱えるようにするための「分散表現」と呼ばれる技術が注目されている。分散表現とは、単語の持つ意味を高次元の実数ベクトル表現(単語ベクトル)に写像する技術によりベクトル化することで単語や文の意味を機械的に演算可能となる。意味的に類似した単語同士であるほど、単語のベクトル間の距離は小さくなる。
 例えば、評価用のテキスト中の任意の単語に対し、適切な対応する概念ベクトルを推定する技術がある(特許文献1)。
特開2005-128917号公報
 しかし、単語ベクトル(単語意味ベクトル、概念ベクトル、単語分散表現などともよばれる)は単語の共起関係に基づいて数値ベクトル化される。共起関係に基づく単語ベクトルは、似た文脈で使われる単語は似た意味を持つに違いないという仮説に基づく。
 すなわち、語法的に近い単語は、ベクトル空間上でも近いベクトルとなる。
 その結果、例えば、「りんご-みかん」、「野球-サッカー」、「赤-青」のように上位概念が同一の単語は、似たベクトルとして生成されてしまう、という問題があった。
 すなわち、精度よくテキスト間の類似度を算出することができない、という問題があった。
 本発明は上記の点に鑑みてなされたものであり、精度よくテキスト間の類似度を算出することができるテキスト類似度算出装置、テキスト類似度算出方法、及びプログラムを提供することを目的とする。
 本発明に係るテキスト類似度算出装置は、入力された第1テキストと、入力された第2テキストとの類似度を算出するテキスト類似度算出装置であって、前記第1テキストを、前記第1テキストに対応する第1画像情報に変換すると共に、前記第2テキストを、前記第2テキストに対応する第2画像情報に変換する画像情報変換部と、前記第1画像情報と、前記第2画像情報との類似度である画像類似度を算出する画像類似度計算部と、前記第1テキストに基づいて、前記第1テキストを表す第1テキストベクトルを生成すると共に、前記第2テキストに基づいて、前記第2テキストを表す第2テキストベクトルを生成するテキストベクトル生成部と、前記第1テキストベクトルと、前記第2テキストベクトルとの類似度であるテキストベクトル類似度を算出するテキストベクトル類似度計算部と、前記画像類似度と、前記テキストベクトル類似度とに基づいて、前記第1テキストと、前記第2テキストとの類似度を算出するテキスト類似度計算部と、を備えて構成される。
 また、本発明に係るテキスト類似度算出方法は、入力された第1テキストと、入力された第2テキストとの類似度を算出するテキスト類似度算出方法であって、画像情報変換部が、前記第1テキストを、前記第1テキストに対応する第1画像情報に変換すると共に、前記第2テキストを、前記第2テキストに対応する第2画像情報に変換し、画像類似度計算部が、前記第1画像情報と、前記第2画像情報との類似度である画像類似度を算出し、テキストベクトル生成部が、前記第1テキストに基づいて、前記第1テキストを表す第1テキストベクトルを生成すると共に、前記第2テキストに基づいて、前記第2テキストを表す第2テキストベクトルを生成し、テキストベクトル類似度計算部が、前記第1テキストベクトルと、前記第2テキストベクトルとの類似度であるテキストベクトル類似度を算出し、テキスト類似度計算部が、前記画像類似度と、前記テキストベクトル類似度とに基づいて、前記第1テキストと、前記第2テキストとの類似度を算出する。
 本発明に係るテキスト類似度算出装置及びテキスト類似度算出方法によれば、画像情報変換部が、第1テキストを、第1テキストに対応する第1画像情報に変換すると共に、第2テキストを、第2テキストに対応する第2画像情報に変換し、画像類似度計算部が、第1画像情報と、第2画像情報との類似度である画像類似度を算出する。
 そして、テキストベクトル生成部が、第1テキストに基づいて、第1テキストを表す第1テキストベクトルを生成すると共に、第2テキストに基づいて、第2テキストを表す第2テキストベクトルを生成し、テキストベクトル類似度計算部が、第1テキストベクトルと、第2テキストベクトルとの類似度であるテキストベクトル類似度を算出し、テキスト類似度計算部が、画像類似度と、テキストベクトル類似度とに基づいて、第1テキストと、第2テキストとの類似度を算出する。
 このように、第1テキストを変換した、第1テキストに対応する第1画像情報と、第2テキストを変換した、第2テキストに対応する第2画像情報との類似度である画像類似度を算出し、第1テキストを表す第1テキストベクトルと、第2テキストを表す第2テキストベクトルとの類似度であるテキストベクトル類似度を算出し、画像類似度と、テキストベクトル類似度とに基づいて、第1テキストと、第2テキストとの類似度を算出することにより、精度よくテキスト間の類似度を算出することができる。
 また、本発明に係るテキスト類似度算出装置は、前記第1画像情報に普遍的な視覚情報である普遍的視覚情報が含まれる度合いを推定すると共に、前記第2画像情報に前記普遍的視覚情報が含まれる度合いを推定する視覚情報推定部を更に備え、前記テキスト類似度計算部は、前記視覚情報推定部によって推定された度合いに基づいて、前記第1テキストと、前記第2テキストとの類似度を算出することができる。
 本発明に係るテキスト類似度算出装置は、入力された第1テキストと、入力された第2テキストとの類似度を算出するテキスト類似度算出装置であって、前記第1テキストを、前記第1テキストに対応する第1画像情報に変換すると共に、前記第2テキストを、前記第2テキストに対応する第2画像情報に変換する画像情報変換部と、前記第1画像情報に基づいて、前記第1画像情報を表す第1画像ベクトルを生成すると共に、前記第2画像情報に基づいて、前記第2画像情報を表す第2画像ベクトルを生成する画像ベクトル生成部と、前記第1テキストに基づいて、前記第1テキストを表す第1テキストベクトルを生成すると共に、前記第2テキストに基づいて、前記第2テキストを表す第2テキストベクトルを生成するテキストベクトル生成部と、前記第1画像ベクトルと、前記第1テキストベクトルとを混合した第1混合ベクトルを生成すると共に、前記第2画像ベクトルと、前記第2テキストベクトルとを混合した第2混合ベクトルを生成する画像テキスト混合ベクトル生成部と、前記第1混合ベクトルと、前記第2混合ベクトルとの類似度であるベクトル類似度を、前記第1テキストと、前記第2テキストとの類似度として算出するテキスト類似度計算部と、を備えて構成される。
 また、本発明に係るテキスト類似度算出方法は、入力された第1テキストと、入力された第2テキストとの類似度を算出するテキスト類似度算出方法であって、画像情報変換部が、前記第1テキストを、前記第1テキストに対応する第1画像情報に変換すると共に、前記第2テキストを、前記第2テキストに対応する第2画像情報に変換し、画像ベクトル生成部が、前記第1画像情報に基づいて、前記第1画像情報を表す第1画像ベクトルを生成すると共に、前記第2画像情報に基づいて、前記第2画像情報を表す第2画像ベクトルを生成し、テキストベクトル生成部が、前記第1テキストに基づいて、前記第1テキストを表す第1テキストベクトルを生成すると共に、前記第2テキストに基づいて、前記第2テキストを表す第2テキストベクトルを生成し、画像テキスト混合ベクトル生成部が、前記第1画像ベクトルと、前記第1テキストベクトルとを混合した第1混合ベクトルを生成すると共に、前記第2画像ベクトルと、前記第2テキストベクトルとを混合した第2混合ベクトルを生成し、テキスト類似度計算部が、前記第1混合ベクトルと、前記第2混合ベクトルとの類似度であるベクトル類似度を、前記第1テキストと、前記第2テキストとの類似度として算出する。
 本発明に係るテキスト類似度算出装置及びテキスト類似度算出方法によれば、画像情報変換部が、第1テキストを、第1テキストに対応する第1画像情報に変換すると共に、第2テキストを、第2テキストに対応する第2画像情報に変換する、画像ベクトル生成部が、第1画像情報に基づいて、第1画像情報を表す第1画像ベクトルを生成すると共に、第2画像情報に基づいて、第2画像情報を表す第2画像ベクトルを生成し、テキストベクトル生成部が、第1テキストに基づいて、第1テキストを表す第1テキストベクトルを生成すると共に、第2テキストに基づいて、第2テキストを表す第2テキストベクトルを生成する。
 そして、画像テキスト混合ベクトル生成部が、第1画像ベクトルと、第1テキストベクトルとを混合した第1混合ベクトルを生成すると共に、第2画像ベクトルと、第2テキストベクトルとを混合した第2混合ベクトルを生成し、テキスト類似度計算部が、第1混合ベクトルと、第2混合ベクトルとの類似度であるベクトル類似度を、第1テキストと、第2テキストとの類似度として算出する。
 このように、第1テキストを変換した、第1テキストに対応する第1画像情報を表す第1画像ベクトルと、第1テキストを表す第1テキストベクトルとを混合した第1混合ベクトルを生成すると共に、第2テキストを変換した、第2テキストに対応する第2画像情報を表す第2画像ベクトルと、第2テキストを表す第2テキストベクトルとを混合した第2混合ベクトルを生成し、第1混合ベクトルと、第2混合ベクトルとの類似度であるベクトル類似度を、第1テキストと、第2テキストとの類似度として算出することにより、精度よくテキスト間の類似度を算出することができる。
 また、本発明に係るテキスト類似度算出装置は、前記第1画像情報に普遍的な視覚情報である普遍的視覚情報が含まれる度合いを推定すると共に、前記第2画像情報に前記普遍的視覚情報が含まれる度合いを推定する視覚情報推定部を更に備え、前記テキスト類似度計算部は、前記視覚情報推定部によって推定された度合いに基づいて、前記第1テキストと、前記第2テキストとの類似度を算出することができる。
 本発明に係るテキスト類似度算出装置は、入力されたテキストを、前記テキストに対応する画像情報に変換する画像情報変換部と、前記画像情報に普遍的な視覚情報である普遍的視覚情報が含まれる度合いを推定する視覚情報推定部と、前記画像情報に基づいて、前記画像情報を表す画像ベクトルを生成する画像ベクトル生成部と、前記テキストに基づいて、前記テキストを表すテキストベクトルを生成するテキストベクトル生成部と、前記視覚情報推定部によって推定された、前記画像情報に前記普遍的視覚情報が含まれる度合いと、前記画像ベクトルと、前記テキストベクトルとに基づいて、混合ベクトルを生成する画像テキスト混合ベクトル生成部と、を備えて構成される。
 また、本発明に係るテキスト類似度算出方法は、画像情報変換部が、入力されたテキストを、前記テキストに対応する画像情報に変換し、視覚情報推定部が、前記画像情報に普遍的な視覚情報である普遍的視覚情報が含まれる度合いを推定し、画像ベクトル生成部が、前記画像情報に基づいて、前記画像情報を表す画像ベクトルを生成し、テキストベクトル生成部が、前記テキストに基づいて、前記テキストを表すテキストベクトルを生成し、画像テキスト混合ベクトル生成部が、前記視覚情報推定部によって推定された、前記画像情報に前記普遍的視覚情報が含まれる度合いと、前記画像ベクトルと、前記テキストベクトルとに基づいて、混合ベクトルを生成する。
 本発明に係るプログラムは、上記のテキスト類似度算出装置の各部として機能させるためのプログラムである。
 本発明のテキスト類似度算出装置、テキスト類似度算出方法、及びプログラムによれば、精度よくテキスト間の類似度を算出することができる。
本発明の第1の実施の形態に係るテキスト類似度算出装置の構成を示すブロック図である。 本発明の第1の実施の形態に係るテキスト類似度算出装置のテキスト類似度算出処理ルーチンを示すフローチャートである。 本発明の第2の実施の形態に係るテキスト類似度算出装置の構成を示すブロック図である。 本発明の第2の実施の形態に係るテキスト類似度算出装置のテキスト類似度算出処理ルーチンを示すフローチャートである。 本発明の第3の実施の形態に係るテキスト類似度算出装置の構成を示すブロック図である。 本発明の第3の実施の形態に係るテキスト類似度算出装置のテキスト類似度算出処理ルーチンを示すフローチャートである。 本発明の第3の実施の形態に係るテキスト類似度算出装置に、普遍的視覚情報を用いる構成を適用した構成を示すブロック図である。 本発明の第3の実施の形態に係るテキスト類似度算出装置の変形例1を示すブロック図である。 本発明の第3の実施の形態に係るテキスト類似度算出装置の変形例2を示すブロック図である。
 以下、本発明の実施の形態について図面を用いて説明する。
<本発明の実施の形態に係るテキスト類似度算出装置の概要>
 まず、本発明の実施形態の概要について説明する。
 本実施形態は、語法的には近いが、意味の異なる単語を識別可能にするため、語法以外の特徴も併用する。
 本実施形態では、語法以外の特徴として、画像情報を用いる。語法的な類似性では捉えることのできない視覚的な差異を用いることで、課題の解決を図る。
 具体的には、テキストを画像情報に変換した上で画像間の類似度も利用することで精度向上を図る。テキストの画像情報変換には、例えばweb検索を利用する。
 このような構成により、大量のテキストコーパスを集めなくても、より正確なテキスト間の意味の類似性を計算することが可能になる。
 また、画像情報を用いるにあたり、普遍的な視覚情報を有する度合いを推定し、その度合いに応じて画像情報を利用する。あるいは、普遍的な視覚情報を有するテキストか否かを推定し、普遍的な視覚情報を有すると推定されたテキストのみ画像情報を利用する。
 ここで、普遍的視覚情報を有する度合いが低い場合とは、視覚的な特徴量が不安定な場合を示し、普遍的な視覚情報を有しないテキストとは、例えば「あなた/わたし」や「上/下」等の現実世界で視覚的な実体を持たないテキストのことを示す。
 普遍的視覚情報の有無の推定は、例えば、(1)得られた画像データが写真であるかイラストであるかについて推定する。写真であるものは普遍的視覚情報を有し、イラストであるものは普遍的視覚情報を有さないと推定する。イラストには抽象的なものも多く含まれ、抽象的な概念は人によって受ける印象が異なってくる。このような抽象的な概念に対して画像の情報を用いるメリットが無いと考えられるので、イラストは普遍的視覚情報を有さないものとみなす。
 また、普遍的視覚情報を有する度合いの推定では、例えば、(2)得られた複数の画像データの特徴量の分散の大きさを利用する(特徴量の分散が小さい方が、安定した視覚的特徴量と言える)等により推定する。
 このような構成により、語法的な類似性では捉えることのできない視覚的な差異を用いることができるため、精度よくテキスト間の類似度を算出することができる。
<本発明の第1の実施の形態に係るテキスト類似度算出装置の構成>
 図1を参照して、本発明の第1の実施の形態に係るテキスト類似度算出装置10の構成について説明する。図1は、本発明の第1の実施の形態に係るテキスト類似度算出装置10の構成を示すブロック図である。
 テキスト類似度算出装置10は、CPUと、RAMと、後述するテキスト類似度算出処理ルーチンを実行するためのプログラムを記憶したROMとを備えたコンピュータで構成され、機能的には次に示すように構成されている。
 図1に示すように、本実施形態に係るテキスト類似度算出装置10は、入力部100と、画像情報変換部110と、画像類似度計算部120と、テキストベクトル生成部130と、テキストベクトル類似度計算部140と、テキスト類似度計算部150と、出力部160とを備えて構成される。
 入力部100は、第1テキスト及び第2テキストの入力を受け付ける。
 ここで、テキストとは、自然文で書かれたものであり、1以上の単語からなる。テキストは、1単語でもよく、文、文書等でもよい。
 そして、入力部100は、受け付けた第1テキスト及び第2テキストを、画像情報変換部110及びテキストベクトル生成部130に渡す。
 画像情報変換部110は、第1テキストを、第1テキストに対応する第1画像情報に変換すると共に、第2テキストを、第2テキストに対応第2画像情報に変換する。
 画像情報変換部110が、テキストから画像情報に変換する手段として、例えば、web-api等を用いることができる。すなわち、web検索により画像検索をし、検索結果である画像データを、検索上位n個取得したものを、画像情報とする。
 具体的には、画像情報変換部110は、第1テキストについてweb検索により画像検索をし、検索結果である画像データを検索上位n個取得したものを、第1画像情報とする。同様に、画像情報変換部110は、第2テキストについてweb検索により画像検索をし、検索結果である画像データを検索上位n個取得したものを、第2画像情報とする。
 そして、画像情報変換部110は、第1画像情報及び第2画像情報を、画像類似度計算部120に渡す。
 画像類似度計算部120は、第1画像情報と、第2画像情報との類似度である画像類似度Sを算出する。
 具体的には、画像類似度計算部120は、任意の画像類似度の計算方法を用いて、第1画像情報と、第2画像情報との類似度である画像類似度Sを算出する。
 例えば、参考文献1のように、特徴点周辺の注目度によって特徴点の重み付けを行い、重み付き類似度を求める等の既存手法を用いて、画像類似度Sを算出する。
[参考文献1]木村 昭悟、外3名、"重み付き特徴点照合に基づく高速画像検索″、電子情報通信学会技術研究報告.PRMU,パターン認識・メディア理解105(118)、2005年6月。
 また、画像類似度計算部120は、画像情報変換部110により第1画像情報又は第2画像情報に複数の画像データが含まれている場合には、当該複数の画像データと、他方の画像データとの全ての組合せについての画像類似度を算出し、その平均を第1画像情報と第2画像情報との画像類似度Sとする。
 そして、画像類似度計算部120は、算出した画像類似度Sを、テキスト類似度計算部150に渡す。
 テキストベクトル生成部130は、第1テキストに基づいて、第1テキストを表す第1テキストベクトルを生成すると共に、第2テキストに基づいて、第2テキストを表す第2テキストベクトルを生成する。テキストベクトルの次元数は所定の次元数であり、全てのテキストベクトルで同一とする。
 具体的には、テキストベクトル生成部130は、テキストに対応するテキストベクトルを生成するために、事前に収集された大量のテキストコーパス(図示しない)から、単語ベクトルを学習する。なお、処理の都度学習を行う必要はなく、予め学習しておいた単語ベクトルを用いてもよい。また、単語ベクトルの学習方法は、既存手法を用いて良い。
 テキストベクトル生成部130は、テキストに含まれる各単語に対応する単語ベクトルを用いて、テキストに対応するテキストベクトルを生成する。テキストに対応するテキストベクトルを生成する方法は、例えば参考文献2の方法等の既存手法を用いることができる。
[参考文献2]別所 克人、外3名、"単語ベクトルを用いた文書要約の検討(ライフインテリジェンスとオフィス情報システム)″、電子情報通信学会技術研究報告=IEICE technical report :信学技報 114(32)、2014年5月。
 そして、テキストベクトル生成部130は、生成した第1テキストベクトル及び第2テキストベクトルを、テキストベクトル類似度計算部140に渡す。
 テキストベクトル類似度計算部140は、第1テキストベクトルと、第2テキストベクトルとの類似度であるテキストベクトル類似度Sを算出する。
 具体的には、テキストベクトル類似度計算部140は、テキストベクトル間の類似度であるテキストベクトル類似度Sを、参考文献2のベクトル類似度の計算方法等の既存手法を用いて算出する。例えば、テキストベクトル間のユークリッド距離やコサイン類似度を用いて類似度を算出すればよい。
 そして、テキストベクトル類似度計算部140は、算出したテキストベクトル類似度Sを、テキスト類似度計算部150に渡す。
 テキスト類似度計算部150は、画像類似度Sと、テキストベクトル類似度Sとに基づいて、第1テキストと、第2テキストとの類似度Sを算出する。
 具体的には、テキスト類似度計算部150は、第1テキストと、第2テキストとの類似度Sを、画像類似度Sとテキストベクトル類似度Sとの線形和(下記式(1))により算出する。
Figure JPOXMLDOC01-appb-M000001

 
 ここで、αは重みであり、評価セット等を用いる等により事前に定めておく。αは、例えば以下のように決定される。
 まず、あるテキストAに対し、複数のテキストBを用意する。複数のテキストBの各々は、テキストAとの意味の類似性に基づき人手で順位付けされている。つまり、順位が高いものほどテキストAとテキストBの意味的類似性が高いことを意味する。
 次に、そのような順位付されたテキストAと複数のテキストBとのセットを1つ又は複数用意し、テキスト類似度計算部150により算出された類似度Sに基づく順位と人手で与えられた順位との順位相関が最も高いパラメータを求める。このパラメータに基づいて、αを求める。例えば、求めたパラメータをそのままαとして用いることができる。なお、αは人手により任意の値を設定してもよい。
 そして、テキスト類似度計算部150は、算出した第1テキストと、第2テキストとの類似度Sを、出力部160に渡す。
 出力部160は、第1テキストと、第2テキストとの類似度Sを出力する。
<本発明の第1の実施の形態に係るテキスト類似度算出装置の作用>
 図2は、本発明の実施の形態に係るテキスト類似度算出処理ルーチンを示すフローチャートである。
 入力部100に第1テキスト及び第2テキストが入力されると、テキスト類似度算出装置10において、図2に示すテキスト類似度算出処理ルーチンが実行される。
 まず、ステップS100において、入力部100が、第1テキスト及び第2テキストの入力を受け付ける。
 ステップS110において、テキストベクトル生成部130は、第1テキストに基づいて、第1テキストを表す第1テキストベクトルを生成すると共に、第2テキストに基づいて、第2テキストを表す第2テキストベクトルを生成する。
 ステップS120において、テキストベクトル類似度計算部140は、第1テキストベクトルと、第2テキストベクトルとの類似度であるテキストベクトル類似度Sを算出する。
 ステップS130において、画像情報変換部110は、第1テキストを、第1テキストに対応する第1画像情報に変換すると共に、第2テキストを、第2テキストに対応第2画像情報に変換する。
 ステップS140において、画像類似度計算部120は、第1画像情報と、第2画像情報との類似度である画像類似度Sを算出する。
 ステップS150において、テキスト類似度計算部150は、画像類似度Sと、テキストベクトル類似度Sとに基づいて、第1テキストと、第2テキストとの類似度Sを算出する。
 ステップS160において、出力部160は、第1テキストと、第2テキストとの類似度Sを出力する。
 以上説明したように、本発明の実施形態に係るテキスト類似度算出装置によれば、第1テキストを変換した、第1テキストに対応する第1画像情報と、第2テキストを変換した、第2テキストに対応する第2画像情報との類似度である画像類似度を算出し、第1テキストを表す第1テキストベクトルと、第2テキストを表す第2テキストベクトルとの類似度であるテキストベクトル類似度を算出し、画像類似度と、テキストベクトル類似度とに基づいて、第1テキストと、第2テキストとの類似度を算出することにより、精度よくテキスト間の類似度を算出することができる。
<本発明の第2の実施の形態に係るテキスト類似度算出装置の構成>
 図3を参照して、本発明の第2の実施の形態に係るテキスト類似度算出装置の構成について説明する。図3は、本発明の第2の実施の形態に係るテキスト類似度算出装置20の構成を示すブロック図である。
 なお、第1の実施の形態に係るテキスト類似度算出装置10と同様の構成については、同一の符号を付して詳細な説明は省略する。
 テキスト類似度算出装置20は、CPUと、RAMと、後述するテキスト類似度算出処理ルーチンを実行するためのプログラムを記憶したROMとを備えたコンピュータで構成され、機能的には次に示すように構成されている。
 図3に示すように、本実施形態に係るテキスト類似度算出装置20は、入力部100と、画像情報変換部110と、視覚情報推定部212と、画像情報利用判定部214と、画像類似度計算部220と、テキストベクトル生成部130と、テキストベクトル類似度計算部140と、テキスト類似度計算部250と、出力部160とを備えて構成される。
 画像情報変換部110は、第1画像情報及び第2画像情報を、視覚情報推定部212及び画像類似度計算部220に渡す。
 視覚情報推定部212は、第1画像情報に普遍的な視覚情報である普遍的視覚情報が含まれる度合いを推定すると共に、第2画像情報に普遍的視覚情報が含まれる度合いを推定する。
 具体的には、視覚情報推定部212は、第1画像情報に含まれる複数の画像データの各々が、普遍的視覚情報を有するか否かを推定する。普遍的視覚情報を有するか否かは、得られた画像データが写真であるか、イラストであるかによって判定する。
 画像データが、写真であるか、イラストであるかの判定には、例えば参考文献3等の既存技術を利用することができる。
[参考文献3]大塚 一輝、外3名、"ディープラーニングを用いての写真と絵画、イラストの識別"、情報処理学会、第79回全国大会講演論文集、2017年3月、p.p.371-372。
 視覚情報推定部212は、第1画像情報に含まれる複数の画像データのうち、写真であると判定された画像データの割合を、第1画像情報に普遍的視覚情報が含まれる度合いとして、推定する。
 視覚情報推定部212は、第2画像情報についても同様に、第2画像情報に含まれる複数の画像データのうち、写真であると判定された画像データの割合を、第2画像情報に普遍的視覚情報が含まれる度合いとして推定する。
 そして、視覚情報推定部212は、推定した第1画像情報が普遍的視覚情報を有する度合い及び第2画像情報が普遍的視覚情報を有する度合いを推定結果として、画像情報利用判定部214に渡す。
 画像情報利用判定部214は、視覚情報推定部212によって推定された第1画像情報に普遍的視覚情報が含まれる度合い、及び第2画像情報に普遍的視覚情報が含まれる度合いに基づいて、テキスト類似度計算部250が画像類似度Sを用いるか否かを決定する。
 具体的には、画像情報利用判定部214は、第1画像情報及び第2画像情報の少なくとも一方について普遍的視覚情報が含まれる度合いが、予め定めた閾値未満である場合、テキスト類似度計算部250が画像類似度Sを用いないことを決定する。すなわち、以降の処理に画像情報は利用しない。
 一方、画像情報利用判定部214は、第1画像情報及び第2画像情報のいずれについても普遍的視覚情報が含まれる度合いが、予め定めた閾値以上である推定された場合、テキスト類似度計算部250が画像類似度Sを用いることを決定する。
 そして、画像情報利用判定部214は、テキスト類似度計算部250が画像類似度Sを用いないことを決定した場合には、その旨をテキスト類似度計算部250に渡す。また、画像情報利用判定部214は、テキスト類似度計算部250が画像類似度Sを用いることを決定した場合には、その旨を、画像類似度計算部220及びテキスト類似度計算部250に渡す。
 画像類似度計算部220は、画像情報利用判定部214が、画像類似度Sを用いることを決定した場合に、第1画像情報と、第2画像情報との類似度である画像類似度Sを算出する。
 そして、画像類似度計算部220は、算出した画像類似度Sを、テキスト類似度計算部250に渡す。
 テキスト類似度計算部250は、画像情報利用判定部214によって、画像類似度Sを用いることを決定された場合に、画像類似度Sと、テキストベクトル類似度Sとに基づいて、第1テキストと、第2テキストとの類似度Sを算出する。この場合、テキスト類似度計算部150と同様の処理を行う。
 一方、テキスト類似度計算部250は、画像情報利用判定部214によって、画像類似度Sを用いないことを決定された場合に、テキストベクトル類似度Sに基づいて、第1テキストと、第2テキストとの類似度Sを算出する。
 具体的には、テキスト類似度計算部250は、画像類似度Sを用いない場合、テキストベクトル類似度Sを、第1テキストと、第2テキストとの類似度Sとする。この場合、上記式(1)において、α=0としてもよい。
 なお、画像情報利用判定部214が、視覚情報推定部212によって推定された第1画像情報に普遍的視覚情報が含まれる度合い、及び第2画像情報に普遍的視覚情報が含まれる度合いに基づいて、αの値を調整する構成としてもよい。
 この場合、第1画像情報に普遍的視覚情報が含まれる度合い、及び第2画像情報に普遍的視覚情報が含まれる度合いのいずれもが予め定めた値を下回る場合(すなわち、画像類似度Sを用いないと判定するような場合)に、α=0とすることができる。
 また、両テキスト毎に、普遍的視覚情報が含まれる度合いの推定値を1に規格化しておき、αの値として、大きい方を用いる、小さい方を用いる、平均を用いる等の方法を用いてもよい。この場合、αの値は0と1との間を取り得る。
 そして、テキスト類似度計算部250は、算出した第1テキストと、第2テキストとの類似度Sを、出力部160に渡す。
<本発明の第2の実施の形態に係るテキスト類似度算出装置の作用>
 図4は、本発明の第2の実施の形態に係るテキスト類似度算出処理ルーチンを示すフローチャートである。なお、第1の実施の形態に係るテキスト類似度算出処理ルーチンと同様の処理については、同一の符号を付して詳細な説明は省略する。
 ステップS232において、視覚情報推定部212は、第1画像情報に普遍的な視覚情報である普遍的視覚情報が含まれる度合いを推定すると共に、第2画像情報に普遍的視覚情報が含まれる度合いを推定する。
 ステップS234において、画像情報利用判定部214は、視覚情報推定部212によって推定された、第1画像情報に普遍的視覚情報が含まれる度合いが閾値未満である、又は、第2画像情報に普遍的視覚情報が含まれる度合いが閾値未満である場合に、テキスト類似度計算部250が画像類似度Sを用いないことを決定する。
 画像類似度Sを用いると決定された場合(ステップS234のYES)、ステップS140~S160の処理を行う。
 一方、画像類似度Sを用いないと決定された場合(ステップS234のNO)、ステップS250において、テキスト類似度計算部250は、テキストベクトル類似度Sに基づいて、第1テキストと、第2テキストとの類似度Sを算出する。
 以上説明したように、本実施形態に係るテキスト類似度算出装置によれば、第1画像情報に普遍的視覚情報が含まれる度合いを推定すると共に、第2画像情報に普遍的視覚情報が含まれる度合いを推定し、第1画像情報に普遍的視覚情報が含まれる度合いが閾値未満である、又は、第2画像情報に普遍的視覚情報が含まれていないと推定された場合に、画像類似度を用いないことを決定し、テキストベクトル類似度を、第1テキストと、第2テキストとの類似度とするため、精度よくテキスト間の類似度を算出することができる。
<本発明の第3の実施の形態に係るテキスト類似度算出装置の構成>
 図5を参照して、本発明の第3の実施の形態に係るテキスト類似度算出装置の構成について説明する。図5は、本発明の第3の実施の形態に係るテキスト類似度算出装置30の構成を示すブロック図である。
 なお、第1の実施の形態に係るテキスト類似度算出装置10と同様の構成については、同一の符号を付して詳細な説明は省略する。
 テキスト類似度算出装置30は、CPUと、RAMと、後述するテキスト類似度算出処理ルーチンを実行するためのプログラムを記憶したROMとを備えたコンピュータで構成され、機能的には次に示すように構成されている。
 図5に示すように、本実施形態に係るテキスト類似度算出装置30は、入力部100と、画像情報変換部110と、画像ベクトル生成部315と、テキストベクトル生成部130と、画像テキスト混合ベクトル生成部335と、テキスト類似度計算部350と、出力部160とを備えて構成される。
 本実施形態のテキストベクトル生成部130は、第1テキストベクトル及び第2テキストベクトルを、画像テキスト混合ベクトル生成部335に渡す。
 画像ベクトル生成部315は、第1画像情報に基づいて、第1画像情報を表す第1画像ベクトルを生成すると共に、第2画像情報に基づいて、第2画像情報を表す第2画像ベクトルを生成する。画像ベクトルの次元数は所定の次元数であり、全ての画像ベクトルで同一とする。なお、画像ベクトルの次元数は、テキストベクトルの次元数と同じである必要はない。
 具体的には、画像ベクトル生成部315は、例えば、参考文献4等の既存技術を用いて、第1画像情報に含まれるn個の画像データの各々について、当該画像データに対応する画像ベクトルを生成する。
[参考文献4]紺谷 精一、外2名、"複数特徴量を統合した visual words による料理画像の分類"、電子情報通信学会技術研究報告. LOIS, ライフインテリジェンスとオフィス情報システム、2010年7月、p.p.35-39.
 そして、得られたn個の画像ベクトルの重心をとり、第1画像ベクトルを生成する。
 ここで、n個の画像ベクトルの重心を取る事で本来持っていた視覚的な情報が壊されてしまうことも考えられる。その場合、第1画像情報に含まれるn個の画像データの各々についての画像ベクトルのうち、重心ベクトルに最も近い画像ベクトルを第1画像ベクトルとしても良い。
 画像ベクトル生成部315は、同様に、第2画像情報を表す第2画像ベクトルを生成する。
 そして、画像ベクトル生成部315は、第1画像ベクトル及び第2画像ベクトルを、画像テキスト混合ベクトル生成部335に渡す。
 画像テキスト混合ベクトル生成部335は、第1画像ベクトルと、第1テキストベクトルとを混合した第1混合ベクトルを生成すると共に、第2画像ベクトルと、第2テキストベクトルとを混合した第2混合ベクトルを生成する。
 具体的には、画像テキスト混合ベクトル生成部335は、第1テキストベクトルと第1画像ベクトルとを結合することにより、第1混合ベクトルを生成する。結合方法は既存手法を用いることができ、例えば、第1テキストベクトルの末尾に、第1画像ベクトルをそのまま連結させる方法を採用してもよい。
 例えば、第1テキストベクトルが(a,b,c)、第1画像ベクトルが(d,e,f,g)であったとすると、これらを結合した第1混合ベクトルは、(a,b,c,d,e,f,g)と表すことができる。なお、上述した重み付けのためのαの情報を各混合ベクトルに対応させて保持する構成としてもよい。
 同様に、画像テキスト混合ベクトル生成部335は、第2画像ベクトルと、第2テキストベクトルとを混合した第2混合ベクトルを生成する。
 そして、画像テキスト混合ベクトル生成部335は、第1混合ベクトル及び第2混合ベクトルを、テキスト類似度計算部350に渡す。
 テキスト類似度計算部350は、第1混合ベクトルと、第2混合ベクトルとの類似度である混合ベクトル類似度を、第1テキストと、第2テキストとの類似度Sとして算出する。
 具体的には、テキスト類似度計算部350は、第1混合ベクトルと、第2混合ベクトルとの類似度である混合ベクトル類似度を、ユークリッド距離やコサイン類似度を算出する等の方法により、算出する。
 そして、テキスト類似度計算部350は、算出した第1テキストと、第2テキストとの類似度Sを、出力部160に渡す。
<本発明の第3の実施の形態に係るテキスト類似度算出装置の作用>
 図6は、本発明の第3の実施の形態に係るテキスト類似度算出処理ルーチンを示すフローチャートである。なお、第1の実施の形態に係るテキスト類似度算出処理ルーチンと同様の処理については、同一の符号を付して詳細な説明は省略する。
 ステップS335において、画像ベクトル生成部315は、第1画像情報に基づいて、第1画像情報を表す第1画像ベクトルを生成すると共に、第2画像情報に基づいて、第2画像情報を表す第2画像ベクトルを生成する。
 ステップS340において、画像テキスト混合ベクトル生成部335は、第1画像ベクトルと、第1テキストベクトルとを混合した第1混合ベクトルを生成すると共に、第2画像ベクトルと、第2テキストベクトルとを混合した第2混合ベクトルを生成する。
 ステップS350において、テキスト類似度計算部350は、第1混合ベクトルと、第2混合ベクトルとの類似度である混合ベクトル類似度を、第1テキストと、第2テキストとの類似度Sとして算出する。
 以上説明したように、本実施形態に係るテキスト類似度算出装置によれば、第1テキストを変換した、第1テキストに対応する第1画像情報を表す第1画像ベクトルと、第1テキストを表す第1テキストベクトルとを混合した第1混合ベクトルを生成すると共に、第2テキストを変換した、第2テキストに対応する第2画像情報を表す第2画像ベクトルと、第2テキストを表す第2テキストベクトルとを混合した第2混合ベクトルを生成し、第1混合ベクトルと、第2混合ベクトルとの類似度であるベクトル類似度を、第1テキストと、第2テキストとの類似度として算出することにより、精度よくテキスト間の類似度を算出することができる。
 なお、本発明は、上述した実施の形態に限定されるものではなく、この発明の要旨を逸脱しない範囲内で様々な変形や応用が可能である。
 例えば、視覚情報推定部212は、得られた複数の画像データの特徴量の分散の大きさを利用する(特徴量の分散に対し、任意の閾値で判定)ことにより、普遍的視覚情報を有する度合いを推定するようにしてもよい。この場合、複数の画像データを用いるため、第1画像情報及び第2画像情報の各々に含まれる画像データの数n>1とする。また、画像情報利用判定部214による、画像情報を利用する/しないの判定を省略する。
 そして、画像類似度計算部220は、第1画像情報と、第2画像情報との類似度である画像類似度Sを算出する。
 更に、テキスト類似度計算部250は、画像類似度Sと、テキストベクトル類似度Sと、視覚情報推定部212により推定された度合いとに基づいて、第1テキストと、第2テキストとの類似度Sを算出する。
 この場合、テキスト類似度計算部250は、第1度合い及び第2度合いに応じて、重みαの値を変更する。
 また、視覚情報推定部212は、第1画像情報に普遍的な視覚情報である普遍的視覚情報が含まれるか否かを推定すると共に、第2画像情報に普遍的視覚情報が含まれるか否かを推定してもよい。
 また、第2の実施の形態で採用した普遍的視覚情報を用いる構成を、第3の実施の形態においても採用することができる。図7は、第3の実施の形態に係るテキスト類似度算出装置30に、普遍的視覚情報を用いる構成を適用した構成を示すブロック図である。
 この場合、テキスト類似度計算部350で類似度計算を行う際に、視覚情報推定部212の推定結果に基づき、画像テキスト混合ベクトルの類似度計算を行う。計算方法の一例を以下に示す。
 画像情報利用判定部214は、視覚情報推定部212によって、推定された第1画像情報に普遍的視覚情報が含まれる度合いが閾値未満である、又は、第2画像情報に普遍的視覚情報が含まれる度合いが閾値未満である場合に、画像テキスト混合ベクトル生成部335が画像ベクトルを用いないことを決定する。
 一方、画像情報利用判定部214は、第1画像情報及び第2画像情報のいずれについても普遍的視覚情報が含まれる度合いが閾値以上である場合、画像テキスト混合ベクトル生成部335が画像ベクトルを用いることを決定する。
 そして、画像情報利用判定部214は、画像テキスト混合ベクトル生成部335が画像ベクトルを用いないことを決定した場合には、その旨を画像テキスト混合ベクトル生成部335に渡す。また、画像情報利用判定部214は、画像テキスト混合ベクトル生成部335が画像ベクトルを用いることを決定した場合には、その旨を、画像ベクトル生成部315及び画像テキスト混合ベクトル生成部335に渡す。
 画像テキスト混合ベクトル生成部335は、画像情報利用判定部214によって画像ベクトルを用いないことが決定された場合に、第1テキストベクトルを、第1混合ベクトルとし、第2テキストベクトルを、第2混合ベクトルとする。
 また、上述の第3の実施の形態では、入力された第1テキスト及び第2テキストについて第1混合ベクトル及び第2混合ベクトルを生成する構成としたが、これに限定されるものではなく、予め複数のテキストについての複数の混合ベクトルを生成しておき、入力された第1テキスト及び第2テキストの各々に対応する第1混合ベクトル及び第2混合ベクトルを検索して、得られた第1混合ベクトルと、第2混合ベクトルとの類似度であるベクトル類似度を、第1テキストと、第2テキストとの類似度Sとして算出するようにしてもよい。
 例えば、第3の実施の形態に係るテキスト類似度算出装置30を、以下のように変形することができる。
<変形例1>
 図8は、本発明の第3の実施の形態に係るテキスト類似度算出装置30の変形例1を示すブロック図である。変形例1では、テキスト類似度算出装置30は、画像テキスト混合ベクトルDB370と、入力部400とを更に備える。
 入力部100は、複数の混合ベクトルを生成するための複数のテキストの入力を受け付ける。
 画像テキスト混合ベクトルDB370は、入力部100が受け付けた複数のテキストについて生成された複数の混合ベクトルを格納する。
 入力部400は、第1テキスト及び第2テキストの入力を受け付け、テキスト類似度計算部350に渡す。
 テキスト類似度計算部350は、第1テキスト及び第2テキストをクエリとして、第1テキスト及び第2テキストに対応する第1混合ベクトル及び第2混合ベクトルを、画像テキスト混合ベクトルDB370から検索する。
 テキスト類似度計算部350は、検索して得られた第1混合ベクトルと、第2混合ベクトルとの類似度であるベクトル類似度を、第1テキストと、第2テキストとの類似度Sとして算出する。
 そして、テキスト類似度計算部350は、算出した類似度Sを、出力部160に渡す。
<変形例2>
 図9は、本発明の第3の実施の形態に係るテキスト類似度算出装置30の変形例2を示すブロック図である。変形例2では、テキスト類似度算出装置30は、変形例1と異なり、入力部100の代わりに、単語DB305を備える。
 単語DB305は、テキストとしての複数の単語の各々について、当該単語を表す単語ベクトルを格納する。例えば、従来技術で作成した、単語と、その分散表現(テキストベクトル)とからなるデータベースとして構成される。
 変形例2では、単語DB305に含まれる複数の単語の各々について、当該単語に対して画像情報変換部110及び画像ベクトル生成部315の処理を行い、当該単語を変換した画像情報を表す画像ベクトルを生成する。
 一方、複数の単語に対する複数の単語ベクトルは既に生成されているため、テキストベクトル生成部130の処理を省略する。
 画像テキスト混合ベクトル生成部335は、複数の単語の各々について、当該単語に対応する画像ベクトルと、単語ベクトルとを混合した混合ベクトルを生成する。
 画像テキスト混合ベクトル生成部335は、生成した複数の混合ベクトルを、画像テキスト混合ベクトルDB370に格納する。
 また、上記変形例1及び変形例2において、視覚情報推定部212を備えることもできる。この場合、画像テキスト混合ベクトルDB370は、複数のテキストの各々、又は複数の単語の各々について、視覚情報推定部212の推定結果を保持するため、(1)各画像テキスト混合ベクトルに対応する値として保持する、(2)画像ベクトルに、視覚情報推定部212の推定結果に相当する要素を加える、すなわち画像ベクトルの次元数を1次元増やす、等の方法を採用することができる。
 そして、テキスト類似度計算部350により類似度計算を行う際に、第1テキスト及び第2テキストに対して保持された視覚情報推定部212の推定結果に基づいて、画像テキスト混合ベクトルの類似度計算を行う。
 このとき、テキスト類似度計算部350は、例えば、画像テキスト混合ベクトルDB370に保持された、第1テキスト及び第2テキストに対して保持された視覚情報推定部212の推定結果の値に基づき、画像テキスト混合ベクトルのうち、いずれの次元の値を用いて類似度計算を行うかを決定する。すなわち、視覚情報推定部212の推定結果の値に応じて、画像テキスト混合ベクトルのテキストベクトル部分のみで類似度計算を行うか、画像ベクトル部分まで用いて類似度計算を行うかを決定する。又は、画像テキスト混合ベクトルの類似度計算を行う際に、視覚情報推定部212の推定結果の値に応じて、重み付けを行うようにすればよい。
 このような構成では、画像テキスト混合ベクトルにおいて、テキスト類似度計算部350は各次元が何を表すかの情報(テキストベクトルが○~○次元、画像ベクトルが×~×次元、αは△次元等)を、予め取得しておく。
 また、本願明細書中において、プログラムが予めインストールされている実施形態として説明したが、当該プログラムを、コンピュータ読み取り可能な記録媒体に格納して提供することも可能である。
10 テキスト類似度算出装置
20 テキスト類似度算出装置
30 テキスト類似度算出装置
100 入力部
110 画像情報変換部
120 画像類似度計算部
130 テキストベクトル生成部
140 テキストベクトル類似度計算部
150 テキスト類似度計算部
160 出力部
212 視覚情報推定部
214 画像情報利用判定部
220 画像類似度計算部
250 テキスト類似度計算部
305 単語DB
315 画像ベクトル生成部
335 画像テキスト混合ベクトル生成部
350 テキスト類似度計算部
370 画像テキスト混合ベクトルDB
400 入力部

Claims (8)

  1.  入力された第1テキストと、入力された第2テキストとの類似度を算出するテキスト類似度算出装置であって、
     前記第1テキストを、前記第1テキストに対応する第1画像情報に変換すると共に、前記第2テキストを、前記第2テキストに対応する第2画像情報に変換する画像情報変換部と、
     前記第1画像情報と、前記第2画像情報との類似度である画像類似度を算出する画像類似度計算部と、
     前記第1テキストに基づいて、前記第1テキストを表す第1テキストベクトルを生成すると共に、前記第2テキストに基づいて、前記第2テキストを表す第2テキストベクトルを生成するテキストベクトル生成部と、
     前記第1テキストベクトルと、前記第2テキストベクトルとの類似度であるテキストベクトル類似度を算出するテキストベクトル類似度計算部と、
     前記画像類似度と、前記テキストベクトル類似度とに基づいて、前記第1テキストと、前記第2テキストとの類似度を算出するテキスト類似度計算部と、
     を備えることを特徴とするテキスト類似度算出装置。
  2.  入力された第1テキストと、入力された第2テキストとの類似度を算出するテキスト類似度算出装置であって、
     前記第1テキストを、前記第1テキストに対応する第1画像情報に変換すると共に、前記第2テキストを、前記第2テキストに対応する第2画像情報に変換する画像情報変換部と、
     前記第1画像情報に基づいて、前記第1画像情報を表す第1画像ベクトルを生成すると共に、前記第2画像情報に基づいて、前記第2画像情報を表す第2画像ベクトルを生成する画像ベクトル生成部と、
     前記第1テキストに基づいて、前記第1テキストを表す第1テキストベクトルを生成すると共に、前記第2テキストに基づいて、前記第2テキストを表す第2テキストベクトルを生成するテキストベクトル生成部と、
     前記第1画像ベクトルと、前記第1テキストベクトルとを混合した第1混合ベクトルを生成すると共に、前記第2画像ベクトルと、前記第2テキストベクトルとを混合した第2混合ベクトルを生成する画像テキスト混合ベクトル生成部と、
     前記第1混合ベクトルと、前記第2混合ベクトルとの類似度であるベクトル類似度を、前記第1テキストと、前記第2テキストとの類似度として算出するテキスト類似度計算部と、
     を備えることを特徴とするテキスト類似度算出装置。
  3.  入力されたテキストを、前記テキストに対応する画像情報に変換する画像情報変換部と、
     前記画像情報に普遍的な視覚情報である普遍的視覚情報が含まれる度合いを推定する視覚情報推定部と、
     前記画像情報に基づいて、前記画像情報を表す画像ベクトルを生成する画像ベクトル生成部と、
     前記テキストに基づいて、前記テキストを表すテキストベクトルを生成するテキストベクトル生成部と、
     前記視覚情報推定部によって推定された、前記画像情報に前記普遍的視覚情報が含まれる度合いと、前記画像ベクトルと、前記テキストベクトルとに基づいて、混合ベクトルを生成する画像テキスト混合ベクトル生成部と、
     を備えることを特徴とするテキスト類似度算出装置。
  4.  前記第1画像情報に普遍的な視覚情報である普遍的視覚情報が含まれる度合いを推定すると共に、前記第2画像情報に前記普遍的視覚情報が含まれる度合いを推定する視覚情報推定部
     を更に備え、
     前記テキスト類似度計算部は、前記視覚情報推定部によって推定された前記第1画像情報に前記普遍的視覚情報が含まれる度合い、及び前記第2画像情報に前記普遍的視覚情報が含まれる度合いに基づいて、前記第1テキストと、前記第2テキストとの類似度を算出する
     ことを特徴とする請求項1又は2記載のテキスト類似度算出装置。
  5.  入力された第1テキストと、入力された第2テキストとの類似度を算出するテキスト類似度算出方法であって、
     画像情報変換部が、前記第1テキストを、前記第1テキストに対応する第1画像情報に変換すると共に、前記第2テキストを、前記第2テキストに対応する第2画像情報に変換し、
     画像類似度計算部が、前記第1画像情報と、前記第2画像情報との類似度である画像類似度を算出し、
     テキストベクトル生成部が、前記第1テキストに基づいて、前記第1テキストを表す第1テキストベクトルを生成すると共に、前記第2テキストに基づいて、前記第2テキストを表す第2テキストベクトルを生成し、
     テキストベクトル類似度計算部が、前記第1テキストベクトルと、前記第2テキストベクトルとの類似度であるテキストベクトル類似度を算出し、
     テキスト類似度計算部が、前記画像類似度と、前記テキストベクトル類似度とに基づいて、前記第1テキストと、前記第2テキストとの類似度を算出する
     ことを特徴とするテキスト類似度算出方法。
  6.  入力された第1テキストと、入力された第2テキストとの類似度を算出するテキスト類似度算出方法であって、
     画像情報変換部が、前記第1テキストを、前記第1テキストに対応する第1画像情報に変換すると共に、前記第2テキストを、前記第2テキストに対応する第2画像情報に変換し、
     画像ベクトル生成部が、前記第1画像情報に基づいて、前記第1画像情報を表す第1画像ベクトルを生成すると共に、前記第2画像情報に基づいて、前記第2画像情報を表す第2画像ベクトルを生成し、
     テキストベクトル生成部が、前記第1テキストに基づいて、前記第1テキストを表す第1テキストベクトルを生成すると共に、前記第2テキストに基づいて、前記第2テキストを表す第2テキストベクトルを生成し、
     画像テキスト混合ベクトル生成部が、前記第1画像ベクトルと、前記第1テキストベクトルとを混合した第1混合ベクトルを生成すると共に、前記第2画像ベクトルと、前記第2テキストベクトルとを混合した第2混合ベクトルを生成し、
     テキスト類似度計算部が、前記第1混合ベクトルと、前記第2混合ベクトルとの類似度であるベクトル類似度を、前記第1テキストと、前記第2テキストとの類似度として算出する
     ことを特徴とするテキスト類似度算出方法。
  7.  画像情報変換部が、入力されたテキストを、前記テキストに対応する画像情報に変換し、
     視覚情報推定部が、前記画像情報に普遍的な視覚情報である普遍的視覚情報が含まれる度合いを推定し、
     画像ベクトル生成部が、前記画像情報に基づいて、前記画像情報を表す画像ベクトルを生成し、
     テキストベクトル生成部が、前記テキストに基づいて、前記テキストを表すテキストベクトルを生成し、
     画像テキスト混合ベクトル生成部が、前記視覚情報推定部によって推定された、前記画像情報に前記普遍的視覚情報が含まれる度合いと、前記画像ベクトルと、前記テキストベクトルとに基づいて、混合ベクトルを生成する
     ことを特徴とするテキスト類似度算出方法。
  8.  コンピュータを、請求項1乃至4の何れか1項記載のテキスト類似度算出装置の各部として機能させるためのプログラム。
PCT/JP2019/026132 2018-07-02 2019-07-01 テキスト類似度算出装置、テキスト類似度算出方法、及びプログラム Ceased WO2020009067A1 (ja)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2018-125893 2018-07-02
JP2018125893A JP6553776B1 (ja) 2018-07-02 2018-07-02 テキスト類似度算出装置、テキスト類似度算出方法、及びプログラム

Publications (1)

Publication Number Publication Date
WO2020009067A1 true WO2020009067A1 (ja) 2020-01-09

Family

ID=67473424

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2019/026132 Ceased WO2020009067A1 (ja) 2018-07-02 2019-07-01 テキスト類似度算出装置、テキスト類似度算出方法、及びプログラム

Country Status (2)

Country Link
JP (1) JP6553776B1 (ja)
WO (1) WO2020009067A1 (ja)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112801217A (zh) * 2021-03-19 2021-05-14 北京世纪好未来教育科技有限公司 文本相似度判断方法、装置、电子设备以及可读存储介质
JPWO2023084833A1 (ja) * 2021-11-12 2023-05-19
CN116522168A (zh) * 2023-07-04 2023-08-01 北京墨丘科技有限公司 一种跨模态的文本相似度比较方法、装置及电子设备

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7556269B2 (ja) * 2020-11-16 2024-09-26 富士通株式会社 推論プログラム及び推論方法
KR102594547B1 (ko) * 2022-11-28 2023-10-26 (주)위세아이텍 멀티모달 특성 기반의 이미지 검색 장치 및 방법

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006227743A (ja) * 2005-02-15 2006-08-31 Xing Inc 検索装置
JP2009122942A (ja) * 2007-11-14 2009-06-04 Nippon Telegr & Teleph Corp <Ntt> 文書間距離計算装置およびプログラム

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4999886B2 (ja) * 2009-06-09 2012-08-15 ヤフー株式会社 画像検索装置
JP5569728B2 (ja) * 2010-05-11 2014-08-13 国立大学法人電気通信大学 画像ランキング方法、プログラム及び記憶媒体並びに画像表示システム
JP6278893B2 (ja) * 2011-11-24 2018-02-14 マイクロソフト テクノロジー ライセンシング,エルエルシー 対話型マルチモード画像検索

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006227743A (ja) * 2005-02-15 2006-08-31 Xing Inc 検索装置
JP2009122942A (ja) * 2007-11-14 2009-06-04 Nippon Telegr & Teleph Corp <Ntt> 文書間距離計算装置およびプログラム

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
MASUHIRO N.: "improvement of a dsitance between concept using weighted combination of image instances with their text tags", IECE, vol. 113, no. 403, 16 January 2014 (2014-01-16), pages 131 - 136 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112801217A (zh) * 2021-03-19 2021-05-14 北京世纪好未来教育科技有限公司 文本相似度判断方法、装置、电子设备以及可读存储介质
CN112801217B (zh) * 2021-03-19 2021-07-06 北京世纪好未来教育科技有限公司 文本相似度判断方法、装置、电子设备以及可读存储介质
JPWO2023084833A1 (ja) * 2021-11-12 2023-05-19
JP7647919B2 (ja) 2021-11-12 2025-03-18 日本電信電話株式会社 画像処理装置、画像処理方法、及びプログラム
CN116522168A (zh) * 2023-07-04 2023-08-01 北京墨丘科技有限公司 一种跨模态的文本相似度比较方法、装置及电子设备

Also Published As

Publication number Publication date
JP6553776B1 (ja) 2019-07-31
JP2020004322A (ja) 2020-01-09

Similar Documents

Publication Publication Date Title
US12399919B2 (en) Method and system for multi-level artificial intelligence supercomputer design
WO2020009067A1 (ja) テキスト類似度算出装置、テキスト類似度算出方法、及びプログラム
Chuang et al. Debiasing vision-language models via biased prompts
Gualberto et al. The answer is in the text: Multi-stage methods for phishing detection based on feature engineering
CN106973244B (zh) 使用弱监督数据自动生成图像字幕的方法和系统
CN107066464B (zh) 语义自然语言向量空间
Zhang et al. Mitigating uncertainty in document classification
Zhao et al. Simple question answering with subgraph ranking and joint-scoring
JP2016207141A (ja) 要約生成装置、要約生成方法、及び要約生成プログラム
Huang et al. Siamese network-based supervised topic modeling
WO2017183548A1 (ja) 情報処理システム、情報処理方法、及び、記録媒体
JP4170296B2 (ja) 事例分類装置および方法
US11954137B2 (en) Data generation device and data generation method
Bade et al. Lexicon-based language relatedness analysis
JP2010272004A (ja) 判別装置及び判別方法、並びにコンピューター・プログラム
Wang et al. Cequel: Cost-Effective Querying of Large Language Models for Text Clustering
CN114842246A (zh) 一种社交媒体压力类别检测方法及装置
WO2023145051A1 (ja) 推定装置、推定方法、および推定プログラム
Syaputra et al. Improving mental health surveillance over Twitter text classification using word embedding techniques
Srivastava et al. Hybrid Machine Learning Method for Sentiment Analysis
Muffo et al. Static fuzzy bag-of-words: a lightweight and fast sentence embedding algorithm
CN108595564B (zh) 媒体友好度评估方法、装置及计算机可读存储介质
Mirkin et al. Recognising entailment within discourse
US12299017B2 (en) Method and system for multi-level artificial intelligence supercomputer design
CN113297511B (zh) 商户排序模型的构建方法、装置、服务器及存储介质

Legal Events

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

Ref document number: 19830756

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: 19830756

Country of ref document: EP

Kind code of ref document: A1