JP2011257921A - Character string selection device, character string selection method, and program therefor - Google Patents
Character string selection device, character string selection method, and program therefor Download PDFInfo
- Publication number
- JP2011257921A JP2011257921A JP2010131071A JP2010131071A JP2011257921A JP 2011257921 A JP2011257921 A JP 2011257921A JP 2010131071 A JP2010131071 A JP 2010131071A JP 2010131071 A JP2010131071 A JP 2010131071A JP 2011257921 A JP2011257921 A JP 2011257921A
- Authority
- JP
- Japan
- Prior art keywords
- character string
- character
- term
- input
- value
- 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.)
- Granted
Links
- 238000010187 selection method Methods 0.000 title claims description 8
- 238000012545 processing Methods 0.000 abstract description 66
- 239000011159 matrix material Substances 0.000 description 100
- 210000001072 colon Anatomy 0.000 description 73
- 206010028980 Neoplasm Diseases 0.000 description 37
- 201000011510 cancer Diseases 0.000 description 37
- 210000004877 mucosa Anatomy 0.000 description 33
- 238000000034 method Methods 0.000 description 31
- 238000004891 communication Methods 0.000 description 24
- 238000004886 process control Methods 0.000 description 16
- 238000010586 diagram Methods 0.000 description 9
- 239000007788 liquid Substances 0.000 description 9
- 201000009030 Carcinoma Diseases 0.000 description 8
- 206010009944 Colon cancer Diseases 0.000 description 8
- 208000029742 colonic neoplasm Diseases 0.000 description 8
- 210000000936 intestine Anatomy 0.000 description 8
- 230000000295 complement effect Effects 0.000 description 6
- 210000003097 mucus Anatomy 0.000 description 6
- 210000002429 large intestine Anatomy 0.000 description 5
- 230000006870 function Effects 0.000 description 4
- 230000015654 memory Effects 0.000 description 4
- 208000009956 adenocarcinoma Diseases 0.000 description 3
- 230000001174 ascending effect Effects 0.000 description 3
- 201000010879 mucinous adenocarcinoma Diseases 0.000 description 3
- 230000003936 working memory Effects 0.000 description 3
- 206010009887 colitis Diseases 0.000 description 2
- 201000010099 disease Diseases 0.000 description 2
- 208000037265 diseases, disorders, signs and symptoms Diseases 0.000 description 2
- 238000004519 manufacturing process Methods 0.000 description 2
- 239000012528 membrane Substances 0.000 description 2
- 210000004379 membrane Anatomy 0.000 description 2
- 208000014081 polyp of colon Diseases 0.000 description 2
- 206010052358 Colorectal cancer metastatic Diseases 0.000 description 1
- 206010027476 Metastases Diseases 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 201000010989 colorectal carcinoma Diseases 0.000 description 1
- 238000012217 deletion Methods 0.000 description 1
- 230000037430 deletion Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 239000012530 fluid Substances 0.000 description 1
- 210000004347 intestinal mucosa Anatomy 0.000 description 1
- 210000000265 leukocyte Anatomy 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 230000009401 metastasis Effects 0.000 description 1
- 235000013615 non-nutritive sweetener Nutrition 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 230000002040 relaxant effect Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 201000002314 small intestine cancer Diseases 0.000 description 1
- 210000000707 wrist Anatomy 0.000 description 1
Images
Landscapes
- Machine Translation (AREA)
- Document Processing Apparatus (AREA)
Abstract
Description
本発明は、文字列選択装置、文字列選択方法およびプログラムに関する。 The present invention relates to a character string selection device, a character string selection method, and a program.
コンピュータ等においてユーザが用語(文字列)を入力する負担を軽減する用語入力支援方法の1つに、当該コンピュータ等が、予め記憶する用語群の中から、入力済みの文字列に類似する用語を用語候補として選択して表示し、表示した用語候補のいずれかに対するユーザの選択操作を受け付ける方法がある。
例えば、コンピュータの表示画面に表示される診断書に病名を入力する際、図12(a)に示すように、ユーザによる「大腸」の入力に対して、コンピュータは、この「大腸」に類似する用語として、「大腸炎」や「大腸癌」など、「大腸」を含む用語を選択し、入力欄の下方近傍に表示する。そして、カーソルキーあるいはマウスを用いてユーザが「大腸ポリープ」を選択すると、コンピュータは、選択された「大腸ポリープ」を入力欄に表示する。
One of the term input support methods for reducing the burden of a user inputting a term (character string) on a computer or the like is to use a term similar to the input character string from a group of terms stored in advance by the computer or the like. There is a method of selecting and displaying as a term candidate and accepting a user's selection operation for any of the displayed term candidates.
For example, when inputting a disease name on a medical certificate displayed on a display screen of a computer, as shown in FIG. 12A, the computer is similar to this “colon” in response to an input of “colon” by a user. As a term, a term including “colon” such as “colitis” or “colon cancer” is selected and displayed near the lower part of the input column. When the user selects “colon polyp” using the cursor key or the mouse, the computer displays the selected “colon polyp” in the input field.
一方、ユーザが用語の選択を行わずに、更に「癌」を入力すると、コンピュータは、同図(b)に示すように、入力された文字列「大腸癌」のうち2文字以上を含む、「大腸炎」や「大腸粘膜内癌」などの用語を選択して表示する。
このように、入力された文字列の全部を含む用語に限らず、一部を含む用語も表示することにより、「大腸炎」を誤って「大腸癌」と入力する文字違いや、「転移性大腸癌」を誤って「転移大腸癌」と入力する入力不足など、入力された文字列に誤りがある場合にもユーザの意図する用語を表示し得る。
On the other hand, when the user inputs “cancer” without selecting a term, the computer includes two or more characters in the input character string “colon cancer” as shown in FIG. Select and display terms such as “colitis” and “colon mucosal cancer”.
In this way, by displaying not only terms that include all of the entered character string, but also terms that include a portion, it is possible to incorrectly enter “colonitis” as “colon cancer” or “metastasis” The term intended by the user can also be displayed when there is an error in the input character string, such as insufficient input to erroneously input “colon cancer” as “metastatic colorectal cancer”.
このような、入力済みの文字列に類似する用語を用語候補として選択する方法として、例えば、特許文献1に示される方法を用いることが考えられる。同文献では、"leucocyte"と"leukocyte"など、同一の事物を示す用語の表記が異なる「表記揺れ」の用語を取得する方法が示されている。この方法では、注目する用語に対する表記揺れの用語を収集するために、まず、予め記憶する用語の各々について、注目する用語とのNグラム(文字数Nの部分文字列)の一致度および文字列長の類似度を比較することにより、類似する用語の絞込みを行う(以下では、この絞込みを「第1の絞込み」と称する)。そして、大文字と小文字との置換は10点、数字の置換は100点など、編集内容毎に設定されたコストで重み付けされた編集距離に基づいて、さらに用語の絞込みを行う(以下では、この絞込みを「第2の絞込み」と称する)。
この方法を、用語候補の選択に用いると、入力済みの文字列と共通の部分文字列を多く含み、入力済みの文字列に文字数が類似し、かつ、入力済みの文字列に対してコストの小さい変換操作を行って得られる文字列を抽出できる。
As a method for selecting such a term similar to the input character string as a term candidate, for example, it is conceivable to use a method disclosed in
When this method is used to select term candidates, it contains many partial character strings in common with the input character string, the number of characters is similar to the input character string, and the cost of the input character string is low. A character string obtained by performing a small conversion operation can be extracted.
しかしながら、特許文献1に示される方法を用語候補の選択に用いた場合、第1の絞込みを行う段階で、編集距離が小さい用語が除外されてしまい、最終的に、ユーザが入力したい用語を抽出できなくなるおそれが強くなってしまう。
かかる不都合を回避するために、第1の絞込みを行う段階における絞込み要件を緩和することによって除外する用語の数を少なくすることが考えられる。しかし、第1の絞込みを行う段階で除外する用語の数を少なくすると、第2の絞込みの対象となる用語の数が増大し、処理に要する時間が増大してしまう。ユーザに、用語候補の表示を待つストレスを与えないためには、例えば文字列が入力されてから0.1秒以内に用語候補を表示するなど、高速に用語候補を選択して表示する必要がある(例えば、図12(b)の「癌」が入力された後速やかに、同図(b)に示す用語候補を表示する必要がある)が、処理に要する時間の増大により、高速に用語候補を選択して表示できないおそれがある。
However, when the method disclosed in
In order to avoid such an inconvenience, it is conceivable to reduce the number of terms to be excluded by relaxing the narrowing-down requirement in the first narrowing-down stage. However, if the number of terms excluded in the stage of performing the first narrowing is reduced, the number of terms to be second narrowed increases, and the time required for processing increases. In order not to give the user the stress of waiting for the display of term candidates, it is necessary to select and display term candidates at high speed, for example, displaying term candidates within 0.1 seconds after a character string is input. There is a need (for example, the term candidates shown in FIG. 12B need to be displayed immediately after the input of “cancer” in FIG. 12B). There is a possibility that a candidate cannot be selected and displayed.
本発明は、このような事情を考慮してなされたものであり、その目的は、ユーザの入力したい文字列の候補を適切に、かつ、高速に得られる文字列選択装置、文字列選択方法およびプログラムを提供することにある。 The present invention has been made in consideration of such circumstances, and the object thereof is to provide a character string selection device, a character string selection method, and a character string selection method that can appropriately and quickly obtain character string candidates that a user wants to input. To provide a program.
[1]この発明は上述した課題を解決するためになされたもので、本発明の一態様による文字列選択装置は、第1の文字列を取得する取得部と、1つ以上の第2の文字列の各々と、当該第2の文字列を識別する文字列識別情報とが対応付けられた識別情報付文字列群を記憶する文字列群記憶部と、前記識別情報付文字列群中の前記第2の文字列に含まれる全ての文字について、異なる前記文字毎に、当該文字と、当該文字を含み前記識別情報付文字列群に含まれる前記第2の文字列の文字列識別情報と、が対応付けられた文字インデックスを記憶する文字インデックス記憶部と、前記第1の文字列に含まれる文字に、前記文字インデックスにて対応付けられた前記文字列識別情報により識別される前記第2の文字列を選択する文字列選択部と、を具備することを特徴とする。 [1] The present invention has been made to solve the above-described problem, and a character string selection device according to an aspect of the present invention includes an acquisition unit that acquires a first character string, and one or more second A character string group storage unit for storing a character string group with identification information in which each of the character strings is associated with character string identification information for identifying the second character string; For all the characters included in the second character string, for each of the different characters, the character and the character string identification information of the second character string including the character and included in the character string group with identification information , And a character index storage unit that stores a character index associated with the character string, and the character string identification information associated with the character included in the first character string by the character string identification information. A character string selector that selects the character string Characterized by including the.
[2]また、本発明の一態様による文字列選択装置は、上述の文字列選択装置であって、前記文字列選択部は、前記選択した第2の文字列に含まれる文字と、前記第1の文字列に含まれる文字とに共通する文字の文字数を示す文字数情報を生成することを特徴とする。 [2] A character string selection device according to an aspect of the present invention is the character string selection device described above, wherein the character string selection unit includes a character included in the selected second character string, and the first character string selection device. Character number information indicating the number of characters common to the characters included in one character string is generated.
[3]また、本発明の一態様による文字列選択装置は、上述の文字列選択装置であって、前記文字列選択部は、前記第1の文字列の部分文字列に含まれる文字と、前記第2の文字列に含まれる文字とに共通する文字の文字数を示す文字数情報を生成し、当該文字数情報と、前記第1の文字列に含まれる文字数と前記部分文字列に含まれる文字数との差と、に基づいて定まる値が、予め定められた閾値未満の場合に、前記第1の文字列と当該第2の文字列との前記類似度を示す情報の生成を中止することを特徴とする。 [3] A character string selection device according to an aspect of the present invention is the character string selection device described above, wherein the character string selection unit includes a character included in the partial character string of the first character string, Character number information indicating the number of characters common to the characters included in the second character string is generated, the character number information, the number of characters included in the first character string, and the number of characters included in the partial character string, Generation of information indicating the similarity between the first character string and the second character string is stopped when a value determined based on the difference between the first character string and the second character string is less than a predetermined threshold value. And
[4]また、本発明の一態様による文字列選択方法は、1つ以上の第2の文字列の各々と、当該第2の文字列を識別する文字列識別情報とが対応付けられた識別情報付文字列群を記憶する文字列群記憶部と、前記識別情報付文字列群中の前記第2の文字列に含まれる全ての文字について、異なる前記文字毎に、当該文字と、当該文字を含み前記識別情報付文字列群に含まれる前記第2の文字列の文字列識別情報と、が対応付けられた文字インデックスを記憶する文字インデックス記憶部と、を具備する文字列選択装置の文字列選択方法であって、取得部が、第1の文字列を取得する取得ステップと、文字列選択部が、前記第1の文字列に含まれる文字に、前記文字インデックスにて対応付けられた前記文字列識別情報により識別される前記第2の文字列を選択する文字列選択ステップと、を具備することを特徴とする。 [4] In the character string selection method according to one aspect of the present invention, an identification in which each of the one or more second character strings is associated with character string identification information for identifying the second character string. A character string group storage unit that stores a character string group with information, and for all the characters included in the second character string in the character string group with identification information, for each of the different characters, the character and the character And a character index storage unit for storing a character index associated with the character string identification information of the second character string included in the character string group with the identification information. In the column selection method, the acquisition unit acquires the first character string, and the character string selection unit is associated with the character included in the first character string by the character index. The first identified by the character string identification information Characterized by the character string selection step of selecting a character string, a provided.
[5]また、本発明の一態様によるプログラムは、1つ以上の第2の文字列の各々と、当該第2の文字列を識別する文字列識別情報とが対応付けられた識別情報付文字列群を記憶する文字列群記憶部と、前記識別情報付文字列群中の前記第2の文字列に含まれる全ての文字について、異なる前記文字毎に、当該文字と、当該文字を含み前記識別情報付文字列群に含まれる前記第2の文字列の文字列識別情報と、が対応付けられた文字インデックスを記憶する文字インデックス記憶部と、を具備する文字列選択装置としてのコンピュータに、第1の文字列を取得する取得ステップと、前記第1の文字列に含まれる文字に、前記文字インデックスにて対応付けられた前記文字列識別情報により識別される前記第2の文字列を選択する文字列選択ステップと、を実行させるためのプログラムである。 [5] Further, the program according to one aspect of the present invention provides a character with identification information in which each of the one or more second character strings is associated with character string identification information for identifying the second character string. For each character included in the second character string in the character string group with identification information and the character string group storage unit that stores the string group, for each different character, the character and the character are included. A computer as a character string selection device, comprising: a character index storage unit that stores a character index associated with the character string identification information of the second character string included in the character string group with identification information; An acquisition step of acquiring a first character string; and selecting the second character string identified by the character string identification information associated with the character included in the first character string by the character index Character string selection Tsu is a program to be executed and up, the.
この発明によれば、文字列選択部は、第1の文字列に含まれる文字に、文字インデックスにて対応付けられた文字列識別情報により識別される第2の文字列を選択する。
これにより、文字列選択部は、第1の文字列と共通の文字を含まない第2の文字列については、選択の要否を判定することなく第2の文字列を選択できるので、第2の文字列を高速に選択できる。これにより、ユーザの入力したい文字列の候補として、第2の文字列を高速に得られる。
また、文字列選択部は、第1の文字列に含まれる文字に、文字インデックスにて対応付けられた文字列識別情報により識別される第2の文字列を選択することにより、第1の文字列に含まれる文字を含む第2の文字列のみを全て選択できる。この点で、ユーザの入力した文字列の候補として、第2の文字列を適切に得られる。
According to this invention, the character string selection unit selects the second character string identified by the character string identification information associated with the character included in the first character string by the character index.
As a result, the character string selection unit can select the second character string without determining whether or not the second character string does not include a character common to the first character string. Can be selected at high speed. As a result, the second character string can be obtained at high speed as a character string candidate to be input by the user.
In addition, the character string selection unit selects the first character by selecting the second character string identified by the character string identification information associated with the character included in the first character string by the character index. Only the second character string including the characters included in the column can be selected. In this respect, the second character string can be appropriately obtained as a character string candidate input by the user.
この発明によれば、さらに、選択された第2の文字列を用いて、選択した第2の文字列に含まれる文字と、第1の文字列に含まれる文字とに共通する文字の文字数を示す文字数情報を生成するようにした。これにより、文字数情報の文字数が多い第2の文字列は、第1の文字列と共通度合いが高いものとして把握することができる。 According to this invention, the number of characters common to the character included in the selected second character string and the character included in the first character string is further calculated using the selected second character string. The number of characters shown information is generated. Thereby, the second character string having a large number of characters in the character number information can be grasped as having a high degree of commonality with the first character string.
この発明によれば、さらに、第1の文字列の部分文字列に含まれる文字と、第2の文字列に含まれる文字とに共通する文字の文字数を示す文字数情報を生成した後、当該文字数情報と、第1の文字列に含まれる文字数と部分文字列に含まれる文字数との差と、に基づいて定まる値が、予め定められた閾値未満の場合に、第1の文字列と当該第2の文字列との前記類似度を示す情報の生成を中止するようにした。これにより、文字数情報が閾値未満となる第2の文字列を除外して、残りの第2の文字列に対して文字数情報を生成することができ、文字数情報を生成する処理を高速に行うことができる。 According to this invention, after generating the number-of-characters information indicating the number of characters common to the characters included in the partial character string of the first character string and the characters included in the second character string, When the value determined based on the information and the difference between the number of characters included in the first character string and the number of characters included in the partial character string is less than a predetermined threshold, the first character string and the first character string Generation of information indicating the degree of similarity with the second character string is stopped. As a result, the second character string whose character number information is less than the threshold value can be excluded, the character number information can be generated for the remaining second character string, and the processing for generating the character number information can be performed at high speed. Can do.
以下、図面を参照して、本発明の一実施形態について説明する。
図1は、本発明の一実施形態における文字列入力支援システムの概略構成を示す構成図である。同図において、文字列入力支援システム1は、文字列入力支援装置(文字列選択装置)100と、端末装置200とを具備する。文字列入力支援装置100は、通信部(取得部)110と、処理部(文字列選択部)120と、記憶部130とを具備する。処理部120は、処理制御部121と、文字インデックス生成部122と、LCS長算出部123と、文字位置情報生成部124と、順位決定部125とを具備する。記憶部130は、用語記憶部(文字列群記憶部)131と、文字インデックス記憶部132と、LCS長行列記憶部133と、文字位置情報行列記憶部134とを具備する。端末装置200は、通信部210と、入力部220と、表示部230とを具備する。
Hereinafter, an embodiment of the present invention will be described with reference to the drawings.
FIG. 1 is a configuration diagram showing a schematic configuration of a character string input support system according to an embodiment of the present invention. In FIG. 1, the character string
文字列入力支援システム1は、ユーザが入力済みの文字列(第1の文字列。以下では、「入力文字列」と称する)に基づいて、ユーザが入力したい文字列の候補(文字列候補)を表示する。
文字列入力支援装置100は、入力文字列を端末装置200から取得し、取得した文字列に基づいて、ユーザが入力したい文字列の候補の各々の順位を決定し、ユーザが入力したい文字列の候補を、決定した順位に従って並べたリストを生成して端末装置200に送信する。
通信部110は、端末装置200との間でデータの送受信を行う。
記憶部130は、ユーザが入力したい文字列の候補である用語を予め記憶する。また、記憶部130は、ユーザが入力したい文字列の候補である用語の順位を、文字列入力支援装置100が決定する際のワーキングメモリとして機能する。記憶部130は、文字列入力支援装置100が具備する記憶装置上に実現される。
The character string
The character string
The
The
用語記憶部131は、ユーザが入力したい文字列の候補である用語(第2の文字列)をリスト形式にて予め記憶する。
図2は、用語記憶部131が記憶する用語リストの例を示す図である。同図に示すように、用語リストの各行に、ユーザが入力したい文字列の候補である用語と、当該用語の識別番号である用語IDとが対応付けて記憶されている。用語リストは、例えば、ある分野の辞書に含まれる用語の各々に用語IDを付して生成される。同図の例では、用語リストは、病名に用語IDを付して生成されている。
用語IDは、各用語を識別する情報であると共に、用語リスト中における各用語の順序を示す情報でもある。
なお、用語リストに記憶される用語の数は、同図に示す7つに限らず、任意の個数であってよい。
The
FIG. 2 is a diagram illustrating an example of a term list stored in the
The term ID is information for identifying each term and information indicating the order of each term in the term list.
Note that the number of terms stored in the term list is not limited to seven shown in the figure, and may be any number.
文字インデックス記憶部132は、用語記憶部131が記憶する用語に含まれる文字の各々について、当該文字を含む用語を示す文字インデックスを記憶する。
図3は、文字インデックス記憶部132が記憶する文字インデックスの例を示す図である。同図に示すように、文字インデックスの各行には、用語リスト中のいずれかの用語に含まれる文字と、当該文字を含む用語を示す用語IDリストとが格納されている。同図の文字インデックスは、図2の用語リスト中の用語に含まれる文字毎に、当該文字を含む用語を用語IDにて示している。例えば、図2の用語リスト中で用語ID「1」に対応付けられた用語「小腸癌」は、文字「小」と「腸」と「癌」とを含む。したがって、図3の文字インデックスの、文字「小」を含む行と、文字「腸」を含む行と、文字「癌」を含む行とのいずれも、用語IDリスト中に用語ID「1」を含んでいる。
The character
FIG. 3 is a diagram illustrating an example of a character index stored in the character
LCS長行列記憶部133は、文字列入力支援装置100が用語の順位を決定する際に生成するLCS長行列を記憶するワーキングメモリである。
以下、図4を参照して、LCS長行列記憶部133が記憶するLCS長行列について説明する。
図4は、LCS長を算出するために用いられる行列の例を示す図である。同図(a)と(b)とは、いずれも、LCS長を算出するために用いられる行列の例を示す。
同図(a)の行列は、入力文字列の文字数+1の行、および、用語記憶部131が記憶する用語の文字数+1の列を有する行列であり、各要素には非負整数が格納される。以下では、図4(a)の行列の最上行(初期値に対応する行)を第0行とし、最左列(初期値に対応する列)を第0列とする。
The LCS length
Hereinafter, the LCS length matrix stored in the LCS length
FIG. 4 is a diagram illustrating an example of a matrix used for calculating the LCS length. FIGS. 5A and 5B show examples of matrices used for calculating the LCS length.
The matrix in FIG. 5A is a matrix having a row of the number of characters of the input character string + 1 and a column of the number of characters of the term + 1 stored in the
ここで、LCS(Longest Common Subsequence、最長共通部分列)は、2つの文字列に共通する部分列(共通部分列、Common Subsequence)のうち、最も長い(文字数の多い)ものである。この共通部分列は、各文字列中に連続して出現する必要はないが、2つの文字列中に同じ順序で出現する必要がある。図4(a)の「大腸粘膜内癌」と「大腸粘液癌」との場合、「大」「腸」「粘」「癌」の各文字が同順序で出現しているので、両者のLCSは「大腸粘癌」であり、LCSの文字数(以下では、「LCS長」と称する)は4である。
このように、LCS長は、2つの文字列に共通する文字の数を示すので、2つの文字列の類似度を示す情報として用いることができる。
Here, LCS (Longest Common Subsequence, longest common subsequence) is the longest (the number of characters is large) among the partial sequences (common subsequence) common to two character strings. The common partial sequence does not need to appear continuously in each character string, but needs to appear in the same order in the two character strings. In the case of “colon intramucosal cancer” and “colon mucinous cancer” in FIG. 4A, the letters “large”, “intestine”, “viscosity”, and “cancer” appear in the same order. Is “colonous carcinoma of the large intestine”, and the number of characters of LCS (hereinafter referred to as “LCS length”) is 4.
Thus, since the LCS length indicates the number of characters common to the two character strings, it can be used as information indicating the similarity between the two character strings.
図4(a)の行列の各要素は、当該要素の位置に対応する、用語またはその部分文字列と、入力文字列またはその部分文字列とのLCS長を示す。例えば、図4(a)の行列の第5行第6列の要素a156は、入力文字列「大腸粘液癌」と、用語「大腸粘膜内癌」とのLCS長「4」を示している。また、図4(a)の行列の第2行第4列の要素a124は、入力文字列の先頭から2文字の部分文字列(すなわち、先頭から2文字を入力した時点での入力文字列)「大腸」と、用語の先頭から4文字の部分文字列「大腸粘膜」とのLCS「大腸」の文字数「2」を示している。 Each element of the matrix in FIG. 4A indicates the LCS length of the term or its partial character string and the input character string or its partial character string corresponding to the position of the element. For example, the element a156 in the fifth row and sixth column of the matrix of FIG. 4A indicates the LCS length “4” of the input character string “colon mucinous cancer” and the term “colon mucosal carcinoma”. The element a124 in the second row and the fourth column of the matrix of FIG. 4A is a partial character string of two characters from the beginning of the input character string (that is, the input character string when the two characters are inputted from the beginning). The number of characters “2” of the LCS “colon” with “colon” and a partial character string “colon mucosa” of 4 characters from the beginning of the term is shown.
この、2つの文字列のLCSは、部分文字列のLCSから再帰的に算出できる。
2つの文字列の末尾の文字が同じ場合は、各文字列から当該末尾の文字を除いた部分文字列のLCSに、当該末尾の文字を加えることによりLCSを得られる。例えば、入力文字列「大腸粘液癌」と用語「大腸粘膜内癌」との末尾の文字は共に「癌」である。そして、「大腸粘液癌」と「大腸粘膜内癌」とのLCS「大腸粘癌」は、入力文字列「大腸粘液癌」から「癌」を除いた「大腸粘液」と、用語「大腸粘膜内癌」から「癌」を除いた「大腸粘膜内」との「大腸粘」に「癌」を加えて得られる。したがって、第5行第6列の要素a156の値「4」(「大腸粘癌」の文字数)は、第4行第5列の要素a145の値「3」(「大腸粘」の文字数)に1(「癌」の文字数)を加えた値となっている。
The LCS of the two character strings can be calculated recursively from the LCS of the partial character strings.
When the last character of two character strings is the same, the LCS can be obtained by adding the last character to the LCS of the partial character string obtained by removing the last character from each character string. For example, the end characters of the input character string “colon mucinous cancer” and the term “colon mucosa cancer” are both “cancer”. The LCS “colon mucosal cancer” of “colon mucinous cancer” and “colon mucosal carcinoma” is derived from the input string “colon mucinous cancer” excluding “cancer” and the term “colon mucosal cancer” It is obtained by adding "cancer" to "colon mucosa" with "intestinal mucosa" excluding "cancer" from "cancer". Therefore, the value “4” of the element a156 in the fifth row and sixth column (the number of characters of “colon mucosa”) is set to the value “3” (the number of characters of “colon mucosa”) of the element a145 in the fourth row and fifth column. 1 (the number of characters of “cancer”) is added.
一方、2つの文字列の末尾が異なる場合は、一方の文字列から当該末尾の文字を除いた部分文字列のLCSのうち、文字数の多いほうのLCSと同一(両者の値が等しい場合は、両者の値と同一)である。例えば、「大腸」と「大腸粘膜」との末尾の文字は、それぞれ「腸」と「膜」とであり異なる。ここで、「大腸」と、「大腸粘膜」から末尾の文字「膜」を除いた「大腸粘」とのLCSは「大腸」である。また、「大腸」から末尾の文字「腸」を除いた「大」と、「大腸粘膜」とのLCSは「大」である。そして、「大腸」と「大腸粘膜」とのLCS「大腸」は、この2つのLCS「大腸」および「大」のうち文字数の多いほうである「大腸」と同一である。したがって、第2行第4列の要素a124の値「2」(「大腸」の文字数)は、第2行第3列の要素a123の値「2」(「大腸」の文字数)と、第1行第4列の要素a114の値「1」(「大」の文字数)とのうち、値の大きいほうである「2」と同一である。 On the other hand, if the end of the two character strings are different, the LCS of the partial character string obtained by removing the end character from the one character string is the same as the LCS having the larger number of characters (if both values are equal, Both values are the same). For example, the letters at the end of “colon” and “colon mucosa” are different for “intestine” and “membrane”, respectively. Here, the LCS of “colon” and “colon mucosa” obtained by removing the last letter “membrane” from “colon mucosa” is “colon”. The LCS of “large” obtained by removing the last letter “intestine” from “large intestine” and “colon mucosa” is “large”. The LCS “colon” of “colon” and “colon mucosa” is the same as the “colon”, which is the larger of the two LCSs “colon” and “large”. Therefore, the value “2” (number of characters of “colon”) of the element a124 in the second row and fourth column is equal to the value “2” (number of characters of “colon”) of the element a123 of the second row and third column, and the first Of the value “1” (number of characters of “large”) of the element a114 in the row 4th column, it is the same as “2” which is the larger value.
このように、図4(a)の行列の各要素の値は、入力文字列中の対応する文字と、用語中の対応する文字とが同じ場合は、左上の要素の値に1を加えた値と同一である。一方、入力文字列中の対応する文字と、用語中の対応する文字とが異なる場合は、左隣の要素の値と、上隣の要素の値とのうち大きいほうの値と同一(両者の値が等しい場合は、両者の値と同一)である。 As described above, when the corresponding character in the input character string is the same as the corresponding character in the term, the value of each element of the matrix in FIG. Is the same as the value. On the other hand, if the corresponding character in the input string is different from the corresponding character in the term, it is the same as the larger value of the value of the element on the left and the value of the element on the upper left (both If the values are equal, both values are the same).
ここで、図4(a)の入力文字列「大腸粘液癌」のうち、文字「液」は、用語「大腸粘膜内癌」と共通しておらず、LCS「大腸粘癌」には含まれない。このため、用語「大腸粘膜内癌」またはその部分文字列のいずれについても、入力文字列の部分文字列「大腸粘液」とのLCS長は、文字「液」を除いた「大腸粘」とのLCS長と同一である。例えば、用語の部分文字列「大腸粘膜内」について見ると、この「大腸粘膜内」と「大腸粘液」とのLCSは「大腸粘」であり、LCS長は(要素a145の値)「3」である。そして、「大腸粘膜内」と、「大腸粘液」から「液」を除いた「大腸粘」とのLCSも「大腸粘」であり、LCS長は(要素a135の値)「3」である。
このため、LCS行列の第4行(文字「液」に対応する行)の値は、上隣の第3行(文字「粘」に対応する行)の値と一致する。
Here, in the input character string “colon mucinous carcinoma” in FIG. 4A, the character “fluid” is not common to the term “colon mucosal carcinoma” and is included in the LCS “colonous mucosal carcinoma”. Absent. Therefore, for both the term “colon mucosa cancer” or its partial character string, the LCS length of the input character string with the partial character string “colon mucus” is the same as the “colon mucosa” excluding the character “liquid”. It is the same as the LCS length. For example, looking at the term partial character string “in the large intestine mucosa”, the LCS of “in the large intestine mucosa” and “colon mucus” is “colon mucosa”, and the LCS length (value of element a145) is “3”. It is. The LCS of “colon mucosa” and “colon mucosa” obtained by removing “liquid” from “colon mucus” is also “colon mucosa”, and the LCS length (value of element a135) is “3”.
For this reason, the value of the fourth line (line corresponding to the character “liquid”) of the LCS matrix matches the value of the third line (line corresponding to the character “sticky”) on the upper side.
このように、入力文字列のうち用語に含まれない文字に対応する、図4(a)の行列中の行の値は、上隣の行の値と一致する。そこで、LCS長行列記憶部133は、図4(a)の行列から、用語に含まれない文字に対応する行を削除した行列を、LCS長行列として記憶する。このLCS長行列の最下行最右列の要素の値は、図4(a)の行列の最下行最右列の要素の値と一致する。すなわち、LCS長行列の最下行最右列の要素の値は、入力文字列と用語とのLCS長を示している。
例えば、LCS長行列記憶部133は、図4(a)の行列から、用語に含まれない文字「液」に対応する行を削除した、図4(b)のLCS長行列を記憶する。この行列の最下行最右列の要素a246の値「4」は、入力文字列「大腸粘液癌」と用語「大腸粘膜内癌」とのLCS「大腸粘癌」の文字数、すなわちLCS長を示している。
後述するように、LCS長行列は、文字インデックス記憶部132が記憶する文字インデックスを用いて生成される。
As described above, the value of the row in the matrix of FIG. 4A corresponding to the character not included in the term in the input character string matches the value of the upper adjacent row. Therefore, the LCS length
For example, the LCS length
As will be described later, the LCS length matrix is generated using the character index stored in the character
図1に戻って、文字位置情報行列記憶部134は、文字列入力支援装置100が用語の順位を決定する際に生成する文字位置情報行列を記憶するワーキングメモリである。
以下、図5を参照して、文字位置情報行列記憶部134が記憶する文字位置情報行列について説明する。
図5は、入力文字列と用語とのLCSが用語中に出現する位置を示す文字位置情報を算出するために用いられる行列の例を示す図である。同図(a)と(b)とは、いずれも、文字位置情報を算出するために用いられる行列の例を示す。
同図(a)の行列は、入力文字列の文字数+1の行数、および、用語記憶部131が記憶する用語の文字数+1の列数を有する行列であり、各要素にはビット列(二進数)が格納される。以下では、図5(a)の行列の最上行(初期値に対応する行)を第0行とし、最左列(初期値に対応する列)を第0列とする。
Returning to FIG. 1, the character position information
Hereinafter, the character position information matrix stored in the character position information
FIG. 5 is a diagram illustrating an example of a matrix used for calculating character position information indicating a position where an LCS of an input character string and a term appears in the term. FIGS. 5A and 5B show examples of matrices used for calculating character position information.
The matrix in FIG. 6A is a matrix having the number of characters of the input character string + 1 and the number of columns of the term character number + 1 stored in the
図5(a)の行列の各要素には、入力文字列と、用語記憶部131が記憶する用語とのLCSの各文字が、当該用語中に出現する位置を示す文字位置情報が格納されている。文字位置情報はビット列により構成され、1の位(最右ビット)から順に、入力文字列中の1番目(先頭)から順の各文字の位置を示す。例えば、図5(a)の行列の第5行第6列の要素b156は、最右ビットが入力文字列の先頭の文字「大」の位置を示し、以下同様に、右から2番目のビットが「腸」の位置、3番目が「粘」の位置、・・・、6番目(最左ビット)が「癌」の位置を示す。ここで、入力文字列「大腸粘液癌」と用語「大腸粘膜内癌」とのLCS「大腸粘癌」の各文字は、それぞれ、用語「大腸粘膜内癌」の先頭から1文字目(「大」)と、2文字目(「腸」)と、3文字目(「粘」)と、6文字目(「癌」)とに出現する。したがって、図5(a)の行列の第5行第6列の要素b156は、右から1、2、3、6番目のビットが「1」、4、5番目のビットが「0」となっている。
Each element of the matrix in FIG. 5A stores character position information indicating the position where each character of the LCS of the input character string and the term stored in the
上述したように、2つの文字列のLCSは、部分文字列のLCSから再帰的に算出できる。このため、文字位置情報も、部分文字列の文字位置情報から再帰的に生成できる。
2つの文字列(入力文字列またはその部分文字列、および、用語またはその部分文字列)の末尾の文字が同じ場合、これらの文字列の文字位置情報は、各文字列から当該末尾の文字を除いた部分文字列の文字位置情報に、当該末尾の文字の位置に対応する桁を1とした数を加算した値となる。例えば、図5(a)の行列の、第5行第6列の要素b156の値「100111」(二進数)は、第4行第5列の要素b145の値「111」(二進数。「00111」の先頭の0が省略されている。以下同様に、文字位置情報の先頭の0の表示を省略する)に、末尾の文字「癌」の位置に対応する右から6桁目が1の「100000」(二進数)を加算した値となっている。
As described above, the LCS of the two character strings can be recursively calculated from the LCS of the partial character strings. For this reason, the character position information can also be recursively generated from the character position information of the partial character string.
When the last character of two character strings (input character string or its substring, and term or its substring) is the same, the character position information of these character strings is the character from the end of each character string. This is a value obtained by adding a number with the digit corresponding to the position of the last character as 1 to the character position information of the excluded partial character string. For example, in the matrix of FIG. 5A, the value “100111” (binary number) of the element b156 in the fifth row and sixth column is the value “111” (binary number) of the element b145 in the fourth row and fifth column. “00111” is omitted from the leading 0. Similarly, the leading zero of the character position information is omitted), and the sixth digit from the right corresponding to the position of the last character “cancer” is 1 It is a value obtained by adding “100,000” (binary number).
一方、2つの文字列の末尾が異なる場合、これらの文字列の文字位置情報は、一方の文字列から当該末尾の文字を除いた場合の文字位置情報のうち、LCS長が長いほうの文字列の文字位置情報と同一である。例えば、図5(a)の行列の、第2行第4列の要素b124の値「11」(二進数)は、第2行第3列の要素b123の値「11」(二進数)と、第1行第4列の要素b114の値「1」(二進数)とのうち、LCS長が長い文字列に対応する、第2行第3列の要素b123の値「11」(二進数)と同一である。
いずれの文字列から末尾の文字を除いてもLCS長が同一の場合は、いずれの文字位置情報と同一としてもよい。本実施形態では、値が小さいほうの文字位置情報と同一とする。後述するように、LCSに含まれる文字が先頭に近い位置に出現する用語を上位とするためである。
On the other hand, when the two character strings have different tails, the character position information of these character strings is the character string having the longer LCS length among the character position information obtained by removing the tail character from one character string. Is the same as the character position information. For example, in the matrix of FIG. 5A, the value “11” (binary number) of the element b124 in the second row and fourth column is the value “11” (binary number) of the element b123 in the second row and third column. , The value “11” (binary number) of the element b123 in the second row and third column corresponding to the character string having a long LCS length among the value “1” (binary number) of the element b114 in the first row and fourth column ).
If the LCS length is the same even if the last character is removed from any character string, it may be the same as any character position information. In this embodiment, it is the same as the character position information with the smaller value. This is because, as will be described later, a term in which a character included in the LCS appears at a position close to the head is regarded as a higher rank.
このように、図5(a)の行列の各要素の値は、入力文字列中の対応する文字と、用語中の対応する文字とが同じ場合は、左上の要素の値に、用語の末尾の位置に対応する桁を1とした数を加えた値と同一である。一方、入力文字列中の対応する文字と、用語中の対応する文字とが異なる場合は、左隣の要素の値と、上隣の要素の値とのうち、LCS長が長いほうの値と同一(両者のLCS長が同一の場合は、値が小さいほうの要素の値と同一。さらに両要素の値が同一の場合は、両要素の値と同一)である。 In this way, the value of each element of the matrix in FIG. 5A is the value of the upper left element when the corresponding character in the input character string is the same as the corresponding character in the term, and the end of the term. This is the same as the value obtained by adding a number with the digit corresponding to the position of 1. On the other hand, when the corresponding character in the input character string is different from the corresponding character in the term, the value of the longer LCS length among the value of the element on the left and the value of the element on the upper left is The same value (if both LCS lengths are the same, it is the same as the value of the smaller element. Further, if both elements are the same value, they are the same as the values of both elements).
ここで、図4で説明したように、入力文字列「大腸粘液癌」のうち、文字「液」は、用語「大腸粘膜内癌」と共通しておらず、LCS「大腸粘癌」には含まれない。このため、図4で説明したLCS長の場合と同様、用語「大腸粘膜内癌」またはその部分文字列のいずれについても、入力文字列の部分文字列「大腸粘液」との文字位置情報は、文字「液」を除いた「大腸粘」との文字位置情報と同一である。例えば、用語の部分文字列「大腸粘膜内」について見ると、この「大腸粘膜内」と「大腸粘液」とのLCSは「大腸粘」であり、文字位置情報は(要素b145の値)「111」(二進数)である。そして、「大腸粘膜内」と、「大腸粘液」から「液」を除いた「大腸粘」とのLCSも「大腸粘」であり、文字位置情報は(要素a135の値)「111」(二進数)である。
このため、図5(a)の行列の第4行(文字「液」に対応する行)の値は、上隣の第3行(文字「粘」に対応する行)の値と一致する。
Here, as described with reference to FIG. 4, the character “liquid” in the input character string “colon mucinous carcinoma” is not in common with the term “colon mucosa cancer”, and LCS “colonous mucosal cancer” Not included. For this reason, as in the case of the LCS length described in FIG. 4, the character position information with the partial character string “colon mucus” of the input character string for either the term “colon mucosa cancer” or its partial character string is: It is the same as the character position information of “colon viscosity” excluding the character “liquid”. For example, looking at the term partial character string “in the large intestine mucosa”, the LCS of “in the large intestine mucosa” and “colon mucus” is “colon mucosa”, and the character position information (value of element b145) is “111”. (Binary number). The LCS of “colon mucosa” and “colon mucosa” obtained by removing “liquid” from “colon mucus” is also “colon mucosa”, and the character position information is (value of element a135) “111” (two Decimal number).
For this reason, the value of the fourth row (row corresponding to the character “Liquid”) in the matrix of FIG. 5A matches the value of the third row above (row corresponding to the character “Viscosity”).
このように、入力文字列のうち、用語に含まれない文字に対応する、図5(a)の行列中の行の値は、上隣の行の値と一致する。そこで、文字位置情報行列記憶部134は、図5(a)の行列から、用語に含まれない文字に対応する行を削除した行列を、文字位置情報行列として記憶する。この文字位置情報行列の最下行最右列の要素の値は、図5(a)の行列の最下行最右列の要素の値と一致する。すなわち、文字位置情報行列の最下行最右列の要素の値は、入力文字列と用語とのLCSが用語中に出現する位置を示す文字位置情報を示している。
例えば、文字位置情報行列記憶部134は、図5(a)の行列から、用語に含まれない文字「液」を削除した図5(b)の文字位置情報行列を記憶する。この行列の最下行最右列の要素b246の値「100111」は、入力文字列「大腸粘液癌」と用語「大腸粘膜内癌」とのLCS「大腸粘癌」に含まれる各文字が、用語「大腸粘膜内癌」中に出現する位置を示している。
後述するように、文字列情報行列は、文字インデックス記憶部132が記憶する文字インデックスを用いて生成される。
As described above, the value of the row in the matrix of FIG. 5A corresponding to the character not included in the term in the input character string matches the value of the upper adjacent row. Therefore, the character position information
For example, the character position information
As will be described later, the character string information matrix is generated using the character index stored in the character
図1に戻って、処理部120は、通信部110を介して、ユーザが入力済みの文字列を端末装置200から取得し、取得した文字列に基づいて、ユーザが入力したい文字列の候補の各々の順位を決定する。そして、処理部120は、ユーザが入力したい文字列の候補を、決定した順位に従って並べたリストを生成し、通信部110を介して端末装置200に送信する。処理部120は、例えば、文字列入力支援装置100の具備するCPUが、記憶部130からプログラムを読み出して実行することにより実現される。
処理制御部121は、各部を制御して処理を行わせる。文字インデックス生成部122は、用語記憶部131の記憶する用語リストに基づいて文字インデックスを生成する。LCS長算出部123は、入力文字列と、用語記憶部131が記憶する各用語とのLCS長を算出する。文字位置情報生成部124は、入力文字列と、用語記憶部131が記憶する各用語との文字位置情報を生成する。順位決定部125は、LCS長算出部123が算出するLCS長および文字位置情報生成部124が生成する文字位置情報に基づいて、用語記憶部131が記憶する各用語の順位を決定する。
Returning to FIG. 1, the
The
端末装置200は、ユーザによる文字列の入力を受け付けて文字列入力支援装置100に送信し、文字列入力支援装置100から送信される用語(ユーザが入力しようとしている文字列の候補)を、文字列入力支援装置100が決定した順位に従って表示する。
通信部210は、文字列入力支援装置100との間でデータの送受信を行う。
入力部220は、キーボードおよびマウスを備え、ユーザによる文字列の入力を受け付けて、入力された文字列を、通信部210を介して文字列入力支援装置100に送信する。表示部230は、液晶ディスプレイ等の表示画面を備え、文字列の入力欄を表示し、ユーザの入力した文字列を入力欄に表示する。また、表示部230は、順位付けされた用語を、通信部210を介して文字列入力支援装置100から受信し、受信した用語を、その順位に従って入力欄の下方近傍に表示する。
The
The
The
次に、文字列入力支援システム1の動作について説明する。
文字列入力支援システム1では、文字列入力支援装置100の文字インデックス生成部122が、用語記憶部131の記憶する用語リストに基づいて、予め文字インデックスを生成し、文字インデックス記憶部132に書き込んでおく。
図6は、文字インデックス生成部122が文字インデックスを生成する処理手順を示すフローチャートである。
文字インデックス生成部122は、まず、用語記憶部131が記憶する用語リストの各行に対する処理を行うループL1の処理を開始する。以下では、ループL1にて処理対象となっている用語を「W」にて表示し、用語Wの用語IDリストを「i」にて表示する(以上、ステップS1)。
Next, the operation of the character string
In the character string
FIG. 6 is a flowchart illustrating a processing procedure in which the character
First, the character
そして、文字インデックス生成部122は、用語Wに含まれる各文字に対する処理を行うループL2の処理を開始する。以下では、ループL2にて処理対象となっている文字を「R」にて表示する(以上、ステップS2)。
そして、文字インデックス生成部122は、文字インデックスの行を示す変数kの値を1に設定する(ステップS3)。
Then, the character
Then, the character
次に、文字インデックス生成部122は、文字インデックス記憶部132が記憶する文字インデックスに第k行が存在するか否かを判定する(ステップS4)。存在すると判定した場合(ステップS4:YES)、文字インデックス生成部122は、文字インデックスの第k行に含まれる文字と文字Rとが一致するか否かを判定する。一致しないと判定した場合(ステップS5:NO)、文字インデックス生成部122は、kに1を加え、すなわち文字インデックスの次の行を対象に設定し(ステップS31)、ステップS4に戻る。
Next, the character
一方、ステップS5にて一致すると判定した場合(ステップS5:YES)、文字インデックス生成部122は、文字インデックスの第k行に含まれる用語IDリストに、iが含まれるか否かを判定する。このように、既にiが含まれているか否かを判定するのは、重複記載を避けるためである(以上、ステップS6)。含まれないと判定した場合(ステップS6:NO)、文字インデックス生成部122は、文字インデックス記憶部132が記憶する、文字インデックスの第k行に含まれる用語IDリストに、iを追加する(書き込む)(ステップS7)。
On the other hand, when it is determined in step S5 that they match (step S5: YES), the character
その後、文字インデックス生成部122は、用語Wの全ての文字に対してループL2の処理を行ったか否かを判定する。未処理の文字があると判定した場合は、ステップS2に戻って、未処理の文字に対して引き続きループL2の処理を行う。一方、全ての文字に対して処理を行ったと判定した場合は、次のステップS9に進む(以上、ステップS8)。
そして、文字インデックス生成部122は、用語リストの全ての行に対してループL1の処理を行ったか否かを判定する。未処理の行があると判定した場合は、ステップS1に戻って、未処理の行に対して引き続きループL1の処理を行う。一方、全ての行に対して処理を行ったと判定した場合は、同図の処理を終了する(以上、ステップS9)。
Thereafter, the character
Then, the character
一方、ステップS4において、文字インデックス記憶部132が記憶する文字インデックスに第k行が存在しないと判定した場合(ステップS4:NO)、および、ステップS6において、文字インデックスの第k行に含まれる用語IDリストに、iが含まれていると判定した場合(ステップS6:YES)は、ステップS8に進む。
また、ステップS4において、文字インデックス記憶部132が記憶する文字インデックスに第k行が存在しないと判定した場合(ステップS4:NO)は、文字インデックス記憶部132が記憶する文字インデックスの末尾に、文字Rと、iから成る用語IDリストとを含む行を追加する(書き込む)。
On the other hand, when it is determined in step S4 that the kth row does not exist in the character index stored in the character index storage unit 132 (step S4: NO), and the term included in the kth row of the character index in step S6. If it is determined that i is included in the ID list (step S6: YES), the process proceeds to step S8.
In step S4, when it is determined that the k-th line does not exist in the character index stored in the character index storage unit 132 (step S4: NO), the character index stored in the character
文字インデックスの生成を完了すると、端末装置200の表示部230が入力欄を表示し、入力部220がユーザの入力操作を待ち受ける。入力部220は、ユーザの入力操作を受けると、当該操作に基づいて、入力文字列を生成する。すなわち、入力部220は、過去の入力操作に基づく入力文字列を記憶しており、文字の追加や削除等の新たな入力操作を受けると、記憶している入力文字列を当該操作に基づいて更新(編集)する。入力部220は、更新された入力文字列を、表示部230および通信部210に出力する。
表示部230は、入力部220から出力された入力文字列を入力欄に表示(既に入力文字列を表示しているときは更新)する。また、通信部210は、入力部220から出力された入力文字列を、文字列入力支援装置100の通信部110に送信する。
通信部110は、通信部210からの入力文字列を受信すると、受信した入力文字列を処理部120に出力する。
When the generation of the character index is completed, the
The
When receiving the input character string from the
処理部120は、通信部110から出力される入力文字列と、用語記憶部131の記憶する各用語とのLCS長の算出および文字位置情報の生成を行う。
図7および図8は、処理部120がLCS長を算出し、文字位置情報を生成する処理手順を示すフローチャートである。処理部120は、通信部110から入力文字列が出力されると同図の処理を開始する。
まず、処理部120の処理制御部121は、LCS長行列記憶部133のLCS長行列を初期化するようLCS長算出部123を制御し、文字位置情報行列記憶部134の文字位置情報行列を初期化するよう文字位置情報生成部124を制御する。
The
7 and 8 are flowcharts showing a processing procedure in which the
First, the
LCS長算出部123は、用語記憶部131が記憶する用語の各々について、LCS長行列の行数を入力文字列の文字数+1とし、列数を当該用語の文字数+1とする。そして、最上行(図4の例で、「初期値」に対応する行)の各要素の値と、最左列(図4の例で、「初期値」に対応する列)の各要素の値とを、いずれも「0」とする。他の要素の値は、この時点では未定である。
また、文字位置情報生成部124は、用語記憶部131が記憶する用語の各々について、文字位置情報行列の行数を入力文字列の文字数+1とし、列数を当該用語の文字数+1とする。そして、最上行(図5の例で、「初期値」に対応する行)の各要素の値と、最左列(図5の例で、「初期値」に対応する列)の各要素の値とを、いずれも「0」とする。他の要素の値は、この時点では未定である(以上、ステップS101)。
For each term stored in the
Further, for each term stored in the
次に、処理制御部121は、入力文字列の各文字について先頭から順に処理を行うループL11の処理を開始する。以下では、ループL11にて処理対象となっている文字の位置を「j」(先頭から順に、1、2、・・・とする)にて表示する。(以上、ステップS102)。
次に、処理制御部121は、文字インデックス記憶部132が記憶する文字インデックスの中から、入力文字列の先頭からj番目の文字と同じ行に格納されている用語IDリスト(文字インデックス中に、該当する行が無い場合は空のリスト)を読み出す(ステップS103)。
そして、処理制御部121は、ステップS103で取得した用語IDリストに含まれる用語IDに対応する各用語について処理を行うループL12の処理を開始する。以下では、ループL12にて処理対象となっている用語を「W」にて表示する(以上、ステップS104)。
Next, the
Next, the
And the
次に、処理制御部121は、算出済みのLCS長、すなわち、LCS長行列記憶部133の記憶するLCS長行列のうち、用語Wに対応するLCS長行列の、値が確定している行の最右の要素の値を読み出す。後述するように、この算出済みのLCS長は、入力文字列の部分文字列と、用語WとのLCS長である。また、処理制御部121は、入力文字列に含まれる文字のうち、処理が終わっていない文字の数(入力文字列の文字数−k+1)を算出する。そして、処理制御部121は、算出済みのLCS長と、入力文字列に含まれる文字のうち処理が終わっていない文字の数との合計値が、予め定められた閾値以上か否かを判定する。
この閾値は、入力文字列と用語とのLCS長に対する閾値であり、LCS長が閾値以上の用語のみが、ユーザの入力したい文字列の候補として端末装置200の表示部230に表示される。この閾値は、例えばユーザによって予め設定される(以上、ステップS105)。
算出済みのLCS長と、入力文字列に含まれる文字のうち処理が終わっていない文字の数との合計値が、閾値以上であると判定した場合(ステップS105:YES)、処理制御部121は、用語Wの各文字について先頭から順に処理を行うループL13の処理を開始する。以下では、ループL11にて処理対象となっている文字の位置を「k」(先頭から順に、1、2、・・・とする)にて表示する。(以上、ステップS106)。
Next, the
This threshold value is a threshold value for the LCS length of the input character string and the term, and only the term whose LCS length is equal to or greater than the threshold value is displayed on the
When it is determined that the total value of the calculated LCS length and the number of characters that have not been processed among the characters included in the input character string is equal to or greater than the threshold (step S105: YES), the
そして、処理制御部121は、入力文字列のj番目の文字と、用語Wのk番目の文字とが同一か否かを判定する(ステップS107)。同一であると判定した場合(ステップS107:YES)、処理制御部121は、文字が同一であることを示す信号を、LCS長算出部123に出力する。
文字が同一であることを示す信号が処理制御部121から出力されると、LCS長算出部123は、LCS長行列の第j行第k列の要素の値として、第j−1行第k−1列の要素の値+1を書き込む。すなわち、図4で説明したように、左上の要素の値に1を加えた値とする(以上、ステップS111)。
Then, the
When a signal indicating that the characters are the same is output from the
また、ステップS107において文字が同一であると判定した(ステップS107:YES)処理制御部121は、文字が同一であることを示す信号を、文字位置情報生成部124にも出力する。
文字が同一であることを示す信号が処理制御部121から出力されると、文字位置情報生成部124は、文字位置情報行列の第j行第k列の要素の値として、第j−1行第k−1列の要素の値+2k−1を書き込む。すなわち、図5で説明したように、左上の要素の値に、用語の末尾の位置に対応する桁を1とした数を加えた値とする(以上、ステップS112)。
Further, in step S107, it is determined that the characters are the same (step S107: YES), and the
When a signal indicating that the characters are the same is output from the
その後、処理制御部121は、用語Wの全ての文字に対してループL13の処理を行ったか否かを判定する。未処理の文字があると判定した場合は、ステップS106に戻って、未処理の文字に対して引き続きループL13の処理を行う。一方、全ての文字に対して処理を行ったと判定した場合は、次のステップS142に進む。
この、ループL13の終了時点では、入力文字列の先頭からj文字目までの部分文字列と、用語WとのLCSが算出されている。例えば、入力文字列が「大腸粘膜癌」、用語Wが「大腸粘膜内癌」で、j=2の場合、図4に示したLCS長行列のうち上3行(初期値の行と、入力文字列「大」および「腸」に対応する行)が生成されている。このLCS長行列の最下行最右列の要素の値「2」は、入力文字列の先頭から2文字の部分文字列「大腸」と用語W「大腸粘膜内癌」とのCLS長(CLSは「大腸」であり、CLS長は「2」)を示している(以上、ステップS141)。
Thereafter, the
At the end of the loop L13, the LCS of the partial character string from the beginning of the input character string to the jth character and the term W is calculated. For example, when the input character string is “colon mucosa cancer” and the term W is “colon mucosa cancer” and j = 2, the upper three rows (the initial value row and the input value) of the LCS length matrix shown in FIG. The lines corresponding to the character strings “Large” and “Intestine” are generated. The value “2” of the element in the bottom rightmost column of this LCS length matrix is the CLS length (CLS is CLS) between the partial character string “colon” of 2 characters from the beginning of the input character string and the term W “colonal mucosal carcinoma” "Large colon" and CLS length is "2") (step S141).
そして、処理制御部121は、用語記憶部131の記憶する全ての用語に対してループL12の処理を行ったか否かを判定する。未処理の用語があると判定した場合は、ステップS104に戻って、未処理の用語に対して引き続きループL12の処理を行う。一方、全ての用語に対して処理を行ったと判定した場合は、次のステップS143に進む(以上、ステップS142)。
そして、処理制御部121は、入力文字列の全ての文字に対してループL11の処理を行ったか否かを判定する。未処理の文字があると判定した場合は、ステップS102に戻って、未処理の文字に対して引き続きループL11の処理を行う。一方、全ての文字に対して処理を行ったと判定した場合は、同図の処理を終了する(以上、ステップS143)。
And the
Then, the
一方、ステップS105において、閾値未満であると判定した場合(ステップS105:NO)、処理制御部121は、ステップS141に進む。すなわち、入力文字列に含まれる文字のうち、まだLCS長算出に用いられていない文字が全てLCSを構成すると仮定しても処理対象の用語のLCS長が閾値未満である場合、残りの文字について処理をするまでもなく、この用語のLCS長が最終的に閾値未満となることが明らかである。すなわち、この用語は端末装置200の表示部230には表示されないことが確定している。そこで、処理部120は、この用語に対するLCS長の算出および文字位置情報の生成を中止して、全体の処理の迅速化を図る。
On the other hand, when it determines with it being less than a threshold value in step S105 (step S105: NO), the
また、ステップS107において文字が異なると判定した場合(ステップS107:NO)、処理制御部121は、LCS長行列の第j−1行第k列の要素の値が、第j行第k−1列の要素の値以上か否かを判定する(ステップS121)。第j−1行第k列の要素の値が、第j行第k−1列の要素の値以上であると判定した場合(ステップS121:YES)、処理制御部121は、第j−1行第k列の要素の値が、第j行第k−1列の要素の値以上であることを示す信号を、LCS長算出部123に出力する。
当該信号が処理制御部121から出力されると、LCS長算出部123は、LCS長行列の第j行第k列の要素の値として、第j−1行第k列の要素の値を書き込む。すなわち、図4で説明したように、左隣の値と、上隣の値とのうち大きいほう(ここでは、上隣の要素)の値と同一(両者の値が等しい場合は、両者の値と同一)とする(以上、ステップS122)。
If it is determined in step S107 that the characters are different (step S107: NO), the
When the signal is output from the
また、ステップS121において、第j−1行第k列の要素の値が、第j行第k−1列の要素の値以上であると判定した(ステップS121:YES)処理制御部121は、LCS長行列の第j−1行第k列の要素の値が、第j行第k−1列の要素の値と等しいか否かを判定する(ステップS123)。値が等しいと判定した場合(ステップS123:YES)、処理制御部121は、さらに、文字位置情報行列の第j−1行第k列の要素の値が、第j行第k−1列の要素の値以下か否かを判定する(ステップS124)。
ステップS123において両者の値が異なると判定した場合(ステップS123:NO)、および、ステップS124において、第j−1行第k列の要素の値が、第j行第k−1列の要素の値以下であると判定した場合(ステップS124:YES)、処理制御部121は、上隣の要素を書き込むよう指示する信号を、文字位置情報生成部124に出力する。
当該信号が処理制御部121から出力されると、文字位置情報生成部124は、文字位置情報行列の第j行第k列の要素の値として、第j−1行第k列の要素の値を書き込む。すなわち、図5で説明したように、左隣の要素の値と、上隣の要素の値とのうち、LCS長が長いほう(ここでは、上隣の要素)の値と同一(両者のLCS長が同一の場合は、値が小さいほうの要素の値と同一。さらに両要素の値が同一の場合は、両要素の値と同一)とする(以上、ステップS125)。
その後、処理制御部121は、ステップS141に進む。
In step S121, the
When it is determined in step S123 that the two values are different (step S123: NO), and in step S124, the value of the element in the j-1st row and the kth column is the value of the element in the jth row and the k-1th column. When it determines with it being below a value (step S124: YES), the
When the signal is output from the
Thereafter, the
一方、ステップS121において、第j−1行第k列の要素の値が、第j行第k−1列の要素の値未満であると判定した場合(ステップS121:NO)、処理制御部121は、第j−1行第k列の要素の値が、第j行第k−1列の要素の値未満であることを示す信号を、LCS長算出部123に出力する。
当該信号が処理制御部121から出力されると、LCS長算出部123は、LCS長行列の第j行第k列の要素の値として、第j行第k−1列の要素の値を書き込む。すなわち、図4で説明したように、左隣の値と、上隣の値とのうち大きいほう(ここでは、左隣の要素)の値と同一とする(以上、ステップS131)。
On the other hand, when it is determined in step S121 that the value of the element in the (j-1) th row and the kth column is less than the value of the element in the jth row and the (k-1) th column (step S121: NO), the
When the signal is output from the
また、ステップS121において、第j−1行第k列の要素の値が、第j行第k−1列の要素の値未満であると判定した場合(ステップS121:NO)、および、ステップS124において、第j−1行第k列の要素の値が、第j行第k−1列の要素の値より大きいと判定した場合(ステップS124:NO)、処理制御部121は、左隣の要素を書き込むよう指示する信号を、文字位置情報生成部124に出力する。
当該信号が処理制御部121から出力されると、文字位置情報生成部124は、文字位置情報行列の第j行第k列の要素の値として、第j行第k−1列の要素の値を書き込む。すなわち、図5で説明したように、左隣の要素の値と、上隣の要素の値とのうち、LCS長が長いほう(ここでは、左隣の要素)の値と同一(両者のLCS長が同一の場合は、値が小さいほうの要素の値と同一)とする(以上、ステップS132)。
その後、処理制御部121は、ステップS141に進む。
Further, when it is determined in step S121 that the value of the element in the j-1st row and the kth column is less than the value of the element in the jth row and the (k-1) th column (step S121: NO), and step S124. In step S124, the
When the signal is output from the
Thereafter, the
以上により、LCS長行列および文字位置情報行列が完成する。そして、LCS長行列の最上行最右列の要素の値が、対応する用語のLCS長を示し、文字位置情報行列の最上行最右列の要素の値が、対応する用語中における、LCSに含まれる文字の出現位置、すなわち文字位置情報を示している。 Thus, the LCS length matrix and the character position information matrix are completed. The value of the element in the top rightmost column of the LCS length matrix indicates the LCS length of the corresponding term, and the value of the element in the top rightmost column of the character position information matrix is the LCS in the corresponding term. The appearance position of the included character, that is, the character position information is shown.
なお、図7のステップS105で用語の絞込みを行わない場合(例えば、閾値の値が「0」または「1」に設定されている場合)は、処理部120が、LCS長行列と文字位置情報行列とを常に新たに生成するのではなく、生成済みのLCS長行列および文字位置情報行列を更新するようにしてもよい。例えば、ユーザの操作入力により入力文字列の末尾に新たに1文字追加された場合、処理部120に入力される入力文字列のうち、末尾の文字を除いた部分文字列は、前回の入力文字列と同一である。そこで、LCS長算出部123が、各LCS長行列の末尾に行を追加し、文字位置情報生成部124が、各文字位置情報行列の末尾に行を追加するようにしてもよい。そして、処理部120は、新たに入力された入力文字列の末尾の文字に基づき、ループL12の処理手順に従って、LCS長行列および文字位置情報行列を完成させる。
In the case where no terms are narrowed down in step S105 of FIG. 7 (for example, when the threshold value is set to “0” or “1”), the
LCS長行列および文字位置情報行列が完成すると、処理制御部121は、用語記憶部131の記憶する各用語の順位を決定するように順位決定部125を制御する。
順位決定部125は、用語記憶部131の記憶する各用語の、LCS長と、文字位置情報と、用語の長さ(文字数)と、用語リストにおける順序(用語IDの値)とに基づいて、順位を決定し、決定した順位に基づいて並べられた用語のリストを生成する。
図9は、順位決定部125による用語の順位決定の例を示す図である。同図は、入力文字列が「大腸癌」である場合の例であり、図1に示す用語リストに含まれる用語のうちLCS長が3以上の用語と、各用語の順位と、順位を決定する基準となるLCS長と文字位置情報と用語の文字数と用語IDとを示している。
When the LCS length matrix and the character position information matrix are completed, the
The
FIG. 9 is a diagram illustrating an example of the ranking determination of terms by the
順位決定部125は、まず、LCS長が閾値以上の用語のみを、端末装置200の表示部230に表示する用語として選択する。具体的には、順位決定部125は、LCS長行列記憶部133が記憶する各LCS長行列の最下行最右列の要素と閾値とを比較し、閾値以上の値を示すLCS長行列に対応する用語のみを選択する。ここで、LCS長行列記憶部133が記憶するLCS長行列の中には、図7のステップS105における判定の結果、LCS長算出処理が中止されているLCS長行列もある。このLCS長行列の最下行最右列の要素は、実際のLCS長よりも小さい値を示す場合がある。しかし、図7(ステップS105:NO)で説明したように、このLCS長行列に対応する用語は、LCS長が閾値未満となることが確定している用語であり、順位決定部125の選択には影響しない。
The
次に順位決定部125は、選択した各用語に対して、LCS長が長いほど上位とし(上位の用語ほど高い優先順位である、すなわち表示部230の入力欄に近い位置に表示されやすくなる)、LCS長が同じ用語に対しては、文字位置情報の値が小さい用語を上位とする。さらに、LCS長および文字位置情報の値が同じ用語に対しては、用語の文字数が少ない用語を上位とし、用語の文字数も同じである用語に対しては、用語IDの小さい用語を上位とする。
上述したように、LCS長は入力文字列と用語との類似度を示す情報として用いることができる。従って、LCS長が長い用語ほど上位とすることで、入力文字列と類似度の高い用語を上位とすることができ、ユーザが入力したい文字列の候補を適切に提示できる。
また、ユーザは、通常、入力したい文字列の先頭から順に入力する。したがって、入力済みの文字列とのLCSが先頭付近に出現する用語のほうが、末尾付近に出現する用語よりも、ユーザが入力したい文字列の候補として適切である。文字位置情報の値が小さい用語を上位とすることで、入力済みの文字列とのLCSが先頭付近に出現する用語を上位とすることができ、ユーザが入力したい文字列の候補を適切に提示できる。
Next, the
As described above, the LCS length can be used as information indicating the similarity between the input character string and the term. Therefore, a term having a higher LCS length is ranked higher so that a term having a higher similarity to the input character string can be ranked higher, and a character string candidate that the user wants to input can be presented appropriately.
Further, the user normally inputs the characters in order from the beginning of the character string to be input. Therefore, a term in which an LCS with an already entered character string appears near the beginning is more appropriate as a candidate for a character string that the user wants to input than a term that appears near the end. By placing a term with a small character position information value at the top, it is possible to place a term in which the LCS with the entered character string appears near the top, and appropriately present the candidate for the character string that the user wants to input it can.
順位決定部125は、例えば、順位を示す指標を用語毎に生成し、生成した指標に基づいて用語を並べ替える。
図10は、順位決定部125が生成する指標の例を示す図である。
同図に示す指標は、LCSの長さ(二進数表示)と、小数点と、文字位置情報(二進数表示)の2の補数と、用語の長さ(二進数表示)の2の補数と、用語ID(二進数表示)の2の補数とが、この順に結合されて生成される。その際、順位決定部125は、文字位置情報(二進数表示)の桁数を、当該用語文字数に揃える。また、用語の長さ(二進数表示)の桁数を、用語記憶部131が記憶する用語のうち最長のものを表現可能な桁数に揃える。また、用語ID(二進数表示)の桁数を、用語記憶部131が記憶する用語IDのうち最大のものを表現可能な桁数に揃える。
For example, the
FIG. 10 is a diagram illustrating an example of an index generated by the
The index shown in the figure includes LCS length (binary number display), decimal point, two's complement number of character position information (binary number display), term length (binary number display) two's complement number, The two's complement of the term ID (in binary notation) is generated by combining in this order. At that time, the
また、同図の値は、入力文字列が「大腸癌」である場合に、用語「大腸粘膜内癌」に対して生成される指標の値を示している。
「大腸癌」の文字数は「3」であるため、同図に示す指標の整数部分は「11」となっており、また、小数部分は、文字位置情報「100011」の2の補数「011100」と、用語の長さ「6」の二進数表示「0・・・0110」の2の補数「1・・・1001」と、用語ID「5」の二進数表示「0・・・0101」の2の補数「1・・・1010」とを結合した値となっている。2の補数を取ることにより、元となる値が小さいほど大きい値の指標が生成される。
Also, the values in the figure indicate the index values generated for the term “colon mucosa cancer” when the input character string is “colon cancer”.
Since the number of characters of “colon cancer” is “3”, the integer part of the index shown in the figure is “11”, and the decimal part is the two's complement “011100” of the character position information “1000011”. And the two's complement “1... 1001” of the binary representation “0... 0110” of the term length “6” and the binary representation “0... 0101” of the term ID “5”. It is a value obtained by combining 2's complements “1... 1010”. By taking a 2's complement, a smaller value is generated as the original value is smaller.
順位決定部125が、この指標の大きい順に用語を並べ替えることにより、各用語は、LCSの長さが長い順に並べられ、LCSの長さが同一の場合は、文字位置情報の値が小さい順に並べられ、文字位置情報の値も同一の場合は、用語の長さが短い順に並べられ、用語の長さも同一の場合は、用語IDの値が小さい順に並べられる。
ここで、LCSに含まれる文字が用語に出現する位置のうち、最も後ろ(用語の末尾側)の位置が先頭に近い用語ほど、文字位置情報の値が小さくなる。また、LCSに含まれる文字が用語に出現する位置のうち、最も後ろの出現位置が同一の場合は、後ろから2番目の出現位置が先頭に近い用語ほど、文字位置情報の値が小さくなる。同様に、1〜i−1(iはLCS長以下の正整数)番目の各出現位置が同一の場合は、i番目の出現位置が先頭に近い用語ほど、文字位置情報の値が小さくなる。この点で、文字位置情報生成部124は、LCSに含まれる文字が用語中に出現する位置が先頭に近いほど小さい値を示す文字位置情報を生成する。
The
Here, among the positions where the characters included in the LCS appear in the term, the value of the character position information becomes smaller as the term is located closest to the beginning (the end side of the term). Moreover, when the last appearance position is the same among the positions where the characters included in the LCS appear in the term, the value of the character position information becomes smaller as the second appearance position from the back is closer to the beginning. Similarly, when the 1st to i-1 (where i is a positive integer less than or equal to the LCS length) -th appearance positions are the same, the term with the i-th appearance position closer to the head has a smaller character position information value. In this regard, the character position
順位決定部125は、並べ替えた用語を並べ替えた順に含むリストを生成し、通信部110を介して端末装置200に送信する。
端末装置200の通信部210は、順位決定部125からの用語のリストを受信すると、受信したリストを表示部230に出力する。表示部230は、通信部210から出力される用語のリストを、入力欄の下方近傍に表示する。
The
When the
図11は、表示部230が用語のリストを表示した例を示す図である。同図では、入力文字列が「大腸癌」である場合に、図2に示した用語リストの用語のうち、LCS長が3以上の用語を表示した例が示されている。順位決定部125は、設定されている閾値「3」に基づいて用語の絞込みを行い、さらに、図9で示した順位に従って用語を並べ替え、並べ替えた順に用語を含むリストを生成する。そして、表示部230がこのリストを表示する。
ユーザが、このリストに含まれる用語のいずれかを、マウスでクリックする等により選択すると、入力部220は、選択された用語を入力文字列として表示部230と通信部210に出力する。以下、各部は上述した処理を行う。
FIG. 11 is a diagram illustrating an example in which the
When the user selects one of the terms included in this list by clicking with the mouse or the like, the
以上のように、文字列入力支援装置100の文字インデックス記憶部132は、用語記憶部131の記憶する用語に含まれる文字の各々について、当該文字を含む用語を示す文字インデックスを予め記憶しておく。そして、処理部120は、ユーザが入力したい文字列の候補のリストを生成する際に、文字インデックスに基づいて処理対象となる用語の選択(絞込み)を行う。これにより、高速に、かつ、LCS長が所定の閾値以上の全ての用語を対象として適切に、ユーザの入力したい文字列の候補を得られる。
As described above, the character
また、処理部120は、入力文字列の部分文字列と用語とのLCS長を算出し、算出したLCS長に基づいて、当該用語に関する類似度を示す情報の生成を中止するか否かを決定する。具体的には、入力文字列のうち未処理の文字の数と、算出したLCS長との合計値が、予め定められた閾値未満の場合に、当該用語について、LCS長の算出および文字位置情報の生成を中止する。これにより、高速に、かつ、LCS長が閾値以上の全ての用語を対象として適切に、ユーザの入力したい文字列の候補を得られる。
In addition, the
なお、LCS長算出部123が生成する類似度を示す情報は、上述したLCS長に限らず、ある文字が用語に含まれるか否かに基づいて再帰的に生成されるものであればよい。例えば、入力文字列と用語とに共通して出現する文字数(LCS長の算出において、文字の並びが同順であるとの条件を不要としたもの)を、上述したLCS長の算出と同様に、入力文字列の部分文字列について再帰的に算出するようにしてもよい。
Note that the information indicating the degree of similarity generated by the LCS
なお、処理制御部121が、用語リストに含まれる用語のうち、入力文字列に含まれる全ての用語を、ユーザの入力したい文字列の候補として選択するようにしてもよい。この場合、処理制御部121は、図7のループ12において、用語IDリストに基づいて得られる全ての用語を、ユーザの入力したい文字列の候補として選択する。
Note that the
なお、上述したように、文字列入力支援装置100は、コンピュータによって実現するようにしてもよい。すなわち、文字列入力支援装置100の全部または一部の機能を実現するためのプログラムをコンピュータ読み取り可能な記録媒体に記録して、この記録媒体に記録されたプログラムをコンピュータシステムに読み込ませ、実行することにより各部の処理を行ってもよい。なお、ここでいう「コンピュータシステム」とは、OSや周辺機器等のハードウェアを含むものとする。
また、「コンピュータシステム」は、WWWシステムを利用している場合であれば、ホームページ提供環境(あるいは表示環境)も含むものとする。
また、「コンピュータ読み取り可能な記録媒体」とは、フレキシブルディスク、光磁気ディスク、ROM、CD−ROM等の可搬媒体、コンピュータシステムに内蔵されるハードディスク等の記憶装置のことをいう。さらに「コンピュータ読み取り可能な記録媒体」とは、インターネット等のネットワークや電話回線等の通信回線を介してプログラムを送信する場合の通信線のように、短時間の間、動的にプログラムを保持するもの、その場合のサーバやクライアントとなるコンピュータシステム内部の揮発性メモリのように、一定時間プログラムを保持しているものも含むものとする。また上記プログラムは、前述した機能の一部を実現するためのものであっても良く、さらに前述した機能をコンピュータシステムにすでに記録されているプログラムとの組み合わせで実現できるものであっても良い。
Note that, as described above, the character string
Further, the “computer system” includes a homepage providing environment (or display environment) if a WWW system is used.
The “computer-readable recording medium” refers to a storage device such as a flexible medium, a magneto-optical disk, a portable medium such as a ROM and a CD-ROM, and a hard disk incorporated in a computer system. Furthermore, the “computer-readable recording medium” dynamically holds a program for a short time like a communication line when transmitting a program via a network such as the Internet or a communication line such as a telephone line. In this case, a volatile memory in a computer system serving as a server or a client in that case, and a program that holds a program for a certain period of time are also included. The program may be a program for realizing a part of the functions described above, and may be a program capable of realizing the functions described above in combination with a program already recorded in a computer system.
以上、この発明の実施形態を図面を参照して詳述してきたが、具体的な構成はこの実施形態に限られるものではなく、この発明の要旨を逸脱しない範囲の設計変更等も含まれる。 The embodiment of the present invention has been described in detail with reference to the drawings. However, the specific configuration is not limited to this embodiment, and includes design changes and the like within a scope not departing from the gist of the present invention.
1 文字列入力支援システム
100 文字列入力支援装置
110 通信部
120 処理部
121 処理制御部
122 文字インデックス生成部
123 LCS長算出部
124 文字位置情報生成部
125 順位決定部
130 記憶部
131 用語記憶部
132 文字インデックス記憶部
133 LCS長行列記憶部
134 文字位置情報行列記憶部
200 端末装置
210 通信部
220 入力部
230 表示部
DESCRIPTION OF
Claims (5)
1つ以上の第2の文字列の各々と、当該第2の文字列を識別する文字列識別情報とが対応付けられた識別情報付文字列群を記憶する文字列群記憶部と、
前記識別情報付文字列群中の前記第2の文字列に含まれる全ての文字について、異なる前記文字毎に、当該文字と、当該文字を含み前記識別情報付文字列群に含まれる前記第2の文字列の文字列識別情報と、が対応付けられた文字インデックスを記憶する文字インデックス記憶部と、
前記第1の文字列に含まれる文字に、前記文字インデックスにて対応付けられた前記文字列識別情報により識別される前記第2の文字列を選択する文字列選択部と、
を具備することを特徴とする文字列選択装置。 An acquisition unit for acquiring a first character string;
A character string group storage unit for storing a character string group with identification information in which each of the one or more second character strings is associated with character string identification information for identifying the second character string;
For all the characters included in the second character string in the character string group with identification information, for each different character, the character and the second character string including the character and included in the character string group with identification information A character index storage unit that stores a character index associated with the character string identification information of
A character string selection unit that selects the second character string identified by the character string identification information associated with the character included in the first character string by the character index;
A character string selection device comprising:
前記識別情報付文字列群中の前記第2の文字列に含まれる全ての文字について、異なる前記文字毎に、当該文字と、当該文字を含み前記識別情報付文字列群に含まれる前記第2の文字列の文字列識別情報と、が対応付けられた文字インデックスを記憶する文字インデックス記憶部と、
を具備する文字列選択装置の文字列選択方法であって、
取得部が、第1の文字列を取得する取得ステップと、
文字列選択部が、前記第1の文字列に含まれる文字に、前記文字インデックスにて対応付けられた前記文字列識別情報により識別される前記第2の文字列を選択する文字列選択ステップと、
を具備することを特徴とする文字列選択方法。 A character string group storage unit for storing a character string group with identification information in which each of the one or more second character strings is associated with character string identification information for identifying the second character string;
For all the characters included in the second character string in the character string group with identification information, for each different character, the character and the second character string including the character and included in the character string group with identification information A character index storage unit that stores a character index associated with the character string identification information of
A character string selection method for a character string selection device comprising:
An acquisition step in which the acquisition unit acquires the first character string;
A character string selection step in which the character string selection unit selects the second character string identified by the character string identification information associated with the character included in the first character string by the character index; ,
A character string selection method comprising:
前記識別情報付文字列群中の前記第2の文字列に含まれる全ての文字について、異なる前記文字毎に、当該文字と、当該文字を含み前記識別情報付文字列群に含まれる前記第2の文字列の文字列識別情報と、が対応付けられた文字インデックスを記憶する文字インデックス記憶部と、
を具備する文字列選択装置としてのコンピュータに、
第1の文字列を取得する取得ステップと、
前記第1の文字列に含まれる文字に、前記文字インデックスにて対応付けられた前記文字列識別情報により識別される前記第2の文字列を選択する文字列選択ステップと、
を実行させるためのプログラム。
A character string group storage unit for storing a character string group with identification information in which each of the one or more second character strings is associated with character string identification information for identifying the second character string;
For all the characters included in the second character string in the character string group with identification information, for each different character, the character and the second character string including the character and included in the character string group with identification information A character index storage unit that stores a character index associated with the character string identification information of
In a computer as a character string selection device comprising:
An acquisition step of acquiring a first character string;
A character string selection step of selecting the second character string identified by the character string identification information associated with the character included in the first character string by the character index;
A program for running
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010131071A JP5560105B2 (en) | 2010-06-08 | 2010-06-08 | Character string selection device, character string selection method and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010131071A JP5560105B2 (en) | 2010-06-08 | 2010-06-08 | Character string selection device, character string selection method and program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2011257921A true JP2011257921A (en) | 2011-12-22 |
JP5560105B2 JP5560105B2 (en) | 2014-07-23 |
Family
ID=45474051
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2010131071A Expired - Fee Related JP5560105B2 (en) | 2010-06-08 | 2010-06-08 | Character string selection device, character string selection method and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5560105B2 (en) |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2007172539A (en) * | 2005-12-26 | 2007-07-05 | Ricoh Co Ltd | Word retrieval device and program |
-
2010
- 2010-06-08 JP JP2010131071A patent/JP5560105B2/en not_active Expired - Fee Related
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2007172539A (en) * | 2005-12-26 | 2007-07-05 | Ricoh Co Ltd | Word retrieval device and program |
Also Published As
Publication number | Publication date |
---|---|
JP5560105B2 (en) | 2014-07-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Marco-Sola et al. | The GEM mapper: fast, accurate and versatile alignment by filtration | |
US8914275B2 (en) | Text prediction | |
CN104272222B (en) | Input the system of text and the method for input text | |
CN107704102B (en) | Text input method and device | |
CN103927329B (en) | A kind of instant search method and system | |
US20150317069A1 (en) | System and method for inputting text into electronic devices | |
US11062793B2 (en) | Systems and methods for aligning sequences to graph references | |
US20120029910A1 (en) | System and Method for Inputting Text into Electronic Devices | |
JPWO2014132497A1 (en) | Data analysis apparatus and method | |
WO2020040253A1 (en) | Prediction interpretation device and prediction interpretation method | |
US20210183466A1 (en) | Identification method, information processing device, and recording medium | |
CN101369209B (en) | Hand-written input device and method for complete mixing input | |
US9785726B2 (en) | Pattern matching based character string retrieval | |
CN115713078A (en) | Knowledge graph construction method and device, storage medium and electronic equipment | |
JP5980520B2 (en) | Method and apparatus for efficiently processing a query | |
JP2013172709A (en) | Reference sequence processing system for base sequence analysis and method | |
JP2009059140A (en) | Electronic dictionary, retrieval method for electronic dictionary, and retrieval program for electronic dictionary | |
JP5586334B2 (en) | Character string input support device, character string input support method, and program | |
JP5560105B2 (en) | Character string selection device, character string selection method and program | |
WO2012015021A1 (en) | Stroke and structure input method and system | |
JP6653628B2 (en) | DNA sequence analyzer, DNA sequence analysis method, and DNA sequence analysis system | |
CN115700527A (en) | String similarity determination | |
JP2019148859A (en) | Device and method supporting discovery of design pattern in model development environment using flow diagram | |
Kociumaka et al. | Faster recovery of approximate periods over edit distance | |
JP6805206B2 (en) | Search word suggestion device, expression information creation method, and expression information creation program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20130319 |
|
RD02 | Notification of acceptance of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7422 Effective date: 20130515 |
|
RD04 | Notification of resignation of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7424 Effective date: 20130816 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20131203 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20131206 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20140124 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20140218 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20140421 |
|
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: 20140513 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20140609 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5560105 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
LAPS | Cancellation because of no payment of annual fees |