JP3827067B2 - Finite state automaton generator - Google Patents
Finite state automaton generator Download PDFInfo
- Publication number
- JP3827067B2 JP3827067B2 JP2001095962A JP2001095962A JP3827067B2 JP 3827067 B2 JP3827067 B2 JP 3827067B2 JP 2001095962 A JP2001095962 A JP 2001095962A JP 2001095962 A JP2001095962 A JP 2001095962A JP 3827067 B2 JP3827067 B2 JP 3827067B2
- Authority
- JP
- Japan
- Prior art keywords
- fsa
- states
- fsas
- partial
- unit
- 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.)
- Expired - Fee Related
Links
Images
Description
【0001】
【発明の属する技術分野】
本発明は、有限状態オートマトン作成装置(Finite State Automaton、 以下FSA作成装置と記す)に関し、特に、FSAの状態数を少なくすることにより、FSAを記憶するメモリ量を削減することが可能なFSA作成装置に関するものである。
【0002】
【従来の技術】
従来は、図9に示すように、FSA格納部31に格納された1つのFSA(例えば、FSA−A)を状態数最小化部32で状態数を最小化した1つのFSAに変換し、出力FSA格納部33に1つのFSA(FSA−A')として格納していた。状態数最小化部32の最小化手法は、1つのFSAの最簡形を求めるアルゴリズム(例えば、“オートマトン・言語理論” 2.4節 “有限状態オートマトンの最簡形”、本多波雄著、コロナ社)を用いて容易に実現することができる。
【0003】
【発明が解決しようとする課題】
しかし、従来は、1つのFSAにおける冗長な状態遷移を前記状態数最小化部32で取り除いて1つのFSAを作成することに留まっていたため、1つのFSAを複数のFSAに分割することによりFSAの状態数をさらに減らすこと、あるいは、複数のFSAを合成することにより、複数のFSAの総状態数を減らすことはできなかった。
【0004】
本発明は、前記した従来技術に鑑みてなされたものであり、その目的は、FSAの分割、または/および合成により、FSAの状態数の総和を削減し、状態数の削減によってFSAの記憶に係るメモリ量を削減することができるFSA作成装置を提供することにある。
【0005】
【課題を解決するための手段】
前記した目的を達成するために、本発明は、1または複数の有限状態オートマトン( 以下、FSAと記す)の状態数を最小化する状態数最小化部と、該状態数最小化部で最小化された1または複数のメインFSAから等価な部分FSAを抽出し、該等価な部分FSAのシンボルを用いて表した1または複数のメインFSAと該等価な部分FSAとに分割するFSA分割部とを具備し、該FSA分割部は、分割された複数のFSAの状態数の総和が、分割前のFSAの状態数の総和に比較して少なくなるFSAを生成するようにした点に第1の特徴がある。
【0006】
また、 本発明は、前記状態数最小化部で最小化された複数のメインFSAから等価な部分FSAを抽出し、該等価な部分FSAを用いて合成するFSA合成部を具備し、該FSA合成部は、合成されたFSAの状態数が、合成前の複数のFSAの状態数の総和に比較して少なくなるFSAを生成するようにした点に第2の特徴がある。
【0007】
前記第1、第2の特徴によれば、FSAの状態数を従来のFSA作成装置によるものより削減することができるようになり、FSAの記憶に係るメモリ量を削減することができるようになる。
【0008】
【発明の実施の形態】
以下に、本発明を図面を参照して説明する。図1は、本発明の一実施形態の概略の構成を示すブロック図である。
【0009】
図1の実施形態は、複数のFSA(FSA−A1〜An)を格納しているFSA格納部1と、状態数最小化部2と、FSA分割部3と、出力FSA格納部4とから構成されている。
【0010】
次に、本実施形態の動作を説明する。まず、従来手法により、FSA格納部1に格納されている全てのFSAについて、状態数最小化部2で各FSAの状態数を最小化する。続いてFSA分割部3で各FSAに対して1つのFSAを複数のFSAに分割する処理を施す。例えば、図2に示されている状態1から状態18に至る1つのFSA(main1)から、等価な部分FSA、すなわち状態2から状態16に至る部分FSAと状態3から状態17に至る部分FSAを抽出する。そして、該部分FSAをFSA(main1)から分割し、該部分FSAを1つの状態遷移に置き換える。なお、FSAの等価性は、FSAの等価性を求めるアルゴリズム(例えば、“オートマトン・言語理論” 2.4節 “有限状態オートマトンの最簡形”、本多波雄著、コロナ社)によって容易に求めることができる。このことは、以下の例でも、同様である。
【0011】
前記等価な部分FSAは(sub1)として分割し、(main1)の状態2と状態16との間を部分FSAを表すシンボルsub1に置き換える。同様に、(main1)の状態3と状態17との間を部分FSAを表すシンボルsub1に置き換える。そして、シンボルを置き換えたFSAを新たに(main2)とする。この操作によって、状態数18の1つのFSA(main1)は、状態数6のFSA(main2)と状態数8の部分FSA(sub1)に分割される。分割された2つのFSAの状態数の総和は14で、分割前のFSA(状態数18)より、少なくなっている。
【0012】
次に、図3を参照して本実施形態の他の具体例を説明する。図3は、複数のFSAから等価な複数の部分FSAを分割する例を示す。図3では、FSA(main1)の状態1から状態8に至る部分FSAと、FSA(main2)の状態1から状態8に至る部分FSAが等価である。そこで、部分FSAを(sub1)として分割し、(main1)の状態2と状態16との間を部分FSAを表すシンボルsub1に置き換え、新たにFSA(main3)とする。同様に、(main2)の状態1と状態8との間を部分FSAを表すシンボルsub1に置き換え、新たにFSA(main4)とする。この操作によって、2つのFSA(main1とmain2)の状態数の和は18であるが、分割されたFSA(main3とmain4とsub1)の状態数の和は14となり、分割前の状態数より少なくなっている。なお、FSA分割部は分割後のFSAの状態数の総和を分割前の状態数の総和より少なくすることが目的であるから、分割操作によって状態数が減少しないような場合は、必ずしも分割操作を行う必要はない。
【0013】
次に、本発明の第2実施形態を図4を参照して説明する。この実施形態は、FSA合成部5で複数のFSAを1つのFSAに合成することにより状態数を減らすようにしたものである。
【0014】
FSA合成部5は、図5に示すように、2つ以上のFSAの状態遷移を合成することによって、状態数の総和が減少することが期待される場合、FSA合成によって、2つ以上のFSAを1つのFSAに合成する。FSA合成によって状態数の総和が削減可能かどうかは実際に任意のFSAの組み合わせにおいて、合成操作を行い、合成前後の状態数の総和を比較することで実現することができる。
【0015】
図5は、2つのFSA(main1とmain2)を合成して、1つのFSA(main3)を生成する例を示す。図5では、2つのFSA(main1とmain2)を合成すると1つのFSA(main3)が得られる。この操作によって、2つのFSA(main1とmain2)の状態数の和は8であるが、合成されたFSA(main3)の状態数は5となり、合成前の状態数より少なくなっている。なお、FSA合成部は合成後のFSAの状態数の総和を合成前の状態数の総和より少なくすることが目的であるから、合成操作によって状態数が減少しないような場合は、必ずしも合成操作を行う必要はない。
【0016】
次に、本発明の第3実施形態を図6を参照して説明する。この実施形態は、FSA分割部3で分割することにより状態数を減らしたFSAをFSA合成部5に入れて合成することにより、さらに状態数を減らすようにしたものである。
【0017】
次に、図7を参照して、図1または図6のFSA分割部3の処理フローの一例を説明する。まず、全てのFSAについて、最も状態数の大きな部分FSAを抽出する(ステップS1)。部分FSAが抽出できたかどうかをチェックし(ステップS2)、部分FSAが存在すれば仮に部分FSA分割処理を行う(ステップS3)。次に、部分FSA分割により状態数が減少したかどうかチェックし(ステップS4)、状態数が減少する場合は部分FSAをFSAから分割する(ステップS5)。この操作を、部分FSAの抽出に失敗するか(ステップS2の判定が否定)、部分FSAの分割により状態数が減少しなくなる(ステップS4の判定が否定)まで繰り返す。
【0018】
次に、図8を参照して、図4または図6のFSA合成部5の処理フローの一例を説明する。まず、全てのFSAについて、任意の2つのFSAを選択する(ステップS11)。選択された2つのFSAに対して仮にFSA合成処理を行う(ステップS12)。次に、FSA合成により状態数が減少したかどうかチェックし(ステップS13)、状態数が減少する場合はFSAを合成する(ステップS14)。この操作を、全てのFSAの組み合わせについてチェックするまで繰り返す(ステップS15)。
【0019】
以上、本発明を好適な実施形態により説明したが、本発明は該実施形態に限定されることなく、本発明の趣旨に属する種々の変形も、本発明の範囲内であることは明らかである。
【0020】
【発明の効果】
以上の説明から明らかなように、本発明によれば、FSAの分割および/または合成により、FSAの状態数の総和を削減することができるという効果がある。また、この状態数の削減によって、FSAの記憶に係るメモリ量を削減することができるという効果がある。
【図面の簡単な説明】
【図1】 本発明の第1実施形態の概略の構成を示すブロック図である。
【図2】 本発明の第1実施形態の一具体例の説明図である。
【図3】 本発明の第1実施形態の他の具体例の説明図である。
【図4】 本発明の第2実施形態の概略の構成を示すブロック図である。
【図5】 本発明の第2実施形態の一具体例の説明図である。
【図6】 本発明の第3実施形態の概略の構成を示すブロック図である。
【図7】 前記第1実施形態の動作を示すフローチャートである。
【図8】 前記第2実施形態の動作を示すフローチャートである。
【図9】 従来装置の概略の構成を示すブロック図である。
【符号の説明】
1・・・FSA格納部、2・・・状態数最小化部、3・・・FSA分割部、4・・・出力FSA格納部、5・・・FSA合成部。[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a finite state automaton creation device (Finite State Automaton, hereinafter referred to as an FSA creation device), and in particular, an FSA creation capable of reducing the amount of memory for storing FSA by reducing the number of FSA states. It relates to the device.
[0002]
[Prior art]
Conventionally, as shown in FIG. 9, one FSA (for example, FSA-A) stored in the FSA storage unit 31 is converted into one FSA in which the number of states is minimized by the state
[0003]
[Problems to be solved by the invention]
However, in the past, redundant state transitions in one FSA were removed by the state
[0004]
The present invention has been made in view of the above-described prior art, and an object of the present invention is to reduce the total number of FSA states by dividing or / and combining FSA, and to store the FSA by reducing the number of states. An object of the present invention is to provide an FSA creation apparatus capable of reducing the amount of memory.
[0005]
[Means for Solving the Problems]
To achieve the above object, the present invention minimizes the number of states minimizing the number of states of one or more finite state automata (hereinafter referred to as FSA), and the state number minimizing unit. An equivalent partial FSA is extracted from the one or more main FSAs, and one or more main FSAs expressed using symbols of the equivalent partial FSA and an FSA dividing unit that divides into the equivalent partial FSAs The first feature is that the FSA dividing unit generates an FSA in which the sum of the number of states of the plurality of divided FSAs is smaller than the sum of the number of states of the FSA before the division. There is.
[0006]
The present invention further includes an FSA synthesis unit that extracts an equivalent partial FSA from a plurality of main FSAs minimized by the state number minimizing unit and synthesizes the equivalent FSA using the equivalent partial FSA. The second feature is that the FSA generates a FSA in which the number of states of the synthesized FSA is smaller than the sum of the number of states of the plurality of FSAs before the synthesis.
[0007]
According to the first and second features, the number of FSA states can be reduced as compared with the conventional FSA creation apparatus, and the amount of memory related to FSA storage can be reduced. .
[0008]
DETAILED DESCRIPTION OF THE INVENTION
The present invention will be described below with reference to the drawings. FIG. 1 is a block diagram showing a schematic configuration of an embodiment of the present invention.
[0009]
1 includes an
[0010]
Next, the operation of this embodiment will be described. First, the state
[0011]
The equivalent part FSA is divided as (sub1), and the
[0012]
Next, another specific example of the present embodiment will be described with reference to FIG. FIG. 3 shows an example of dividing a plurality of equivalent partial FSAs from a plurality of FSAs. In FIG. 3, the partial FSA from FSA (main1) from
[0013]
Next, a second embodiment of the present invention will be described with reference to FIG. In this embodiment, the number of states is reduced by combining a plurality of FSAs into one FSA by the FSA combining
[0014]
As shown in FIG. 5, the FSA
[0015]
FIG. 5 shows an example in which two FSAs (main1 and main2) are combined to generate one FSA (main3). In FIG. 5, when two FSAs (main1 and main2) are synthesized, one FSA (main3) is obtained. By this operation, the sum of the number of states of the two FSAs (main1 and main2) is 8, but the number of states of the synthesized FSA (main3) is 5, which is smaller than the number of states before the synthesis. The purpose of the FSA synthesis unit is to make the total number of FSA states after synthesis less than the total number of states before synthesis, so if the number of states does not decrease due to the synthesis operation, the synthesis operation is not necessarily performed. There is no need to do it.
[0016]
Next, a third embodiment of the present invention will be described with reference to FIG. In this embodiment, the number of states is further reduced by putting the FSA having the number of states reduced by the
[0017]
Next, an example of the processing flow of the
[0018]
Next, an example of the processing flow of the
[0019]
As mentioned above, although this invention was demonstrated by suitable embodiment, this invention is not limited to this embodiment, It is clear that the various deformation | transformation which belongs to the meaning of this invention is also within the scope of this invention. .
[0020]
【The invention's effect】
As is apparent from the above description, according to the present invention, there is an effect that the total number of states of the FSA can be reduced by dividing and / or synthesizing the FSA. In addition, the reduction in the number of states has an effect of reducing the amount of memory related to FSA storage.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a schematic configuration of a first embodiment of the present invention.
FIG. 2 is an explanatory diagram of a specific example of the first embodiment of the present invention.
FIG. 3 is an explanatory diagram of another specific example of the first embodiment of the present invention.
FIG. 4 is a block diagram showing a schematic configuration of a second embodiment of the present invention.
FIG. 5 is an explanatory diagram of a specific example of the second embodiment of the present invention.
FIG. 6 is a block diagram showing a schematic configuration of a third embodiment of the present invention.
FIG. 7 is a flowchart showing the operation of the first embodiment.
FIG. 8 is a flowchart showing the operation of the second embodiment.
FIG. 9 is a block diagram showing a schematic configuration of a conventional apparatus.
[Explanation of symbols]
DESCRIPTION OF
Claims (4)
該状態数最小化部で最小化された1または複数のメインFSAから等価な部分FSAを抽出し、該等価な部分FSAのシンボルを用いて表した1または複数のメインFSAと該等価な部分FSAとに分割するFSA分割部とを具備し、
該FSA分割部は、分割された複数のFSAの状態数の総和が、分割前のFSAの状態数の総和に比較して少なくなるFSAを生成することを特徴とするFSA作成装置。A state number minimizing unit for minimizing the number of states of one or more finite state automata (hereinafter referred to as FSA);
The equivalent partial FSA is extracted from one or a plurality of main FSAs minimized by the state number minimizing unit, and the one or a plurality of main FSAs represented by using symbols of the equivalent part FSA and the equivalent partial FSA And an FSA dividing unit that divides into
The FSA dividing apparatus generates an FSA in which the total number of states of a plurality of divided FSAs is smaller than the total number of states of FSAs before division.
該状態数最小化部で最小化された複数のメインFSAから等価な部分FSAを抽出し、該等価な部分FSAを用いて合成するFSA合成部とを具備し、
該FSA合成部は、合成されたFSAの状態数が、合成前の複数のFSAの状態数の総和に比較して少なくなるFSAを生成することを特徴とするFSA作成装置。A state number minimizing unit that minimizes the number of states of a plurality of finite state automata (hereinafter referred to as FSA);
An equivalent partial FSA is extracted from a plurality of main FSAs minimized by the state number minimizing unit, and is synthesized using the equivalent partial FSA; and
The FSA synthesizing unit generates the FSA in which the number of states of the synthesized FSA is smaller than the total number of states of the plurality of FSAs before the synthesis.
該状態数最小化部で最小化された1または複数のメインFSAから等価な部分FSAを抽出し、該等価な部分FSAのシンボルを用いて表した1または複数のメインFSAと該等価な部分FSAとに分割するFSA分割部と、
該FSA分割部で分割されたメインFSAまたは部分FSAを合成する合成部とを具備し、
合成されたFSAの状態数が、分割前のFSAの状態数の総和に比較して少なくなるFSAとなるようにしたことを特徴とするFSA作成装置。A state number minimizing unit for minimizing the number of states of one or more finite state automata (hereinafter referred to as FSA);
The equivalent partial FSA is extracted from one or a plurality of main FSAs minimized by the state number minimizing unit, and the one or a plurality of main FSAs represented by using symbols of the equivalent part FSA and the equivalent partial FSA An FSA splitting unit that splits into
A synthesizing unit that synthesizes the main FSA or the partial FSA divided by the FSA dividing unit,
An FSA creation apparatus characterized in that the number of synthesized FSA states is FSA which is smaller than the total number of FSA states before division.
前記FSA分割部は、部分FSAからさらにその部分FSAを分割するようにしたことを特徴とするFSA作成装置。In the FSA preparation apparatus according to claim 1 or 3,
The FSA creating apparatus, wherein the FSA dividing unit further divides the partial FSA from the partial FSA.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2001095962A JP3827067B2 (en) | 2001-03-29 | 2001-03-29 | Finite state automaton generator |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2001095962A JP3827067B2 (en) | 2001-03-29 | 2001-03-29 | Finite state automaton generator |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2002297681A JP2002297681A (en) | 2002-10-11 |
| JP3827067B2 true JP3827067B2 (en) | 2006-09-27 |
Family
ID=18949949
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2001095962A Expired - Fee Related JP3827067B2 (en) | 2001-03-29 | 2001-03-29 | Finite state automaton generator |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP3827067B2 (en) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN100495407C (en) * | 2007-05-18 | 2009-06-03 | 北京哲安科技有限公司 | A method and chip for matching multiple character strings |
| JP5121650B2 (en) * | 2008-09-26 | 2013-01-16 | 株式会社東芝 | Information processing apparatus, information processing method, and program |
-
2001
- 2001-03-29 JP JP2001095962A patent/JP3827067B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JP2002297681A (en) | 2002-10-11 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP7482253B2 (en) | IMAGE PROCESSING METHOD, APPARATUS, COMPUTER DEVICE, AND STORAGE MEDIUM | |
| US12277766B2 (en) | Information generation method and apparatus | |
| CN113011337B (en) | Chinese character library generation method and system based on deep meta learning | |
| CN114968612B (en) | Data processing method, system and related equipment | |
| CN110427930A (en) | Multimedia data processing method and device, electronic equipment and readable storage medium storing program for executing | |
| KR102305575B1 (en) | Method and system for highlighting similar areas using similarity between images | |
| CN113392840A (en) | Real-time semantic segmentation method based on multi-scale segmentation fusion | |
| CN113409827A (en) | Voice endpoint detection method and system based on local convolution block attention network | |
| US20220366111A1 (en) | High-level synthesis device and high-level synthesis method | |
| WO2010045736A1 (en) | Reduced-latency rendering for a text-to-movie system | |
| CN118396044A (en) | Method and device for accelerating processing of large language model based on middle layer decoding | |
| KR20120088350A (en) | Apparatus for generating high resolution image | |
| JP2009294955A (en) | Image processor, image processing method, image processing program and recording medium with the same program recorded thereon | |
| JP3827067B2 (en) | Finite state automaton generator | |
| CN112346811A (en) | Rendering method and device | |
| CN107329802A (en) | A kind of virtual machine creation method and electronic equipment | |
| CN117196015A (en) | Operator execution method, device, electronic equipment and storage medium | |
| WO2018228528A1 (en) | Batch circuit simulation method and system | |
| CN108108379A (en) | Keyword opens up the method and device of word | |
| CN119477962B (en) | A Self-Supervised Medical Image Segmentation Method and System Based on Structural Relationship Modeling | |
| US9262720B2 (en) | Computer-readable recording medium, extracting device, and extracting method | |
| CN119988345A (en) | Method and device for generating rollback log and determining active data table in transaction rollback | |
| CN117671558A (en) | Poster generation method, device, electronic device and storage medium | |
| WO2024130704A1 (en) | Text cutout method and apparatus based on neural network, device, and storage medium | |
| CN115952172B (en) | Data matching method and device based on database temporary table |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20060405 |
|
| 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: 20060628 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20060628 |
|
| R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| LAPS | Cancellation because of no payment of annual fees |