JP2023073104A - Matching device, matching method, program, and recording medium - Google Patents

Matching device, matching method, program, and recording medium Download PDF

Info

Publication number
JP2023073104A
JP2023073104A JP2021185939A JP2021185939A JP2023073104A JP 2023073104 A JP2023073104 A JP 2023073104A JP 2021185939 A JP2021185939 A JP 2021185939A JP 2021185939 A JP2021185939 A JP 2021185939A JP 2023073104 A JP2023073104 A JP 2023073104A
Authority
JP
Japan
Prior art keywords
matching
unit
information
result
search
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
Application number
JP2021185939A
Other languages
Japanese (ja)
Other versions
JP7134526B1 (en
Inventor
アントアン レクバン
Lecubin Antoine
ヴァギフ ハサノフ
Hasanov Vagif
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Cogent Labs
Cogent Labs Inc
Original Assignee
Cogent Labs
Cogent Labs Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Cogent Labs, Cogent Labs Inc filed Critical Cogent Labs
Priority to JP2021185939A priority Critical patent/JP7134526B1/en
Application granted granted Critical
Publication of JP7134526B1 publication Critical patent/JP7134526B1/en
Publication of JP2023073104A publication Critical patent/JP2023073104A/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Character Discrimination (AREA)
  • Image Analysis (AREA)

Abstract

To improve accuracy in a sequential pattern matching technique.SOLUTION: A matching device (1) comprises: an acquisition section (11) that acquires object information to be matched; a first matching section (12) that performs pattern matching for the object information by executing a search, which is aimed at each of a plurality of pieces of partial information included in the object information and in which the number of search paths is limited to a predetermined number or smaller number, using a state model corresponding to a regular expression; a second matching section (15) that performs pattern matching for the object information by executing a beam search aimed at each of the plurality of pieces of partial information included in the object information without using the state model corresponding to the regular expression; and a selection section (16) that outputs a matching result by the first matching section or a matching result by the second matching section.SELECTED DRAWING: Figure 11

Description

本発明は、対象情報とのマッチングを行うマッチング装置、マッチング方法、プログラム、及び記録媒体に関する。 The present invention relates to a matching device, a matching method, a program, and a recording medium that perform matching with target information.

従来、OCR(Optical Character Recognition)等のパターンマッチング技術では、複数の文字を逐次的に識別するために探索アルゴリズムが併用されている。一方、このような探索アルゴリズムの一例として、ビームサーチが知られている(例えば、非特許文献1)。ビームサーチでは、探索のステップごとに、確率が高い上位から所定の数の候補のみを残し、探索のステップを繰り返す。 Conventionally, in pattern matching techniques such as OCR (Optical Character Recognition), a search algorithm is also used to sequentially identify a plurality of characters. On the other hand, beam search is known as an example of such a search algorithm (for example, Non-Patent Document 1). In the beam search, only a predetermined number of candidates with the highest probability are left in each search step, and the search step is repeated.

“Towards End-To-End Speech Recognition with Recurrent Neural Networks,” Alex Graves, Navdeep Jaitly, Proceedings of the 31st International Conference on Machine Learning, PMLR 32(2); 1764-1772, 2014.“Towards End-To-End Speech Recognition with Recurrent Neural Networks,” Alex Graves, Navdeep Jaitly, Proceedings of the 31st International Conference on Machine Learning, PMLR 32(2); 1764-1772, 2014. “Regular expressions for decoding of neural network outputs,” Tobias Strauss et.al, arXiv:1509.04438v2, 2016.“Regular expressions for decoding of neural network outputs,” Tobias Strauss et.al, arXiv:1509.04438v2, 2016.

OCRのようなパターンマッチング技術において、ビームサーチを用いることにより、貪欲法(Greedy Search)等の探索アルゴリズムに比べて精度の向上を期待でき、また、しらみつぶし探索(Exhaustive Search)等の探索アルゴリズムに比べて探索時間の短縮を図ることができる。 By using beam search in pattern matching technology such as OCR, it is expected to improve accuracy compared to search algorithms such as greedy search. It is possible to shorten the search time compared to the conventional method.

しかしながら、ビームサーチを用いたとしても、文字の誤認識等に起因した精度の低下については改善の余地がある。この点に関し、非特許文献2では、正規表現に対応する非決定論的有限オートマトン(NFA: Nondeterministic Finite Automaton)を用いたビームサーチが提唱されている。しかしながら、認識対象の情報がどのようなタイプの情報であるのかに関する先験的な情報がない場合、非特許文献2の手法を用いたとしても、精度の向上を得ることは困難であるという問題がある。 However, even if the beam search is used, there is still room for improvement in terms of accuracy deterioration due to misrecognition of characters and the like. In this regard, Non-Patent Document 2 proposes a beam search using a nondeterministic finite automaton (NFA) corresponding to regular expressions. However, if there is no a priori information about the type of information to be recognized, even if the method of Non-Patent Document 2 is used, it is difficult to improve accuracy. There is

上記の課題を解決するために、本発明の一態様に係るマッチング装置は、マッチングの対象である対象情報を取得する取得部と、ある正規表現に対応する状態モデルを用いて、前記対象情報に含まれる複数の部分情報の各々を対象とするサーチであって、サーチ経路数を所定の数以下に制限したサーチを実行することによって、前記対象情報に対するパターンマッチングを行う第1のマッチング部と、正規表現に対応する状態モデルを用いることなく、前記対象情報に含まれる複数の部分情報の各々を対象とするビームサーチであって、サーチ経路数を所定の数に制限したビームサーチを実行することによって、前記対象情報に対するパターンマッチングを行う第2のマッチング部と、前記第1のマッチング部によるマッチング結果及び前記第2のマッチング部によるマッチング結果の何れかを、前記第1のマッチング部によるマッチング結果の確率情報と前記第2のマッチング部によるマッチング結果の確率情報とに応じて選択する選択部とを備えている。 In order to solve the above problems, a matching device according to an aspect of the present invention uses an acquisition unit that acquires target information to be matched, and a state model that corresponds to a certain regular expression. a first matching unit that performs pattern matching on the target information by executing a search that targets each of a plurality of included partial information and limits the number of search paths to a predetermined number or less; A beam search targeting each of a plurality of partial information included in the target information without using a state model corresponding to a regular expression, the beam search limiting the number of search paths to a predetermined number. a second matching unit that performs pattern matching with respect to the target information; and a selection unit that selects according to the probability information of the matching result from the second matching unit.

上記の課題を解決するために、本発明の一態様に係るマッチング方法は、マッチングの対象である対象情報を取得する取得ステップと、ある正規表現に対応する状態モデルを用いて、前記対象情報に含まれる複数の部分情報の各々を対象とするサーチであって、サーチ経路数を所定の数以下に制限したサーチを実行することによって、前記対象情報に対するパターンマッチングを行う第1のマッチングステップと、正規表現に対応する状態モデルを用いることなく、前記対象情報に含まれる複数の部分情報の各々を対象とするビームサーチであって、サーチ経路数を所定の数に制限したビームサーチを実行することによって、前記対象情報に対するパターンマッチングを行う第2のマッチングステップと、前記第1のマッチングステップによるマッチング結果及び前記第2のマッチングステップによるマッチング結果の何れかを、前記第1のマッチングステップによるマッチング結果の確率情報と前記第2のマッチングステップによるマッチング結果の確率情報とに応じて選択する選択ステップとを含んでいる。 In order to solve the above problems, a matching method according to an aspect of the present invention includes an acquisition step of acquiring target information to be matched; a first matching step of performing pattern matching on the target information by executing a search targeting each of a plurality of included partial information, the search limiting the number of search paths to a predetermined number or less; A beam search targeting each of a plurality of partial information included in the target information without using a state model corresponding to a regular expression, the beam search limiting the number of search paths to a predetermined number. a second matching step that performs pattern matching on the target information, and either the matching result of the first matching step or the matching result of the second matching step as the matching result of the first matching step and a selection step of selecting according to the probability information of the matching result of the second matching step.

本発明の一態様によれば、認識対象の情報がどのようなタイプの情報であるのかに関する先験的な情報がない場合であっても、精度の向上を得ることができる。 According to one aspect of the present invention, improved accuracy can be obtained even in the absence of a priori information about what type of information is to be recognized.

本発明の実施形態1に係るマッチング装置の構成を示すブロック図である。1 is a block diagram showing the configuration of a matching device according to Embodiment 1 of the present invention; FIG. 本発明の実施形態1に係るマッチング装置が参照する正規表現の例、及び状態モデルの例を示す図である。FIG. 4 is a diagram showing an example of a regular expression and an example of a state model referred to by the matching device according to Embodiment 1 of the present invention; 本発明の実施形態1に係るマッチング装置が実行するマッチング処理の流れを示すフロー図である。FIG. 4 is a flow chart showing the flow of matching processing executed by the matching device according to the first embodiment of the present invention; 本発明の実施形態1に係るマッチング部が取得する複数のマッチング候補と確率情報の例を示す図である。FIG. 5 is a diagram showing an example of a plurality of matching candidates and probability information acquired by the matching unit according to the first embodiment of the present invention; 比較例に係るビームサーチにおいて、各々のマッチング候補を用いて探索された、現在状態からの可能な遷移を説明する図である。FIG. 10 is a diagram illustrating possible transitions from the current state searched using each matching candidate in a beam search according to a comparative example; 図4に示した予測結果に重ね合わせて、図5に対応するサーチ経路を示した図である。6 is a diagram showing a search path corresponding to FIG. 5 superimposed on the prediction result shown in FIG. 4; FIG. 本発明の実施形態1に係るマッチング部が行うパターンマッチングに用いる状態モデルの例を示す図である。FIG. 5 is a diagram showing an example of a state model used for pattern matching performed by the matching unit according to the first embodiment of the present invention; 本発明の実施形態1に係るマッチング部によるパターンマッチング処理のサーチにおいて、各々のマッチング候補を用いて探索された、現在状態からの可能な遷移を説明する図である。FIG. 10 is a diagram illustrating possible transitions from the current state searched using each matching candidate in the search for pattern matching processing by the matching unit according to the first embodiment of the present invention; 図4に示した予測結果に重ね合わせて、図8に対応するサーチ経路を示した図である。FIG. 9 is a diagram showing a search path corresponding to FIG. 8 superimposed on the prediction result shown in FIG. 4; 本発明の実施形態1に係るマッチング装置による出力結果例を、比較例と共に示す図である。FIG. 5 is a diagram showing an output result example by the matching device according to the first embodiment of the present invention, together with a comparative example; 本発明の実施形態2に係るマッチング装置の構成を示すブロック図である。FIG. 7 is a block diagram showing the configuration of a matching device according to Embodiment 2 of the present invention; 本発明の実施形態2に係るマッチング装置によるマッチング結果の出力の一例を示す図である。FIG. 10 is a diagram showing an example of matching result output by the matching device according to the second embodiment of the present invention; 本発明の実施形態2に係るマッチング装置によるマッチング結果の出力の他の例を示す図である。FIG. 10 is a diagram showing another example of matching result output by the matching device according to the second embodiment of the present invention; 本発明の実施形態1に係るマッチング装置のハードウェア構成例を示すブロック図である。It is a block diagram which shows the hardware structural example of the matching apparatus which concerns on Embodiment 1 of this invention.

〔実施形態1〕
以下、本発明の一実施形態について、詳細に説明する。本実施形態に係るマッチング装置は、画像情報等の対象情報に対するマッチング処理を行い、マッチング結果を出力する。一例として、本実施形態に係るマッチング装置は、撮像装置によって撮像された画像データに含まれる文字列を識別するために用いることができるがこれは本実施形態を限定するものではない。
[Embodiment 1]
An embodiment of the present invention will be described in detail below. The matching device according to the present embodiment performs matching processing on target information such as image information, and outputs matching results. As an example, the matching device according to this embodiment can be used to identify a character string included in image data captured by an imaging device, but this is not a limitation of this embodiment.

(マッチング装置)
図1を参照してマッチング装置の構成について具体的に説明する。図1は、本実施形態に係るマッチング装置1の構成を示すブロック図である。図1に示すように、マッチング装置1は、制御部10、記憶部20、通信部30、及び入出力部40を備えている。
(matching device)
The configuration of the matching device will be specifically described with reference to FIG. FIG. 1 is a block diagram showing the configuration of a matching device 1 according to this embodiment. As shown in FIG. 1, the matching device 1 includes a control unit 10, a storage unit 20, a communication unit 30, and an input/output unit 40.

(記憶部)
まず、図1を参照して記憶部20に格納された各種データについて説明を行う。図1に示すように、記憶部20には、
・正規表現(Regular Expression)REGEX、及び、
・当該正規表現に対応する状態モデル(State Model)SM
が格納されている。ここで、正規表現REGEXは、後述する通信部30や入出力部40を介して、マッチング装置1の外部から取得されたものであってもよいし、通信部30や入出力部40を介して取得したユーザの指示に基づき、後述する生成部14によって生成されたものであってもよい。
(storage unit)
First, various data stored in the storage unit 20 will be described with reference to FIG. As shown in FIG. 1, the storage unit 20 contains
・Regular Expression REGEX, and
・State Model SM corresponding to the regular expression
is stored. Here, the regular expression REGEX may be obtained from outside the matching device 1 via the communication unit 30 and the input/output unit 40, which will be described later, or may be obtained via the communication unit 30 and the input/output unit 40. It may be generated by the generating unit 14, which will be described later, based on the acquired user's instruction.

正規表現REGEXは、1又は複数のリテラル文字(literal character)、及び1又は複数のメタ文字(meta-character)の少なくとも何れかを含んで構成される。ここで、リテラル文字(literal character)は、識別子によって表現する必要のない明示的な数値、文字、文字列等を指す。一方、メタ文字(meta-character)は、識別子によって表現され種々の意味を有する。一例として、メタ文字(meta-character)には、場所(位置)を表現するメタ文字、文字や文字グループを表現するメタ文字、エスケープを表現するメタ文字、繰り返しを表現するメタ文字、グループ化を表現するメタ文字等があるが、これは本実施形態を限定するものではない。 A regular expression REGEX includes at least one or more literal characters and/or one or more meta-characters. Here, literal characters refer to explicit numbers, characters, strings, etc. that need not be represented by identifiers. On the other hand, meta-characters are represented by identifiers and have various meanings. As an example, meta-characters include meta-characters that represent location (position), meta-characters that represent characters and groups of characters, meta-characters that represent escapes, meta-characters that represent repetition, and meta-characters that represent grouping. Although there are metacharacters and the like to express, this is not intended to limit the present embodiment.

図2の上段は、記憶部20に格納された正規表現REGEXの一例を示している。図2に示した正規表現REGEXは、
・リテラル文字「a」及び「b」
・グループ化を意味するメタ文字「()」
・択一的選択を意味するメタ文字「|」
・指定回数分の繰り返しを意味するメタ文字「{}」と指定回数を示すリテラル文字「2」
・0回以上の任意の繰り返しを意味するメタ文字「*」
を含んで構成されており、全体として、
・(1個のa、又は2個のb)の0回以上の繰り返し
を表現している。
The upper part of FIG. 2 shows an example of the regular expression REGEX stored in the storage unit 20. As shown in FIG. The regular expression REGEX shown in Figure 2 is
The literal letters 'a' and 'b'
・Meta character "()" that means grouping
・The meta character ``|'', which means an alternative choice
・The meta character “{}” that means the specified number of repetitions and the literal character “2” that indicates the specified number of times
・A meta character “*” that means any repetition of 0 or more times
and as a whole,
- It expresses 0 or more repetitions of (one a or two b).

一方、状態モデルSMは、複数の状態(state)と、状態間の遷移(transition)とを含むモデルであり、状態機械(State Machine)とも呼ばれる。状態モデルSMは、一例として、状態を表すノードと、状態間の遷移を示す有向リンクとを含んで構成される。状態モデルSMは、後述するマッチング部12によるマッチング処理において参照される。 On the other hand, the state model SM is a model including a plurality of states and transitions between states, and is also called a state machine. The state model SM includes, for example, nodes representing states and directed links representing transitions between states. The state model SM is referred to in matching processing by the matching unit 12, which will be described later.

任意の正規表現は、状態モデルとして表現することができる。換言すれば、ある対象の文字列が、ある正規表現に整合しているか否か(当該ある対象の文字列が当該ある正規表現として表現できるものであるか否か)を、当該正規表現に対応する状態モデルを用いて判別することができる。 Any regular expression can be represented as a state model. In other words, whether or not a certain target character string matches a certain regular expression (whether or not the certain target character string can be expressed as the certain regular expression) is determined by the corresponding regular expression. It can be determined using a state model that

状態モデルの一例として有限オートマトン(Finite Automaton)が挙げられるが、これは本実施形態を限定するものではない。また、有限オートマトンの例として、
・決定論的有限オートマトン(Deterministic Finite Automaton)
・非決定論的有限オートマトン(Non-deterministic Finite Automaton)
が挙げられるが、これは本実施形態を限定するものではない。有限オートマトンは、一例として、1又は複数の状態と1又は複数の遷移を記述するルールとを含むコンピュータプログラムによって表現可能である。
An example of a state model is a Finite Automaton, but this is not a limitation of this embodiment. Also, as an example of a finite automaton,
・Deterministic Finite Automaton
・Non-deterministic Finite Automaton
However, this does not limit the present embodiment. A finite automaton can be represented, by way of example, by a computer program containing one or more states and rules describing one or more transitions.

状態モデルSMは、後述する通信部30や入出力部40を介して、マッチング装置1の外部から取得されたものであってもよいし、通信部30や入出力部40を介して取得したユーザの指示に基づき、後述する生成部14によって生成されたものであってもよい。 The state model SM may be obtained from the outside of the matching device 1 via the communication unit 30 and the input/output unit 40, which will be described later, or may be obtained from the user may be generated by the generation unit 14, which will be described later, based on the instruction of .

本実施形態に係る状態モデルSMは、一例として、上述した正規表現に対応付けて生成されたものである。例えば、後述するマッチング部12によるマッチング処理に先駆けて、当該マッチング処理において用いられる正規表現REGEXに対応する状態モデルSMを、生成部14が予め生成し、記憶部20に格納しておくことができる。 As an example, the state model SM according to this embodiment is generated in association with the regular expression described above. For example, prior to matching processing by the matching unit 12, which will be described later, the generation unit 14 can generate in advance the state model SM corresponding to the regular expression REGEX used in the matching processing, and store it in the storage unit 20. .

図2の下段は、記憶部20に格納された状態モデルSMの一例を示している。図2の下段に示す状態モデルSMは、図2の上段に示す正規表現REGEXの例を表現する状態モデルである。 The lower part of FIG. 2 shows an example of the state model SM stored in the storage unit 20. As shown in FIG. The state model SM shown in the lower part of FIG. 2 is a state model expressing an example of the regular expression REGEX shown in the upper part of FIG.

図2に例示する状態モデルSMは、
・ノード「1」及び「2」
・ノード「1」からノード「2」へのリンク
・ノード「2」からノード「1」へのリンク、並びに
・ノード「1」から自身のノード「1」へのリンク
を含んで構成される。状態モデルSMに対して対象の文字列がノード「1」に入力され、当該文字列の1番目が「a」であればノード「1」に留まり、当該文字列の1番目が「b」であればノード「2」に遷移する。当該文字列の1番目が「a」又は「b」以外であれば当該文字列は拒絶(reject)される。また、ノード「2」の状態において、当該文字列の2番目が「b」であれば、ノード「1」に遷移する。
The state model SM illustrated in FIG.
・Nodes “1” and “2”
A link from node '1' to node '2', a link from node '2' to node '1', and a link from node '1' to its own node '1'. For the state model SM, the target character string is input to node "1", and if the first character string is "a", it stays at node "1", and the first character string is "b". If so, transition to node "2". If the first character in the string is anything other than "a" or "b", the string is rejected. Also, in the state of node “2”, if the second character string is “b”, the state is changed to node “1”.

このようにして、対象の文字列が、図2上段の正規表現REGEXを満たしている(当該対象文字列が当該正規表現REGEXによって表現できる)場合に、当該文字列はノード「1」の状態となる。これを、当該対象文字列が、状態モデルSMによって受理(accept)されたと表現することもある。 In this way, when the target character string satisfies the regular expression REGEX in the upper part of FIG. Become. This may also be expressed as that the subject character string has been accepted by the state model SM.

一方、対象文字列が、図2上段の正規表現REGEXを満たしていない(当該対象文字列が当該正規表現REGEXによって表現できない)場合に、当該文字列はノード「1」以外の状態となる。これを、当該対象文字列が、状態モデルSMによって拒絶(reject)されたと表現することもある。 On the other hand, when the target character string does not satisfy the regular expression REGEX in the upper part of FIG. 2 (the target character string cannot be expressed by the regular expression REGEX), the character string is in a state other than node "1". This is sometimes expressed as that the target character string is rejected by the state model SM.

記憶部20に格納された他のデータの説明に戻る。図1に示すように、記憶部20には、画像データIMGが格納されている。画像データIMGは一例として、1又は複数の文字を画角に含む画像データである。画像データIMGは、通信部30や入出力部40を介して、マッチング装置1の外部から取得されたものであってもよいし、マッチング装置1が備える図示しないカメラ(撮像装置)によって撮像されたものであってもよい。 Returning to the description of other data stored in the storage unit 20 . As shown in FIG. 1, the storage unit 20 stores image data IMG. The image data IMG is, for example, image data including one or more characters in the angle of view. The image data IMG may be acquired from the outside of the matching device 1 via the communication unit 30 or the input/output unit 40, or may be captured by a camera (imaging device) (not shown) included in the matching device 1. can be anything.

また、図1に示すように、記憶部20には、推論モデルPMも格納されている。より具体的には、記憶部20には、推論モデルPMを規定する各種のデータが格納されており、後述するマッチング部12は、これらのデータを参照して推論モデルPMを実行させる。推論モデルPMの具体的構成は本実施形態を限定するものではないが、一例として、推論モデルPMは、CNN(Convolutional Neural Network)を用いて構成することができるが、これは本実施形態を限定するものではない。推論モデルPMは、CNNとRNN(Recurrent Neural Network)とを組み合わせることによって構成してもよいし、その他のDNN(Deep Neural Network)を用いてもよい。 In addition, as shown in FIG. 1, the storage unit 20 also stores an inference model PM. More specifically, the storage unit 20 stores various data defining the inference model PM, and the later-described matching unit 12 refers to these data to execute the inference model PM. Although the specific configuration of the inference model PM does not limit this embodiment, as an example, the inference model PM can be configured using a CNN (Convolutional Neural Network), which limits this embodiment. not something to do. The inference model PM may be configured by combining a CNN and an RNN (Recurrent Neural Network), or may use another DNN (Deep Neural Network).

また、図1に示すように、記憶部20には、マッチング部12によるマッチング処理の結果を示すパターンマッチ結果PMRも格納されている。画像データIMGが1又は複数の文字を画角に含む画像データである場合、当該画像データIMGに対するマッチング部12によるパターンマッチングの結果を示すパターンマッチ結果PMRは、一例として文字列(string)である。パターンマッチ結果PMRは、通信部30や入出力部40を介して、マッチング装置1の外部に出力される。 Further, as shown in FIG. 1, the storage unit 20 also stores a pattern matching result PMR indicating the result of matching processing by the matching unit 12 . When the image data IMG is image data including one or more characters in the angle of view, the pattern matching result PMR indicating the result of pattern matching by the matching unit 12 for the image data IMG is, for example, a string. . The pattern matching result PMR is output outside the matching device 1 via the communication unit 30 and the input/output unit 40 .

(通信部)
通信部30は、マッチング装置1の外部の装置と通信を行う。通信部30は、制御部10から供給されたデータを外部の装置に送信したり、外部の装置から受信したデータを制御部10に供給したりする。
(communication department)
The communication unit 30 communicates with devices external to the matching device 1 . The communication unit 30 transmits data supplied from the control unit 10 to an external device, and supplies data received from an external device to the control unit 10 .

(入出力部)
入出力部40は、マッチング装置1の外部からデータを受け付けたり、マッチング装置1の外部にデータを出力したりする。一例として、入出力部40は、カメラ又はスキャナを備え、当該カメラ又はスキャナで取得した画像を、制御部10に供給する。ここで、当該画像には、上述した画像データIMGが含まれ得る。他の例として、入出力部40はキーボードやタッチパッド等の入力デバイスを備え、これらの入力デバイスを介してデータの入力を受け付ける。そして受け付けたデータを制御部10に供給する。また、一例として、入出力部40は、表示パネルを備え、制御部10から供給されたデータを当該表示パネルを介して表示する。表示パネルが表示するデータには、マッチング部12によるマッチング結果が含まれ得る。
(input/output unit)
The input/output unit 40 receives data from outside the matching device 1 and outputs data to the outside of the matching device 1 . As an example, the input/output unit 40 includes a camera or scanner, and supplies an image acquired by the camera or scanner to the control unit 10 . Here, the image may include the image data IMG described above. As another example, the input/output unit 40 includes input devices such as a keyboard and a touch pad, and receives data input via these input devices. Then, it supplies the received data to the control unit 10 . Further, as an example, the input/output unit 40 includes a display panel, and displays data supplied from the control unit 10 via the display panel. The data displayed by the display panel may include the matching result by the matching unit 12 .

(制御部)
続いて、図1を参照して、マッチング装置1が備える制御部10の構成について説明する。図1に示すように、制御部10は、取得部11、マッチング部12、選択部13、及び生成部14を備えている。
(control part)
Next, the configuration of the control unit 10 included in the matching device 1 will be described with reference to FIG. As shown in FIG. 1, the control unit 10 includes an acquisition unit 11, a matching unit 12, a selection unit 13, and a generation unit .

(取得部)
取得部11は、マッチングの対象である対象情報を取得する。ここで、対象情報は、一例として、1又は複数の文字やパターンを画角に含む画像情報である。一例として、対象情報は、1又は複数の文字やパターンを画角に含む1枚の画像を含んでもよいし、1又は複数の文字やパターンを画角に含む複数枚の画像を含んでもよい。上述した画像データIMGは、対象情報の一例である。ただし、これらの例は、本実施形態を限定するものではない。
(acquisition part)
The acquisition unit 11 acquires target information to be matched. Here, the target information is, for example, image information including one or more characters or patterns in the angle of view. As an example, the target information may include one image including one or more characters or patterns in the angle of view, or may include multiple images including one or more characters or patterns in the angle of view. The image data IMG described above is an example of target information. However, these examples do not limit this embodiment.

(マッチング部)
マッチング部12は、対象情報に対するパターンマッチング処理を実行する。より具体的には、マッチング部12は、ある正規表現に対応する状態モデルを用いて、画像データIMGに含まれる複数の部分情報の各々を対象とするサーチであって、であって、サーチ経路数を所定の数以下に制限したサーチを実行することによって、前記対象情報に対するパターンマッチングを行う。マッチング部12のことを第1のマッチング部と呼ぶこともある。また、本実施形態において、サーチ経路のことを単に経路とも呼ぶ。
(Matching part)
The matching unit 12 executes pattern matching processing on target information. More specifically, the matching unit 12 uses a state model corresponding to a certain regular expression to search each of a plurality of pieces of partial information included in the image data IMG, comprising: Pattern matching is performed on the target information by executing a search limited to a predetermined number or less. The matching section 12 is sometimes called a first matching section. In addition, in this embodiment, the search route is also simply referred to as a route.

ここで、マッチング部12は、一例として、上述した正規表現REGEXに対応する状態モデルSMを用いることができる。 Here, the matching unit 12 can use, as an example, the state model SM corresponding to the regular expression REGEX described above.

また、画像データIMGに含まれる複数の部分情報は、一例として、画像データIMGを複数の部分に分割して得られる部分画像である。例えば、マッチング部12は、画像データIMGを、所定の画素幅の部分画像に分割し、当該部分画像毎にマッチング候補を予測する構成とすることができる。ここで、所定の画素幅は、一例として、4画素(4 pixels)であるが、これは本実施形態を限定するものではない。所定の画素幅は、例えば、6画素(6 pixels)であってもよいし、8画素(8 pixels)であってもよいし、他の画素幅であってもよい。また、マッチング部12による部分画像毎のマッチング候補の予測は、一例として、上述した推論モデルPMによって実行することができる。 Also, the plurality of pieces of partial information included in the image data IMG are, for example, partial images obtained by dividing the image data IMG into a plurality of pieces. For example, the matching unit 12 may divide the image data IMG into partial images each having a predetermined pixel width, and predict a matching candidate for each partial image. Here, the predetermined pixel width is 4 pixels as an example, but this does not limit the present embodiment. The predetermined pixel width may be, for example, 6 pixels, 8 pixels, or another pixel width. Also, the prediction of the matching candidate for each partial image by the matching unit 12 can be executed by the inference model PM described above, as an example.

より具体的に言えば、マッチング部12において、推論モデルPMは、画像データIMGに含まれる所定の画素幅の部分画像毎に、画像データIMGに含まれる文字(character)を予測し、予測結果を表す複数のマッチング候補を、各々のマッチング候補の確率情報と共に出力する。 More specifically, in the matching unit 12, the inference model PM predicts a character included in the image data IMG for each partial image of a predetermined pixel width included in the image data IMG, and outputs the prediction result. The plurality of matching candidates represented is output along with probability information for each matching candidate.

また、上述したように、マッチング部12は画像データIMGに含まれる複数の部分画像の各々を対象とするサーチであって、であって、サーチ経路数を所定の数以下に制限したサーチを実行する。ここで、当該サーチは、推論モデルPMが部分画像に対するマッチング候補を出力する度に、
(1)確率情報の示す確率が高い順にK個のマッチング候補を選択し
(2)選択した複数のマッチング候補を、前回までのサーチ経路に追加することによって1又は複数のサーチ経路を生成し、
(3)生成した1又は複数のサーチ経路のうち、上位N番目までのサーチ経路を残し、他の経路を排除する
という処理を行う。
In addition, as described above, the matching unit 12 executes a search targeting each of the plurality of partial images included in the image data IMG, in which the number of search paths is limited to a predetermined number or less. do. Here, each time the inference model PM outputs a matching candidate for a partial image,
(1) selecting K matching candidates in descending order of probability indicated by the probability information; (2) generating one or more search paths by adding the selected plurality of matching candidates to the previous search paths;
(3) Among one or more generated search paths, a process of leaving the top N-th search paths and excluding other paths is performed.

ここで、マッチング部12は、上記(1)から(3)の各処理に加え、状態モデルSMを参照した選択処理を適用することによって、状態モデルSMに整合しないマッチング候補を排除する処理を行う。一例として、マッチング部12は、上記(1)の処理の前に、推論モデルPMが出力した複数のマッチング候補に対して、状態モデルSMを参照した選択処理を適用することによって、状態モデルSMに整合しないマッチング候補を排除するフィルタ処理を行う。そして、マッチング部12は、当該フィルタ処理後のマッチング候補に対して、上記(2)及び(3)の処理を実行する。 Here, in addition to the processes (1) to (3) above, the matching unit 12 applies a selection process with reference to the state model SM to eliminate matching candidates that do not match the state model SM. . As an example, the matching unit 12 applies selection processing with reference to the state model SM to a plurality of matching candidates output by the inference model PM before the processing of (1) above. Perform a filtering process that eliminates matching candidates that do not match. Then, the matching unit 12 performs the processes (2) and (3) above on the matching candidates after the filtering process.

このように、マッチング部12は、上述した複数のマッチング候補に対して、状態モデルSMを参照した選択処理を適用することによって、状態モデルSMに整合しないマッチング候補を排除すると共に、遷移経路の数を所定のビーム幅以下に制限しつつ、次の部分画像のマッチング処理に進む。マッチング部12は、このような処理を行うことによって、状態モデルを用いたビームサーチを実行する。そして、マッチング部12は、このような状態モデルを用いたビームサーチを実行することによって、画像データIMGに対するパターンマッチングを行う。 In this way, the matching unit 12 applies the selection process with reference to the state model SM to the plurality of matching candidates described above, thereby eliminating matching candidates that do not match the state model SM and increasing the number of transition paths. is limited to a predetermined beam width or less, the process proceeds to matching processing for the next partial image. The matching unit 12 executes beam search using the state model by performing such processing. The matching unit 12 performs pattern matching on the image data IMG by executing beam search using such a state model.

マッチング部12は、パターンマッチングの結果を、パターンマッチ結果PMRとして出力し、出力したパターンマッチ結果PMRは、一例として記憶部20に格納される。 The matching unit 12 outputs the result of pattern matching as a pattern matching result PMR, and the output pattern matching result PMR is stored in the storage unit 20 as an example.

(選択部)
選択部13(状態モデル選択部13)は、記憶部20に格納されている状態モデルSMの中から、マッチング部12によるパターンマッチに用いられる状態モデルSMを選択する。選択部13は、一例として、入出力部40が受け付けたコンテンツタイプ情報に基づいて、個々の正規表現に個別に対応する複数の状態モデルから、パターンマッチングに用いる状態モデルを選択する。
(Selection part)
The selection unit 13 (state model selection unit 13 ) selects a state model SM to be used for pattern matching by the matching unit 12 from the state models SM stored in the storage unit 20 . As an example, the selection unit 13 selects a state model to be used for pattern matching from a plurality of state models individually corresponding to individual regular expressions based on the content type information received by the input/output unit 40 .

マッチング装置1が、特定の1つの状態モデルSMのみを用いる場合には、選択部13は必須ではない。なお、複数の状態モデルSMには、一例として、
・日付(年、月、日等を含む)に関するパターンマッチに適した正規表現に対応する状態モデル
・住所(都道府県、市、町、番地等を含む)に関するパターンマッチに適した正規表現に対応する状態モデル
・電話番号に関するパターンマッチに適した正規表現に対応する状態モデル
・E-mailアドレスに関するパターンマッチに適した正規表現に対応する状態モデル
・金融的な値(価格や各種の指数など)に関するパターンマッチに適した正規表現に対応する状態モデル
のように、マッチング対象の種類に応じて、予め用意しておくことができる。
If the matching device 1 uses only one specific state model SM, the selector 13 is not essential. As an example, the multiple state models SM include
・State model that supports regular expressions suitable for pattern matching on dates (including year, month, day, etc.) ・Supports regular expressions suitable for pattern matching on addresses (including prefectures, cities, towns, addresses, etc.)・State model that supports regular expressions suitable for pattern matching on phone numbers ・State model that supports regular expressions suitable for pattern matching on e-mail addresses ・Financial values (price, various indices, etc.) It can be prepared in advance according to the type of matching target, such as a state model corresponding to a regular expression suitable for pattern matching.

(生成部)
生成部14は、記憶部20に格納された正規表現REGEXから、当該正規表現に対応する状態モデルSMを生成する。生成部14は、有限オートマトンとしての状態モデルSMを、一例としてコンピュータプログラムの形式で生成することができる。ただしこれは本実施形態を限定するものではなく、状態モデルSMは、ルールやパラメータの集合であってコンピュータが参照可能な形式として生成されてもよい。
(generator)
The generation unit 14 generates the state model SM corresponding to the regular expression REGEX stored in the storage unit 20 from the regular expression REGEX. The generator 14 can generate the state model SM as a finite automaton in the form of a computer program, for example. However, this does not limit the present embodiment, and the state model SM may be a set of rules and parameters and may be generated in a form that can be referred to by a computer.

生成部14は、一例として、記憶部20に格納された正規表現REGEXから、当該正規表現に対応する非決定論的有限オートマトンを生成し、当該非決定論的有限オートマトンに基づいて、決定論的有限オートマトンを生成してもよい。 For example, the generating unit 14 generates a non-deterministic finite automaton corresponding to the regular expression REGEX stored in the storage unit 20, and generates a deterministic finite automaton based on the non-deterministic finite automaton. may be generated.

上述したマッチング部12が行うパターンマッチングに用いる状態モデルSMとしては、非決定論的有限オートマトンよりも、決定論的有限オートマトンを用いることが好ましい。これは、決定論的有限オートマトンは、受理又は拒絶の処理を、非決定論的有限オートマトンよりも迅速に行うことができるためである。 A deterministic finite automaton is preferably used rather than a non-deterministic finite automaton as the state model SM used for pattern matching performed by the matching unit 12 described above. This is because deterministic finite automata can process acceptance or rejection faster than non-deterministic finite automata.

なお、状態モデルSMは人間によって作成されたものを記憶部20に格納する構成としてもよい。そのような構成の場合、生成部14は必須ではない。 Note that the state model SM may be configured to be created by a human and stored in the storage unit 20 . In such a configuration, the generator 14 is not essential.

(パターンマッチング処理の流れ)
続いて、マッチング装置1によるパターンマッチング処理の流れについて図3を参照して説明する。図3は、マッチング装置1によるパターンマッチング処理の流れを示すフローチャートである。
(Flow of pattern matching processing)
Next, the flow of pattern matching processing by the matching device 1 will be described with reference to FIG. FIG. 3 is a flow chart showing the flow of pattern matching processing by the matching device 1. As shown in FIG.

(ステップS101)
まず、ステップS101において、取得部11は対象情報を取得する。上述したように、一例として、取得部11は対象情報として画像データIMGを取得する。
(Step S101)
First, in step S101, the acquisition unit 11 acquires target information. As described above, for example, the acquiring unit 11 acquires the image data IMG as the target information.

(ステップS102)
ステップS102は、対象情報に含まれる複数の部分情報に関する処理のループの始端である。上述したように、一例として、部分情報は、画像データIMGに含まれる所定の画素幅の部分画像である。部分情報に関するループを、一例として、ループ変数n(nは0からN-1(Nは画像データIMGに含まれる部分画像の総数)までの自然数)によって表現している。
(Step S102)
Step S102 is the beginning of a processing loop for a plurality of pieces of partial information included in target information. As described above, as an example, the partial information is a partial image with a predetermined pixel width included in the image data IMG. A loop related to partial information is expressed by a loop variable n (n is a natural number from 0 to N-1 (N is the total number of partial images included in the image data IMG)), as an example.

(ステップS103)
続いて、ステップS103において、マッチング部12は、部分情報Inを参照した推論モデルPMによって画像データIMGに含まれる文字(character)を予測し、予測結果を表す複数のマッチング候補を、各々のマッチング候補の確率情報と共に取得する。
(Step S103)
Subsequently, in step S103, the matching unit 12 predicts a character included in the image data IMG by the inference model PM referring to the partial information In, and selects a plurality of matching candidates representing the prediction result as each matching candidate. Acquired with the probability information of

(ステップS104)
続いて、ステップS104において、マッチング部12は、ステップS103において取得した各々のマッチング候補を用いて、現在状態からの可能な遷移を取得する。ここで、現在状態とは、ループ変数n-1までの処理によって定まる状態のことを指し、一例として、状態モデルSMにおける現在状態のことを指し、現在状態からの可能な遷移とは、一例として、状態モデルSMにおいて現在状態からの可能な遷移のことを指す。或いは、ループ変数n-1までの各処理に対応する遷移を表現する遷移図において、選択可能な状態として残存している1又は複数の経路のことを現在状態と呼ぶこともできる。
(Step S104)
Subsequently, in step S104, the matching unit 12 obtains possible transitions from the current state using each matching candidate obtained in step S103. Here, the current state refers to the state determined by the processing up to the loop variable n-1, and as an example, refers to the current state in the state model SM. , refers to possible transitions from the current state in the state model SM. Alternatively, one or a plurality of paths remaining as selectable states in a transition diagram representing transitions corresponding to each process up to the loop variable n-1 can also be referred to as the current state.

(ステップS105)
続いて、ステップS105において、マッチング部12は、ステップS104において取得した各々の前記可能な遷移が、状態モデルSMと整合しているかを確認する。換言すれば、各々のマッチング候補が、状態モデルSMと整合しているかを確認する。ここで、前記可能な遷移(又はそれに対応するマッチング候補)が状態モデルSMに整合している場合には、当該遷移(又はそれに対応するマッチング候補)は、状態モデルSMによって受理され、そうでない場合に拒絶される。
(Step S105)
Subsequently, in step S105, the matching unit 12 checks whether each of the possible transitions obtained in step S104 matches the state model SM. In other words, each matching candidate is checked for consistency with the state model SM. where if said possible transition (or its corresponding candidate match) is consistent with the state model SM, then said transition (or its corresponding candidate match) is accepted by the state model SM; rejected by

(ステップS106)
続いて、ステップS106において、マッチング部12は、状態モデルSMに整合しない遷移(又はそれに対応するマッチング候補)、換言すれば状態モデルSMによって拒絶された遷移(又はそれに対応するマッチング候補)を排除し、以降の処理では考慮しない。
(Step S106)
Subsequently, in step S106, the matching unit 12 eliminates transitions (or matching candidates corresponding thereto) that do not match the state model SM, in other words, transitions that are rejected by the state model SM (or matching candidates corresponding thereto). , is not considered in subsequent processing.

(ステップS107)
続いて、ステップS107において、マッチング部12は、ステップS106において排除されなかったマッチング候補から、K個のマッチング候補を選択する。一例として、確率が高いK番目までのマッチング候補を選択する。
(Step S107)
Subsequently, in step S107, the matching unit 12 selects K matching candidates from the matching candidates that were not eliminated in step S106. As an example, matching candidates up to the Kth with the highest probability are selected.

(ステップS108)
続いて、ステップS108において、マッチング部12は、ステップS107において選択されたマッチング候補を用いて経路を更新する。
(Step S108)
Subsequently, in step S108, the matching unit 12 updates the route using the matching candidate selected in step S107.

(ステップS109)
続いて、ステップS109において、マッチング部12は、ステップS108において選択された経路のうち、上記N番目までの経路を残し、それ以外の経路を排除する。排除された経路は、以降の処理では考慮されない。
(Step S109)
Subsequently, in step S109, the matching unit 12 leaves the routes up to the N-th route selected in step S108, and excludes the other routes. Excluded paths are not considered in further processing.

(ステップS110)
続いて、ステップS110において、マッチング部12は、ループ変数nをn+1にインクリメントする。
(Step S110)
Subsequently, in step S110, the matching unit 12 increments the loop variable n to n+1.

(ステップS111)
ステップS111は、対象情報に含まれる複数の部分情報に関する処理のループの終端である。
(Step S111)
Step S111 is the end of the processing loop for a plurality of pieces of partial information included in the target information.

(ステップS112)
対象情報に含まれる複数の部分情報の全てについて上述した処理が終了した後、ステップS112において、マッチング部12は、最も確率の高い経路に対応するマッチング結果を出力する。
(Step S112)
After completing the above-described processing for all of the plurality of pieces of partial information included in the target information, in step S112, the matching unit 12 outputs the matching result corresponding to the route with the highest probability.

以上のように、マッチング装置1によるパターンマッチング処理は、対象情報に含まれるある部分情報に対するマッチング処理として、
前記ある部分情報に対する1又は複数のマッチング候補と、各マッチング候補の確率情報とを取得する処理(ステップS103)と、
前記1又は複数のマッチング候補のうち、前記状態モデルに整合しないマッチング候補を除外する第1の選択処理(ステップS106)と、
前記確率情報を参照して、前記第1の選択処理後のマッチング候補から、前記所定の数以下のマッチング候補を選択する第2の選択処理(ステップS107)と、を含んでいる。
As described above, the pattern matching processing by the matching device 1 is performed as matching processing for certain partial information included in the target information.
a process of acquiring one or more matching candidates for the certain partial information and probability information of each matching candidate (step S103);
a first selection process (step S106) for excluding matching candidates that do not match the state model from among the one or more matching candidates;
and a second selection process (step S107) for selecting matching candidates equal to or less than the predetermined number from the matching candidates after the first selection process by referring to the probability information.

(マッチング部12の処理による状態の遷移例)
以下では、マッチング部12の処理による状態の遷移例について説明する。以下の説明では、撮像装置によって撮像された画像データに含まれる文字列が「1年2月8日」であった場合を例に挙げて説明する。換言すれば、上述したステップS101において、取得部11が、「1年2月8日」との文字列が撮像された画像データIMGを対象情報として取得した場合を例に挙げて説明する。
(Example of state transition by processing of matching unit 12)
An example of state transition by the processing of the matching unit 12 will be described below. In the following description, the case where the character string included in the image data captured by the imaging device is "1st year February 8" will be described as an example. In other words, in step S101 described above, a case where the acquisition unit 11 acquires the image data IMG in which the character string "February 8, 1st year" is imaged as the target information will be described as an example.

上記のような例では、対象情報に含まれる複数の部分情報In(n=0~5)は、それぞれ「1」、「年」、「2」、「月」、「8」、および「日」に対応する6個の部分画像となる。 In the above example, the multiple pieces of partial information In (n=0 to 5) included in the target information are "1", "year", "2", "month", "8", and "day". , six partial images corresponding to .

上述したように、ステップS103において、マッチング部12は、部分情報Inを参照した推論モデルPMによって画像データIMGに含まれる文字(character)を予測し、予測結果を表す複数のマッチング候補を、各々のマッチング候補の確率情報と共に取得する。これにより、例えば、図4に示される情報が取得されることになる。 As described above, in step S103, the matching unit 12 predicts characters included in the image data IMG by the inference model PM that refers to the partial information In, and selects a plurality of matching candidates representing the prediction results from each Acquired together with probability information of matching candidates. As a result, for example, the information shown in FIG. 4 is acquired.

図4は、マッチング部12が取得する複数のマッチング候補と確率情報の例を示す図である。 FIG. 4 is a diagram showing an example of a plurality of matching candidates and probability information acquired by the matching unit 12. As shown in FIG.

図4の例では、部分情報I0~部分情報I5が、Slice0~Slice5として表されている。また、部分情報I0~部分情報I5のマッチング候補として、Characters「1」、「2」、「3」、・・・「月」、「日」、・・・が示されている。 In the example of FIG. 4, the partial information I0 to I5 are represented as Slice0 to Slice5. Also, Characters “1”, “2”, “3”, . . . “Month”, “Day”, .

そして、図4においては、各Sliceに対応する列と各Charactersに対応する行とにより、各部分情報に対する予測結果としての各マッチング候補の確率情報が示されている。ここで、各マッチング候補の確率情報は、部分情報毎に、値の大きい順に上位3つが選択される。図4において、この上位3つの確率情報は、それぞれ異なるハッチングを付して示されている。 In FIG. 4, the columns corresponding to each Slice and the rows corresponding to each Characters indicate the probability information of each matching candidate as the prediction result for each piece of partial information. Here, for each piece of partial information, the top three probability information items of each matching candidate are selected in descending order of value. In FIG. 4, the top three pieces of probability information are shown with different hatching.

次に、マッチング部12の処理により得られるサーチ経路とマッチング結果の例について、より具体的に説明する。 Next, examples of search paths and matching results obtained by the processing of the matching unit 12 will be described more specifically.

(比較例に係る処理)
まず、比較のため、従来のビームサーチによる遷移を、比較例として先に説明する。
(Processing according to comparative example)
First, for comparison, the transition by the conventional beam search will be described as a comparative example.

図5は、従来のビームサーチにおいて、各々のマッチング候補を用いて探索された、現在状態からの可能な遷移を説明する図である。この例において、維持すべきビームの数Nは、2であり、遷移先として考慮されるマッチング候補(Considered characters)の数Kは3である。 FIG. 5 is a diagram illustrating possible transitions from the current state searched using each matching candidate in the conventional beam search. In this example, the number N of beams to maintain is two and the number K of matching characters considered for transition destinations is three.

すなわち、部分情報I0~部分情報I5のそれぞれに対するビームサーチにおいて、確率が高い3番目までのマッチング候補が選択され、選択されたマッチング候補を用いてビームサーチの経路が更新される。このとき、ビームサーチの経路のうち、上位2番目までの経路を残し、それ以外の経路が排除され、排除された経路は、以降の処理では考慮されない。 That is, in the beam search for each of the partial information I0 to the partial information I5, matching candidates up to the third with the highest probability are selected, and the beam search path is updated using the selected matching candidates. At this time, among the paths of the beam search, the paths up to the second highest are left, the other paths are excluded, and the excluded paths are not considered in the subsequent processing.

いまの場合、部分情報I0~部分情報I5のそれぞれに対するビームサーチに伴って状態が遷移する。このため、図5においては、部分情報I0に対応する状態がStep0で示され、部分情報I1に対応する状態がStep1で示され、部分情報I2に対応する状態がStep2で示され、・・・部分情報I5に対応する状態がStep5で示されている。 In this case, the state transitions with the beam search for each of the partial information I0 to I5. Therefore, in FIG. 5, Step 0 indicates the state corresponding to the partial information I0, Step 1 indicates the state corresponding to the partial information I1, Step 2 indicates the state corresponding to the partial information I2, and so on. A state corresponding to the partial information I5 is shown in Step5.

また、図5において、Considered charactersは、確率が高いK番目までのマッチング候補であり、例えば、Step0では、「/」、「1」、および「l」の3つのマッチング候補がConsidered charactersとして特定されている。 Also, in FIG. 5, the Considered characters are matching candidates up to K-th with high probability. ing.

さらに、図5においては、上位2番目までの経路がBeam 1とBeam 2で表されている。経路Beam 1での現在状態に対応するマッチング候補は、Beam 1 charactersで示されており、経路Beam 2での現在状態に対応するマッチング候補は、Beam 2 charactersで示されている。 Furthermore, in FIG. 5, the paths up to the top two are represented by Beam 1 and Beam 2. In FIG. Matching candidates corresponding to the current state of path Beam 1 are indicated by Beam 1 characters, and matching candidates corresponding to the current state of path Beam 2 are indicated by Beam 2 characters.

また、図5においては、Beam 1 charactersで示されたマッチング候補の確率情報がBeam 1 probabilityで示され、Beam 2 charactersで示されたマッチング候補の確率情報がBeam 1 probabilityで示されている。 In FIG. 5, the matching candidate probability information indicated by Beam 1 characters is indicated by Beam 1 probability, and the matching candidate probability information indicated by Beam 2 characters is indicated by Beam 1 probability.

図5とともに図6を参照してさらに詳細に説明する。図6は、図4に示した予測結果に重ね合わせて、図5に対応するサーチ経路を示した図である。図6においては、上位2番目までの経路Beam 1と経路Beam 2が、それぞれ直線の矢印と一点鎖線の矢印によって示されている。 Further details will be described with reference to FIG. 6 in conjunction with FIG. FIG. 6 is a diagram showing search paths corresponding to FIG. 5 superimposed on the prediction result shown in FIG. In FIG. 6, the path Beam 1 and path Beam 2 up to the second highest are indicated by straight arrows and dashed-dotted line arrows, respectively.

ここで、経路Beam 1および経路Beam 2は、それぞれBest beamおよび2nd best beamとも称される。また、図6において、排除された経路は、Considered expansionと称され、破線の矢印で示されている。 Here, path Beam 1 and path Beam 2 are also referred to as Best beam and 2nd best beam, respectively. Also, in FIG. 6, excluded pathways are called Considered expansion and indicated by dashed arrows.

図6において、Step0(Slice0)では、確率情報が参照され、「/」がBest beamとなり、「1」(数字の1)が2nd best beamとなる。一方、「l」(アルファベットのl)は、3つのマッチング候補の中で確率情報の値が最も低いので、Considered expansionとなり、排除される。 In FIG. 6, in Step 0 (Slice 0), the probability information is referenced, "/" is the best beam, and "1" (number 1) is the 2nd best beam. On the other hand, "l" (alphabet l) has the lowest probability information value among the three matching candidates, so it is considered expansion and is eliminated.

Step1(Slice1)では、「/」および「1」のそれぞれを現在状態として、ビームサーチが実行される。Step1(Slice1)のConsidered charactersは、「年」、「月」、および「日」なので、「/」から「年」への経路、「/」から「月」への経路、「/」から「日」への経路、「1」から「年」への経路、「1」から「月」への経路、および「1」から「日」への経路があり得る。 In Step 1 (Slice 1), beam search is executed with each of "/" and "1" as the current state. Considered characters in Step1 (Slice1) are "year", "month", and "day", so the path from "/" to "year", the path from "/" to "month", the path from "/" to " There can be a path to day, a path from '1' to 'year', a path from '1' to 'month', and a path from '1' to 'day'.

「/」から「年」への経路に対応する確率は、0.32(=0.4×0.8)、「/」から「月」への経路に対応する確率は、0.04(=0.4×0.1)、「/」から「日」への経路に対応する確率は、0.02(=0.4×0.05)である。また、「1」から「年」への経路に対応する確率は、0.24(=0.3×0.8)であり、「1」から「月」への経路に対応する確率は、0.03(=0.3×0.1)であり、「1」から「月」への経路に対応する確率は、0.015(=0.3×0.05)である。 The probability corresponding to the route from "/" to "year" is 0.32 (=0.4×0.8), the probability corresponding to the route from "/" to "month" is 0.04 (=0.4×0.1), "/ ” to “日” is 0.02 (=0.4×0.05). The probability corresponding to the route from "1" to "year" is 0.24 (=0.3×0.8), and the probability corresponding to the route from "1" to "month" is 0.03 (=0.3×0.1 ), and the probability corresponding to the path from “1” to “moon” is 0.015 (=0.3×0.05).

上記に説明した6本の経路のうち、上位2番目までの経路は、「/」から「年」への経路および「1」から「月」への経路である。従って、Step1(Slice1)でのBest beamは、「/」から「年」への経路となり、2nd best beamは、「1」から「年」への経路になり、それ以外の経路は排除される。 Among the six paths described above, the top two paths are the path from "/" to "year" and the path from "1" to "month". Therefore, the best beam in Step1 (Slice1) is the path from "/" to "year", the 2nd best beam is the path from "1" to "year", and other paths are excluded. .

同様に、Step2(Slice2)では、「/」、「年」、「2」の経路がBest beamになり、「1」、「年」、「2」の経路が2nd best beamとなる。 Similarly, in Step 2 (Slice 2), the path of '/', 'year', and '2' is the best beam, and the path of '1', 'year', and '2' is the 2nd best beam.

このような処理が、Step5(Slice5)まで繰り返されることにより、対象情報「1年2月8日」の予測結果としてのBest beamと2nd best beamが得られることになる。この例では、Best beamは、「/」、「年」、「2」、「月」、「8」、「8」の経路になり、2nd best beamは、「/」、「年」、「2」、「月」、「8」、「日」の経路になる。ここで、Best beamの確率(Beam 1 probability)は、0.09216であり、2nd best beamの確率(Beam 2 probability)は、0.073728となる。 By repeating such processing up to Step 5 (Slice 5), the best beam and the 2nd best beam as the prediction results of the target information "February 8, 1st year" are obtained. In this example, the best beam is the path of '/', 'year', '2', 'month', '8', '8', and the 2nd best beam is the path of '/', 'year', ' 2", "month", "8", "day". Here, the probability of the best beam (Beam 1 probability) is 0.09216, and the probability of the 2nd best beam (Beam 2 probability) is 0.073728.

(本実施形態に係る処理例)
次に、本実施形態のマッチング装置1によるパターンマッチング処理による状態の遷移について、より具体的に説明する。
(Example of processing according to the present embodiment)
Next, a more specific description will be given of the state transition by the pattern matching processing by the matching device 1 of the present embodiment.

図7は、マッチング部12が行うパターンマッチングに用いる状態モデルSMの例を示す図である。図7は、日付(年、月、日等を含む)に関するパターンマッチに適した正規表現に対応する状態モデルである。図7に示す状態モデルは、一例として、複数の状態モデルの中から、選択部13によって選択されたものである。 FIG. 7 is a diagram showing an example of the state model SM used for pattern matching performed by the matching unit 12. As shown in FIG. FIG. 7 is a state model corresponding to regular expressions suitable for pattern matching on dates (including year, month, day, etc.). The state model shown in FIG. 7 is selected by the selection unit 13 from among a plurality of state models, as an example.

図7の状態モデルを参照して、マッチング部12は、
Step0(ノード0からノード1への遷移)において、各マッチング候補と正規表現「[0-9]」との整合性をし、当該正規表現「[0-9]に整合するマッチング候補を残し、当該正規表現「[0-9]に整合しないマッチング候補を除外し、
Step1(ノード1からノード2への遷移)において、各マッチング候補と正規表現「年」との整合性を判定し、当該正規表現「年」に整合するマッチング候補を残し、当該正規表現「年」に整合しないマッチング候補を除外し、
・・・
Step5(ノード5からノード6への遷移)において、各マッチング候補と正規表現「日」との整合性を判定し、当該正規表現「日」に整合するマッチング候補を残し、当該正規表現「日」に整合しないマッチング候補を除外する、
という処理を行う。
Referring to the state model of FIG. 7, the matching unit 12
In Step 0 (transition from node 0 to node 1), each matching candidate is matched with the regular expression "[0-9]", and matching candidates matching the regular expression "[0-9]" are left. Exclude matching candidates that do not match the regular expression "[0-9],
In Step 1 (transition from node 1 to node 2), the consistency between each matching candidate and the regular expression "year" is determined, and matching candidates that match the regular expression "year" are left, and the regular expression "year" Filter out candidate matches that do not match the
・・・
In Step 5 (transition from node 5 to node 6), the consistency between each matching candidate and the regular expression "day" is determined, and matching candidates that match the regular expression "day" are left, and the regular expression "day" filter out candidate matches that do not match the
process.

図8は、本実施形態のマッチング装置1によるパターンマッチング処理のサーチにおいて、各々のマッチング候補を用いて探索された、現在状態からの可能な遷移を説明する図である。この例において、維持すべきビームの数Nは、2であり、遷移先として考慮されるマッチング候補(Considered characters)の数Kは3である。 FIG. 8 is a diagram for explaining possible transitions from the current state searched using each matching candidate in the search for pattern matching processing by the matching device 1 of this embodiment. In this example, the number N of beams to maintain is two and the number K of matching characters considered for transition destinations is three.

すなわち、図5の場合と同様に、部分情報I0~部分情報I5のそれぞれに対するサーチにおいて、確率が高い3番目までのマッチング候補が選択され、選択されたマッチング候補を用いてサーチの経路が更新される。このとき、サーチの経路のうち、上位2番目までの経路を残し、それ以外の経路が排除され、排除された経路は、以降の処理では考慮されない。 That is, as in the case of FIG. 5, in the search for each of the partial information I0 to I5, matching candidates up to the third with the highest probability are selected, and the search path is updated using the selected matching candidates. be. At this time, among the search routes, the routes up to the second highest are retained, the other routes are excluded, and the excluded routes are not considered in subsequent processing.

図8においては、図7の状態モデルが適用されることにより、マッチング候補の選択が図5の場合とは異なっている。 In FIG. 8, selection of matching candidates is different from that in FIG. 5 because the state model of FIG. 7 is applied.

すなわち、Step0(Slice0)では、正規表現「[0-9]」が適用されるため、Considered charactersとなるマッチング候補は、「1」、「2」、および「3」の3つとなり、「/」はマッチング候補から除外されている。 That is, in Step 0 (Slice 0), the regular expression "[0-9]" is applied, so there are three matching candidates for Considered characters: "1", "2", and "3". ” is excluded from matching candidates.

図8とともに図9を参照してさらに詳細に説明する。図9は、図4に示した予測結果に重ね合わせて、図8に対応するサーチ経路を示した図である。図6においては、上位2番目までの経路Beam 1と経路Beam 2が、それぞれ直線の矢印と一点鎖線の矢印によって示されている。 Further details will be described with reference to FIG. 9 in conjunction with FIG. FIG. 9 is a diagram showing search paths corresponding to FIG. 8 superimposed on the prediction result shown in FIG. In FIG. 6, the path Beam 1 and path Beam 2 up to the second highest are indicated by straight arrows and dashed-dotted line arrows, respectively.

ここで、経路Beam 1および経路Beam 2は、それぞれBest beamおよび2nd best beamとも称される。また、図9において、排除された経路は、Considered expansionと称され、破線の矢印で示されている。 Here, path Beam 1 and path Beam 2 are also referred to as Best beam and 2nd best beam, respectively. Also, in FIG. 9, the excluded pathways are called Considered expansion and are indicated by dashed arrows.

図8と図9の例では、Step1(Slice1)では、「1」および「2」のそれぞれを現在状態として、サーチが実行される。図7の状態モデルが適用されることにより、Step1(Slice1)のConsidered charactersは、「年」のみとなるので、「1」から「年」への経路、および「2」から「年」への経路があり得る。従って、Step1(Slice1)でのBest beamは、「1」から「年」への経路となり、2nd best beamは、「2」から「年」への経路になる。 In the examples of FIGS. 8 and 9, in Step 1 (Slice 1), a search is executed with each of "1" and "2" as the current state. By applying the state model in Fig. 7, the Considered characters in Step1 (Slice1) are only "Year", so the path from "1" to "Year" and the path from "2" to "Year" there can be a route. Therefore, the best beam in Step 1 (Slice 1) is the path from "1" to "year", and the 2nd best beam is the path from "2" to "year".

同様に、Step2(Slice2)では、「1」、「年」、「2」の経路がBest beamになり、「2」、「年」、「2」の経路が2nd best beamとなる。 Similarly, in Step 2 (Slice 2), the path of "1", "year" and "2" is the best beam, and the path of "2", "year" and "2" is the 2nd best beam.

このような処理が、Step5(Slice5)まで繰り返されることにより、対象情報「1年2月8日」の予測結果としてのBest beamと2nd best beamが得られることになる。この例では、Best beamは、「1」、「年」、「2」、「月」、「8」、「日」の経路になり、2nd best beamは、「2」、「年」、「2」、「月」、「8」、「日」の経路になる。ここで、Best beamの確率(Beam 1 probability)は、0.055296であり、2nd best beamの確率(Beam 2 probability)は、0となる。 By repeating such processing up to Step 5 (Slice 5), the best beam and the 2nd best beam as the prediction results of the target information "February 8, 1st year" are obtained. In this example, the Best beam will be the path of '1', 'Year', '2', 'Month', '8', 'Day', and the 2nd best beam will be '2', 'Year', ' 2", "month", "8", "day". Here, the probability of the best beam (Beam 1 probability) is 0.055296, and the probability of the 2nd best beam (Beam 2 probability) is 0.

図5と図6を参照して説明した比較例に係るビームサーチによれば、対象情報「1年2月8日」の予測結果として、「/年2月88」と「/年2月8日」とが得られることになり、いずれも誤った予測結果となっている。 According to the beam search according to the comparative example described with reference to FIGS. day" are obtained, both of which are incorrect prediction results.

一方、図7~図9を参照して説明した本実施形態のサーチによれば、対象情報「1年2月8日」の予測結果として、「1年2月8日」と「2年2月8日」とが得られることになるが、「2年2月8日」の確率は0であるため、実際には、「1年2月8日」のみが得られることになる。 On the other hand, according to the search of this embodiment described with reference to FIGS. However, since the probability of "February 8, 2nd year" is 0, only "February 8th, 1st year" is actually obtained.

このように本実施形態によれば、マッチング部12が行うパターンマッチングにおいて正規表現に対応する状態モデルが用いられるので、より正確な予測結果を得ることができる。 As described above, according to the present embodiment, since the state model corresponding to the regular expression is used in the pattern matching performed by the matching unit 12, more accurate prediction results can be obtained.

(マッチング装置1による出力結果例)
図10は、本実施形態に係るマッチング装置1による出力結果例を、比較例と共に示す図である。図10に示す例では、マッチング装置1が、画像データ101を対象情報として取得した場合の、マッチング結果を示している。
(Example of output result by matching device 1)
FIG. 10 is a diagram showing an output result example by the matching device 1 according to the present embodiment together with a comparative example. The example shown in FIG. 10 shows the matching result when the matching device 1 acquires the image data 101 as the target information.

図10に示す例では、入出力部40が、コンテンツタイプ情報として、「date(日付)」を受け付け、選択部13が、当該コンテンツタイプ情報に基づいて、個々の正規表現に個別に対応する複数の状態モデルから、日付(年、月、日等を含む)に関するパターンマッチに適した正規表現に対応する状態モデルを選択した場合を示している。 In the example shown in FIG. 10, the input/output unit 40 accepts "date" as the content type information, and the selection unit 13 selects multiple regular expressions individually corresponding to individual regular expressions based on the content type information. state model corresponding to a regular expression suitable for pattern matching on dates (including year, month, day, etc.).

そして、図10に示す例では、マッチング部12は当該状態モデルを用いて、上述したように、対象情報に含まれる複数の部分情報の各々を対象とするサーチであって、サーチ経路数を所定の数以下に制限したサーチを実行することによって、対象情報に対するパターンマッチングを行う。そして、入出力部40は、図10に示すように、マッチング部12によるマッチング結果103を表示する。 In the example shown in FIG. 10, the matching unit 12 uses the state model to search each of a plurality of pieces of partial information included in the target information as described above. Pattern matching is performed on the target information by performing searches limited to no more than the number of . Then, the input/output unit 40 displays the matching result 103 by the matching unit 12, as shown in FIG.

一方で、マッチング結果102A、及び102Bは比較例に係るマッチング結果を示している。マッチング結果102Aは、状態モデルを用いないビームサーチを実行した結果の一例を示している。 On the other hand, matching results 102A and 102B indicate matching results according to comparative examples. A matching result 102A shows an example of the result of executing a beam search without using the state model.

より具体的には、マッチング結果102Aは、推論モデルPMの出力のうち、キャラクタータイプ(character type)として、
数字(numbers)、漢字(kanji)、及び句読点(punctuation)のみを残す処理、換言すれば、数字(numbers)、漢字(kanji)、及び句読点(punctuation)以外の出力の確率情報を0に設定する処理
を実行したうえで、状態モデルを用いないビームサーチを実行した結果を示している。
More specifically, the matching result 102A has the following character types among the outputs of the inference model PM:
A process that leaves only numbers, kanji, and punctuation, in other words, sets the probability information for outputs other than numbers, kanji, and punctuation to 0. After executing the processing, the result of executing the beam search without using the state model is shown.

マッチング結果102Bは、状態モデルを用いないビームサーチを実行した結果の他の例を示している。より具体的には、マッチング結果102Bは、推論モデルPMの出力のうち、キャラクタータイプ(character type)として、
数字(numbers)、漢字(kanji)のみを残す処理、換言すれば、数字(numbers)、及び漢字(kanji)以外の出力の確率情報を0に設定する処理
を実行したうえで、状態モデルを用いないビームサーチを実行した結果を示している。
Matching result 102B shows another example of the result of performing beam search without using the state model. More specifically, the matching result 102B has the following character types among the outputs of the inference model PM:
After executing the process of leaving only numbers and kanji, in other words, the process of setting the probability information of outputs other than numbers and kanji to 0, the state model is used. It shows the result of performing a beam search that does not have

図10に示すように、状態モデルを用いないサーチでは、マッチング結果102Aに示すように「1」ではなく「/」が出力されたり、マッチング結果102Bに示すように、「日」ではなく「8」が出力されたりしてしまい、適切なマッチング結果を出力することが出来ていない。 As shown in FIG. 10, a search that does not use a state model outputs "/" instead of "1" as shown in matching result 102A, or "8" instead of "day" as shown in matching result 102B. " is output, and it is not possible to output an appropriate matching result.

一方、図10に示すように、状態モデルを用いたサーチの結果であるマッチング結果103では、適切なマッチング結果が出力されている。 On the other hand, as shown in FIG. 10, the matching result 103, which is the search result using the state model, is an appropriate matching result.

このように、本実施形態1に係るマッチング装置1によれば、逐次的なパターンマッチング処理において、精度の向上を図ることができる。 As described above, according to the matching device 1 according to the first embodiment, it is possible to improve accuracy in the sequential pattern matching process.

〔実施形態2〕
以下、本発明の第2の実施形態について説明する。実施形態1において説明した構成と同じ構成については同じ参照符号を付し説明を適宜省略する。
[Embodiment 2]
A second embodiment of the present invention will be described below. The same reference numerals are given to the same configurations as those described in the first embodiment, and the description thereof will be omitted as appropriate.

本実施形態に係るマッチング装置1Aは、実施形態1に係るマッチング装置1と同様に、画像情報等の対象情報に対するマッチング処理を行い、マッチング結果を出力する。 A matching device 1A according to the present embodiment, like the matching device 1 according to the first embodiment, performs matching processing on target information such as image information, and outputs a matching result.

図11は、本実施形態に係るマッチング装置1Aの構成を示すブロック図である。図11に示すように、制御部10、記憶部20、通信部30、及び入出力部40を備えている。 FIG. 11 is a block diagram showing the configuration of a matching device 1A according to this embodiment. As shown in FIG. 11, a control unit 10, a storage unit 20, a communication unit 30, and an input/output unit 40 are provided.

記憶部20に格納された各種のデータは、実施形態1に係るマッチング装置1が備える記憶部20とほぼ同様である。ただし、本実施形態に係る記憶部20には、一例として、状態モデルSMが1つのみ格納されている。本実施形態に係る状態モデルSMは、一例として、正規表現REGEXとして実施形態1よりも一般的な表現を用いている。 Various data stored in the storage unit 20 are substantially the same as those in the storage unit 20 included in the matching device 1 according to the first embodiment. However, as an example, only one state model SM is stored in the storage unit 20 according to the present embodiment. The state model SM according to this embodiment uses, as an example, a more general expression than the first embodiment as the regular expression REGEX.

また、図11に示すように、本実施形態に係るマッチング装置1Aの制御部10は、取得部11、第1マッチング部12、第2マッチング部15、マッチング結果選択部16、及びマッチング結果出力部17を備えている。 Further, as shown in FIG. 11, the control unit 10 of the matching device 1A according to the present embodiment includes an acquisition unit 11, a first matching unit 12, a second matching unit 15, a matching result selection unit 16, and a matching result output unit. 17.

第1マッチング部12は、実施形態1に係るマッチング部12と同様の構成である。したがって、実施形態1において説明したマッチング部12の各種の処理が本実施形態にも適用される。一方、第2マッチング部15は、状態モデルを用いないビームサーチを実行する。換言すれば、第2マッチング部15は、実施形態1において説明した比較例に係るビームサーチを実行する。より具体的に言えば、第2マッチング部15は、正規表現に対応する状態モデルを用いることなく、対象情報に含まれる複数の部分情報の各々を対象とするビームサーチであって、サーチ経路数を所定の数に制限したビームサーチを実行することによって、前記対象情報に対するパターンマッチングを行う。 The first matching unit 12 has the same configuration as the matching unit 12 according to the first embodiment. Therefore, various processes of the matching unit 12 described in the first embodiment are also applied to this embodiment. On the other hand, the second matching unit 15 performs beam search without using the state model. In other words, the second matching unit 15 performs beam search according to the comparative example described in the first embodiment. More specifically, the second matching unit 15 performs a beam search for each of a plurality of pieces of partial information included in the target information without using a state model corresponding to a regular expression. is limited to a predetermined number, pattern matching is performed on the target information.

マッチング結果選択部16は、第1マッチング部12によるマッチング結果及び第2マッチング部15によるマッチング結果の何れかを、第1マッチング部12によるマッチング結果の確率情報と第2マッチング部15によるマッチング結果の確率情報とに応じて選択する。そして、マッチング結果出力部17は、マッチング結果選択部16による選択結果を出力する。マッチング結果出力部17が出力するマッチング結果は、一例として入出力部40が備える表示パネルに表示される。 The matching result selection unit 16 selects either the matching result from the first matching unit 12 or the matching result from the second matching unit 15 as probability information of the matching result from the first matching unit 12 and the matching result from the second matching unit 15. Select according to probability information. Then, the matching result output unit 17 outputs the selection result by the matching result selection unit 16 . The matching result output by the matching result output unit 17 is displayed on a display panel included in the input/output unit 40 as an example.

換言すれば、マッチング装置1Aによるマッチング方法は、
マッチングの対象である対象情報を取得する取得ステップと、
ある正規表現に対応する状態モデルを用いて、前記対象情報に含まれる複数の部分情報の各々を対象とするサーチであって、サーチ経路数を所定の数以下に制限したサーチを実行することによって、前記対象情報に対するパターンマッチングを行う第1のマッチングステップと、
正規表現に対応する状態モデルを用いることなく、前記対象情報に含まれる複数の部分情報の各々を対象とするビームサーチであって、サーチ経路数を所定の数に制限したビームサーチを実行することによって、前記対象情報に対するパターンマッチングを行う第2のマッチングステップと、
前記第1のマッチングステップによるマッチング結果及び前記第2のマッチングステップによるマッチング結果の何れかを、前記第1のマッチングステップによるマッチング結果の確率情報と前記第2のマッチングステップによるマッチング結果の確率情報とに応じて選択する選択ステップと
を含んでいると表現してもよい。
In other words, the matching method by the matching device 1A is
an acquisition step of acquiring target information to be matched;
By executing a search targeting each of a plurality of partial information contained in the target information using a state model corresponding to a certain regular expression, the search limiting the number of search paths to a predetermined number or less , a first matching step of performing pattern matching on the target information;
A beam search targeting each of a plurality of partial information included in the target information without using a state model corresponding to a regular expression, the beam search limiting the number of search paths to a predetermined number. A second matching step of performing pattern matching on the target information by
Either the matching result of the first matching step or the matching result of the second matching step is combined with probability information of the matching result of the first matching step and probability information of the matching result of the second matching step. and a selection step of selecting according to .

図12は、本実施形態に係るマッチング装置1Aによるマッチング結果の出力の一例を示す図である。図12に示す例では、マッチング装置1Aが、画像データ101を対象情報として取得した場合の、マッチング結果を示している。 FIG. 12 is a diagram showing an example of matching result output by the matching device 1A according to the present embodiment. The example shown in FIG. 12 shows the matching result when the matching device 1A acquires the image data 101 as the target information.

図12に示す例では、第1マッチング部12は、上述した一般的な状態モデルを用いて、対象情報に含まれる複数の部分情報の各々を対象とするサーチであって、サーチ経路数を所定の数以下に制限したサーチを実行することによって、対象情報に対するパターンマッチングを行い、マッチング結果103を得る。 In the example shown in FIG. 12, the first matching unit 12 uses the general state model described above to search each of a plurality of pieces of partial information included in the target information. Pattern matching is performed on the target information by performing a search limited to the number of , and a matching result 103 is obtained.

一方で、第2マッチング部15は、正規表現に対応する状態モデルを用いることなく、対象情報に含まれる複数の部分情報の各々を対象とするビームサーチであって、サーチ経路数を所定の数に制限したビームサーチを実行することによって、前記対象情報に対するパターンマッチングを行い、マッチング結果102を得る。 On the other hand, the second matching unit 15 performs a beam search targeting each of a plurality of pieces of partial information included in the target information without using a state model corresponding to a regular expression. Pattern matching is performed on the target information by performing a beam search restricted to , and a matching result 102 is obtained.

図12に示す例では、第1マッチング部12が得たマッチング結果103の確率(Beam probability)は、0.98であり、十分に大きい値と言える。換言すれば、一例として予め設定された閾値を0.8とすると、当該閾値よりも大きい値の確率を得ている。 In the example shown in FIG. 12, the probability (beam probability) of the matching result 103 obtained by the first matching unit 12 is 0.98, which can be said to be a sufficiently large value. In other words, assuming that the preset threshold value is 0.8 as an example, the probability of a value greater than the threshold value is obtained.

一方、図12に示す例では、第2マッチング部15が得たマッチング結果102の確率(Beam probability)は、0.99であり、十分に大きい値と言える。換言すれば、一例として予め設定された閾値を0.8とすると、当該閾値よりも大きい値の確率を得ている。 On the other hand, in the example shown in FIG. 12, the probability (Beam probability) of the matching result 102 obtained by the second matching unit 15 is 0.99, which can be said to be a sufficiently large value. In other words, assuming that the preset threshold value is 0.8 as an example, the probability of a value greater than the threshold value is obtained.

このように、第1マッチング部12が得たマッチング結果の確率情報と、第2マッチング部15が得たマッチング結果の確率情報とが、共に高い確率を示している場合、換言すれば、両者のマッチング結果の確率情報が共に所定の閾値よりも大きい場合、マッチング結果出力部16は、第1マッチング部12が得たマッチング結果及び第2マッチング部15が得たマッチング結果のうち、第1マッチング部12が得たマッチング結果のみを出力する。又は、第1マッチング部12が得たマッチング結果を優先的に表示する。 Thus, when both the matching result probability information obtained by the first matching unit 12 and the matching result probability information obtained by the second matching unit 15 indicate high probability, in other words, When the probability information of the matching result is both larger than the predetermined threshold, the matching result output unit 16 outputs the matching result obtained by the first matching unit 12 and the matching result obtained by the second matching unit 15, 12 outputs only the matching results obtained. Alternatively, the matching result obtained by the first matching unit 12 is preferentially displayed.

一方、図13は、本実施形態に係るマッチング装置1Aによるマッチング結果の出力の他の例を示す図である。図13に示す例では、マッチング装置1Aが、画像データ101を対象情報として取得した場合の、マッチング結果を示している。 On the other hand, FIG. 13 is a diagram showing another example of matching result output by the matching device 1A according to the present embodiment. The example shown in FIG. 13 shows the matching result when the matching device 1A acquires the image data 101 as the target information.

図13に示す例では、第1マッチング部12が得たマッチング結果103の確率(Beam probability)は、0.02であり、十分に小さい値と言える。換言すれば、一例として予め設定された閾値を0.8とすると、当該閾値よりも小さい値の確率を得ている。 In the example shown in FIG. 13, the probability (beam probability) of the matching result 103 obtained by the first matching unit 12 is 0.02, which can be said to be a sufficiently small value. In other words, assuming that the preset threshold value is 0.8 as an example, the probability of a value smaller than the threshold value is obtained.

一方、図13に示す例では、第2マッチング部15が得たマッチング結果102の確率(Beam probability)は、0.96であり、十分に大きい値と言える。換言すれば、一例として予め設定された閾値を0.8とすると、当該閾値よりも大きい値の確率を得ている。 On the other hand, in the example shown in FIG. 13, the probability (beam probability) of the matching result 102 obtained by the second matching unit 15 is 0.96, which can be said to be a sufficiently large value. In other words, assuming that the preset threshold value is 0.8 as an example, the probability of a value greater than the threshold value is obtained.

このように、第1マッチング部12が得たマッチング結果の確率情報が、第2マッチング部15が得たマッチング結果の確率情報よりも小さい場合、換言すれば、第1マッチング部12が得たマッチング結果の確率情報が所定の閾値よりも小さく、第2マッチング部15が得たマッチング結果の確率情報が所定の閾値よりも大きい場合、マッチング結果出力部16は、第1マッチング部12が得たマッチング結果及び第2マッチング部15が得たマッチング結果のうち、第2マッチング部15が得たマッチング結果のみを出力する。又は、第2マッチング部15が得たマッチング結果を優先的に表示する。 Thus, when the probability information of the matching result obtained by the first matching unit 12 is smaller than the probability information of the matching result obtained by the second matching unit 15, in other words, the matching obtained by the first matching unit 12 If the probability information of the result is smaller than the predetermined threshold and the probability information of the matching result obtained by the second matching unit 15 is larger than the predetermined threshold, the matching result output unit 16 outputs the matching obtained by the first matching unit 12. Among the results and the matching results obtained by the second matching unit 15, only the matching results obtained by the second matching unit 15 are output. Alternatively, the matching result obtained by the second matching unit 15 is preferentially displayed.

以上のように構成されたマッチング装置1Aによれば、ユーザに対してより適切なマッチング結果を提示することができる。また、上記の処理を行うマッチング装置1Aによれば、対象情報(画像データ)がどのようなタイプの情報であるのかに関する先験的な情報がなくとも、精度の向上を得ることができる。
(具体的な処理例)
なお、マッチング結果選択部16による具体的な処理例は、以下のように表現してもよい。すなわち、マッチング結果選択部16は、
第1マッチング部12によるマッチング結果の確率情報が示す確率値と、第2マッチング部15によるマッチング結果の確率情報が示す確率値で除算して得られる比を示す値と、閾値とを比較する。そして、マッチング結果選択部16は、
前記比を示す値が、前記閾値以上であれば、第1マッチング部12によるマッチング結果を選択し、
前記比を示す値が、前記閾値未満であれば、第2マッチング部15によるマッチング結果を選択する。ここで、前記閾値は、適宜設定しておくことができる。一例として前記閾値は、0.9~1.0までの任意の値としてもよいし、他の値としてもよい。
According to the matching device 1A configured as described above, more appropriate matching results can be presented to the user. Further, according to the matching device 1A that performs the above process, it is possible to improve accuracy without a priori information regarding what type of information the target information (image data) is.
(Specific processing example)
A specific processing example by the matching result selection unit 16 may be expressed as follows. That is, the matching result selection unit 16
A value indicating a ratio obtained by dividing the probability value indicated by the probability information of the matching result by the first matching unit 12 and the probability value indicated by the probability information of the matching result by the second matching unit 15 is compared with the threshold. Then, the matching result selection unit 16
If the value indicating the ratio is equal to or greater than the threshold, selecting the matching result by the first matching unit 12;
If the value indicating the ratio is less than the threshold, the matching result by the second matching unit 15 is selected. Here, the threshold can be set as appropriate. As an example, the threshold may be any value between 0.9 and 1.0, or may be another value.

一例として、図12の例を、本処理例の観点から説明すると、マッチング結果選択部16は、第1マッチング部12が得たマッチング結果103の確率(Beam probability)である0.98を、第2マッチング部15が得たマッチング結果102の確率(Beam probability)である0.99で除算することによって、比の値(ratio)
0.989
を算出する。ここで、上記閾値(threshold value)を0.9とする。
As an example, the example of FIG. 12 will be described from the viewpoint of this processing example. 2 by dividing by 0.99, which is the beam probability of the matching result 102 obtained by the matching unit 15, the ratio
0.989
Calculate Here, the threshold value is set to 0.9.

マッチング結果選択部16は、上記比の値0.989と上記閾値を0.9とを比較する。そして、上記比の値は、上記閾値以上であるので、マッチング結果選択部16は、第1マッチング部12によるマッチング結果103を選択する。 The matching result selection unit 16 compares the ratio value of 0.989 with the threshold value of 0.9. Since the value of the ratio is greater than or equal to the threshold, the matching result selection unit 16 selects the matching result 103 by the first matching unit 12 .

一方、図13の例では、マッチング結果選択部16は、第1マッチング部12が得たマッチング結果103の確率(Beam probability)である0.02を、第2マッチング部15が得たマッチング結果102の確率(Beam probability)である0.96で除算することによって、比の値
0.021
を算出する。ここで、上記閾値は、図12の例の場合と同じく、0.9とする。
On the other hand, in the example of FIG. 13 , the matching result selection unit 16 sets the beam probability of 0.02 for the matching result 103 obtained by the first matching unit 12 to 0.02 for the matching result 102 obtained by the second matching unit 15 . By dividing by 0.96, the Beam probability of 0.021, the ratio value
Calculate Here, the threshold is set to 0.9 as in the case of the example of FIG.

マッチング結果選択部16は、上記比の値0.021と上記閾値を0.9とを比較する。そして、上記比の値は、上記閾値未満であるので、マッチング結果選択部16は、第2マッチング部15によるマッチング結果102を選択する。 The matching result selection unit 16 compares the ratio value of 0.021 with the threshold value of 0.9. Since the value of the ratio is less than the threshold, the matching result selection unit 16 selects the matching result 102 from the second matching unit 15 .

なお、マッチング結果選択部16は、上記閾値を、第1マッチング部12によるマッチング結果及び前記第2マッチング部12によるマッチング結果の少なくとも何れかに応じた値に設定してもよい。一例として、上記閾値を、第1マッチング部12によるマッチング結果の確率情報が示す確率値、及び第2マッチング部15によるマッチング結果の確率情報が示す確率値の少なくとも何れかに応じた値に設定してもよい。 Note that the matching result selection unit 16 may set the threshold to a value corresponding to at least one of the matching result by the first matching unit 12 and the matching result by the second matching unit 12 . As an example, the threshold is set to a value corresponding to at least one of the probability value indicated by the probability information of the matching result by the first matching unit 12 and the probability value indicated by the probability information of the matching result by the second matching unit 15. may

(マッチング装置のハードウェア構成例)
図14は、マッチング装置1,1Aとして用いられるコンピュータの物理的構成を例示したブロック図である。情報処理装置1は、図14に示すように、バス210と、プロセッサ201と、主メモリ202と、補助メモリ203と、通信インタフェース204と、入出力インタフェース205とを備えたコンピュータによって構成可能である。プロセッサ201、主メモリ202、補助メモリ203、通信インタフェース204、及び入出力インタフェース205は、バス210を介して互いに接続されている。入出力インタフェース205には、入力装置206および出力装置207が接続されている。
(Hardware configuration example of matching device)
FIG. 14 is a block diagram illustrating the physical configuration of a computer used as matching devices 1 and 1A. The information processing apparatus 1 can be configured by a computer having a bus 210, a processor 201, a main memory 202, an auxiliary memory 203, a communication interface 204, and an input/output interface 205, as shown in FIG. . Processor 201 , main memory 202 , auxiliary memory 203 , communication interface 204 and input/output interface 205 are interconnected via bus 210 . An input device 206 and an output device 207 are connected to the input/output interface 205 .

プロセッサ201としては、例えば、CPU(Central Processing Unit)、マイクロプロセッサ、デジタルシグナルプロセッサ、マイクロコントローラ、またはこれらの組み合わせ等が用いられる。 As the processor 201, for example, a CPU (Central Processing Unit), a microprocessor, a digital signal processor, a microcontroller, or a combination thereof is used.

主メモリ202としては、例えば、半導体RAM(random access memory)等が用いられる。 As the main memory 202, for example, a semiconductor RAM (random access memory) or the like is used.

補助メモリ203としては、例えば、フラッシュメモリ、HDD(Hard Disk Drive)、SSD(Solid State Drive)、またはこれらの組み合わせ等が用いられる。補助メモリ203には、上述したマッチング装置1,1Aの動作をプロセッサ201に実行させるためのプログラムが格納されている。プロセッサ201は、補助メモリ203に格納されたプログラムを主メモリ202上に展開し、展開したプログラムに含まれる各命令を実行する。 As the auxiliary memory 203, for example, flash memory, HDD (Hard Disk Drive), SSD (Solid State Drive), or a combination of these is used. Auxiliary memory 203 stores a program for causing processor 201 to execute the operations of matching devices 1 and 1A described above. The processor 201 expands the program stored in the auxiliary memory 203 onto the main memory 202 and executes each instruction included in the expanded program.

通信インタフェース204は、ネットワークNに接続するインタフェースである。 A communication interface 204 is an interface that connects to the network N. FIG.

入出力インタフェース205としては、例えば、USBインタフェース、赤外線やBluetooth(登録商標)等の近距離通信インタフェース、またはこれらの組み合わせが用いられる。 As the input/output interface 205, for example, a USB interface, a short-range communication interface such as infrared rays or Bluetooth (registered trademark), or a combination thereof is used.

入力装置206としては、例えば、キーボード、マウス、タッチパッド、マイク、又はこれらの組み合わせ等が用いられる。出力装置207としては、例えば、ディスプレイ、プリンタ、スピーカ、又はこれらの組み合わせが用いられる。 As the input device 206, for example, a keyboard, mouse, touch pad, microphone, or a combination thereof is used. A display, a printer, a speaker, or a combination thereof is used as the output device 207, for example.

この例で、プロセッサ201は制御部10を実現するハードウェア要素の一例である。また、主メモリ202及び補助メモリ03は、記憶部20を実現するハードウェア要素の一例である。また、通信インタフェース204は、通信部30を実現するハードウェア要素の一例である。また、入出力インタフェース205、入力装置206及び出力装置207は、上述した入出力部40を実現するハードウェア要素の一例である。 In this example, processor 201 is an example of a hardware element that implements control unit 10 . Also, the main memory 202 and the auxiliary memory 03 are examples of hardware elements that implement the storage unit 20 . Also, the communication interface 204 is an example of a hardware element that implements the communication unit 30 . Also, the input/output interface 205, the input device 206, and the output device 207 are examples of hardware elements that implement the input/output unit 40 described above.

〔ソフトウェアによる実現例〕
情報処理装置1、1Aの機能は、当該装置としてコンピュータを機能させるためのプログラムであって、当該装置の各制御ブロック(特に制御部10に含まれる各部)としてコンピュータを機能させるためのプログラムにより実現することができる。
[Example of realization by software]
The functions of the information processing apparatuses 1 and 1A are programs for causing a computer to function as the apparatus, and are realized by a program for causing the computer to function as each control block (especially each part included in the control unit 10) of the apparatus. can do.

この場合、上記装置は、上記プログラムを実行するためのハードウェアとして、少なくとも1つの制御装置(例えばプロセッサ)と少なくとも1つの記憶装置(例えばメモリ)を有するコンピュータを備えている。この制御装置と記憶装置により上記プログラムを実行することにより、上記各実施形態で説明した各機能が実現される。 In this case, the apparatus comprises a computer having at least one control device (eg processor) and at least one storage device (eg memory) as hardware for executing the program. Each function described in each of the above embodiments is realized by executing the above program using the control device and the storage device.

上記プログラムは、一時的ではなく、コンピュータ読み取り可能な、1または複数の記録媒体に記録されていてもよい。この記録媒体は、上記装置が備えていてもよいし、備えていなくてもよい。後者の場合、上記プログラムは、有線または無線の任意の伝送媒体を介して上記装置に供給されてもよい。 The program may be recorded on one or more computer-readable recording media, not temporary. The recording medium may or may not be included in the device. In the latter case, the program may be supplied to the device via any transmission medium, wired or wireless.

また、上記各制御ブロックの機能の一部または全部は、論理回路により実現することも可能である。例えば、上記各制御ブロックとして機能する論理回路が形成された集積回路も本発明の範疇に含まれる。 Also, part or all of the functions of the above control blocks can be realized by logic circuits. For example, integrated circuits in which logic circuits functioning as the control blocks described above are formed are also included in the scope of the present invention.

また、上記各制御ブロックの機能の一部または全部は、上記制御装置で動作するものであってもよいし、他の装置(例えばエッジコンピュータまたはクラウドサーバ(cloud server)等)で動作するものであってもよい。 Some or all of the functions of each control block may be operated by the control device, or may be operated by another device (for example, an edge computer or a cloud server). There may be.

〔まとめ〕
上述した実施形態の一部又は全部は、以下のようにも記載され得る。ただし、本発明は、以下の記載する態様に限定されるものではない。
〔summary〕
Some or all of the above-described embodiments may also be described as follows. However, the present invention is not limited to the embodiments described below.

(付記1)
マッチングの対象である対象情報を取得する取得部と、ある正規表現に対応する状態モデルを用いて、前記対象情報に含まれる複数の部分情報の各々を対象とするサーチであって、サーチ経路数を所定の数以下に制限したサーチを実行することによって、前記対象情報に対するパターンマッチングを行う第1のマッチング部とを備えているマッチング装置。
(Appendix 1)
A search targeting each of a plurality of partial information included in the target information using an acquisition unit that acquires target information to be matched and a state model corresponding to a certain regular expression, wherein: a first matching unit that performs pattern matching on the target information by executing a search that limits the number of the target information to a predetermined number or less.

(付記2)
前記第1のマッチング部が実行する前記サーチは、前記対象情報に含まれるある部分情報に対するマッチング処理として、前記ある部分情報に対する1又は複数のマッチング候補と、各マッチング候補の確率情報とを取得する処理と、前記1又は複数のマッチング候補のうち、前記状態モデルに整合しないマッチング候補を除外する第1の選択処理と、前記確率情報を参照して、前記第1の選択処理後のマッチング候補から、前記所定の数以下のマッチング候補を選択する第2の選択処理と、を含んでいる付記1に記載のマッチング装置。
(Appendix 2)
The search executed by the first matching unit acquires one or more matching candidates for the certain partial information and probability information of each matching candidate as matching processing for certain partial information included in the target information. a first selection process for excluding matching candidates that do not match the state model from among the one or more matching candidates; referring to the probability information, from the matching candidates after the first selection process; , and a second selection process of selecting matching candidates equal to or less than the predetermined number.

(付記3)
前記状態モデルは、決定論的有限オートマトンである付記1又は2に記載のマッチング装置。
(Appendix 3)
3. A matching apparatus according to any one of claims 1 or 2, wherein the state model is a deterministic finite automaton.

(付記4)
コンテンツタイプ情報に基づいて、個々の正規表現に個別に対応する複数の状態モデルから、前記パターンマッチングに用いる状態モデルを選択する選択部を更に備えている付記1から3の何れか1項に記載のマッチング装置。
(Appendix 4)
4. The method according to any one of appendices 1 to 3, further comprising a selection unit that selects a state model to be used for the pattern matching from a plurality of state models individually corresponding to each regular expression based on content type information. matching device.

(付記5)
前記状態モデルを生成する生成部を更に備えている付記1から4の何れか1項に記載のマッチング装置。
(Appendix 5)
5. The matching device according to any one of appendices 1 to 4, further comprising a generator that generates the state model.

(付記6)
前記対象情報は、1又は複数の画像を含んでいる付記1から5の何れか1項に記載のマッチング装置。
(Appendix 6)
6. A matching device according to any one of appendices 1 to 5, wherein the target information includes one or more images.

(付記7)
前記第1のマッチング部によるマッチング結果を出力する出力部を備えている付記1から6の何れか1項に記載のマッチング装置。
(Appendix 7)
7. The matching device according to any one of appendices 1 to 6, further comprising an output unit that outputs a matching result obtained by the first matching unit.

(付記8)
正規表現に対応する状態モデルを用いることなく、前記対象情報に含まれる複数の部分情報の各々を対象とするビームサーチであって、サーチ経路数を所定の数に制限したビームサーチを実行することによって、前記対象情報に対するパターンマッチングを行う第2のマッチング部を更に備え、
前記第1のマッチング部によるマッチング結果及び前記第2のマッチング部によるマッチング結果の何れかを、前記第1のマッチング部によるマッチング結果の確率情報と前記第2のマッチング部によるマッチング結果の確率情報とに応じて出力する出力部
を備えている付記1から6の何れか1項に記載のマッチング装置。
(Appendix 8)
A beam search targeting each of a plurality of partial information included in the target information without using a state model corresponding to a regular expression, the beam search limiting the number of search paths to a predetermined number. further comprising a second matching unit that performs pattern matching on the target information,
One of the matching result by the first matching unit and the matching result by the second matching unit is combined with probability information on the matching result by the first matching unit and probability information on the matching result by the second matching unit. 7. A matching device according to any one of claims 1 to 6, comprising an output unit for outputting in response to .

(付記9)
マッチングの対象である対象情報を取得する取得ステップと、ある正規表現に対応する状態モデルを用いて、前記対象情報に含まれる複数の部分情報の各々を対象とするサーチであって、サーチ経路数を所定の数以下に制限したサーチを実行することによって、前記対象情報に対するパターンマッチングを行うマッチングステップとを含んでいるマッチング方法。
(Appendix 9)
An acquisition step of acquiring target information to be matched, and a search targeting each of a plurality of partial information included in the target information using a state model corresponding to a certain regular expression, wherein: and performing pattern matching on said target information by performing a search limited to a predetermined number or less.

(付記10)
付記1に記載のマッチング装置としてコンピュータを機能させるためのプログラムであって、上記取得部、および上記マッチング部としてコンピュータを機能させるためのプログラム。
(Appendix 10)
A program for causing a computer to function as the matching device according to appendix 1, the program for causing the computer to function as the acquisition unit and the matching unit.

(付記11)
付記10に記載のプログラムを記録したコンピュータ読み取り可能な記録媒体。
(Appendix 11)
A computer-readable recording medium recording the program according to appendix 10.

本発明は上述した各実施形態に限定されるものではなく、請求項に示した範囲で種々の変更が可能であり、異なる実施形態にそれぞれ開示された技術的手段を適宜組み合わせて得られる実施形態についても本発明の技術的範囲に含まれる。 The present invention is not limited to the above-described embodiments, but can be modified in various ways within the scope of the claims, and can be obtained by appropriately combining technical means disclosed in different embodiments. is also included in the technical scope of the present invention.

1,1A マッチング装置
10 制御部
11 取得部
12 マッチング部(第1マッチング部)
13 選択部(状態モデル選択部)
14 生成部
15 第2マッチング部
16 マッチング結果選択部
17 マッチング結果出力部
20 記憶部
30 通信部
40 入出力部
1, 1A matching device 10 control unit 11 acquisition unit 12 matching unit (first matching unit)
13 selection unit (state model selection unit)
14 generation unit 15 second matching unit 16 matching result selection unit 17 matching result output unit 20 storage unit 30 communication unit 40 input/output unit

(マッチング部)
マッチング部12は、対象情報に対するパターンマッチング処理を実行する。より具体的には、マッチング部12は、ある正規表現に対応する状態モデルを用いて、画像データIMGに含まれる複数の部分情報の各々を対象とするサーチであって、サーチ経路数を所定の数以下に制限したサーチを実行することによって、前記対象情報に対するパターンマッチングを行う。マッチング部12のことを第1のマッチング部と呼ぶこともある。また、本実施形態において、サーチ経路のことを単に経路とも呼ぶ。
(Matching part)
The matching unit 12 executes pattern matching processing on target information. More specifically, the matching unit 12 searches each of a plurality of pieces of partial information included in the image data IMG using a state model corresponding to a certain regular expression. Pattern matching is performed on the target information by performing searches limited to no more than a number. The matching section 12 is sometimes called a first matching section. In addition, in this embodiment, the search route is also simply referred to as a route.

図7の状態モデルを参照して、マッチング部12は、
Step0(ノード0からノード1への遷移)において、各マッチング候補と正規表現「[0-9]」との整合性を判定し、当該正規表現「[0-9]に整合するマッチング候補を残し、当該正規表現「[0-9]に整合しないマッチング候補を除外し、
Step1(ノード1からノード2への遷移)において、各マッチング候補と正規表現「年」との整合性を判定し、当該正規表現「年」に整合するマッチング候補を残し、当該正規表現「年」に整合しないマッチング候補を除外し、
・・・
Step5(ノード5からノード6への遷移)において、各マッチング候補と正規表現「日」との整合性を判定し、当該正規表現「日」に整合するマッチング候補を残し、当該正規表現「日」に整合しないマッチング候補を除外する、
という処理を行う。
Referring to the state model of FIG. 7, the matching unit 12
In Step 0 (transition from node 0 to node 1), the consistency between each matching candidate and the regular expression "[0-9]" is determined , and matching candidates that match the regular expression "[0-9]" are left. , exclude matching candidates that do not match the regular expression "[0-9],
In Step 1 (transition from node 1 to node 2), the consistency between each matching candidate and the regular expression "year" is determined, and matching candidates that match the regular expression "year" are left, and the regular expression "year" Filter out candidate matches that do not match the
・・・
In Step 5 (transition from node 5 to node 6), the consistency between each matching candidate and the regular expression "day" is determined, and matching candidates that match the regular expression "day" are left, and the regular expression "day" filter out candidate matches that do not match the
process.

Claims (12)

マッチングの対象である対象情報を取得する取得部と、
ある正規表現に対応する状態モデルを用いて、前記対象情報に含まれる複数の部分情報の各々を対象とするサーチであって、サーチ経路数を所定の数以下に制限したサーチを実行することによって、前記対象情報に対するパターンマッチングを行う第1のマッチング部と、
正規表現に対応する状態モデルを用いることなく、前記対象情報に含まれる複数の部分情報の各々を対象とするビームサーチであって、サーチ経路数を所定の数に制限したビームサーチを実行することによって、前記対象情報に対するパターンマッチングを行う第2のマッチング部と、
前記第1のマッチング部によるマッチング結果及び前記第2のマッチング部によるマッチング結果の何れかを、前記第1のマッチング部によるマッチング結果の確率情報と前記第2のマッチング部によるマッチング結果の確率情報とに応じて選択するマッチング結果選択部と
を備えているマッチング装置。
an acquisition unit that acquires target information to be matched;
By executing a search targeting each of a plurality of partial information contained in the target information using a state model corresponding to a certain regular expression, the search limiting the number of search paths to a predetermined number or less , a first matching unit that performs pattern matching on the target information;
A beam search targeting each of a plurality of partial information included in the target information without using a state model corresponding to a regular expression, the beam search limiting the number of search paths to a predetermined number. A second matching unit that performs pattern matching on the target information by
One of the matching result by the first matching unit and the matching result by the second matching unit is combined with probability information on the matching result by the first matching unit and probability information on the matching result by the second matching unit. and a matching result selector that selects according to.
前記第1のマッチング部が実行する前記サーチは、
前記対象情報に含まれるある部分情報に対するマッチング処理として、
前記ある部分情報に対する1又は複数のマッチング候補と、各マッチング候補の確率情報とを取得する処理と、
前記1又は複数のマッチング候補のうち、前記状態モデルに整合しないマッチング候補を除外する第1の選択処理と、
前記確率情報を参照して、前記第1の選択処理後のマッチング候補から、前記所定の数以下のマッチング候補を選択する第2の選択処理と、
を含んでいる
請求項1に記載のマッチング装置。
The search performed by the first matching unit includes:
As a matching process for certain partial information included in the target information,
a process of acquiring one or more matching candidates for the certain partial information and probability information of each matching candidate;
a first selection process for excluding matching candidates that do not match the state model from among the one or more matching candidates;
a second selection process of selecting matching candidates equal to or less than the predetermined number from the matching candidates after the first selection process, with reference to the probability information;
2. The matching device of claim 1, comprising:
前記状態モデルは、決定論的有限オートマトンである
請求項1又は2に記載のマッチング装置。
3. A matching device according to claim 1 or 2, wherein said state model is a deterministic finite automaton.
コンテンツタイプ情報に基づいて、個々の正規表現に個別に対応する複数の状態モデルから、前記パターンマッチングに用いる状態モデルを選択する状態モデル選択部
を更に備えている
請求項1から3の何れか1項に記載のマッチング装置。
4. The method according to any one of claims 1 to 3, further comprising a state model selection unit that selects a state model used for pattern matching from a plurality of state models individually corresponding to individual regular expressions based on content type information. A matching device according to paragraph.
前記状態モデルを生成する生成部
を更に備えている請求項1から4の何れか1項に記載のマッチング装置。
5. The matching device according to any one of claims 1 to 4, further comprising a generator that generates the state model.
前記対象情報は、1又は複数の画像を含んでいる
請求項1から5の何れか1項に記載のマッチング装置。
6. A matching device according to any one of claims 1 to 5, wherein said target information includes one or more images.
前記マッチング結果選択部による選択結果を出力する出力部
を備えている請求項1から6の何れか1項に記載のマッチング装置。
7. The matching device according to any one of claims 1 to 6, further comprising an output section for outputting the selection result of the matching result selection section.
前記マッチング結果選択部は、
前記第1のマッチング部によるマッチング結果の確率情報が示す確率値と、前記第2のマッチング部によるマッチング結果の確率情報が示す確率値で除算して得られる比を示す値と、閾値とを比較し、
前記比を示す値が、前記閾値以上であれば、前記第1のマッチング部によるマッチング結果を選択し、
前記比を示す値が、前記閾値未満であれば、前記第2のマッチング部によるマッチング結果を選択する
ことを特徴とする請求項1から7の何れか1項に記載のマッチング装置。
The matching result selection unit
A probability value indicated by the probability information of the matching result by the first matching unit and a value indicating a ratio obtained by dividing by the probability value indicated by the probability information of the matching result by the second matching unit are compared with a threshold value. death,
If the value indicating the ratio is equal to or greater than the threshold, selecting the matching result by the first matching unit;
8. The matching device according to any one of claims 1 to 7, wherein if the value indicating the ratio is less than the threshold value, the matching result by the second matching section is selected.
前記マッチング結果選択部は、前記閾値を、前記第1のマッチング部によるマッチング結果及び前記第2のマッチング部によるマッチング結果の少なくとも何れかに応じた値に設定する
請求項8に記載のマッチング装置。
9. The matching device according to claim 8, wherein the matching result selection unit sets the threshold to a value corresponding to at least one of the matching result by the first matching unit and the matching result by the second matching unit.
マッチングの対象である対象情報を取得する取得ステップと、
ある正規表現に対応する状態モデルを用いて、前記対象情報に含まれる複数の部分情報の各々を対象とするサーチであって、サーチ経路数を所定の数以下に制限したサーチを実行することによって、前記対象情報に対するパターンマッチングを行う第1のマッチングステップと、
正規表現に対応する状態モデルを用いることなく、前記対象情報に含まれる複数の部分情報の各々を対象とするビームサーチであって、サーチ経路数を所定の数に制限したビームサーチを実行することによって、前記対象情報に対するパターンマッチングを行う第2のマッチングステップと、
前記第1のマッチングステップによるマッチング結果及び前記第2のマッチングステップによるマッチング結果の何れかを、前記第1のマッチングステップによるマッチング結果の確率情報と前記第2のマッチングステップによるマッチング結果の確率情報とに応じて選択する選択ステップと
を含んでいるマッチング方法。
an acquisition step of acquiring target information to be matched;
By executing a search targeting each of a plurality of partial information contained in the target information using a state model corresponding to a certain regular expression, the search limiting the number of search paths to a predetermined number or less , a first matching step of performing pattern matching on the target information;
A beam search targeting each of a plurality of partial information included in the target information without using a state model corresponding to a regular expression, the beam search limiting the number of search paths to a predetermined number. A second matching step of performing pattern matching on the target information by
Either the matching result of the first matching step or the matching result of the second matching step is combined with probability information of the matching result of the first matching step and probability information of the matching result of the second matching step. a selection step of selecting according to the matching method.
請求項1に記載のマッチング装置としてコンピュータを機能させるためのプログラムであって、上記取得部、上記第1のマッチング部、及び上記第2のマッチング部としてコンピュータを機能させるためのプログラム。 A program for causing a computer to function as the matching device according to claim 1, the program for causing the computer to function as the acquisition unit, the first matching unit, and the second matching unit. 請求項11に記載のプログラムを記録したコンピュータ読み取り可能な記録媒体。 A computer-readable recording medium on which the program according to claim 11 is recorded.
JP2021185939A 2021-11-15 2021-11-15 Matching device, matching method, program, and recording medium Active JP7134526B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2021185939A JP7134526B1 (en) 2021-11-15 2021-11-15 Matching device, matching method, program, and recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2021185939A JP7134526B1 (en) 2021-11-15 2021-11-15 Matching device, matching method, program, and recording medium

Publications (2)

Publication Number Publication Date
JP7134526B1 JP7134526B1 (en) 2022-09-12
JP2023073104A true JP2023073104A (en) 2023-05-25

Family

ID=83230143

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2021185939A Active JP7134526B1 (en) 2021-11-15 2021-11-15 Matching device, matching method, program, and recording medium

Country Status (1)

Country Link
JP (1) JP7134526B1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08235221A (en) * 1994-10-17 1996-09-13 Matsushita Electric Ind Co Ltd Method for generating database to which index is attached and method for attaching index to database
JP2003242179A (en) * 2002-02-05 2003-08-29 Internatl Business Mach Corp <Ibm> Character string collating method, document processing device using the method and program
JP2020173802A (en) * 2019-04-11 2020-10-22 富士通株式会社 Correction method of image block recognition result, a device, and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08235221A (en) * 1994-10-17 1996-09-13 Matsushita Electric Ind Co Ltd Method for generating database to which index is attached and method for attaching index to database
JP2003242179A (en) * 2002-02-05 2003-08-29 Internatl Business Mach Corp <Ibm> Character string collating method, document processing device using the method and program
JP2020173802A (en) * 2019-04-11 2020-10-22 富士通株式会社 Correction method of image block recognition result, a device, and storage medium

Also Published As

Publication number Publication date
JP7134526B1 (en) 2022-09-12

Similar Documents

Publication Publication Date Title
EP3711000B1 (en) Regularized neural network architecture search
JP2017211799A (en) Information processing device and information processing method
GB2577584A (en) Utilizing a dynamic memory network to track digital dialog states and generate responses
CN105701120A (en) Method and apparatus for determining semantic matching degree
US20200143243A1 (en) Multiobjective Coevolution of Deep Neural Network Architectures
CN108710904A (en) Image matching method based on recurrent neural network and system
JP2007128195A (en) Image processing system
WO2021196954A1 (en) Serialized data processing method and device, and text processing method and device
WO2019212006A1 (en) Phenomenon prediction device, prediction model generation device, and phenomenon prediction program
KR20200032258A (en) Finding k extreme values in constant processing time
Petersen et al. Differentiable sorting networks for scalable sorting and ranking supervision
WO2022173497A9 (en) Enhancing combinatorial optimization with quantum generative models
Gove et al. New guidance for using t-SNE: Alternative defaults, hyperparameter selection automation, and comparative evaluation
CN111914994A (en) Method and device for generating multilayer perceptron, electronic equipment and storage medium
JP7295431B2 (en) Learning program, learning method and learning device
JP2019204214A (en) Learning device, learning method, program and estimation device
CN113988272A (en) Method and device for generating neural network, computer equipment and storage medium
CN112860685A (en) Automatic recommendation of analysis of data sets
WO2019187696A1 (en) Vectorization device, language processing method and prgram
CN112837466B (en) Bill recognition method, device, equipment and storage medium
JP7134526B1 (en) Matching device, matching method, program, and recording medium
JP7317979B2 (en) System and method for generating pyramid layer architecture
CN114254686A (en) Method and device for identifying confrontation sample
CN113343012B (en) News matching method, device, equipment and storage medium
JP2020086738A (en) Information processing device and information processing method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20211223

A871 Explanation of circumstances concerning accelerated examination

Free format text: JAPANESE INTERMEDIATE CODE: A871

Effective date: 20211223

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20220322

A601 Written request for extension of time

Free format text: JAPANESE INTERMEDIATE CODE: A601

Effective date: 20220517

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20220720

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20220824

R150 Certificate of patent or registration of utility model

Ref document number: 7134526

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150