JP7426302B2 - Synonym generation device and synonym generation program - Google Patents
Synonym generation device and synonym generation program Download PDFInfo
- Publication number
- JP7426302B2 JP7426302B2 JP2020112494A JP2020112494A JP7426302B2 JP 7426302 B2 JP7426302 B2 JP 7426302B2 JP 2020112494 A JP2020112494 A JP 2020112494A JP 2020112494 A JP2020112494 A JP 2020112494A JP 7426302 B2 JP7426302 B2 JP 7426302B2
- Authority
- JP
- Japan
- Prior art keywords
- synonym
- inquiry
- candidate
- synonyms
- candidates
- 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.)
- Active
Links
- 238000001514 detection method Methods 0.000 claims description 61
- 238000003860 storage Methods 0.000 claims description 24
- 238000000034 method Methods 0.000 description 69
- 230000008569 process Effects 0.000 description 52
- 238000012545 processing Methods 0.000 description 37
- 238000010586 diagram Methods 0.000 description 12
- 102220061996 rs786203944 Human genes 0.000 description 7
- 238000004458 analytical method Methods 0.000 description 6
- 238000009826 distribution Methods 0.000 description 5
- 230000000877 morphologic effect Effects 0.000 description 5
- 102220554706 Holliday junction recognition protein_S30T_mutation Human genes 0.000 description 4
- 102220470087 Ribonucleoside-diphosphate reductase subunit M2_S20A_mutation Human genes 0.000 description 4
- 230000002902 bimodal effect Effects 0.000 description 4
- 230000008859 change Effects 0.000 description 4
- 238000006243 chemical reaction Methods 0.000 description 4
- 102220582675 Biotinidase_S20D_mutation Human genes 0.000 description 2
- 238000004422 calculation algorithm Methods 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 2
- 238000010276 construction Methods 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 238000004519 manufacturing process Methods 0.000 description 2
- 102200136369 rs17843776 Human genes 0.000 description 2
- 102220590441 Epoxide hydrolase 3_S30D_mutation Human genes 0.000 description 1
- 102220470058 Ribonucleoside-diphosphate reductase subunit M2_S20E_mutation Human genes 0.000 description 1
- 102220559234 Voltage-dependent L-type calcium channel subunit alpha-1C_S30H_mutation Human genes 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 238000012790 confirmation Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000004880 explosion Methods 0.000 description 1
- 239000000284 extract Substances 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 239000000203 mixture Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 239000002245 particle Substances 0.000 description 1
- 238000012827 research and development Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 102220328040 rs786203944 Human genes 0.000 description 1
- 102220075112 rs796052701 Human genes 0.000 description 1
- 238000010079 rubber tapping Methods 0.000 description 1
- 208000004371 toothache Diseases 0.000 description 1
Images
Landscapes
- Machine Translation (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Description
本発明は、同義語生成装置、及び同義語生成プログラムに関し、より詳しくは、複数の問い合わせから同義語を検出するための同義語生成装置、及び同義語生成プログラムに関する。 The present invention relates to a synonym generation device and a synonym generation program, and more particularly to a synonym generation device and a synonym generation program for detecting synonyms from a plurality of queries.
データベースにおいて、ユーザの問い合わせに対し適切な回答を行うため、同義語を検出する計算機システムが知られており、更なる研究開発が進められている。例えば、製造現場や建築現場において、損傷や摩耗による部品交換を行う必要が生じることがあり、そのような場合に適切に交換部品を発注することが、製造現場や工事現場の安全な作業のために必須である。同様のことは、家庭において、家電製品の部品や消耗品を注文する場合においても生じ得る。 Computer systems that detect synonyms in databases in order to provide appropriate answers to user inquiries are known, and further research and development is underway. For example, at manufacturing or construction sites, parts may need to be replaced due to damage or wear, and in such cases, ordering replacement parts appropriately is essential for safe work at manufacturing and construction sites. is required. A similar situation may occur when ordering parts and consumables for home appliances at home.
部品交換のためには、膨大な部品データベースから正しい部品を選択して発注しなければならない。例えば非特許文献1に示す部品購買サイトでは、部品名などのキーワードで部品を検索し、発注することができる。しかし、キーワード入力において、データベースに登録されていない検索語を用いてしまうことがある。この場合、たとえ検索語と類似語の単語がデータベース中に含まれていたとしても、検索が適切に行われない。同義語辞書をデータベースに搭載することにより、この問題は解決され得るが、同義語辞書を人手で作成することはコストと時間が掛かる。
In order to replace a part, the correct part must be selected and ordered from a huge parts database. For example, at the parts purchasing site shown in Non-Patent
このため、同義語辞書を自動的に作成するシステムが、例えば、非特許文献2により提供されている。このシステムでは、対比される2つの文において、判定対象の単語の対は互いに異なる単語であるが、それらの周囲の単語が全て同一である場合に、その判定対象の単語ペアを同義語と判断し、同義語辞書に登録する。
For this reason, a system for automatically creating a synonym dictionary is provided by, for example, Non-Patent
例えば、
・「私は目が痛いので明日眼科へ行く」
・「私は目が痛いので明日眼医者へ行く」
という2つの文があったとする。
この2つの文には、「眼科」と「眼医者」という異なる単語のペアがある。一方で、これらの単語ペアの周囲に現れる単語は「私」「目」「痛い」「明日」「行く」とすべて同一である。従って、「眼科」と「眼医者」は同義語と判定することができ、同義語辞書に登録することができる。
for example,
・"My eyes hurt, so I'm going to the eye doctor tomorrow."
・"My eye hurts so I'm going to the eye doctor tomorrow."
Suppose there are two sentences.
These two sentences have different pairs of words: "ophthalmologist" and "eye doctor." On the other hand, the words that appear around these word pairs are all the same: "me,""eyes,""ouch,""tomorrow," and "go." Therefore, "ophthalmology" and "eye doctor" can be determined to be synonymous and can be registered in the synonym dictionary.
これに対し、
・「私は目が痛いので明日眼科へ行く」
・「私は歯が痛いので明日歯医者へ行く」という2つの文があったとする。
この2つの文では、「眼科」と「歯医者」という単語ペアが発見されるが、この単語ペアの周囲においても、「目」と「歯」という異なる単語がある。このため、「眼科」と「歯医者」は同義語ではないと判定することができ、同義語辞書への登録の対象外とされる。
In contrast,
・"My eyes hurt, so I'm going to the eye doctor tomorrow."
・Suppose there are two sentences: ``I have a toothache, so I'm going to the dentist tomorrow.''
In these two sentences, the word pair "ophthalmologist" and "dentist" is found, but there are also different words surrounding this word pair, "eye" and "teeth." Therefore, it can be determined that "ophthalmology" and "dentist" are not synonyms, and are excluded from registration in the synonym dictionary.
しかし、上記の非特許文献2の方法により同義語を自動登録すると、同義語で無い語が同義語として誤って登録されることが生じ得るという問題がある。また、問合せ文の入力の際、ユーザによって誤入力が行われたり、音声入力の場合、言い間違えが生じたりすることがある。この場合にも、言い間違えた単語が誤って同義語として入力されてしまうことが生じ得る。
However, when synonyms are automatically registered using the method described in
本発明は、同義語の誤登録を回避しつつ、同義語辞書を効率良く生成することが出来る同義語生成装置、及び同義語生成プログラムを提供することを目的とする。 An object of the present invention is to provide a synonym generation device and a synonym generation program that can efficiently generate a synonym dictionary while avoiding erroneous registration of synonyms.
かかる課題を解決するため、本発明の同義語生成装置は、ユーザ入出力装置からの問い合わせを記録する問い合わせ記録テーブルと、同義語の候補となる同義語候補を登録する同義語候補テーブルと、同義語を記録する同義語辞書を記憶する同義語辞書記憶部と、前記同義語辞書への登録の可否を判定し前記同義語辞書の更新を行う制御部とを有する。前記制御部は、前記問い合わせ記録テーブルに記録された前記問い合わせに基づいて、前記同義語候補を前記同義語候補テーブルに登録し、前記同義語候補テーブルに登録された前記同義語候補に関し同義語判定を実行し、所定の判定基準を満たした同義語候補を前記同義語辞書に同義語として登録する。 In order to solve this problem, the synonym generation device of the present invention includes an inquiry record table that records inquiries from user input/output devices, a synonym candidate table that registers synonym candidates that are synonym candidates, It has a synonym dictionary storage unit that stores a synonym dictionary for recording words, and a control unit that determines whether registration in the synonym dictionary is possible and updates the synonym dictionary. The control unit registers the synonym candidate in the synonym candidate table based on the inquiry recorded in the inquiry record table, and performs synonym determination regarding the synonym candidate registered in the synonym candidate table. is executed, and synonym candidates that meet predetermined criteria are registered as synonyms in the synonym dictionary.
また、本発明に係る同義語生成プログラムは、ユーザ入出力装置からの問い合わせを問い合わせ記録テーブルに記憶させるステップと、前記問い合わせ記録テーブルに記録された問い合わせに基づいて、同義語の候補となる同義語候補を検出し、同義語候補テーブルに登録するステップと、所定の判定基準を満たした同義語候補を同義語として同義語辞書記憶部に記憶させるステップとをコンピュータに実行させるように構成される。 Further, the synonym generation program according to the present invention includes a step of storing an inquiry from a user input/output device in an inquiry record table, and a synonym that becomes a synonym candidate based on the inquiry recorded in the inquiry record table. The computer is configured to perform the steps of detecting candidates and registering them in a synonym candidate table, and storing synonym candidates that meet predetermined criteria as synonyms in a synonym dictionary storage unit.
本発明によれば、同義語の誤登録を回避しつつ、同義語辞書を効率良く生成することが出来る同義語生成装置、及び同義語生成プログラムを提供することができる。 According to the present invention, it is possible to provide a synonym generation device and a synonym generation program that can efficiently generate a synonym dictionary while avoiding erroneous registration of synonyms.
以下、添付図面を参照して本実施形態について説明する。添付図面では、機能的に同じ要素は同じ番号で表示される場合もある。なお、添付図面は本開示の原理に則った実施形態と実装例を示しているが、これらは本開示の理解のためのものであり、決して本開示を限定的に解釈するために用いられるものではない。本明細書の記述は典型的な例示に過ぎず、本開示の特許請求の範囲又は適用例を如何なる意味においても限定するものではない。 This embodiment will be described below with reference to the accompanying drawings. In the accompanying drawings, functionally similar elements may be designated by the same number. Although the attached drawings show embodiments and implementation examples in accordance with the principles of the present disclosure, they are for the purpose of understanding the present disclosure, and should not be used to limit the present disclosure in any way. isn't it. The descriptions herein are merely typical examples and do not limit the scope of claims or applications of the present disclosure in any way.
本実施形態では、当業者が本開示を実施するのに十分詳細にその説明がなされているが、他の実装・形態も可能で、本開示の技術的思想の範囲と精神を逸脱することなく構成・構造の変更や多様な要素の置き換えが可能であることを理解する必要がある。従って、以降の記述をこれに限定して解釈してはならない。 Although the embodiments are described in sufficient detail for those skilled in the art to implement the present disclosure, other implementations and forms are possible without departing from the scope and spirit of the technical idea of the present disclosure. It is necessary to understand that it is possible to change the composition and structure and replace various elements. Therefore, the following description should not be interpreted as being limited to this.
図1を参照して、実施の形態に係る計算機システム(同義語生成装置)を説明する。図1は、実施の形態に係る計算機システム1の構成について示す図である。この計算機システム1は、CPU(Central Processing Unit)2、主記憶装置3、外部記憶装置4、入出力装置5を備え、これら装置を相互に接続して構成されている。
A computer system (synonym generating device) according to an embodiment will be described with reference to FIG. FIG. 1 is a diagram showing the configuration of a
計算機システム1は、計算機ネットワーク7を介してユーザ入出力装置8と接続され得る。ユーザ入出力装置8は、計算機システム1に対し、部品に関する問い合わせを行い、その検索結果を取得可能に構成されている。ユーザ入出力装置8は、例えば、スマートフォンのような携帯電話、タブレットPC(Personal Computer)、ノートPC、デスクトップPC等であるが、これらに限定されるわけではない。ユーザ入出力装置8は、例えばキーボードやマイクなどの入力装置と、ディスプレイなどの出力装置を含み、特定の形式に限定されるものではない。
The
CPU2は、計算機プログラムに従って、計算機システム1の全体を制御する中央制御装置であり、主記憶装置3及び外部記憶装置4と共に計算機システム1の制御部を構成する。主記憶装置3は、計算機システム1の動作の主要部を構成するモジュールやテーブルを記憶する記憶装置である。また、外部記憶装置4は、主記憶装置3と共に計算機システムの動作を実行するための記憶装置であり、主にデータベースとして機能する。
The
入出力装置5は、計算機システム1における計算を適切に実行するため、オペレータによって各種データ等を入力されると共に、各種データ(演算結果、入力データ、受信データ)を表示するよう構成されている。入出力装置5は、例えば、キーボード、マウス、ディスプレイ、マイク、カメラ、スピーカー等を含み得るが、特定の形式に限定されるものではない。
The input/
具体的には、主記憶装置3は、一例として、データベース問い合わせ処理モジュール20、同義語検出処理モジュール30、問い合わせ記録テーブル42、同義語候補テーブル44等を記憶すると共に、同義語候補検出回数下限値46を記憶している。データベース問い合わせ処理モジュール20、同義語検出処理モジュール30、問い合わせ記録テーブル42、同義語候補テーブル44は、一体として同義語生成プログラムを構成する。
Specifically, the
データベース問い合わせ処理モジュール20は、ユーザ入出力装置8からの問い合わせを(例えば、機種名、部位名、部品名を含む問い合わせ)受信して、問い合わせを処理し、その検索結果をユーザ入出力装置8に返す機能を有する。同義語検出処理モジュール30は、入力された問い合わせ処理の中から、後述するシーケンスに従って同義語を検出する処理を実行するよう構成されている。
The database
問い合わせ記録テーブル42は、データベース問い合わせ処理モジュール20から入力された問い合わせを記録するテーブルである。後述するように、問い合わせ記録テーブル42は、複数の問い合わせの各々について、その内容、及び、その検索が成功であったか、又は失敗であったか(検索結果が得られたか否か)を示すデータを含んでいる。また、同義語候補テーブル44は、各種問い合わせの中から同義語となり得る単語(候補)として抽出された同義語候補を記憶するテーブルである。
The inquiry record table 42 is a table that records inquiries input from the database
本実施の形態では、所定のルールに従って、同義語である可能性があると判定された単語を、即座に同義語辞書データベース50に登録するのではなく、いったんこの同義語候補テーブル44に登録する。その後、後述する処理に従って、これら同義語候補に関して判定処理を実行し、所定の判定基準を満たした同義語候補を、正式に同義語として同義語辞書データベース50に登録・更新する。所定の基準とは、詳しくは後述するが、一例としては、同義語候補検出回数下限値46を超える回数だけ同じ同義語候補が検出されたか否かを基準の1つとすることができる。
In this embodiment, words determined to be potentially synonymous according to predetermined rules are not immediately registered in the
外部記憶装置4には、同義語辞書データベース50(同義語辞書記憶部)、及び部品データベース52が記憶されている。同義語辞書データベース50は、同義語検出処理モジュール30により検出された同義語を登録したデータベースである。同義語辞書データベース50は、例えば計算機システム1の出荷時からある程度の同義語データを保持していてもよいし、出荷時は同義語データを有していないが、使用の結果として蓄積される同義語のデータを記録するものであってもよい。部品データベース52は、部品の名称、部品番号を、対応する機種名、部位名と対応付けて記憶するデータベースである。
The
ユーザ入出力装置8から問い合わせがあった場合、データベース問い合わせ処理モジュール20は、部品データベース52を検索し、問い合わせと一致する部品が見つかれば、その結果をユーザ入出力装置8に返す。検索に当たり、データベース問い合わせモジュール20は、同義語辞書データベース50も検索し、問い合わせに係る部位や部品の名称が同義語辞書データベース50に存在するか否かも併せて検索する。検索の結果同義語が見つかれば、部品データベース52には存在しない単語を、当該同義語と置き換えて検索が実行される。
When there is an inquiry from the user input/
図2は、本実施の形態で実行されるデータベース問い合わせ処理の全体的な流れを示すフローチャートである。ユーザ入出力装置8から、計算機ネットワーク7を介して部品に関する問い合わせが計算機システム1に入力されると、データベース問い合わせ処理モジュール20が動作し、データベース問い合わせ処理が実行される(ステップS20)。
FIG. 2 is a flowchart showing the overall flow of database inquiry processing executed in this embodiment. When an inquiry regarding parts is input from the user input/
その後、入力された問い合わせを分析して、その複数の問い合わせに含まれる単語の中から同義語を検出する同義語検出処理が実行される(ステップS30)。同義語検出処理(ステップS30)の詳細は後述する。ステップS40では、全体処理を終了するか判定し、終了しなければ(No)データベース問い合わせ処理(ステップS20)に戻り、そうでなければ(Yes)全体処理は終了する。ステップS40の判定は、処理を終了するかをユーザ入出力装置8等に表示し、ユーザ入出力装置8等からの特定の入力信号をもって処理の終了を判定することができる。この判定は、特定の方法や機械に限定されるものではない。
Thereafter, a synonym detection process is executed to analyze the input inquiry and detect synonyms from among the words included in the plurality of inquiries (step S30). Details of the synonym detection process (step S30) will be described later. In step S40, it is determined whether the overall process is to be ended. If not (No), the process returns to the database inquiry process (step S20); otherwise (Yes), the entire process is ended. The determination in step S40 can be made by displaying on the user input/
図3を参照して、全体処理の別の例を説明する。この例では、ステップS20の後、ステップS25にて同義語検出処理を実行するか否かの判定処理が含まれる。Yesであれば同義語検出処理(ステップS30)に移行し、そうでなければ(No)データベース問い合わせ処理(ステップS20)に戻る。ステップS25の判定は、同義語検出処理を実行するか否かをユーザ入出力装置8等に表示し、ユーザ入出力装置8等からの特定の入力信号に従い、Yes/Noの判定を行うこともできる。
Another example of overall processing will be described with reference to FIG. In this example, after step S20, step S25 includes a process of determining whether or not to perform synonym detection processing. If Yes, the process moves to synonym detection processing (step S30); otherwise (No), the process returns to database inquiry processing (step S20). The determination in step S25 may be made by displaying on the user input/
また、図示は省略するが、図2又は図3のフローにおいて、以下のような動作が追加されてもよい。以下の動作は、適宜組み合わせることも可能である。また、これらの動作に限定されるものではないことは言うまでもない。
・データベース問い合わせ処理(ステップS20)を予め定めた一定回数実行した場合に同義語検出処理(ステップS30)に移行する
・ユーザ入出力装置8からの入力が一定期間ないことを検出した場合に同義語検出処理を実行する
・CPU2がアイドル状態であることを検出した場合に同義語検出処理を実行する(CPU2がビジー状態である場合には、同義語検出処理は実行せず、データベース問い合わせ処理が繰り返される)
・計算機システム1等から時刻を検出し、検出した時刻が夜間(例えば午後8時~午前5時の範囲)であれば同義語検出処理を実行する
・直前のデータベース問い合わせ処理で成功問い合わせが検出された場合に、同義語検出処理を実行する
Further, although not shown, the following operations may be added to the flow of FIG. 2 or 3. The following operations can be combined as appropriate. It goes without saying that the operations are not limited to these operations.
・When the database inquiry process (step S20) is executed a predetermined number of times, the process proceeds to the synonym detection process (step S30). ・When it is detected that there is no input from the user input/
- Detects the time from
次に、図4のフローチャートを参照して、データベース問い合わせ処理(ステップS20)の詳細を説明する。データベース問い合わせ処理では、問い合わせが入力されると、問い合わせ記録テーブル42において、エントリが1つ作成される(ステップS20A)。 Next, details of the database inquiry process (step S20) will be explained with reference to the flowchart of FIG. In the database inquiry process, when an inquiry is input, one entry is created in the inquiry record table 42 (step S20A).
図5は問い合わせ記録テーブル42のデータ構造の一例を示した図である。図5(a)は、最初の1エントリを作成した直後における問い合わせ記録テーブル42のデータ構造を示す。図5(a)では、3つのフィールドを持つ1エントリのテーブルが作成されており、一番左から、問い合わせの通し番号フィールド、問い合わせに含まれる単語リストフィールド、問い合わせの成功/失敗のフィールドを含む。「問い合わせ成功」とは、部品データベース52への問い合わせで1件以上の検索結果が返ってくることを意味し、失敗とは、検索結果が0件であったことを意味する。以下では、成功した問い合わせを「成功問い合わせ」、失敗した問い合わせを「失敗問い合わせ」と呼ぶ。
FIG. 5 is a diagram showing an example of the data structure of the inquiry record table 42. FIG. 5(a) shows the data structure of the inquiry record table 42 immediately after creating the first entry. In FIG. 5A, a one-entry table with three fields has been created, including, from the left, a serial number field for an inquiry, a field for a list of words included in the inquiry, and a field for success/failure of the inquiry. A "successful inquiry" means that one or more search results are returned by an inquiry to the
図4に戻って説明を続ける。ステップS20Aの後、入力処理(ステップS20B)が実行される。入力処理(ステップS20B)では、キーボードやマイク等から入力された文を、次のSQL生成実行処理(ステップS20C)で扱いやすいように処理する。入力処理(ステップS20B)の詳細は後述する。 Returning to FIG. 4, the explanation will be continued. After step S20A, input processing (step S20B) is executed. In the input process (step S20B), sentences input from the keyboard, microphone, etc. are processed so that they can be easily handled in the next SQL generation execution process (step S20C). Details of the input processing (step S20B) will be described later.
次にSQL生成実行処理(ステップS20C)が実行される。SQL生成実行処理(ステップS20C)では、入力された文からSQL問い合わせを生成して、部品データベース52に対してSQL問い合わせを実行し、その成功問い合わせ/失敗問い合わせを記録する。SQL生成実行処理(ステップS20C)の詳細は後述する。
Next, SQL generation execution processing (step S20C) is executed. In the SQL generation/execution process (step S20C), an SQL query is generated from the input sentence, the SQL query is executed against the
続くステップS20Dでは、SQL生成実行処理(ステップS20C)の結果が成功だったか失敗だったかを判定する。失敗だった場合(No)は、当該問い合わせを「失敗問い合わせ」として記録する(ステップS20E)。「失敗問い合わせ」は、一例として、問い合わせ記録テーブル42の空きエントリの通し番号フィールドに、1から始まり1ずつ増えていく通し番号を、単語リストフィールドにSQL問い合わせに用いた単語を、問い合わせ成功記録フィールドにFalseを記録することにより記録され得る。 In the following step S20D, it is determined whether the result of the SQL generation execution process (step S20C) was successful or unsuccessful. If the inquiry is unsuccessful (No), the inquiry is recorded as a "failed inquiry" (step S20E). For example, for a "failure query", set a serial number starting from 1 and incrementing by 1 in the serial number field of an empty entry in the query record table 42, the word used for the SQL query in the word list field, and False in the query success record field. can be recorded by recording.
図5(b)は、問い合わせ記録テーブル42の最初の1エントリに、通し番号として1を、単語リストとして「ZX200、起重機、ねじ」を、問い合わせ成功記録としてFalseを記録した場合のデータ構造を示している。このような記録がされると、処理はステップS20Aに戻る。 FIG. 5(b) shows the data structure when 1 is recorded as the serial number, "ZX200, hoist, screw" is recorded as the word list, and False is recorded as the inquiry success record in the first entry of the inquiry record table 42. There is. Once such recording is done, the process returns to step S20A.
また、図5(c)は、処理(ステップS20A)へ戻った場合の、問い合わせ記録テーブル42のエントリ作成状態の一例を示している。通し番号1のエントリの上に、新しい空きエントリが作成される。
Further, FIG. 5C shows an example of the entry creation state of the inquiry record table 42 when the process returns to step S20A. A new empty entry is created above the entry with
ステップS20Dの判定が成功だった場合(Yes)、ステップS20Fに移行し、問い合わせ記録テーブル42の空きエントリに、当該問い合わせが「成功問い合わせ」として記録され、データベース問い合わせ処理20が終了する。「成功問い合わせ」として記録するとは、問い合わせ記録テーブル42の空きエントリの通し番号フィールドに、1から始まり1ずつ増えていく通し番号を、単語リストフィールドにSQL問い合わせに用いた単語を、問い合わせ成功記録に「True」を記録することである。図5(d)は、問い合わせ記録テーブル42のn番目(nは正整数)のエントリに、通し番号としてnを、単語リストとして「ZX200、クレーン、ボルト」を、問い合わせ成功記録としてTrueを記録した場合を示している。 If the determination in step S20D is successful (Yes), the process moves to step S20F, the inquiry is recorded as a "successful inquiry" in an empty entry in the inquiry record table 42, and the database inquiry processing 20 ends. Recording as a "successful query" means that the serial number starting from 1 and increasing by 1 is entered in the serial number field of the empty entry in the query record table 42, the word used for the SQL query is entered in the word list field, and "True" is recorded in the query success record. ” is to be recorded. FIG. 5(d) shows a case where n is recorded as the serial number, “ZX200, crane, bolt” is recorded as the word list, and True is recorded as the inquiry success record in the nth entry (n is a positive integer) of the inquiry record table 42. It shows.
なお、図5の問い合わせ記録テーブル42は、テーブルの型式での実施例としたが、この型式に限定されず、連結リストやハッシュテーブル等の型式での実施も可能である。 Although the inquiry record table 42 in FIG. 5 is in the form of a table, it is not limited to this form, and may also be implemented in a form such as a linked list or a hash table.
図6のフローチャートを参照して、入力処理(ステップS20B)の手順を更に説明する。図6(a)は、入力がキーボード入力だった場合のフローチャートである。ステップS20B1では、キーボードから入力された文に対し、形態素解析を行い、名詞を切り出す。形態素解析とは、自然言語の文から、単語を切り出して名詞、助詞などに分類する解析方法である。例えば形態素解析では、「ZX200の、クレーンの、ボルト」という自然言語の文から、「ZX200」「クレーン」「ボルト」という名詞を抽出する。なお句点は説明を分かりやすくするために挿入したものであり、形態素解析にとっては不要である。図6(b)は、入力が音声入力だった場合のフローチャートである。音声は、マイク入力の結果でも、適切なフォーマットの音声ファイルを入力として利用してもよい。ステップS20B2では、入力された音声に対して音声テキスト変換を行う。音声テキスト変換は、Speech to Text技術と呼ばれており、スマートフォンや、Amazon Echo(登録商標)、Google Home(登録商標)等のスマートスピーカ等で実行することができる。続くステップS20B3では、音声テキスト変換された文に対して形態素解析を行い名詞を切り出す。 The procedure of the input process (step S20B) will be further explained with reference to the flowchart of FIG. 6. FIG. 6(a) is a flowchart when the input is a keyboard input. In step S20B1, a sentence input from the keyboard is subjected to morphological analysis to extract nouns. Morphological analysis is an analysis method that extracts words from natural language sentences and classifies them into nouns, particles, etc. For example, in morphological analysis, the nouns "ZX200," "crane," and "bolt" are extracted from the natural language sentence "ZX200, crane, bolt." Note that the punctuation marks are inserted to make the explanation easier to understand, and are not necessary for morphological analysis. FIG. 6(b) is a flowchart when the input is a voice input. The audio may be the result of microphone input, or an audio file in an appropriate format may be used as input. In step S20B2, speech text conversion is performed on the input speech. Speech-to-text conversion is called Speech to Text technology, and can be performed on smartphones and smart speakers such as Amazon Echo (registered trademark) and Google Home (registered trademark). In the following step S20B3, morphological analysis is performed on the text-converted sentence to extract nouns.
以上の入力処理(ステップS20B)の例では、キーボード入力と音声入力を例に挙げたが、これら以外にも静止画や動画等から画像に含まれる文字列を認識して入力とする、手話などのジェスチャをカメラで撮影して入力とする、予め定められた単語や文を選択肢として表示し、それをユーザに選ばせる等、多様な入力方法が可能である。 In the above example of input processing (step S20B), keyboard input and voice input are taken as examples, but in addition to these, there are other methods such as recognition of character strings included in images from still images and videos, sign language, etc. A variety of input methods are possible, such as photographing the gesture with a camera as input, displaying predetermined words and sentences as options, and letting the user select one.
図7のフローチャートを参照して、SQL生成実行処理(ステップS20C)の具体例を説明する。ステップS20C1では、入力処理20Bで抽出した名詞を名詞1、名詞2などとして、例えば下記のようなSQL問い合わせを生成する。
「SELECT 部品番号 FROM 部品DB WHERE 機種名=名詞1 AND 部位名=名詞2 AND 部品名=名詞3」
例えば、抽出した名詞が「ZX200」「クレーン」「ボルト」だった場合、
「SELECT 部品番号 FROM 部品DB WHERE 機種名=ZX200 AND 部位名=クレーン AND 部品名=ボルト」というSQL問い合わせになる。
A specific example of the SQL generation execution process (step S20C) will be described with reference to the flowchart in FIG. In step S20C1, the nouns extracted in the input process 20B are set as
"SELECT part number FROM parts DB WHERE model name=
For example, if the extracted nouns are "ZX200", "crane", and "volt",
The SQL query will be "SELECT part number FROM parts DB WHERE model name=ZX200 AND part name=Crane AND part name=Bolt".
図8は、部品データベース52の例を示した図である。左から第1カラムに機種名、第2カラムに部位名、第3カラムに部品名、第4カラムに部品番号が格納されている。図7のステップS20C1のSQL問い合わせは、この部品データベース52の構成を反映した形になっている。部品データベース52の構成に変更があったり、取り出したい情報(カラム)に変更があったりすれば、対応するSQL問い合わせも変更される。また、入力された名詞の順番が、必ずしもSQL問い合わせでのWHERE節の条件の順番になっていない場合も考えられる。そのような場合は、条件の機種名、部位名などと、入力された名詞の全ての組み合わせの条件でSQL問い合わせを作成し、実行させることもできる。また、機種名辞書、部位名辞書などを予め作成しておき、名詞が機種名辞書に登録された単語であれば機種名の条件(名詞1)に当て嵌める等の方法も可能であり、SQL問い合わせの生成方法はこれらに限られたものではない。また、同義語辞書データベース50に既に同義語データが存在する場合は、名詞1、名詞2等に同義語がないか調べ、同義語がある場合は同義語に置き換えてからSQL問い合わせを作成することもできる。
FIG. 8 is a diagram showing an example of the
図7に戻って説明を続ける。ステップS20C2では、生成したSQL問い合わせを部品データベース52に対して実行する。次にステップS20C3では、部品データベース52に対して実行したSQL問い合わせにより、1件以上の検索結果が得られた場合、その問い合わせを成功問い合わせ(True)とする。一方、検索結果が0件であったら、その問い合わせは失敗問い合わせ(False)とする。
Returning to FIG. 7, the explanation will be continued. In step S20C2, the generated SQL query is executed against the
図9のフローチャートを参照して、同義語検出処理(ステップS30)の詳細を説明する。同義語検出処理が開始されると、問い合わせ記録テーブル42の一番上(n番目)のエントリの問い合わせ成功記録フィールドの値がTrueであり、かつ1つ下(n-1番目)のエントリの問い合わせ成功記録フィールドの値がFalseであるかを判定する(ステップS30A)。そうであれば(Yes)ステップS30Bに移行し、そうでなければ(No)同義語検出処理を終了する。ステップS30Bでは、変数kにnを代入する。また、同義語候補テーブル44を作成する。 Details of the synonym detection process (step S30) will be described with reference to the flowchart in FIG. When the synonym detection process starts, the value of the inquiry success record field of the top (nth) entry in the inquiry record table 42 is True, and the inquiry of the entry one below (n-1st) It is determined whether the value of the success record field is False (step S30A). If so (Yes), the process moves to step S30B, and if not (No), the synonym detection process ends. In step S30B, n is assigned to variable k. Additionally, a synonym candidate table 44 is created.
図10は、同義語候補テーブル44のデータ構造の一例を示した図である。同義語候補テーブル44は、一例として、左側から順に第1~第3カラムを有している。 FIG. 10 is a diagram showing an example of the data structure of the synonym candidate table 44. As an example, the synonym candidate table 44 has first to third columns in order from the left side.
左側の第1カラムは、部品データベース52に登録されている用語である部品データベース用語を記録する。真ん中の第2カラムは、部品データベース用語と同義語ペアを構成する同義語候補を記録する。また、第3カラムは、この同義語ペアが検出された回数である同義語候補検出回数を記録する。
The first column on the left records parts database terms, which are terms registered in the
図10の同義語候補テーブル44は、第1行目において、部品データベース52に登録されている「ボルト」という用語の同義語の候補として、「ねじ」という用語を登録している。そして、その「ねじ」という用語が、「ボルト」の同義語の候補として検出された回数(同義語候補検出)が135回であることを意味している。また、図10の同義語候補テーブルでは、2行目において、部品データベース52に登録されている「ボルト」
という用語の同義語の候補として、「ボトル」という用語を登録している。この「ボトル」は、後述するように、ユーザが「ボルト」と音声又はキーボードで入力すべきところ、誤って「ボトル」と入力した場合を示している。このため、(ボルト、ボトル)については、同義語候補検出回数は1回とされている(そのような間違いをするユーザは少ない)。
In the first row of the synonym candidate table 44 in FIG. 10, the term "screw" is registered as a synonym candidate for the term "bolt" registered in the
The term ``bottle'' is registered as a candidate synonym for the term ``bottle''. As will be described later, this "bottle" indicates a case where the user should have inputted "volt" by voice or keyboard, but instead inputted "bottle" by mistake. Therefore, for (volt, bottle), the number of synonym candidate detections is set to one (few users make such a mistake).
なお、同義語候補テーブル44は、システムの出荷時(使用開始前)においては、第1カラム、第2カラムとも空であり、第3カラムには「0」が記録され得る。同義語候補が登録され、同義語候補が複数回に亘り検出されることで、第3カラムの数字も増えていく。 Note that in the synonym candidate table 44, both the first column and the second column are empty when the system is shipped (before the start of use), and "0" may be recorded in the third column. As synonym candidates are registered and detected multiple times, the number in the third column also increases.
図9に戻って説明を続ける。ステップS30Cでは、問い合わせ記録テーブル42のk番目のエントリとk-1番目のエントリの単語リストを比較し、同義語を検出する。k番目のエントリとk-1番目のエントリとにおいて、単語リストに登録された単語が1単語を除いて同一の場合、その1単語同士を同義語ペアとする。同義語ペアのうち、k番目のエントリに含まれる単語を部品データベース52に既に登録されている単語である部品データベース用語、k-1番目に含まれる単語を同義語(同義語候補)とする。例えば、k番目のエントリの単語リストが「ZX200、クレーン、ボルト」、k-1番目の単語リストが「ZX200、クレーン、ねじ」である場合(図5(d)でk=nの場合に対応)、「ボルト」と「ねじ」が同義語ペアであり、「ボルト」が部品データベース52中の用語、「ねじ」が同義語(同義語候補)となる。両エントリ中で2つ以上の単語が異なる場合は、同義語は検出できなかったとする。
Returning to FIG. 9, the explanation will be continued. In step S30C, the word lists of the k-th entry and the k-1-th entry in the inquiry record table 42 are compared to detect synonyms. If the words registered in the word list are the same in the k-th entry and the k-1-th entry except for one word, those one words are treated as a synonym pair. Among the synonym pairs, the word included in the k-th entry is a component database term, which is a word already registered in the
次にステップS30Dで、両エントリにおいて同義語が検出できたか否かをチェックする。同義語が検出できていれば(Yes)同義語登録処理(ステップS30E)を実行し、検出できていなければ(No)同義語検出処理(ステップS30)を終了する。同義語登録処理(ステップS30E)の詳細は後述する。 Next, in step S30D, it is checked whether synonyms have been detected in both entries. If a synonym has been detected (Yes), the synonym registration process (step S30E) is executed, and if it has not been detected (No), the synonym detection process (step S30) is ended. Details of the synonym registration process (step S30E) will be described later.
次にステップS30Fでは、kにk-1を代入する。すなわち、元は失敗問い合わせであった問い合わせを成功問い合わせとみなし、別の失敗問い合わせと比較して同義語検出処理を実行する。この点は後述する。次にステップS30Gでは、k>0かどうか調べ、k>0であれば(Yes)ステップS30Cに戻り、そうでなければ(No)ステップS30Hに進み、問い合わせ記録テーブル42を削除し、同義語検出処理(ステップS30)を終了する。 Next, in step S30F, k-1 is substituted for k. That is, a query that was originally a failed query is regarded as a successful query, and is compared with another failed query to perform synonym detection processing. This point will be discussed later. Next, in step S30G, it is checked whether k>0, and if k>0 (Yes), the process returns to step S30C, otherwise (No), the process proceeds to step S30H, where the inquiry record table 42 is deleted and synonyms are detected. The process (step S30) ends.
ステップS30B~ステップS30Gで示したように、成功問い合わせと失敗問い合わせの組から同義語が検出できた場合、エントリの通し番号を1つデクリメントして(減らして)、成功問い合わせと一単語だけ異なる失敗問い合わせを検索する。そのような失敗問い合わせが見つかれば、以後はその失敗問い合わせを成功問い合わせとして取り扱い、図9のフローチャートの動作を実行することができる。すなわち、元々は失敗問い合わせと認められた問い合わせを、他の失敗問い合わせと比較して同義語検出に用いることが可能になる。それが可能となる理由を説明する。 As shown in steps S30B to S30G, if synonyms can be detected from the set of success queries and failure queries, the serial number of the entry is decremented (reduced) by one, and the failure queries that differ by one word from the success queries are Search for. If such a failed inquiry is found, the failed inquiry can be treated as a successful inquiry from now on, and the operations in the flowchart of FIG. 9 can be executed. In other words, a query that was originally recognized as a failed query can be compared with other failed queries and used for synonym detection. Explain why this is possible.
成功問い合わせ(図5(d)のn番目のエントリに対応)の単語リストは、部品データベース52に登録された単語のみから構成されている。一方、成功問い合わせとの比較の結果、同義語を検出できた失敗問い合わせ(図5(d)のn-1番目のエントリに対応)の単語リストは、部品データベース52に登録された単語と、検出された同義語のみから構成されている。そのため、検出された同義語を、対応する部品データベース52に登録された単語と置き換えることで、この失敗問い合わせは成功問い合わせと同じ単語リストに書き換えることが可能である。そこで、この失敗問い合わせを成功問い合わせとみなし、例えば1つ前の失敗問い合わせとの間で同義語を検出できるか試みることができる。これを、同義語が検出できなくなるか、問い合わせ記録テーブル42の1番目のエントリに到達するまで再帰的に繰り返すことで、効率よく同義語を検出することができる。
The word list for the success inquiry (corresponding to the n-th entry in FIG. 5(d)) is composed only of words registered in the
成功問い合わせを、全ての失敗問い合わせと突き合わせることで同義語を検出し、それを再帰的に繰り返すことも可能であるが、このようなアルゴリズムは組み合わせ爆発を起こすことが明らかであり、計算時間や計算に必要な計算機資源の面で実用的ではない。以上で同義語検出の手順の説明を終了する。 It is also possible to detect synonyms by matching successful queries with all failed queries and repeat the process recursively, but it is clear that such an algorithm will cause combinatorial explosion, resulting in a large amount of computation time and It is not practical in terms of the computer resources required for calculation. This concludes the explanation of the synonym detection procedure.
図11のフローチャートを参照して、図9の同義語登録処理(ステップS30E)の詳細な手順を説明する。最初にステップS30E1では、同義語候補テーブル44が未作成の場合、これを主記憶装置3に作成する。同義語候補テーブル44がある場合であっても、同義語候補テーブル44中に空きエントリがなければ、空きエントリを追加する。空きエントリの部品データベース用語と同義語のフィールドは空欄に、同義語検出回数フィールドは0に初期化する。
The detailed procedure of the synonym registration process (step S30E) in FIG. 9 will be described with reference to the flowchart in FIG. 11. First, in step S30E1, if the synonym candidate table 44 has not yet been created, it is created in the
次にステップS30E2では、図9のステップS30Cで検出した部品データベース52中の用語と同義語である可能性がある単語を、同義語候補テーブル44の空きエントリに登録し、前記エントリの同義語検出回数を1だけインクリメントする(元々が0であれば、1にする)。
Next, in step S30E2, words that may be synonymous with the term in the
次に、ステップS30E3において、同義語候補検出回数の下限値を決定する。同義語である可能性があるとの検出がなされた回数をカウントし、カウント値がこの下限値を超えた場合において、その同義語の候補とされた単語は、最終的に同義語と認定され、同義語辞書データベース50に登録される。同義語候補検出回数の下限値を決定するステップS30E3の詳細は、図12、図13を用いて説明する。
Next, in step S30E3, a lower limit value of the number of synonym candidate detections is determined. The number of times a word is detected as a possible synonym is counted, and if the count value exceeds this lower limit, the word that is considered as a synonym candidate is finally recognized as a synonym. , is registered in the
次にステップS30E4では、ステップS30E2でインクリメントした後の同義語候補検出回数が、ステップS30E3で決定した同義語候補検出回数の下限値46の値より大きいか調べ、YesであればステップS30E5を実行し、Noであれば、同義語登録処理を終了する。ステップS30E5では、検出された部品データベース用語と同義語である可能性がある単語を、最終的に同義語として同義語辞書データベース50に登録する。そして、同義語候補テーブル44の、部品データベース用語と同義語が登録されていたエントリを削除する。このとき、同義語辞書データベース50に空きエントリがなければ、空きエントリを作成して登録する。ただし、同義語辞書データベース50に前記部品データベース用語と同義語がペアで既に登録されている場合は、重複して登録は行わない。
Next, in step S30E4, it is checked whether the number of synonym candidate detections after incrementing in step S30E2 is larger than the
図12は、同義語辞書データベース50のデータ構造の一例を示す。同義語辞書データベース50は、一例として、第1カラムに部品データベース52中に含まれる用語を登録し、第2カラムに部品データベース52中に含まれる用語に対応する同義語が登録される。
FIG. 12 shows an example of the data structure of the
図13及び図14を参照して、図11のステップS30E3(同義語候補検出回数の下限値の決定)の詳細を説明する。図13は、下限値を決定する原理を説明する概念図である。図14は、ステップS30E3の動作の詳細を説明するフローチャートである。 Details of step S30E3 (determining the lower limit value of the number of synonym candidate detections) in FIG. 11 will be described with reference to FIGS. 13 and 14. FIG. 13 is a conceptual diagram illustrating the principle of determining the lower limit value. FIG. 14 is a flowchart illustrating details of the operation of step S30E3.
図13のグラフ90の横軸は、同義語候補検出回数を示しており、縦軸は同じ同義語候補検出回数を持つ同義語と同義語候補の組の数(同義語数)を示している。同義語候補検出回数と同義語数のグラフ(分布図)は、グラフ90のように、2つの山を有する二峰性分布となるものと予想される。これは、多くの人が入力するであろう同義語は、同義語候補検出回数も多くなると一方、言い間違いや入力間違いは人それぞれのため、同義語候補検出回数も少ない数になるものと予想されるからである。そこで、グラフ90の二峰性分布の谷底に対応する同義語候補検出回数が、同義語候補検出回数下限値46であると決定することができる。図14のフローチャートは、このような原理に従った同義語候補検出回数の下限値を決定する手順の一例を示している。
The horizontal axis of the
最初にステップS30E3Aでは、同義語候補検出回数下限値を変数が取り得る最大値に仮決めする。例えば、同義語検出回数下限値が32ビット符号付き整数であれば2147483647を最大値に仮決めすることができる。 First, in step S30E3A, the lower limit value of the number of synonym candidate detections is tentatively determined to be the maximum value that the variable can take. For example, if the lower limit of the number of times of synonym detection is a 32-bit signed integer, 2147483647 can be provisionally determined as the maximum value.
次にステップS30E3Bでは、同義語候補テーブル44のエントリ数が十分多いか否かをチェックする。例えば、予め与えた閾値(例えば100)よりも大きいかどうかをチェックすることによりエントリ数が十分多いか否かをチェックすることができる。閾値は、コンフィギュレーションファイル等の形式で外部から付与することもできるし、プログラムに直接コーディングすることもできるが、特定の方法に限定されるわけではない。閾値以上(Yes)と判断されればステップS30E3Cに進み、そうでなければ同義語候補検出回数下限値決定ステップS30E3を終了する。 Next, in step S30E3B, it is checked whether the number of entries in the synonym candidate table 44 is sufficiently large. For example, it is possible to check whether the number of entries is sufficiently large by checking whether it is larger than a predetermined threshold (for example, 100). The threshold value can be provided externally in the form of a configuration file or the like, or can be directly coded into the program, but is not limited to a specific method. If it is determined that it is equal to or greater than the threshold value (Yes), the process proceeds to step S30E3C, and if not, the synonym candidate detection frequency lower limit determination step S30E3 is ended.
ステップS30E3Cでは、同義語候補テーブル44の同義語候補検出回数(横軸)と、対応する同義語数(縦軸)を2軸とするグラフ(図13参照)を作成する。そして、ステップS30E3Dでは、同グラフの極小値を見つけ、そのうち同義語候補検出回数が最も小さい極小値に対応する同義語候補検出回数を、同義語候補検出回数下限値46として設定する。これにより、同義語候補検出回数下限値決定ステップS30E3を終了する。
In step S30E3C, a graph (see FIG. 13) is created in which the two axes are the number of synonym candidate detections (horizontal axis) in the synonym candidate table 44 and the corresponding number of synonyms (vertical axis). Then, in step S30E3D, the minimum value of the graph is found, and the number of times of synonym candidate detection corresponding to the minimum value with the smallest number of times of synonym candidate detection is set as the
図14に示すような処理を行うことで、同義語候補テーブル44のエントリ数が少ない(前記予め与えた整数以下である)うちは、同義語候補検出回数下限値がその変数で示すことのできる最大値であるため、図11のステップS30E4の条件が常に成立せず(Noと判断され)、同義語候補テーブル44から同義語辞書データベース50への同義語の登録は行われない。
By performing the process shown in FIG. 14, as long as the number of entries in the synonym candidate table 44 is small (less than or equal to the integer given in advance), the lower limit value of the number of synonym candidate detections can be indicated by the variable. Since this is the maximum value, the condition of step S30E4 in FIG. 11 is not always satisfied (determined as No), and no synonym is registered from the synonym candidate table 44 to the
一方、エントリ数が十分多くなり、図13のグラフの二峰性分布が明らかになった後は、同グラフに基づいて同義語候補検出回数下限値46の値が設定されるため、図11のステップS30E4の条件が成立する(Yesと判断される)ようになり、同義語候補テーブル44から同義語辞書データベース50への同義語の登録が行われるようになる。このような方法で、入力の特性に応じた同義語辞書登録が可能になる。なお、二峰性分布の谷底を見つけるアルゴリズムは、図13に示したもの以外のアルゴリズムを用いることもできる。また、同義語候補検出回数下限値46は、図13に示すような処理を行わなくても、予めコンフィギュレーションファイル等の形で外部から与えることもできる。
On the other hand, after the number of entries becomes sufficiently large and the bimodal distribution of the graph in FIG. 13 becomes clear, the value of the
図15は、ユーザ入出力装置8の表示画面の一例である。この表示画面は、一例として、Q&A画面8A、選択結果表示画面8B、選択肢表示画面8Cから構成される。
FIG. 15 is an example of a display screen of the user input/
Q&A画面8Aは、計算機システム1を対話的に使用した結果を表示する。選択肢表示画面8Cは、前述のステップS20B2(図6)で行った音声テキスト変換の変換候補を表示する。また、部品データベース52が、機種名、部位名、部品名、部品番号以外のカラムを持ち(例えば、号機番号)、機種名、部位名、部品名だけでは部品番号が一意に特定できない場合、情報が不明なカラム(例えば、号機番号のリスト)を選択肢表示画面8Cに表示することもできる。またこれ以外の選択肢を表示することも可能である。これらの選択肢は、画面をタップしたり、マウスで当該箇所をクリックしたりするなどすることで選択され、選択結果が選択結果表示画面8Bに表示される。なお、ユーザ入出力装置8に代わって、入出力装置5で同様の表示や操作を行うこともできる。
The
図16は、Q&A画面8A、選択結果表示画面8B、選択肢表示画面8Cの表示例を示す。なお、動作の説明のため、同義語候補検出回数下限値46は、0に設定されているものとして説明する。
FIG. 16 shows display examples of the
Q&A画面8Aには、図16Aの符号8Aで示すように、機種名、部位名、部品名などの、部品番号の特定に必要な質問が表示される。それに対してユーザが、テキスト入力又は音声入力により「ZX〇〇」「起重機のねじ」との問い合わせを入力したとする。このような問合せが入力されることで、SQL問い合わせが生成され、部品データベース52への問い合わせが実行される。
On the
この場合、部品データベース52には部位名「起重機」や部品名「ねじ」が登録されていないので、部品番号の検索結果は0件となる(失敗問い合わせ1)。
In this case, since the part name "lifter" and the part name "screw" are not registered in the
次に、少し言い回しを変えて、「クレーンのねじ」との問い合わせを入力する。しかし、部品名「ねじ」が部品データベース52に登録されていないので、やはり検索結果は0件である(失敗問い合わせ2)。
Next, change the wording a little and enter the query ``crane screw.'' However, since the component name "screw" is not registered in the
次に、更に言い回しを変えて「クレーンのボルト」と入力すると、部品データベース52の検索がヒットし、検索結果1件「部品番号B1234」が返ってくる(成功問い合わせ1)。また、部品データベース用語「ボルト」と同義語「ねじ」、部品データベース用語「クレーン」と同義語「起重機」が検出されたことが表示される。これは、成功問い合わせ1と失敗問い合わせ2との比較により、ねじとボルトが同義語であることが検出され(図11の手順も実行された場合)、更に成功問い合わせとみなされた失敗問い合わせ2と失敗問い合わせ1との比較により、クレーンと起重機が同義語とみなされたことを示している。
Next, by changing the wording further and inputting "crane bolt", the search in the
なお検索結果として複数件の候補がヒットして部品番号が特定されない場合、他の質問が表示される構成としてもよい。例えば、特定を希望する部品の購買履歴に関する質問、あるいは、検索履歴に基づく他の言い回しの候補が表示されてもよい。これによって、同義語登録の件数が増え、検索結果の精度も向上する。 Note that if a plurality of candidates are found as a search result and the part number is not specified, another question may be displayed. For example, a question regarding the purchase history of the part desired to be identified, or other phrase suggestions based on the search history may be displayed. This increases the number of synonym registrations and improves the accuracy of search results.
図16に示す選択結果表示画面8Bは、複数の選択肢の中から一つを特定した場合の最終確認画面の表示例を示す。この図では部品「XX」が選択されており、最終確定する場合は「はい」を、選択をし直す場合は「もどる」を選択する。なお、選択肢表示画面8Cには、複数の部品番号がヒットした場合など、候補の一覧が表示され、ユーザにその複数の候補からの選択が促される。
A selection
上記の実施の形態は、部品データベース52に対する検索を例に挙げて説明したが、設計図や保守ドキュメント等に対する検索でも同じ方法で同義語を検出することができる。また上記の実施の形態では、部品データベース52を関係データベースと仮定し、SQL問い合わせを生成して検索を行ったが、関係データベース以外のデータ保管場所でも、SQL以外の問い合わせ方法でも、本方法で同義語を検出することができる。
また、上述した各機能部を実現するソフトウェア等は、磁気的又は光学的な可搬の記録媒体に記録することもできるし、それらを用いてコンピュータにインストールすることもできる。更に、インターネット等のネットワークを介してダウンロードすることで、コンピュータにインストールすることも可能である。
Although the above embodiment has been described using the search for the
Furthermore, the software and the like that realize each of the above-mentioned functional units can be recorded on a portable magnetic or optical recording medium, or can be installed on a computer using them. Furthermore, it is also possible to install it on a computer by downloading it via a network such as the Internet.
本発明は上記した実施形態に限定されるものではなく、様々な変形例が含まれる。例えば、上記した実施形態は本発明を分かりやすく説明するために詳細に説明したものであり、必ずしも説明した全ての構成を備えるものに限定されるものではない。また、ある実施形態の構成の一部を他の実施形態の構成に置き換えることが可能であり、また、ある実施形態の構成に他の実施形態の構成を加えることも可能である。また、各実施形態の構成の一部について、他の構成の追加・削除・置換をすることが可能である。 The present invention is not limited to the embodiments described above, and includes various modifications. For example, the above-described embodiments have been described in detail to explain the present invention in an easy-to-understand manner, and the present invention is not necessarily limited to having all the configurations described. Furthermore, it is possible to replace a part of the configuration of one embodiment with the configuration of another embodiment, and it is also possible to add the configuration of another embodiment to the configuration of one embodiment. Furthermore, it is possible to add, delete, or replace some of the configurations of each embodiment with other configurations.
1…計算機システム(同義語生成装置)
2…CPU
3…主記憶装置
4…外部記憶装置
5…入出力装置
7…計算機ネットワーク
8…ユーザ入出力装置
20…データベース問い合わせ処理モジュール
30…同義語検出処理モジュール
42…問い合わせ記録テーブル
44…同義語候補テーブル
46…同義語候補検出回数下限値
50…同義語辞書データベース
52…部品データベース
1...Computer system (synonym generator)
2...CPU
3...
Claims (4)
同義語の候補となる同義語候補を登録する同義語候補テーブルと、
同義語を記録する同義語辞書を記憶する同義語辞書記憶部と、
前記同義語辞書への登録の可否を判定し前記同義語辞書の更新を行う制御部と
を有し、
前記制御部は、前記問い合わせ記録テーブルに記録された前記問い合わせに基づいて、前記同義語候補を前記同義語候補テーブルに登録し、
前記同義語候補テーブルに登録された前記同義語候補に関し同義語判定を実行し、所定の判定基準を満たした同義語候補を前記同義語辞書に同義語として登録し、
前記制御部は、前記同義語候補として検出された検出回数と下限値との比較結果に基づき、その同義語候補を前記同義語辞書に同義語として登録し、
前記制御部は、前記検出回数と、その検出回数だけ検出された同義語の組の数である同義語数のグラフを作成し、そのグラフの極小値を検出し、前記極小値に基づいて前記下限値を設定する
ことを特徴とする同義語生成装置。 an inquiry record table for recording inquiries from user input/output devices;
a synonym candidate table that registers synonym candidates that are synonym candidates;
a synonym dictionary storage unit that stores a synonym dictionary that records synonyms;
a control unit that determines whether registration in the synonym dictionary is possible and updates the synonym dictionary;
The control unit registers the synonym candidate in the synonym candidate table based on the inquiry recorded in the inquiry record table,
performing synonym determination regarding the synonym candidates registered in the synonym candidate table, and registering synonym candidates that meet a predetermined determination criterion as synonyms in the synonym dictionary ;
The control unit registers the synonym candidate as a synonym in the synonym dictionary based on a comparison result between the number of detections detected as the synonym candidate and a lower limit value,
The control unit creates a graph of the number of detections and the number of synonyms, which is the number of pairs of synonyms detected that number of times, detects a minimum value of the graph, and sets the lower limit based on the minimum value. set value
A synonym generating device characterized by:
同義語の候補となる同義語候補を登録する同義語候補テーブルと、
同義語を記録する同義語辞書を記憶する同義語辞書記憶部と、
前記同義語辞書への登録の可否を判定し前記同義語辞書の更新を行う制御部と
を有し、
前記制御部は、前記問い合わせ記録テーブルに記録された前記問い合わせに基づいて、前記同義語候補を前記同義語候補テーブルに登録し、
前記同義語候補テーブルに登録された前記同義語候補に関し同義語判定を実行し、所定の判定基準を満たした同義語候補を前記同義語辞書に同義語として登録し、
前記問い合わせ記録テーブルは、前記問い合わせの内容と、前記問い合わせに基づく検索結果の成功/失敗を記録可能とされ、
前記制御部は、前記検索結果が成功である成功問い合わせに含まれる単語と、前記検索結果が失敗である失敗問い合わせに含まれる単語とを比較することで前記同義語候補を検出し、
同義語が検出された失敗問い合わせと、それ以外の失敗問い合わせとを比較することで前記同義語候補を検出する
ことを特徴とする同義語生成装置。 an inquiry record table for recording inquiries from user input/output devices;
a synonym candidate table that registers synonym candidates that are synonym candidates;
a synonym dictionary storage unit that stores a synonym dictionary that records synonyms;
a control unit that determines whether registration in the synonym dictionary is possible and updates the synonym dictionary;
The control unit registers the synonym candidate in the synonym candidate table based on the inquiry recorded in the inquiry record table,
performing synonym determination regarding the synonym candidates registered in the synonym candidate table, and registering synonym candidates that meet a predetermined determination criterion as synonyms in the synonym dictionary ;
The inquiry record table is capable of recording the contents of the inquiry and success/failure of search results based on the inquiry,
The control unit detects the synonym candidate by comparing a word included in a successful query in which the search result is success and a word included in an unsuccessful query in which the search result is failure;
The synonym candidate is detected by comparing a failed query in which a synonym was detected with other failed queries.
A synonym generating device characterized by :
前記問い合わせ記録テーブルに記録された問い合わせに基づいて、同義語の候補となる同義語候補を検出し、同義語候補テーブルに登録するステップと、
所定の判定基準を満たした同義語候補を同義語として同義語辞書記憶部に記憶させるステップと
をコンピュータに実行させるように構成されており、
前記同義語候補を同義語として前記同義語辞書記憶部に記憶させるステップは、前記同義語候補として検出された検出回数と下限値との比較結果に基づき、その同義語候補を前記同義語辞書記憶部に同義語として登録し、
前記同義語候補を同義語として前記同義語辞書記憶部に記憶させるステップは、前記検出回数と、その検出回数だけ検出された同義語の組の数である同義語数のグラフを作成し、そのグラフの極小値を検出し、前記極小値に基づいて前記下限値を設定する、
同義語生成プログラム。 storing an inquiry from a user input/output device in an inquiry record table;
Detecting synonym candidates that are synonym candidates based on the inquiry recorded in the inquiry record table, and registering them in the synonym candidate table;
and storing synonym candidates that meet predetermined criteria as synonyms in a synonym dictionary storage unit,
The step of storing the synonym candidate as a synonym in the synonym dictionary storage section includes storing the synonym candidate in the synonym dictionary storage section based on a comparison result between the number of detections detected as the synonym candidate and a lower limit value. registered as a synonym in the department,
The step of storing the synonym candidate as a synonym in the synonym dictionary storage unit involves creating a graph of the number of detections and the number of synonyms, which is the number of pairs of synonyms detected that number of times, and detecting a minimum value of and setting the lower limit value based on the minimum value;
Synonym generator.
前記問い合わせ記録テーブルに記録された問い合わせに基づいて、同義語の候補となる同義語候補を検出し、同義語候補テーブルに登録するステップと、
所定の判定基準を満たした同義語候補を同義語として同義語辞書記憶部に記憶させるステップと
をコンピュータに実行させるように構成されており、
前記問い合わせ記録テーブルは、前記問い合わせの内容と、前記問い合わせに基づく検索結果の成功/失敗を記録可能とされ、
前記検索結果が成功である成功問い合わせに含まれる単語と、前記検索結果が失敗である失敗問い合わせに含まれる単語とを比較することで前記同義語候補を検出し、
同義語が検出された失敗問い合わせと、それ以外の失敗問い合わせとを比較することで前記同義語候補を検出する、
同義語生成プログラム。 storing an inquiry from a user input/output device in an inquiry record table;
Detecting synonym candidates that are synonym candidates based on the inquiry recorded in the inquiry record table, and registering them in the synonym candidate table;
and storing synonym candidates that meet predetermined criteria as synonyms in a synonym dictionary storage unit,
The inquiry record table is capable of recording the contents of the inquiry and success/failure of search results based on the inquiry,
detecting the synonym candidate by comparing words included in a successful query in which the search result is success and words included in a failed query in which the search result is failure;
Detecting the synonym candidate by comparing a failed query in which a synonym has been detected with other failed queries;
Synonym generator.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2020112494A JP7426302B2 (en) | 2020-06-30 | 2020-06-30 | Synonym generation device and synonym generation program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2020112494A JP7426302B2 (en) | 2020-06-30 | 2020-06-30 | Synonym generation device and synonym generation program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2022011377A JP2022011377A (en) | 2022-01-17 |
JP7426302B2 true JP7426302B2 (en) | 2024-02-01 |
Family
ID=80148130
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2020112494A Active JP7426302B2 (en) | 2020-06-30 | 2020-06-30 | Synonym generation device and synonym generation program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP7426302B2 (en) |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2002288189A (en) | 2001-03-27 | 2002-10-04 | Seiko Epson Corp | Method and apparatus for classifying documents, and recording medium with document classification processing program recorded thereon |
JP2012008900A (en) | 2010-06-28 | 2012-01-12 | Nippon Telegr & Teleph Corp <Ntt> | Related phrase extraction method, related phrase extraction device and related phrase extraction program |
WO2012063772A1 (en) | 2010-11-10 | 2012-05-18 | 楽天株式会社 | Related-word registration device, information processing device, related-word registration method, program for related-word registration device, recording medium, and related-word registration system |
CN102760134A (en) | 2011-04-28 | 2012-10-31 | 北京百度网讯科技有限公司 | Method and device for mining synonyms |
JP2013008372A (en) | 2010-11-10 | 2013-01-10 | Rakuten Inc | Related word registration device, information processor, related word registration method, program for related word registration device, and recording medium |
US20130232129A1 (en) | 2012-03-05 | 2013-09-05 | Microsoft Corporation | Robust discovery of entity synonyms using query logs |
US20160253418A1 (en) | 2015-02-27 | 2016-09-01 | Wal-Mart Stores, Inc. | System, method, and non-transitory computer-readable storage media for generating synonyms of a search query |
US20190163781A1 (en) | 2017-11-30 | 2019-05-30 | International Business Machines Corporation | Learning user synonyms from sequenced query sessions |
-
2020
- 2020-06-30 JP JP2020112494A patent/JP7426302B2/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2002288189A (en) | 2001-03-27 | 2002-10-04 | Seiko Epson Corp | Method and apparatus for classifying documents, and recording medium with document classification processing program recorded thereon |
JP2012008900A (en) | 2010-06-28 | 2012-01-12 | Nippon Telegr & Teleph Corp <Ntt> | Related phrase extraction method, related phrase extraction device and related phrase extraction program |
WO2012063772A1 (en) | 2010-11-10 | 2012-05-18 | 楽天株式会社 | Related-word registration device, information processing device, related-word registration method, program for related-word registration device, recording medium, and related-word registration system |
JP2013008372A (en) | 2010-11-10 | 2013-01-10 | Rakuten Inc | Related word registration device, information processor, related word registration method, program for related word registration device, and recording medium |
CN102760134A (en) | 2011-04-28 | 2012-10-31 | 北京百度网讯科技有限公司 | Method and device for mining synonyms |
US20130232129A1 (en) | 2012-03-05 | 2013-09-05 | Microsoft Corporation | Robust discovery of entity synonyms using query logs |
US20160253418A1 (en) | 2015-02-27 | 2016-09-01 | Wal-Mart Stores, Inc. | System, method, and non-transitory computer-readable storage media for generating synonyms of a search query |
US20190163781A1 (en) | 2017-11-30 | 2019-05-30 | International Business Machines Corporation | Learning user synonyms from sequenced query sessions |
Also Published As
Publication number | Publication date |
---|---|
JP2022011377A (en) | 2022-01-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105408890B (en) | Performing operations related to listing data based on voice input | |
US10025819B2 (en) | Generating a query statement based on unstructured input | |
JP3170400B2 (en) | Character string search method and device using semantic pattern recognition | |
US9672490B2 (en) | Procurement system | |
US20180011927A1 (en) | Hybrid reasoning-based natural language query answering system and method | |
CN103688260B (en) | Method, computer system and deivce for searching entity in entity resolution system | |
US20070016581A1 (en) | Category setting support method and apparatus | |
US11347947B2 (en) | Encoder with double decoder machine learning models | |
KR20160144384A (en) | Context-sensitive search using a deep learning model | |
US10410139B2 (en) | Named entity recognition and entity linking joint training | |
US20130124194A1 (en) | Systems and methods for manipulating data using natural language commands | |
US11086937B2 (en) | Speech based structured querying | |
CN109791761A (en) | Use the acoustic training model of the term of correction | |
US9898512B1 (en) | Factual query pattern learning | |
US10216792B2 (en) | Automated join detection | |
US11681732B2 (en) | Tuning query generation patterns | |
JP2019204157A (en) | Inquiry apparatus specification system, inquiry apparatus specification method | |
CN117271558A (en) | Language query model construction method, query language acquisition method and related devices | |
JP7426302B2 (en) | Synonym generation device and synonym generation program | |
US11775758B2 (en) | Computing system for entity disambiguation and not-in-list entity detection in a knowledge graph | |
GB2574382A (en) | Method, apparatus and computer program for information retrieval using query expansion | |
US11281736B1 (en) | Search query mapping disambiguation based on user behavior | |
US11507593B2 (en) | System and method for generating queryeable structured document from an unstructured document using machine learning | |
CN106709294B (en) | User authentication method and device | |
JP2005190100A (en) | Question answering system and method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20230209 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20231128 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20231205 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20231226 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20240116 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20240122 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 7426302 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |