WO2006061899A1 - 文字列照合装置および文字列照合プログラム - Google Patents

文字列照合装置および文字列照合プログラム Download PDF

Info

Publication number
WO2006061899A1
WO2006061899A1 PCT/JP2004/018348 JP2004018348W WO2006061899A1 WO 2006061899 A1 WO2006061899 A1 WO 2006061899A1 JP 2004018348 W JP2004018348 W JP 2004018348W WO 2006061899 A1 WO2006061899 A1 WO 2006061899A1
Authority
WO
WIPO (PCT)
Prior art keywords
state
transition
character
nfa
state transition
Prior art date
Application number
PCT/JP2004/018348
Other languages
English (en)
French (fr)
Other versions
WO2006061899A8 (ja
Inventor
Mitsunori Kori
Original Assignee
Mitsubishi Denki Kabushiki Kaisha
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 Mitsubishi Denki Kabushiki Kaisha filed Critical Mitsubishi Denki Kabushiki Kaisha
Priority to BRPI0419214-1A priority Critical patent/BRPI0419214B1/pt
Priority to CNB2004800445705A priority patent/CN100524301C/zh
Priority to PCT/JP2004/018348 priority patent/WO2006061899A1/ja
Priority to JP2007531511A priority patent/JP4535130B2/ja
Priority to US11/792,564 priority patent/US8032479B2/en
Publication of WO2006061899A1 publication Critical patent/WO2006061899A1/ja
Publication of WO2006061899A8 publication Critical patent/WO2006061899A8/ja

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • G06F16/90335Query processing
    • G06F16/90344Query processing by using string matching techniques

Definitions

  • the present invention relates to a technique for collating a pattern designated by a regular expression with text in a sentence.
  • Non-Patent Document 1 is a notation method for expressing a language class called a regular language.
  • DFA Deterministic Finite Automaton
  • the DFA character string matching method is based on a model of a state transition machine (automaton).
  • the state transition machine has a state and a state transition function inside.
  • the state transition function determines the next state for the current state and input characters.
  • the input text is read one character at a time, and the state transitions to the next state obtained by applying the state transition function to the current state and input character pair.
  • collation can be performed by scanning the text once without going back, and high-speed character string collation becomes possible.
  • a finite automaton with output (Moore machine) that extends the DFA and defines the output for each state is also used to distinguish the conditions that succeeded.
  • the state transition function of DFA is determined by the regular expression that is the matching condition.
  • regular expression is once converted to NFA (Non-deterministic Finite Automaton), and NFA is further converted to DFA.
  • NFA Non-deterministic Finite Automaton
  • the DFA character string matching method has the advantage of high speed, but on the other hand, it has the disadvantage that the state transition table for realizing the DFA state transition function tends to be very large.
  • the collation condition of FIG. 52 disclosed in Patent Document 3 is taken as an example.
  • Fig. 53 shows the state transition table and failure function generated from the matching conditions of Fig. 52 in the conventional finite automaton with output. In this way, it is necessary to generate a state transition table that holds 90 combinations for 18 states and 5 character types.
  • Patent Document 1 and Patent Document 2 include AC (AC
  • Patent Document 3 discloses a method for reducing state transition tables by defining a failure function in DFA.
  • the transition fails once again after the transition is made by the failure function. That is, transition failures may occur in a chain. In such a case, there is a problem that it is necessary to refer to the repeated failure function and the collating speed is lowered.
  • FIG. 54 shows a state transition table and a failure function generated in the matching condition force of FIG. 52, which is disclosed in Patent Document 3.
  • the state is first initialized to state 1.
  • the first character “a” is read, and the state transitions to state 3 indicated in the column of input character “a” in the state 1 row of the state transition table.
  • the second character “a” is read and the transition from state 3 to state 6 is performed in the same manner.
  • the state transitions from state 6 to state 10 by reading the third character “c”.
  • the fourth character “a” appears next, there is no transition destination that corresponds to the character “a” in state 10; therefore, first, state 5 that is the transition destination at the time of failure in state 10 Transition to.
  • transition is made to state 2, which is the transition destination when state 5 fails.
  • state 1 which is the transition destination when state 2 fails.
  • the statement Transition is made to state 3 because transition destination state 3 corresponding to the letter “a” exists.
  • the state transition table is referenced and state transitioned 4 times in total for the 4th input character, and 7 state transitions are performed for 4 characters as a whole. I need.
  • Tokusen Literature 1 E.J.Hopcroft, D.J.Ullman, "Formal Languages and their Relation to Automata", Addison Wesley (1969)
  • Patent Document 1 JP 2004-103035 A
  • Patent Document 2 JP 2004-103034 A
  • Patent Document 3 Japanese Patent No. 2994926
  • the present invention has been made to solve the above-described problems, and reduces the storage capacity required to store a state transition table for character string matching using a regular expression as a matching condition. With the goal.
  • the number of state transition table references due to failure of transition is set to 2 or less per character, preventing performance deterioration due to performance deterioration due to repeated failure of transition, and enabling high-speed character string matching. For the purpose.
  • a character string matching device includes a state transition table generating unit that generates a state transition table based on a matching condition described by a regular expression, and a state transition table generated by the state transition table generating unit. And the automaton has no next transition destination state for the set of the current state and the input character in the state transition table generated based on the collation condition !, In this case, the input character is not read and the initial state is entered.
  • a state transition table generating unit that generates a state transition table based on a matching condition described by a regular expression, and an automaton that transitions based on the state transition table generated by the state transition table generating unit, In the state transition table generated based on the collation condition, the automaton does not read the input character and proceeds to the initial state when the next transition destination state for the set of the current state and the input character does not exist. By transitioning to, the storage capacity required to store the state transition table can be reduced.
  • FIG. 1 is an explanatory diagram showing a configuration of a character string matching device.
  • FIG. 2 is an explanatory diagram showing a configuration of matching condition 2;
  • FIG. 3 is an explanatory diagram showing a configuration of conditional expression 17
  • FIG. 4 is an explanatory diagram showing a configuration of a state transition table generation unit 3.
  • FIG. 5 is an explanatory diagram showing a configuration of a state transition table storage unit 4.
  • FIG. 6 is an explanatory diagram showing a configuration of the output table storage unit 5.
  • FIG. 7 is an explanatory diagram showing a configuration of verification result 10.
  • FIG. 8 is a flowchart showing the operation of the character string matching device.
  • FIG. 13 is a flowchart showing a procedure for removing non-deterministic transitions.
  • FIG. 14 is a flowchart showing the procedure for initializing the state set.
  • FIG.15 Flowchart showing the procedure for removing non-deterministic transitions related to trap
  • FIG. 19 is a flowchart showing the procedure for removing unused states.
  • FIG. 20 is a flowchart showing a procedure for removing a redundant state.
  • FIG. 43 is an explanatory diagram for explaining the merging of redundant states.
  • FIG. 47 is an explanatory diagram showing an example of operation.
  • FIG. 49 is an explanatory diagram showing the configuration of the state transition table
  • FIG. 50 is an explanatory diagram showing the structure of the output table.
  • FIG. 51 is an explanatory diagram showing an operation example.
  • FIG. 52 Collation conditions disclosed in Patent Document 3
  • FIG. 1 is a block diagram showing a character string collating apparatus according to the present invention.
  • a character string matching device 1 is a device that performs character string matching using a regular expression according to the present invention, and whether the input document 6 includes a document that satisfies the matching condition 2 or not.
  • Collation condition 2 is a condition describing the conditions for character string collation, and is input to character string collation device 1.
  • the state transition table generation unit 3 generates the state transition 11 and the output description 12 from the matching condition 2 and passes them to the state transition table storage unit 4 and the output table storage unit 5, respectively.
  • the state transition table storage unit holds a set of state transitions 11.
  • the output table storage unit 5 holds the output description 12.
  • Input document 6 is a document to be verified.
  • the input character reading unit 7 extracts characters included in the input document 6 one by one and sends them to the SDFA automaton 8 as input characters 14.
  • the SDFA automaton 8 stores the current state 13 in the internal state storage unit 9, receives the input character 14 from the input character reading unit 7, and refers to the state transition table storage unit 4 and the output table storage unit 5 to store the state storage unit 9 Update the current state 13 stored in and output the collation result 10.
  • the state storage unit 9 stores the state held in the SDFA automaton 8. 10 is the matching result. 11 is a state transition, and is a set of the current state 13, the input character 14, and the next state 15. 12 is an output description, which is a set of the current state 13 and condition number 16. 13 is the current state, 14 is the input character. 15 is the next state. 16 is a condition number.
  • FIG. 2 is a diagram showing a configuration of the collation condition 2 in the present invention.
  • the conditional expression 17 is an individual condition that constitutes the matching condition 2, and one or more conditional expressions 17 are included in the matching condition 2.
  • FIG. 3 is a diagram showing a configuration of conditional expression 17 in the present invention.
  • Conditional expression 17 consists of condition number 16 and condition description 18.
  • Condition number 16 is a number for uniquely distinguishing conditional expressions
  • condition description 18 is a matching condition described by a regular expression. .
  • FIG. 4 is a diagram showing a configuration of the state transition table generating unit 3 in the present invention.
  • the state transition table generation control unit 21 controls an operation procedure for generating the state transition generation table.
  • the NFA state set 22, NFA state transition set 23, NFA output description set 24, state set 25, output transition set 26, and state description set 27 are data referred to by the state transition table generation control unit 21.
  • FIG. 5 is a diagram showing an example of the configuration of the state transition table storage unit 4 in the present invention.
  • 31 is a hash value calculation unit, which calculates a hash value 32 from the current state 13 and the input character 14.
  • the hash value 32 is a hash value calculated by the hash value calculation unit 31.
  • the state transition hash pointer 33 is a table that stores a plurality of pointers of the state transition hash chain 34.
  • the state transition hash chain 34 is a set of a pointer to the state transition hash chain 34, a current state 13, an input character 14, and a next state 15.
  • the state transition hash table 35 is a data structure including a state transition hash pointer 33 and a state transition hash chain 34.
  • the comparison unit 36 compares the set of the current state 13a and the input character 14a input from the outside with the current state 13b and the input character 14b stored in the state transition hash table 35, and outputs the next state 15.
  • FIG. 6 is a diagram showing a configuration of the output table storage unit 5 in the present invention.
  • Condition number index 41 stores a plurality of pointers to the condition number chain.
  • the condition number chain 42 is a combination of a pointer to the condition number chain 42 and the condition number 16.
  • FIG. 7 is a diagram showing an example of the collation result 10 in the present invention.
  • Match result 10 is Contains condition number 16, which successfully matched input document 6.
  • Non-Patent Document 1 As described in Non-Patent Document 1 and the like, a deterministic finite automaton with output, which is known in the past, is given by a set of (Q, ⁇ , ⁇ , ⁇ , ⁇ , q). Where Q is the state
  • is the input alphabet and contains the empty character ⁇ .
  • is the output alphabet, ⁇ is the transition function (Q X ⁇ ⁇ Q), ⁇ is the output function (Q ⁇ A), and q is the initial state.
  • the SDFA automaton 8 of the present invention is given by a set of (Q, ⁇ , ⁇ , ⁇ , e, q).
  • Q is the state set 25, and is the state set Q of the conventional finite automaton with output.
  • is an output alphabet, which is a set of sets of condition number 16 in this embodiment.
  • is a state transition function realized by the state transition table storage unit 4, and hereinafter, the current state 1
  • q is the initial state, the meaning of which is known as a conventional force deterministic finite auto with output
  • is an arbitrary character ⁇ , divisor for the input alphabet ⁇ of a conventional finite automaton with output.
  • state transition set 26 The set of state transitions 11 in which the next state 15 exists for the set of the current state 13 input characters 14 is referred to as a state transition set 26 and is denoted as T.
  • state transition t tran S (q, q, ⁇ ), q
  • sdss Is called the starting point
  • q is the ending point
  • is the transition character.
  • the function that gives the starting point of state transition t is ds
  • the function that gives the Source and end point is called Char, and the function that gives the Destination transition character is called Char.
  • a set of output descriptions 12 whose output alphabet r is not empty for the current state 13 is called an output description set 27 and is denoted as D.
  • the function that gives the output state of output description d is called State, and the function that gives the output result is called Result.
  • State set 25 is a set of NFA state sets.
  • is the NFA state transition function, where the current NFA state 13 is q and the input character 14 is s (NFA) (NFA)
  • is the output function of the NFA, or when the current NFA state 13 is q, the output alpha s (NFA) (NFA) That the bet is r E ⁇
  • is a set of condition numbers 16, and ⁇ is an extended input alphabet, meaning the present invention s s
  • NFA state transition set T
  • the function that gives the Source and end point is called Char, and the function that gives the Destination transition character is called Char.
  • a set of the NFA state q and the output alphabet r is called an NFA output description.
  • NFA output description set 24 A set of NFA output descriptions whose output alphabet p is not empty for NFA state 13 is called an NFA output description set 24 and is denoted as D.
  • FIG. 8 shows the operation of the character string matching device 1 of the present invention.
  • the character string matching device 1 of the present invention first receives the matching condition 2 and generates the state transition 11 and the output description 12 by the state transition table generation unit 3, that is, executes the procedure for compiling the matching condition. (Step S51).
  • step S52 the procedure for outputting the collation result 10 is sequentially executed by the input character reading unit 7 and the SDFA automaton 8 while referring to the state transition 11 and the output description 12 (step S52).
  • ⁇ transition is included from the regular expression by the procedure of “Generate NFA including ⁇ transition”.
  • step S 103 a transition to the initial state when the verification fails is added by the procedure “addition of transition to initial state” (step S 103).
  • non-deterministic transitions are removed by the procedure of “removing non-deterministic transitions” (step S 104).
  • step S105 the state unnecessary in the previous procedure is removed.
  • step S 106 the redundant state and redundant state transition are removed by the procedure “reduction of the number of states” (step S 106).
  • the state transition table is converted from the state set by the procedure of "generation of state transition table and output table”. And an output table are generated (step S107).
  • Non-Patent Document 1 For the procedure of “Generation of NFA including ⁇ transition” in step S101, a known procedure shown in Non-Patent Document 1 or the like can be used.
  • the metacharacter representing the character set other than the specific character set included in the regular expression is replaced with ⁇ , and the state transition from the corresponding state to the initial state q is changed to other O (NFA).
  • step S102 Regarding the procedure of "removing ⁇ transition" in step S102, the ⁇ transition (transition by the empty character) is replaced with a transition to the transition destination set by a known procedure shown in Non-Patent Document 1 and the like. Can be realized.
  • FIG. 10 shows the procedure of “add failure transition to initial state” in step S103.
  • step S202 If not, the process proceeds to step S202. Otherwise, go to step S203 (step S201).
  • step S202 The power that divides the process according to the process
  • step S203 The process of step S202 can be substituted by step S203.
  • the process of step S202 is limited to the applicable range force S “There is a transition destination by ⁇ from the initial state”, but the state transition any
  • the procedure “add failure transition to initial state” can be performed.
  • step S202 “add failure transition to initial state (from initial state to ⁇ ⁇
  • Figure 28 shows an example of regular expression (a
  • a b
  • step S202 “addition of failed transition to initial state (from initial state to ⁇
  • step S302 step S301.
  • is set to Char (t), and the process proceeds to step S304 (step S303).
  • Step S306 Step S305.
  • step S307 step S306
  • Step S308 Let t be the first NFA state transition starting from, and go to Step S308 (Step S308).
  • Step S309 Step S308
  • step S309) If the condition for deviation does not hold, go to step S311 (step S309)
  • NFA state transition trans (q, Destination ⁇ ), ⁇ ) is included in NFA state transition set ⁇
  • step S310 If it is not rare, in addition to T, the process proceeds to step S311 (step S310).
  • step S306 if NFA state q force ⁇ FA initial state q, or step
  • step S203 “Addition of failed transition to initial state (from initial state to ⁇ ⁇
  • step S352 step S351.
  • Step S353 Step S352.
  • is set to Char (t), and the process proceeds to step S354 (step S353).
  • Step S356 Step S355.
  • step S356 If the NFA state q is the initial state q, the process proceeds to step S356. Otherwise
  • step S306 Advances to step S357 (step S306).
  • the NFA state transition trans (q, Destination ⁇ ), ⁇ ) becomes the NFA state transition set ⁇
  • step S104 removes non-deterministic transitions contained in NFA and generates deterministic transitions.
  • the state transition end point q by the transition character a includes the non-deterministic transition character a.
  • step S104 the procedure of “removing non-deterministic transition” in step S104 will be described.
  • the variable Retry is set to other.
  • variable Retry can be TRUE or FALSE!
  • step S402 the procedure of “initial state of state set” is performed, and the process proceeds to step S402 (step S401).
  • variable Retry is initialized to FALSE, and the process proceeds to step S401 (step S402).
  • the procedure “removal of non-deterministic transition” can be performed according to the above procedure.
  • step S401 the procedure of “initial state of state set” in step S401 will be described. This procedure is for initializing the necessary state set to generate the DFA state, and for all NFA states q, the DFA state ⁇ q ⁇ with the associated state transitions. Generation
  • the purpose is to do.
  • step S502 is the first NFA state included in the NFA state set Q, and step S502 is performed.
  • Step S506 proceeds to Step S506. In cases other than that described here, process flow proceeds to Step S504 (Step S503).
  • NFA state set (ie, DFA state) ⁇ q ⁇ is added to state set Q, and step S505 is added.
  • step S506 If (NFA) (NFA) is performed, the state transition set T is emptied, and the process proceeds to step S507 (step S506).
  • Step S511 proceeds to Step S511. In cases other than that described here, process flow proceeds to Step S509 (Step S508).
  • step S510 proceeds to step S510 (step S509).
  • step S512 Empties the output description set D and proceeds to step S512 (step S511).
  • step S508 step S512
  • step S403 the procedure of “removing non-deterministic transition related to bag” in step S403 will be described.
  • this procedure as shown in Fig. 32 and Fig. 34, when there are multiple transition destinations for one transition character ⁇ ⁇ , each transition character is replaced with a transition to a new state. The purpose is to uniquely determine the transition destination by ⁇ .
  • step S 403 the procedure of “removing non-deterministic transitions related to sputum” in step S 403 will be described.
  • This procedure uses the variable Found.
  • the variable Retry is TRUE or FALSE! It can take any value.
  • step S603 step S602.
  • Step S616 If all the states q in the state set Q have been processed, the process proceeds to step S616. In cases other than that described here, process flow proceeds to Step S604 (Step S603).
  • Step S610 If all alphabets ⁇ in the input alphabet ⁇ have been processed, the process proceeds to step S610. In cases other than that described here, process flow proceeds to Step S606 (Step S605).
  • Step S607 If the transition is non-deterministic, go to step S607. In cases other than that described here, process flow proceeds to Step S609 (Step S606).
  • Step S60 7 (Step S60 7 ).
  • variable Found is set to TRUE, and the process proceeds to step S609 (step S608).
  • Step S609 Let ⁇ be the next alphabet in the input alphabet ⁇ , and go to Step S605 (Step S609).
  • step S605 When all alphabets ⁇ in the input alphabet ⁇ are processed in step S605, t is set as the first state transition starting from state q, and the process proceeds to step S611 (step S610). [0135] If all the state transitions t starting from state q have been processed, the process proceeds to step S615. In cases other than that described here, process flow proceeds to Step S612 (Step S611).
  • step S614 step S612.
  • transition character of t is replaced with ⁇ , that is, t is replaced with other other by (Source (t), Destination (t), ⁇ ), and the process proceeds to step S614 (step S613).
  • step S611 If all the state transitions t starting from state q are processed in step S611, q is set as the next state transition in state set Q, and the process proceeds to step S603 (step S615).
  • variable Found can take either TRUE or FALSE values.
  • variable Counter is used.
  • Counter can take an integer value of 0 or greater.
  • step S703 Let q be the first state in state set Q, and go to step S703 (step S702).
  • Step S714 If all the states q in the state set Q have been processed, the process proceeds to step S714. In cases other than that described here, process flow proceeds to Step S701 (Step S703).
  • Step S705 Step S704.
  • Step S706 First state transition starting from q is set in t, and the process proceeds to step S706 (step S705). [0149] If all the state transitions t starting from q have been processed, the process proceeds to step S710. In cases other than that described here, process flow proceeds to Step S707 (Step S706).
  • step S708 If the transition character Char (t) of t is ⁇ , the process proceeds to step S708. Otherwise
  • step S709 step S707
  • step S705 step S709
  • Step S711 If the value of Counter is 2 or more, proceed to step S711. In cases other than that described here, process flow proceeds to Step S713 (Step S710).
  • step S2 step S1
  • TRUE is set in the variable Found, TRUE is set in the variable Retry, and the process proceeds to step S713 (step S712).
  • step S713 Let q be the next state transition in state set Q, and proceed to step S703 (step S713).
  • step S703 When all the states q in state set Q are processed in step S703, the variable Found is set.
  • step S607 the procedure “procedure of new state” in step S607 and step S711 will be described.
  • the procedure “Create new state” takes q and ⁇ as parameters.
  • the state q is the starting point, and a set of states that can be transitioned by ⁇ is obtained, and their NFA
  • Step S801 Find the union for the state and let it be state q. If q is included in the state transition set T, the process proceeds to step S817. In cases other than that described here, process flow proceeds to Step S802 (Step S801).
  • Step S802 the state q is added to the state set Q, and the process proceeds to Step S803 (Step S802).
  • step S804 step S803
  • step S817 If all state transitions t starting from q have been processed, the process proceeds to step S817. It source
  • step S805 step S804.
  • step S816 step S805.
  • Step S807 Step S807
  • step S808 step S807
  • step S809 step S808
  • Step S816 If all output descriptions d whose output state is Destination (t) have been processed, the process proceeds to step S816. In cases other than that described here, process flow proceeds to Step S814 (Step S813).
  • step S815 If the output description is not desc (q, Result (d)) E D, desc (q, Result (d)) is added to D, and the process proceeds to step S815 (step S814).
  • step S801 If q is included in the state transition set T in step S801, and if all state transitions t starting from q are processed in step S804, t starts from q And first The process proceeds to step S818 (step S817).
  • step S822 If all the state transitions t starting from q have been processed, the process proceeds to step S822. It source
  • step S819 step S818).
  • Step S820 The state transition t is deleted from the state transition set T, and the process proceeds to Step S821 (Step S820).
  • step S821 Let t be the next state transition starting from q, and proceed to step S818 (step S821).
  • step S818 If all state transitions t starting from q are processed in step S818, state transition source
  • trans (q, q, ⁇ ) ⁇ is not ⁇ , add trans (q, q, ⁇ ) to ⁇ and exit (step source n t source n t
  • the procedure “Generate New State” can be performed by the above procedure.
  • step S811 the procedure “correction of state transition by ⁇ ” in step S811 will be described.
  • transition characters b, c, and ⁇ are q U q, q U q , q U q and other 3 6 4 5 4 6, respectively.
  • step S811 The procedure "Correction of state transition by ⁇ " in step S811 is explained with reference to FIG.
  • This procedure uses CharSet, a set of extended input alphabet ⁇ E ⁇ .
  • CharSet is initialized to empty, and the process proceeds to step S902 (step S901).
  • Char (t) is included in the input alphabet ⁇ , that is, Char (t) ⁇ ⁇ and Char (t) ⁇ any
  • Step S906 If ⁇ , proceed to step S906. Otherwise, go to Step S905 (Step other S904).
  • step S903 If all state transitions starting from Source (t) are processed in step S903, t is set to other.
  • step S907 The first state transition starting from state q is set, and the process proceeds to step S908 (step S907).
  • Step S909 Step S908
  • step S916 (step S909).
  • step S912 step S911.
  • Char (t) is included in the input alphabet ⁇ , ie Char (t) ⁇ ⁇ and Char (t)
  • Step S915 Step otner
  • step S914 step S913.
  • step S908 The next state transition is started from state q, and the process proceeds to step S908 (step S916).
  • the procedure “correction of state transition by ⁇ 2” can be performed by the above procedure.
  • step S105 the procedure of "removing unused state" in step S105 will be described. This procedure Then, the state that does not become the end point of the state transition that occurred as a result of the processing so far, that is, the state that never reaches any input is deleted.
  • step S105 The procedure of "removing unused state" in step S105 will be described with reference to FIG.
  • variable Found can be TRUE or FALSE!
  • step S1001 the variable Found is set to FALSE, and the process proceeds to step S1002 (step S1001).
  • step S1003 step S1002
  • Step S1017 If all the states q included in the state set Q have been processed, the process proceeds to step S1017. In cases other than that described here, process flow proceeds to Step S1004 (Step S1003).
  • step S1005 If q is in the initial state q, the process proceeds to step S1016. Otherwise, step S1005
  • Step S1016 If there is a state transition with q as the end point, the process proceeds to step S1016. In cases other than that described here, process flow proceeds to Step S1006 (Step S1005).
  • variable Found is set to TRUE, and the process proceeds to step S1007 (step S1006).
  • step S1008 Let t be the first state transition starting from q, and proceed to step S1008 (step S1007).
  • Step S1011 If all state transitions t starting from q have been processed, the process proceeds to step S1011. In cases other than that described here, process flow proceeds to Step S1009 (Step S1008).
  • step S1010 The state transition t is removed from the state transition set T, and the process proceeds to step S1010 (step S1009).
  • step S1008 [0214] Let t be the next state transition starting from q, and proceed to step S1008 (step S1010).
  • step S1008 When all state transitions t starting from q are processed in step S1008, d is set as the first output description in which q is the output state, and the process proceeds to step S1012 (step 1011).
  • Step S1015 If all output descriptions d having q as the output state have been processed, the process proceeds to step S1015. Otherwise, go to Step 1013 (Step 1012).
  • step S1012 [0218] Let d be the next output description with q as the output state, and proceed to step S1012 (step S1014).
  • step S1012 If all output descriptions d in which q is an output state have been processed in step S1012, state q is deleted from state set Q, and the process proceeds to step S1012 (step S1015). [0220] Let q be the next state included in state set Q, and proceed to step S1003 (step S1016).
  • the procedure “removal of unused state” can be performed by the above procedure.
  • the procedure “removing unused state” is intended to reduce the memory capacity necessary to store the state transition table. Therefore, even if this procedure is omitted, the procedure “collation of input document” can be executed, and by omitting this procedure, the time required for “compilation of collation conditions” can be shortened.
  • step S 106 the procedure of “redundant state removal” in step S 106 will be described.
  • This procedure removes two types of unnecessary conditions.
  • the first case is a state transition with the same end point state as the state other transition due to ⁇ .
  • Figure 42 shows an example.
  • the SDFA automaton works even if the state transition with q as the end point due to the transition character b is deleted.
  • the second case is the merging of multiple states with the same end point of state transition for all transition characters.
  • Figure 43 shows an example.
  • states q and q are the states for all transition characters.
  • step S106 the procedure of “redundant state removal” in step S106 will be described. This procedure uses the variables StateRemoved and TransitionRemoved. Variable
  • StateRemoved and TransitionRemoved can take either TRUE or FALSE values.
  • TRUE is set in StateRemoved, and the process proceeds to step S1102 (step S1101).
  • step S1105 step S1104.
  • the procedure “removing the redundant state” can be performed by the above procedure.
  • the procedure “removing redundant state” is intended to reduce the memory capacity necessary to store the state transition table. Therefore, even if this procedure is omitted, the procedure “collation of input document” can be executed, and by omitting this procedure, the time required for “compilation of collation conditions” can be shortened.
  • step S1102 the procedure “Deletion of redundant state transition” in step S1102 will be described. This procedure corresponds to the first case of “redundant state elimination” and is based on ⁇ as shown in FIG.
  • step S1102 the procedure “Deletion of redundant state transition” in step S1102 will be described.
  • Step S 1202 Step S1201
  • step S1203 is set as the first state transition included in the state transition set T, and the process proceeds to step S1203 (step S1202).
  • Step S1204 Step S1203
  • Step S1206 Step S1206
  • Step S1207 Step S1206
  • step S1208 Destination (t)
  • Step S1208 The state transition t is deleted from the state transition set T, and the process proceeds to Step S1209 (Step S1208).
  • step S1210 The next state transition is included, and the process proceeds to step S1203 (step S1210).
  • the procedure “Deletion of redundant state transition” can be performed by the above procedure.
  • step 1104 can be executed by a known procedure described in Non-Patent Document 1, for example. This procedure sets the variable StateRemoved to TRUE when more than one state is merged. Otherwise variable
  • step S107 generation of state transition table and output table
  • state transition 11 and output description 12 are extracted from state set 25, state transition set 26, and output description set 27, and state transition table storage 4 and output table storage 1 respectively.
  • the first state transition t is extracted from the state transition set T (step S1302).
  • step S1307 After all the state transitions t included in the state transition set T have been processed, the process proceeds to step S1307.
  • Hash value is calculated by hash value calculation unit 31 for the set of current state Source (t) and input character Char (t)
  • step S1305 step S1314
  • the first output description d is taken out from the output description set (step S1307).
  • Result (d) is added as condition number chain 42 to condition number index 41 corresponding to state number StateId (State (d)) of State (d), and the process proceeds to step S1310 (step S1309).
  • initial state q is set as state q, and the flow proceeds to step S2002 (step S2001).
  • the output table storage unit 5 is searched, and the condition number 16 related to q is output. This procedure is realized by sequentially searching for a pointer to the condition number chain 42 corresponding to the state number Stateld (q) of the current state 13 of the condition number index 41. When the search for all the condition number chains 42 is completed, the process proceeds to step S2003 (step S2002).
  • step S2004 step S2003
  • step S2005 step S2004
  • State transition table storage 4 is searched, and whether there is a transition destination q from state q by transition character ⁇ d
  • step S2007 If the transition destination q exists, the process proceeds to step S2007. Otherwise, step d
  • step S2006 If q does not exist in step S2006, whether or not there is a transition destination qd other d by the transition character ⁇ from the state q, that is, whether or not q which is trans (q, q, ⁇ ) exists.
  • D d If q does not exist in step S2006, whether or not there is a transition destination qd other d by the transition character ⁇ from the state q, that is, whether or not q which is trans (q, q, ⁇ ) exists.
  • step S2009 step S2008.
  • step S2007 If the transition destination q exists, the process proceeds to step S2007. Otherwise, step d
  • the procedure “verification of input document” can be performed by the above procedure.
  • the operation of the character string collating apparatus of the present example will be described below by taking the case of collation condition 2 shown in Fig. 44 and the case of the input character string shown in Fig. 54 as an example.
  • the collation conditions in FIG. 44 are the collation conditions in FIG. 52 shown in Patent Document 3 in accordance with the format of this example, and are collation conditions logically equivalent to FIG.
  • the state transition table in FIG. 45 represents the current state 13 stored in the state transition table storage unit 4 and the next state 15 for the input character 14 as a table.
  • the state number of the current state is 6.
  • the input character “d” indicates that the next state is 10.
  • “1” indicates that the next state 15 does not exist, and the state transition table storage unit 4 can store the memory without consuming memory for such a combination.
  • the conventional finite state automaton with output requires 90 combinations, whereas in the example of Fig. 45, it is only necessary to store information for 46 state transitions. Reducing the memory required for storage can provide a positive effect.
  • the output table of FIG. 46 is a table representing a set of condition numbers 16 corresponding to the current state 13 stored in the output table storage unit 5. For example, in the case of the current state force, the condition number 0 is set. This indicates that it is output.
  • FIG. 47 shows an operation when the input character string “ aaC a” is input.
  • state q is set to the initial state (state 0).
  • state 0 the initial state
  • state 2 the transition destination of the character “a”. Since the transition destination by the character “a” is defined, it is not necessary to refer to ⁇ , which is indicated as (unnecessary) in FIG. Then other
  • the second character “a” is read and a transition is made to state 5 which is the transition destination of character “a” in state 2.
  • the third character “c” is read, and a transition is made to state 9 which is the transition destination of character “c” in state 5.
  • the fourth character “a” is read, and a transition is made to state 12, which is the transition destination of character “a” in state 9. The input ends here.
  • collation condition in Fig. 44 is described for comparison with the technique described in Patent Document 3, but the special condition that the initial state force can be changed by all characters is used. have.
  • the purpose of the collation condition in Fig. 44 is to be able to detect the character string in the collation target character string “abcd” even if one character changes. Without being converted to the matching conditions shown in FIG. In such a case, the memory required for the state transition can be further reduced, and the effects of the present embodiment can be further exerted.
  • FIG. 51 shows the operation for input “xabxd” with respect to the matching condition 2 of FIG. In state 0, the transition destination of the first character “x” is not defined.
  • the transition state is still defined, so the next state is the initial state, that is, state 0.
  • the state transition table is referenced twice.
  • the state of the second character “a” is 3, 3 characters Transition to state 6 at eye "b”. Since the transition destination of “x” is not defined in the fourth character “Phantom”, the next state 1 is obtained by referring to ⁇ . At this time, the state transition table is referenced twice. More other
  • state 2 since there is number 0 as the output condition number 16, this is output. In this case, the state transition table is referenced 7 times.
  • General DFA is a special output that outputs two types of information: “accepted” and “not accepted” as output alphabets. It can be regarded as a Moore machine. Also in this example, it is possible to configure a character string collating device that outputs two types of information “accepted” and “not accepted” simply by determining whether or not a condition number exists in the collation result.
  • the input and collation target is assumed to be "character”.
  • "Character” is not limited to a human-readable character string, and can be applied to any symbol string or data string. Can be applied.
  • the present invention may be applied to identification of data measured by a gene sequence or a sensor.
  • the state transition hash table 35 is used for the state transition table storage unit 4, but a two-dimensional table such as an array or a tree structure cannot be logically expressed. It may be realized by a suitable data structure.
  • Data structures such as arrays with high access speed are used for frequently used states such as the initial state, and memory capacity is highly efficient for low-use states.
  • a data structure such as a tree structure may be used in combination.
  • the present invention can be applied to a character string collating apparatus.

Abstract

 正規表現で記述された照合条件に基づいて状態遷移表を生成する状態遷移表生成部と、前記状態遷移表生成部により生成された状態遷移表に基づいて遷移するオートマトンとを備えるとともに、前記オートマトンは、前記照合条件に基づいて生成された状態遷移表において、現状態と入力文字の組に対する次の遷移先状態が存在しない場合、入力文字を読み進めずに初期状態へ遷移する。  また、正規表現で記述された照合条件に基づいて状態遷移表を生成する状態遷移表生成部と、前記状態遷移表生成部により生成された状態遷移表に基づいて遷移するオートマトンとを備えるとともに、前記状態遷移表生成部は、前記照合条件に基づいて生成された状態遷移表において、現状態と入力文字の組に対する次の遷移先状態が存在しない場合、入力文字を読み進めずに所定の状態へ遷移する除外文字を設定して状態遷移表を作成する。

Description

明 細 書
文字列照合装置および文字列照合プログラム
技術分野
[0001] 本発明は、正規表現によって指定されたパターンと文章中のテキストの照合を行う ための技術に関するものである。
背景技術
[0002] 近年様々な分野で文書の電子化が進んでおり、文書の効率的な検索方法が求め られている。検索の一方法として、正規表現によって指定されたパターンと文書中の テキストの照合を行う方法がある。正規表現とは、例えば非特許文献 1に記載されて おり、正規言語と呼ばれる言語のクラスを表現する表記方法である。正規表現を検索 条件とする文字列照合方式として、 DFA(Deterministic Finite Automaton,決定性有 限オートマトン)による方法が知られている。
[0003] DFAによる文字列照合方式は状態遷移機械 (オートマトン)のモデルに基づ 、て 、 る。状態遷移機械は内部に状態と状態遷移関数を持つ。状態遷移関数は現在の状 態と入力文字に対して次の状態を決定する関数である。 DFAを用いた文字列照合方 式では、入力テキストを 1文字づっ読み出し、現在の状態と入力文字の組に対して状 態遷移関数を適用して得られた次の状態に遷移する。この方法によるとテキストを後 戻りすることなく 1度走査することによって照合を行うことができ、高速な文字列照合が 可能になる。複数の条件による照合を行う場合、照合に成功した条件を区別するた め、 DFAを拡張し各状態に出力を定義した出力つき有限オートマトン (Moore機械)も 用いられている。
[0004] DFAの状態遷移関数は照合条件となる正規表現によって決まるが、従来から、正 規表現を一度 NFA (Non- deterministic Finite Automaton,非決定性有限オートマトン )に変換し、更に NFAを DFAに変換するその手順が知られており、例えば非特許文 献 1などに記載されている。 DFAによる文字列照合方式は高速であるという特長を持 つが、反面、 DFAの状態遷移関数を実現するための状態遷移表が巨大になりやす いという欠点があった。 [0005] 一例として、特許文献 3に開示されている図 52の照合条件を例にとる。図 53は従 来の出力つき有限オートマトンにおいて図 52の照合条件から生成される状態遷移表 および失敗関数である。このように状態数 18と文字種別 5種類に対し、 90通りの組を 保持する状態遷移表を生成する必要がある。
[0006] このような課題を解決する方法として、特許文献 1、特許文献 2には、 AC (
Aho-Corasick)法に基づく状態遷移表を DFAに変換した後、初期状態への遷移操作 および初期状態の次の状態への遷移操作を状態遷移表力 除去することによって状 態遷移表の記憶容量を削減する方法が示されている。しかし、特許文献 1、特許文 献 2に示された文字列照合方法では、照合の対象を固定の文字列キーワードに限定 して 、るため、一般の正規表現を照合の対象とすることはできな 、。
[0007] また、特許文献 3には、 DFAにおいて、失敗関数を定義することによって状態遷移 表を削減する方法が示されている。しかし、特許文献 3に示された方法では、一度失 敗関数によって遷移した状態で再び遷移に失敗することがある。すなわち、遷移の 失敗が連鎖的に発生することがある。このような場合は、繰り返し失敗関数を参照す る必要があり照合速度が低下するという問題点があった。
[0008] 一例として、特許文献 3に開示されている図 52の照合条件を例にとる。図 54は図 5 2の照合条件力 生成される状態遷移表および失敗関数であり、特許文献 3に開示 されている。
[0009] 照合条件が図 52の条件であり、入力文字列が「aaca」の場合を例にとる。
[0010] 特許文献 3に開示されている方法では、まず、状態を状態 1に初期化する。次にま ず、 1文字目の「a」を読み、状態遷移表の状態 1の行で入力文字「a」の列に示されて いる状態 3に遷移する。次に、 2文字目の「a」を読み、同様に、状態 3から状態 6に遷 移する。次に 3文字目の「c」を読むことにより、状態 6から状態 10に遷移する。ところ 力 次に 4文字目の文字「a」が出現した場合は、状態 10で文字「a」に該当する遷移 先が存在しないことから、まず、状態 10の失敗時の遷移先である状態 5に遷移する。 更に、状態 5で文字「a」に該当する遷移先が存在しないことから、状態 5の失敗時の 遷移先である状態 2に遷移する。しかし、状態 2でも文字「a」に該当する遷移先が存 在しないことから、状態 2の失敗時の遷移先である状態 1に遷移する。状態 1では、文 字「a」に該当する遷移先状態 3が存在することから状態 3に遷移する。このように、 4文 字目の入力文字に対しては合計 4回の状態遷移表の参照と状態遷移を行っており、 全体としては 4文字の入力文字に対して、 7回の状態遷移を必要とする。このように、 特許文献 3の方法では、状態遷移の失敗を繰り返し、その都度失敗時の遷移先を参 照する動作が必要になる場合がある。このため、状態遷移表の参照回数が増加し、 照合性能が低下すると言う問題点があった。
[0011] 特千文献 1 : E.J.Hopcroft, D.J.Ullman, "Formal Languages and their Relation to Automata", Addison Wesley (1969)
特許文献 1:特開 2004-103035号公報
特許文献 2:特開 2004-103034号公報
特許文献 3:特許第 2994926号公報
発明の開示
発明が解決しょうとする課題
[0012] この発明は上記の問題点を解決するためになされたもので、正規表現を照合条件 とする文字列照合に対して、状態遷移表を格納するのに必要な記憶容量を削減する ことを目的とする。
[0013] また、遷移の失敗による状態遷移表の参照回数を 1文字当り 2回以下とし、遷移の 失敗が繰り返されることによる性能低下による性能低下を防止し、高速な文字列照合 を可能にすることを目的とする。
課題を解決するための手段
[0014] 本発明にかかわる文字列照合装置は、正規表現で記述された照合条件に基づい て状態遷移表を生成する状態遷移表生成部と、前記状態遷移表生成部により生成 された状態遷移表に基づいて遷移するオートマトンとを備えるとともに、前記オートマ トンは、前記照合条件に基づいて生成された状態遷移表において、現状態と入力文 字の組に対する次の遷移先状態が存在しな!、場合、入力文字を読み進めずに初期 状態へ遷移するものである。
発明の効果 [0015] 正規表現で記述された照合条件に基づいて状態遷移表を生成する状態遷移表生 成部と、前記状態遷移表生成部により生成された状態遷移表に基づいて遷移するォ 一トマトンとを備えるとともに、前記オートマトンは、前記照合条件に基づいて生成さ れた状態遷移表において、現状態と入力文字の組に対する次の遷移先状態が存在 しない場合、入力文字を読み進めずに初期状態へ遷移することにより、状態遷移表 を格納するのに必要な記憶容量を削減することができる。
図面の簡単な説明
[0016] [図 1]文字列照合装置の構成を示す説明図である。
[図 2]照合条件 2の構成を示す説明図である。
[図 3]条件式 17の構成を示す説明図である。
[図 4]状態遷移表生成部 3の構成を示す説明図である。
[図 5]状態遷移表格納部 4の構成を示す説明図である。
[図 6]出力表格納部 5の構成を示す説明図である。
[図 7]照合結果 10の構成を示す説明図である。
[図 8]文字列照合装置の動作を示すフローチャートである。
[図 9]照合条件のコンパイルの動作を示すフローチャート
[図 10]初期状態への失敗遷移の追加の手続きを示すフローチャート
[図 11]初期状態への失敗遷移の追加 (初期状態から σ による遷移先が存在しない
any
場合)の手続きを示すフローチャート
[図 12]初期状態への失敗遷移の追カ卩 (初期状態から σ による遷移先が存在する場
any
合)の手続きを示すフローチャート
[図 13]非決定的遷移の除去の手続きを示すフローチャート
[図 14]状態集合の初期化の手続きを示すフローチャート
[図 15]∑に関する非決定的遷移の除去の手続きを示すフローチャート
[図 16] σ
otherに関する非決定的遷移の除去の手続きを示すフローチャート
[図 17]新状態の生成の手続きを示すフローチャート
[図 18] σ
otherによる状態遷移の補正の手続きを示すフローチャート
[図 19]未使用状態の除去の手続きを示すフローチャート [図 20]冗長状態の除去の手続きを示すフローチャート
圆 21]冗長な状態遷移の削除の手続きを示すフローチャート
圆 22]状態遷移表と出力表の生成の手続きを示すフローチャート
圆 23]入力文書の照合の手続きを示すフローチャート
[図 24]メタキャラクタ 」の置き換えを説明する説明図
[図 25]メタキャラクタ の置き換えを説明する説明図
[図 26]初期状態への ε遷移を含む NFAを説明する説明図
[図 27] ε遷移の省略を説明する説明図
圆 28]失敗遷移の追加の必要な場合を説明する説明図
圆 29]失敗遷移の追加を説明する説明図
圆 30]初期状態から σ による遷移が存在する場合を説明する説明図
any
圆 31]初期状態から σ による遷移が存在する場合の失敗遷移の追加を説明する
any
説明図
圆 32]非決定的遷移の除去 (除去前)を説明する説明図
[図 33]非決定的遷移の除去 (除去後)を説明する説明図
圆 34]非決定的遷移の除去 (除去前)を説明する説明図
[図 35]非決定的遷移の除去 (除去後)を説明する説明図
圆 36]非決定的遷移の除去 (除去前)を説明する説明図
圆 37]非決定的遷移の除去 (除去後)を説明する説明図
圆 38]非決定的遷移の除去 (除去前)を説明する説明図
圆 39]非決定的遷移の除去 (除去後)を説明する説明図
圆 40]非決定的遷移の除去 (除去前)を説明する説明図
圆 41]非決定的遷移の除去 (除去後)を説明する説明図
圆 42]冗長な状態遷移の削除を説明する説明図
[図 43]冗長な状態の併合を説明する説明図
[図 44]照合条件の構成を示す説明図
[図 45]状態遷移表の構成を示す説明図
[図 46]出力表の構成を示す説明図 [図 47]動作例を示す説明図
[図 48]照合条件の構成を示す説明図
[図 49]状態遷移表の構成を示す説明図
[図 50]出力表の構成を示す説明図
[図 51]動作例を示す説明図
[図 52]特許文献 3に開示されている照合条件
[図 53]特許文献 3による従来の出力付き DFAの状態遷移表
[図 54]特許文献 3による従来の状態遷移表と出力表 符号の説明
1 文字列照合装置
2 照合条件
3 状態遷移表生成部
4 状態遷移表格納部
5 出力表格納部
6 入力文書
7 入力文字読み取り部
8 SDFAオートマトン
9 状態記憶部
10 照合結果
11 状態遷移
12 出力記述
13 現状態
14 入力文字
15 次状態
16 条件番号
17 条件式
18 条件記述
21 状態遷移表生成制御部 22 NFA状態集合
23 NFA状態遷移集合
24 NFA出力記述集合
25 状態集合
26 状態遷移集合
27 出力記述集合
31 ハッシュ値計算部
32 ノヽッシュ値
33 状態遷移ハッシュポインタ
34 状態遷移ハッシュチェイン
35 状態遷移ハッシュ表
36 比較部
41 条件番号インデックス
42 条件番号チェイン
発明を実施するための最良の形態
[0018] 実施例 1.
図 1はこの発明の文字列照合装置を示す構成図である。
[0019] 図 1において、文字列照合装置 1は、この発明における正規表現による文字列照合 を行う装置であり、入力文書 6の中に照合条件 2を満たすものが含まれるかどうかを照 合結果 10として出力する。照合条件 2は文字列照合の条件を記述した条件であり、 文字列照合装置 1の入力となる。状態遷移表生成部 3は照合条件 2から状態遷移 11 と出力記述 12を生成し、それぞれ状態遷移表格納部 4、出力表格納部 5に渡す。状 態遷移表格納部は状態遷移 11の組を保持する。出力表格納部 5は出力記述 12を 保持する。入力文書 6は照合の対象となる文書である。入力文字読み取り部 7は入力 文書 6に含まれる文字を 1文字づっ取り出し、入力文字 14として SDFAオートマトン 8 に送る。 SDFAオートマトン 8は内部の状態記憶部 9に現状態 13を記憶し、入力文字 読み取り部 7から入力文字 14を受け取り、状態遷移表格納部 4、出力表格納部 5を 参照して状態記憶部 9に格納された現状態 13の更新と照合結果 10の出力を行う。 状態記憶部 9は SDFAオートマトン 8の内部に保持された状態を記憶する。 10は照合 結果である。 11は状態遷移であり、現状態 13、入力文字 14、次状態 15の組である。 12は出力記述であり、現状態 13と条件番号 16の組である。 13は現状態である、 14 は入力文字である。 15は次状態である。 16は条件番号である。
[0020] 図 2は、この発明における照合条件 2の構成を示す図である。図において、条件式 17は、照合条件 2を構成する個別の条件であり、照合条件 2の中に 1または複数の 条件式 17が含まれる。
[0021] 図 3は、この発明における条件式 17の構成を示す図である。条件式 17は、条件番 号 16と条件記述 18から構成され、条件番号 16は条件式を一意に区別するための番 号であり、条件記述 18は正規表現によって記述された照合の条件である。
[0022] 図 4は、この発明における状態遷移表生成部 3の構成を示す図である。図にお 、て 、状態遷移表生成制御部 21は、状態遷移生成表の生成の動作手順を制御する。 NFA状態集合 22、 NFA状態遷移集合 23、 NFA出力記述集合 24、状態集合 25、出 力遷移集合 26、状態記述集合 27は状態遷移表生成制御部 21が参照するデータで ある。
[0023] 図 5は、この発明における状態遷移表格納部 4の構成の一例を示す図である。図に おいて、 31はハッシュ値計算部であり、現状態 13と入力文字 14からハッシュ値 32を 計算する。ノ、ッシュ値 32はハッシュ値計算部 31によって計算されたハッシュ値である 。状態遷移ハッシュポインタ 33は状態遷移ハッシュチヱイン 34のポインタを複数格納 する表である。状態遷移ハッシュチェイン 34は状態遷移ハッシュチェイン 34へのポィ ンタ、現状態 13、入力文字 14、次状態 15の組である。状態遷移ハッシュ表 35は状 態遷移ハッシュポインタ 33と状態遷移ハッシュチェイン 34から成るデータ構造である 。比較部 36は外部から入力された現状態 13aと入力文字 14aの組と、状態遷移ハツ シュ表 35に格納された現状態 13b、入力文字 14bを比較し、次状態 15を出力する。
[0024] 図 6は、この発明における出力表格納部 5の構成を示す図である。条件番号インデ ックス 41は条件番号チェインへのポインタを複数格納する。条件番号チェイン 42は、 条件番号チェイン 42へのポインタと条件番号 16の組である。
[0025] 図 7は、この発明における照合結果 10の一例を示す図である。照合結果 10には、 入力文書 6の照合に成功した条件番号 16が含まれる。
[0026] 次に、本発明の動作説明に先立ち、以下の説明で用いる用語および記号の説明 を行う。
[0027] 非特許文献 1などに記載されているように、従来力 知られている出力付き決定性 有限オートマトンは、(Q, ∑, Δ , δ , λ , q )の組によって与えられる。ただし Qは状態
0
集合である。∑は入力アルファベットであり、空文字 εを含む。 Δは出力アルファべッ ト、 δは遷移関数 (Q X∑→Q)、 λは出力関数 (Q→A )、qは初期状態である。
0
[0028] 本発明の SDFAオートマトン 8は (Q,∑, Δ, δ ,え, q )の組によって与えられる。
s s s s s 0
[0029] ここで、 Qは状態集合 25であり、従来の出力つき有限オートマトンの状態集合 Qに
s
相当するものである。
[0030] Δは出力アルファベットであり、本実施例では条件番号 16の集合の集合となる。
s
[0031] δ は状態遷移表格納部 4によって実現される状態遷移関数であり、以下、現状態 1
s
3が q、入力文字 14が σのとき次状態 15が qとなることを、
s s d
δ Kq , σ ノ = q
s s s d
と表記する。
[0032] qは初期状態であり、その意味は従来力 知られている出力つき決定性有限オート
0
マトンと同じである。
[0033] ∑は従来の出力付き有限オートマトンの入力アルファベット∑に任意文字 σ ,除
s any 外文字 σ
otherをカ卩えた拡張入力アルファベットである。すなわち、
∑ =∑ υ { σ , σ }
s any other
とする。
[0034] また、
δ (q , σ ) = q
s s s d
であるとき、状態遷移 11を tとすると、
t=trans(q , q , σ )
s d s
と表記するものとする。
[0035] 現状態 13入力文字 14の組に対して次状態 15が存在する状態遷移 11の集合を状 態遷移集合 26と呼び、 Tと表記する。また、状態遷移 t=tranS(q , q , σ )に対して、 q
s d s s を起点、 qを終点、 σを遷移文字と呼ぶ。更に、状態遷移 tの起点を与える関数を d s
Source,終点を与える関数を Destination遷移文字を与える関数を Charと呼び、それ ぞれ
q =Source(t)
s
q =Destination(t)
d
σ =Char(t)
s
と表記する。
また、
λ (q ) = r
s s
であるとき、出力記述 18を dとすると
d=desc(q, r)
s
と表記するものとする。
[0036] 現状態 13に対して出力アルファベット rが空でない出力記述 12の集合を出力記述 集合 27と呼び、 Dと表記する。出力記述 d=desC(q , r)に対して、 qを出力状態、 rを出 力結果と呼ぶ。更に、出力記述 dの出力状態を与える関数を State、出力結果を与え る関数を Resultと呼び、それぞれ
q =State、a)
s
r =Result(d)
と表記することにする。
[0037] 本発明の SDFAオートマトン 8を生成する過程で NFAが生成される力 NFAは (Q ,
(NFA)
∑ , Δ , δ , λ , q )の組によって表される。
s s s (NFA) s(NFA) O(NFA)
[0038] ここで、 Q は NFA状態集合 22を表す。状態集合 25は NFA状態の集合の集合と
(NFA)
なる。すなわち状態集合 25を Qと表記するとき Q=2Q(NFA)の関係にある。以下、 NFAの 状態を DFAの状態と区別するため、 q と表記し、 NFAの初期状態を q と表記す
(NFA) O(NFA) る。
[0039] δ は NFAの状態遷移関数であり、現在の NFA状態 13が q 、入力文字 14が s(NFA) (NFA)
σから次状態の集合への関数である。
s
[0040] λ は NFAの出力関数であるり、現在の NFA状態 13が q のとき、出力アルファ s(NFA) (NFA) ベットが r E Δとなることを
s
λ (q ) = r
s(NFA) (NFA)
と表記する。
[0041] Δは条件番号 16の集合、∑は拡張入力アルファベットであり、その意味は本発明 s s
の SDFAオートマトン 8と同じである。
[0042] NFAの状態について、 NFA状態遷移を以下のように定める。 NFAの状態 q
d(NFA) q f δ
d(NFA) 、q , σ )
s(NFA) s
のとき、 NFA状態遷移 32を
t =trans(q , q , σ )
(NFA) s(NFA) d(NFA) s
と表記するものとする。 NFA状態遷移の集合を NFA状態遷移集合とよび、 T と表
(NFA) 記する。また、同様に状態遷移 t =trans(q , q , σ )に対して、 q を起点、
(NFA) s(NFA) d(NFA) s s(NFA) q を終点、 σを遷移文字と呼ぶ。更に、状態遷移 t の起点を与える関数を d(NFA) s (NFA)
Source,終点を与える関数を Destination遷移文字を与える関数を Charと呼び、それ ぞれ
q =Source(t )
s(NFA) (NFA)
q =Destmation(t )
d(NFA) (NFA)
σ =Char(t )
s(NFA) (NFA)
と表記することにする。
[0043] NFA状態 q と出力アルファベット rの組を NFA出力記述と呼ぶことにする。
(NFA)
λ (q, ) = r
s (NFA)
であるとき、 NFA出力記述 34を d とすると
(NFA)
d =aesc(q , V)
(NFA) s(NFA)
と表記するものとする。
[0044] NFA状態 13に対して出力アルファベット pが空でない NFA出力記述の集合を NFA 出力記述集合 24と呼び、 D と表記する。出力記述 d =desc(q , r)に対して、 q
(NFA) (NFA) (NFA)
を出力状態、 rを出力結果と呼ぶ。更に、出力記述 dの出力状態を与える関数を
(NFA)
State,出力結果を与える関数を Resultと呼び、それぞれ
q =State(d )
(NFA) (NFA) r =Result(d )
(NFA) (NFA)
と表記することにする。
[0045] 以上で用語および記号の説明を終わり、次に、動作について説明する。
[0046] 図 8に、本発明の文字列照合装置 1の動作を示す。
[0047] 本発明の文字列照合装置 1は、まず、照合条件 2を受け取り状態遷移表生成部 3に より状態遷移 11と出力記述 12を生成する過程、すなわち、照合条件のコンパイルの 手続きを実行する (ステップ S51)。
[0048] 次いで、入力文書 6を受け取り、入力文字読み取り部 7および SDFAオートマトン 8に よって、状態遷移 11と出力記述 12を参照しながら照合結果 10を出力する手続きを 順次実行する (ステップ S52)。
[0049] なお、本実施の例では 1回の「照合条件のコンパイル」に対して「入力文書の照合」 を 1回行うこととしている力 1回の「照合条件のコンパイル」の手続きで生成された、 状態遷移 11と出力記述 12を用いて、複数個の入力文書に対して「入力文書の照合
」を行っても良い。
[0050] 次に、図 9により、手続き「照合条件のコンパイル」について説明する。
[0051] まず「ε遷移を含む NFAの生成」の手続きにより、正規表現から、 ε遷移を含む
NFAを生成する(ステップ S101)。
[0052] 次いで、「 ε遷移の除去」の手続きにより NFAに含まれる ε遷移 (空文字による遷移
)の除去を行う(ステップ S 102)。
[0053] 次いで、「初期状態への遷移の追加」の手続きにより、照合に失敗した際の初期状 態への遷移を追加する (ステップ S 103)。
[0054] 次いで、「非決定的遷移の除去」の手続きにより、非決定的な遷移を除去する (ステ ップ S 104)。
[0055] 次いで、「未使用状態の除去」の手続きにより、これまでの手順で不要になった状態 の除去を行う(ステップ S 105)。
[0056] 次いで、「状態数の削減」の手続きにより、冗長な状態および冗長な状態遷移の除 去を行う(ステップ S 106)。
[0057] 次いで、「状態遷移表と出力表の生成」の手続きにより、状態集合から状態遷移表 と出力表を生成する (ステップ S107)。
[0058] 以上の手順により手続き「照合条件のコンパイル」を実行することができる。
[0059] ステップ S101の、「 ε遷移を含む NFAの生成」の手順については、非特許文献 1な どに示されている公知の手順を使用することができる。
[0060] ただし、図 24に示すように正規表現中に含まれる任意の文字を表すメタキャラクタ「
.Jは σ に置き換える。なお、以下、図 24—図 31では状態 q を単に qと表記してい any (NFA)
る。
[0061] また、図 25に示すように正規表現中に含まれる、特定文字集合以外を表すメタキヤ ラクタ は σ に置き換え更に、該当する状態から初期状態 q への状態遷移を other O(NFA)
追加する t ヽぅ手順を追加する。
[0062] ステップ S102の、「 ε遷移の除去」の手順についても、非特許文献 1などに示されて いる公知の手順により、 ε遷移 (空文字による遷移)を遷移先集合への遷移で置き換 えることにより、実現することができる。
[0063] 次に、図 10によってステップ S103の「初期状態への失敗遷移の追加」の手続きを示 す。
[0064] まず、ステップ S102によって生成された NFAの初期状態 q から。 による遷移が
O(NFA) any
存在しない場合はステップ S202に進む。それ以外の場合は、ステップ S203に進む (ス テツプ S201)。
[0065] 「初期状態への失敗遷移の追加 (初期状態から σ による遷移先が存在しな!、場 any
合)」の手続きを実行し、終了する (ステップ S202)。
[0066] ステップ S201で NFAの初期状態 q から。 による遷移が存在する場合は「初期
O(NFA) any
状態への失敗遷移の追加 (初期状態から σ による遷移先が存在する場合) Jの手 any
続きを実行し、終了する (ステップ S203)。
[0067] なお、本実施例では NFAの初期状態 q 力 σ による遷移先が存在するか否
0(NFA) any
かにより処理を分けている力 ステップ S202の処理はステップ S203によって代行する ことも可能である。ステップ S202の処理はステップ S203と比較すると適用可能な範囲 力 S「初期状態から σ による遷移先が存在する」場合に限定されるが、より状態遷移 any
の数を削減することができる。初期状態から σ による遷移先が存在するとは、照合 条件となる正規表現の先頭に任意文字「.」が指定されるということであるが、実用上 はこのような指定がされることは少ないため、多くの場合はステップ S202の処理を適 用することによって状態遷移の数を削減できる。
[0068] 以上の手順に従って、手続き「初期状態への失敗遷移の追加」を行うことができる。
[0069] 次に、ステップ S202の「初期状態への失敗遷移の追加(初期状態から σ 〖こよる遷
any 移先が存在しな 、場合)」の手続きにつ 、て説明する。
[0070] 一般に、連続的な文字列照合を行う NFAまたは DFAでは、すべての状態から初期 状態への ε遷移を追加することにより、任意の文字位置からの文字列照合を実現で きる。図 26に、正規表現 (a|b|c(d|e))f に対応する NFAに ε遷移を追加した例を示す。 本発明の SDFAオートマトン 8では、遷移に失敗した際に入力文字を進めずに初期状 態 q
0に戻って再度状態遷移を行うため、初期状態 qへの ε
0 遷移を省略できる。すな わち、図 27に示す NFAを構成すればよぐ状態遷移の総数を大幅に削減することが できる。しかし、初期状態 q
O(NFA)から遷移文字 σにより状態 q
l(NFA)に遷移可能であると き、状態 q q
(NFA)からの遷移文字 σによる遷移が存在するか、または、状態 (NFA)を起点と する 、ずれかの遷移文字 σが σ である場合は、 σによる遷移が成功した場合にも
any
σにより q 〖こも遷移可能であるため、状態 q 力 σによる状態 q への状態遷
l(NFA) (NFA) l(NFA)
移を追加する。図 28に、正規表現 (a|b|c(d|e))f の場合の例を示す。図 28の例では初 期状態 q から遷移文字 aにより状態 q に遷移可能であり、状態 q から遷移
O(NFA) l(NFA) 3(NFA)
文字 aによる遷移が存在するため、図 29のように遷移文字 aによる状態 q から状態
3(NFA) q への遷移を追加する。状態 q から遷移文字 aによる遷移は非決定的な状態 l(NFA) 3(NFA)
遷移となる力 後続の「非決定的遷移の除去」の手続きにより、この非決定的遷移は 最終的に除去される。手続き「初期状態への失敗遷移の追加 (初期状態から σ に
any よる遷移先が存在しな 、場合)」および「初期状態への失敗遷移の追加 (初期状態か ら σ による遷移先が存在する場合)」はこの処理を行うためのものである。
any
[0071] 図 11により、ステップ S202の「初期状態への失敗遷移の追加(初期状態から σ に
any よる遷移先が存在しな 、場合)」の手続きにつ 、て説明する。
[0072] まず、 t をステップ S102によって生成された NFAの初期状態 q を起点とする
O(NFA) O(NFA)
最初の状態遷移とし、ステップ S302に進む (ステップ S301)。 [0073] NFAの初期状態 q を起点とするすべての状態遷移 t の処理を終了したら手
O(NFA) O(NFA)
続きを終了する。それ以外の場合はステップ S303に進む (ステップ S302)。
[0074] σを Char(t )とし、ステップ S304に進む(ステップ S303)。
O(NFA)
[0075] q を NFA状態集合 Q に含まれる最初の NFA状態とし、ステップ S305に進む (ス
(NFA) (NFA)
テツプ S304)。
[0076] NFA状態集合 Q に含まれるすべての NFA状態 q の処理を終了したらステップ
(NFA) (NFA)
S313に進む。それ以外の場合はステップ S306に進む(ステップ S305)。
[0077] NFA状態 q が初期状態 q の場合は、ステップ S312に進む。それ以外の場合
(NFA) O(NFA)
はステップ S307に進む(ステップ S306)。
[0078] t を を起点とする最初の NFA状態遷移とし、ステップ S308に進む (ステップ
(NFA) (NFA)
S307) o
[0079] q を起点とするすべての NFA状態遷移 t の処理を終了したらステップ S312に
(NFA) (NFA)
進む。それ以外の場合はステップ S309に進む (ステップ S308)。
[0080] Char(t )= σ 、Char(t )= σ のいずれかの条件が成立する場合はステップ
(NFA) (NFA) any
S310に進む。 、ずれの条件も成立しな!、場合はステップ S311に進む(ステップ S309)
[0081] NFA状態遷移 trans(q , Destination^ ), σ )が NFA状態遷移集合 Τ に含
(NFA) 0(NFA) (NFA) まれて ヽなければ Tに加え、ステップ S311に進む(ステップ S310)。
[0082] t を NFA状態 q を起点とする次の NFA状態遷移とし、ステップ S305に進む (ス
(NFA) (NFA)
テツプ S311)。
[0083] ステップ S306にて NFA状態 q 力 ^FAの初期状態 q の場合、またはステップ
(NFA) 0(NFA)
S308にて q を起点とするすべての NFA状態遷移 t を処理した場合は NFA状態 q
(NFA) (NFA)
を NFA状態集合 Q に含まれる次の NFA状態とし、ステップ S305に進む (ステツ
(NFA) NFA
プ S312)。
[0084] ステップ S305にてすべての NFA状態 q の処理を終了した場合は、 t を NFAの
(NFA) 0(NFA) 初期状態 q を起点とする次の NFA状態遷移とし、ステップ S302に進む (ステップ
0(NFA)
S313)。
[0085] 以上の手順に従って、手続き「初期状態への失敗遷移の追加 (初期状態から σ による遷移先が存在しな 、場合)」を行うことができる。
[0086] 次に、ステップ S203の「初期状態への失敗遷移の追加(初期状態から σ 〖こよる遷
any 移先が存在する場合)」の手続きについて説明する。この手続きの目的はステップ S202と同じであるが、図 30に示す正規表現 (.|b|c(d|e))f のように、初期状態から σ
any による遷移先 q が存在する場合は、すべての状態に対して、遷移が成功した場合
l(NFA)
にも q にも遷移可能となるため、図 31に示すように、 NFAの初期状態 q を除く l(NFA) O(NFA) すべての NFA状態 q とすべての遷移文字 σに対して、 q への遷移を追加する
(NFA) l(NFA)
[0087] 図 12により、ステップ S203の「初期状態への失敗遷移の追加(初期状態から σ に
any よる遷移先が存在する場合)」の手続きにっ 、て説明する。
[0088] まず、 t をステップ S102によって生成された NFAの初期状態 q を起点とする
O(NFA) O(NFA)
最初の NFA状態遷移とし、ステップ S352に進む(ステップ S351)。
[0089] NFAの初期状態 q を起点とするすべての NFA状態遷移 t の処理を終了した
O(NFA) 0(NFA)
ら手続きを終了する。それ以外の場合はステップ S353に進む (ステップ S352)。
[0090] σを Char(t )とし、ステップ S354に進む(ステップ S353)。
0(NFA)
[0091] qを NFA状態集合 Q に含まれる最初の NFA状態とし、ステップ S355に進む (ステ
(NFA)
ップ S354)。
[0092] NFA状態集合 Q に含まれるすべての NFA状態 qの処理を終了したらステップ
(NFA)
S359に進む。それ以外の場合はステップ S356に進む(ステップ S355)。
[0093] NFA状態 q が初期状態 q の場合は、ステップ S356に進む。それ以外の場合
(NFA) 0(NFA)
はステップ S357に進む(ステップ S306)。
[0094] NFA状態遷移 trans (q , Destination^ ), σ )が NFA状態遷移集合 Τ に
(NFA) 0(NFA) (NFA) (NFA) 含まれて!/、なければ T にカロえ、ステップ S355に進む(ステップ S358)。
(NFA)
[0095] ステップ S355にてすべての NFA状態 q の処理を終了した場合は、 t を NFAの
(NFA) 0(NFA) 初期状態 q を起点とする次の NFA状態遷移とし、ステップ S352に進む (ステップ
0(NFA)
S359)。
[0096] 以上の手順に従って、手続き「初期状態への失敗遷移の追加 (初期状態から σ
any による遷移先が存在する場合)」を行うことができる。 [0097] 次にステップ S104の「非決定的遷移の除去」の手続きについて説明する。本手続き は、 NFAに含まれる非決定的な遷移を除去し、決定的な遷移を生成するものである。 図 32に一例を示す。状態 q 力 遷移文字 aによる状態遷移として qおよび qが存 source 1 2 在する、すなわち非決定的であるため、遷移先の状態を併合する、すなわち図 33に 示すように遷移先の NFA状態集合 qおよび qの和集合 q =q U qへの状態遷移とす
1 2 n 1 2
る。この手順は基本的に非特許文献 1などに示されて ヽる DFAの生成手順と同様で あるが、本実施の例では、更に、図 34のように、任意文字 σ による状態遷移 qと遷 any 2 移文字 aによる状態遷移の終点 qを含む場合について、非決定的な遷移文字 aに関
1
する状態 q =q U qへの状態遷移の他に、除外文字 σ 〖こよる状態 qへの遷移を生 n 1 2 other 1
成する(図 35)。
[0098] 図 13によって、ステップ S104の「非決定的遷移の除去」の手続きについて説明する 。本手続きおよび「 σ に関する非決定的遷移の除去」の手続きでは変数 Retryを other
使用する。変数 Retryは TRUEまたは FALSEの!、ずれかの値をとることができる。
[0099] まず「状態集合の初期ィ匕」の手続きを行い、ステップ S402に進む (ステップ S401)。
[0100] 次!、で、変数 Retryを FALSEに初期化し、ステップ S401に進む(ステップ S402)。
[0101] 次 、で、「∑に関する非決定的遷移の除去」の手続きを行 、。ステップ S404に進む
(ステップ S403)。
[0102] 次いで、「σ に関する非決定的遷移の除去」の手続きを行い、ステップ S405に進 other
む(ステップ S404)。
[0103] 変数 Retry力 TRUEの場合はステップ S403に進む。 FALSEの場合は終了する(ステツ プ S405)。
[0104] 以上の手順に従って、手続き「非決定的遷移の除去」を行うことができる。
[0105] 次にステップ S401の「状態集合の初期ィ匕」の手続きについて説明する。本手続きは 、 DFAの状態を生成するため、必要な状態集合を初期化するためのものであり、すべ ての NFAの状態 q に対して、 DFAの状態 {q }を関連する状態遷移ととともに生成
(NFA) (NFA)
することを目的とする。
[0106] 図 14によって、ステップ S401の「状態集合の初期ィ匕」の手続きについて説明する。
[0107] まず、状態集合 Qを空に初期化しステップ S502に進む (ステップ S501)。 [0108] 次に を NFA状態集合 Q に含まれる最初の NFA状態とし、ステップ S502に
(NFA) (NFA)
進む(ステップ S502)。
[0109] NFA状態集合 Q に含まれるすべての NFA状態 q を処理した場合はステップ
(NFA) (NFA)
S506に進む。それ以外の場合は、ステップ S504に進む(ステップ S503)。
[0110] 状態集合 Qに NFA状態集合 (すなわち DFAの状態) {q }を加え、ステップ S505に
(NFA)
進む(ステップ S504)。
[0111] q を NFA状態集合 Q に含まれる次の NFA状態とし、ステップ S503に進む (ステ
(NFA) (NFA)
ップ S505)。
[0112] ステップ S503において NFA状態集合 Q に含まれるすべての NFA状態 を処理
(NFA) (NFA) した場合は、状態遷移集合 Tを空にし、ステップ S507に進む (ステップ S506)。
[0113] 次に、 t を NFA状態遷移集合 T に含まれる最初の NFA状態遷移とし、ステップ
(NFA) (NFA)
S508に進む(ステップ S507)。
[0114] NFA状態遷移集合 T に含まれるすべての NFA状態遷移 t を処理したらステツ
(NFA) (NFA)
プ S511に進む。それ以外の場合は、ステップ S509に進む(ステップ S508)。
[0115] 状態遷移集合 Tに trans({Source(t )}, {Destination^ )}, Char(t ;))をカ卩え、ス
(NFA) (NFA) (NFA)
テツプ S510に進む(ステップ S509)。
[0116] t を NFA状態遷移集合 T に含まれる次の NFA状態遷移とし、ステップ S508に
(NFA) (NFA)
進む(ステップ S510)。
[0117] ステップ S508において T に含まれるすべての NFA状態遷移 t を処理した場合
(NFA) (NFA)
は、出力記述集合 Dを空にし、ステップ S512に進む (ステップ S511)。
[0118] 次に、 d を NFA出力記述集合 D に含まれる最初の NFA出力記述とし、ステツ
(NFA) (NFA)
プ S508に進む(ステップ S512)。
[0119] NFA出力記述集合 D に含まれるすべての NFA出力記述 d を処理したら終了
(NFA) (NFA)
する。それ以外の場合は、ステップ S509に進む (ステップ S513)。
[0120] 出力記述集合 Dに desc({State(d )}, Result(d ;))をカ卩え、ステップ S510に進む(ス
(NFA) (NFA)
テツプ S514)。
[0121] d を NFA出力記述集合 D に含まれる次の NFA出力記述とし、ステップ S508に
(NFA) (NFA)
進む(ステップ S515)。 [0122] 以上の手順によって、手続き「状態集合の初期化」を行うことができる。
[0123] 次に、ステップ S403の「∑に関する非決定的遷移の除去」の手続きについて説明す る。本手続きでは、図 32および図 34に示した例のように、一つの遷移文字 σ Ε∑に 対して複数の遷移先が存在するとき、新たな状態への遷移で置き換えることにより、 各遷移文字 σによる遷移先を一意に確定することを目的とする。
[0124] 図 15によって、ステップ S403の「∑に関する非決定的遷移の除去」の手続きについ て説明する。本手続きでは変数 Foundを使用する。変数 Retryは TRUEまたは FALSE の!、ずれかの値をとることができる。
[0125] まず、 Foundを FALSEに初期化し、ステップ S602に進む(ステップ S601)。
[0126] 次に、 qを状態集合 Q中の最初の状態遷移とし、ステップ S603に進む (ステップ S602
) o
[0127] 状態集合 Q中のすべての状態 qを処理した場合はステップ S616に進む。それ以外 の場合はステップ S604に進む(ステップ S603)。
[0128] σを入力アルファベット∑中の最初のアルファベットとし、ステップ S605に進む(ステ ップ S604)。
[0129] 入力アルファベット∑中のすべてのアルファベット σを処理した場合はステップ S610 に進む。それ以外の場合はステップ S606に進む (ステップ S605)。
[0130] qを起点とし、 σを遷移文字とする状態遷移 tが複数存在するか、または σを遷移文 字とする状態遷移 tと σ を遷移文字とする状態遷移 tが存在する、すなわち、 σによ
any
る遷移が非決定的である場合は、ステップ S607に進む。それ以外の場合はステップ S609に進む (ステップ S606)。
[0131] ノ ラメータ q を q、 σを σに設定し手続き「新状態の生成」を行 、、ステップ S608
source t
に進む(ステップ S607)。
[0132] 変数 Foundに TRUEを設定し、ステップ S609に進む(ステップ S608)。
[0133] σを入力アルファベット∑中の次のアルファベットとし、ステップ S605に進む(ステツ プ S609)。
[0134] ステップ S605で入力アルファベット∑中のすべてのアルファベット σを処理した場合 は、 tを状態 qを起点とする最初の状態遷移とし、ステップ S611に進む (ステップ S610)。 [0135] 状態 qを起点とするすべての状態遷移 tを処理した場合はステップ S615に進む。そ れ以外の場合はステップ S612に進む (ステップ S611)。
[0136] tの遷移文字 Char(t)が σ の場合はステップ S613に進む。それ以外の場合はステツ any
プ S614に進む(ステップ S612)。
[0137] tの遷移文字を σ で置き換える、すなわち tを(Source(t), Destination(t), σ )で other other おきかえ、ステップ S614に進む(ステップ S613)。
[0138] tを状態 qを起点とする次の状態遷移とし、ステップ S611に進む (ステップ S614)。
[0139] ステップ S611で状態 qを起点とするすべての状態遷移 tを処理した場合は qを状態集 合 Q中の次の状態遷移とし、ステップ S603に進む (ステップ S615)。
[0140] ステップ S603で状態集合 Q中のすべての状態 qを処理した場合は、変数 Foundが
TRUEであればステップ S601に進む。それ以外の場合は終了する(ステップ S616)。
[0141] 以上の手順により、手続き「∑に関する非決定的遷移の除去」を行うことができる。
[0142] 次に、ステップ S404の手続き「σ に関する非決定的遷移の除去」について説明 other
する。本手続きでは、図 36に示すように、「∑に関する非決定的遷移の除去」によつ て生成された遷移文字 σ による遷移にっ 、て、状態 q 力 複数の状態 qおよ other source 1 び qへの状態遷移が存在する場合、それらの和集合 q =q U qの状態への遷移で置
2 n 1 2
き換えることにより、図 37に示すように、遷移文字 σ による非決定的な遷移を除去 other
する。
[0143] 図 16により、ステップ S404の手続き「σ に関する非決定的遷移の除去」について other
説明する。本手続きでは変数 Foundを使用する。変数 Foundは TRUEまたは FALSEの いずれかの値をとることができる。また本手続きでは変数 Counterを使用する。変数
Counterは 0以上の整数値を取ることができる。
[0144] まず、変数 Foundに FALSEを設定し、ステップ S702に進む(ステップ S701)。
[0145] qを状態集合 Q中の最初の状態とし、ステップ S703に進む (ステップ S702)。
[0146] 状態集合 Q中のすべての状態 qを処理した場合はステップ S714に進む。それ以外 の場合はステップ S701に進む(ステップ S703)。
[0147] 変数 Counterに 0を設定し、ステップ S705に進む(ステップ S704)。
[0148] tに qを起点とする最初の状態遷移を設定しステップ S706に進む (ステップ S705)。 [0149] qを起点とするすべての状態遷移 tを処理した場合はステップ S710に進む。それ以 外の場合はステップ S707に進む(ステップ S706)。
[0150] tの遷移文字 Char(t)が σ の場合はステップ S708に進む。それ以外の場合はステ
other
ップ S709に進む(ステップ S707)。
[0151] 変数 Counterに 1を加え、ステップ S709に進む(ステップ S708)。
[0152] tに、 qを起点とする次の状態遷移を設定し、ステップ S705に進む (ステップ S709)。
[0153] ステップ S706において qを起点とするすべての状態遷移 tを処理した場合は、変数
Counterの値が 2以上であればステップ S711に進む。それ以外の場合はステップ S713 に進む(ステップ S710)。
[0154] ノラメータ q を q、 aを σ に設定し、手続き「新状態の生成」を呼び出し、ステ
source t other
ップ S 2に進む(ステップ S 1)。
[0155] 変数 Foundに TRUEを設定し、また変数 Retryに TRUEを設定し、ステップ S713に進 む(ステップ S712)。
[0156] qを状態集合 Q中の次の状態遷移とし、ステップ S703に進む (ステップ S713)。
[0157] ステップ S703にて状態集合 Q中のすべての状態 qを処理した場合は、変数 Foundが
TRUEの場合はステップ S701に進む。それ以外の場合は終了する(ステップ S714)。
[0158] 以上の手順により、手続き「 σ に関する非決定的遷移の除去」を行うことができる
other
[0159] 次に、ステップ S607およびステップ S711の手続き「新状態の生成」の手順について 説明する。本手順は、状態 q から遷移文字 σ に関する個々の非決定的な状態遷
source t
移を除去する手順である。
[0160] 図 17によって、ステップ S607およびステップ S711の手続き「新状態の生成」の手順 につ 、て説明する。手続き「新状態の生成」では q および σをパラメータとする。
source t
[0161] まず、状態 q を起点とし、 σ により遷移可能な状態の集合を求め、それらの NFA
source t
状態に関する和集合を求め、状態 qとする。 qが状態遷移集合 Tに含まれている場合 はステップ S817に進む。それ以外の場合はステップ S802に進む(ステップ S801)。
[0162] 次に、状態 qを状態集合 Qに追加し、ステップ S803に進む (ステップ S802)。
[0163] tを q を起点とする最初の状態遷移とし、ステップ S804に進む (ステップ S803)。 [0164] q を起点とするすべての状態遷移 tを処理した場合はステップ S817に進む。それ source
以外の場合はステップ S805に進む(ステップ S804)。
[0165] Char(t)= σの場合、または Char(t)= σ の場合はステップ S806に進む。それ以外の t any
場合はステップ S816に進む(ステップ S805)。
[0166] tを、 Destination^を起点とする最初の状態遷移とし、ステップ S807に進む(ステツ
1
プ S806)。
[0167] Destination(t)を起点とするすべての状態遷移 tを処理した場合はステップ S812に
1
進む。それ以外はステップ S808に進む(ステップ S807)。
[0168] 状態遷移 trans(q , Destination^ ), Char(t》ETでなければ Tに trans(q ,
n 1 1 n
Destination^ ), Char(t》を追加し、ステップ S809に進む(ステップ S808)。
1 1
[0169] Char(t )= σ であればステップ S810に進む。それ以外であればステップ S811に進
1 other
む(ステップ S809)。
[0170] 手続き「σ による状態遷移の補正」を呼び出し、ステップ S811に進む。このとき、 other
パラメータとして (q , q , t )を与える (ステップ S810)。
source n 1
[0171] tを、 Destination(t)を起点とする次の状態遷移とし、ステップ S807に進む (ステップ
1
S811)。
[0172] ステップ S807で Destination(t)を起点とするすべての状態遷移 tを処理した場合は、
1
dを Destination(t)を出力状態とする最初の出力記述とし、ステップ S813に進む (ステツ プ S812)。
[0173] Destination(t)を出力状態とするすべての出力記述 dを処理した場合はステップ S816 に進む。それ以外の場合は、ステップ S814に進む (ステップ S813)。
[0174] 出力記述 desc(q ,Result(d)) E Dでなければ Dに desc(q ,Result(d))を加え、ステップ S815に進む(ステップ S814)。
[0175] dを Destination(t)を出力状態とする次の出力記述とし、ステップ S813に進む (ステツ プ S815)。
[0176] tを q を起点とする次の状態遷移とし、ステップ S804に進む (ステップ S816)。
source
[0177] ステップ S801で qが状態遷移集合 Tに含まれて!/、な!/、場合、およびステップ S804で q を起点とするすべての状態遷移 tを処理した場合は、 tを q を起点とする最初 の状態遷移とし、ステップ S818に進む (ステップ S817)。
[0178] q を起点とするすべての状態遷移 tを処理した場合はステップ S822に進む。それ source
以外の場合はステップ S819に進む (ステップ S818)。
[0179] Char(t)= σの場合はステップ S820に進む。それ以外の場合はステップ S821に進む( t
ステップ S819)。
[0180] 状態遷移 tを状態遷移集合 Tから削除し、ステップ S821に進む (ステップ S820)。
[0181] tを q を起点とする次の状態遷移とし、ステップ S818に進む (ステップ S821)。
source
[0182] ステップ S818で q を起点とするすべての状態遷移 tを処理した場合は、状態遷移 source
trans(q , q , σ ) ΕΤでなければ Τに trans(q , q , σ )を追加し、終了する(ステ source n t source n t
ップ S822)。
[0183] 以上の手順により、手続き「新状態の生成」を行うことができる。
[0184] 次にステップ S811の手続き「σ による状態遷移の補正」について説明する。本手 other
続きは、図 38に示すように、非決定的遷移の除去の際に併合すべき状態 q , qを起
1 2 点とする状態遷移の中に遷移文字 σ による状態遷移が含まれる場合の、状態 q , other 1 qを起点とする状態遷移の終点となる状態の併合の手順を示すものである。図 38の
2
状態 q , qを併合すると図 39のようになり、状態 q =q U q遷移文字 bによる状態遷移
1 2 n 1 2
の終点は q U qとなる。同様に、図 40に示す状態 q , qを併合すると、図 41に示すよ
3 5 1 2
うに遷移文字 b、 c、 σ による状態遷移の終点は、それぞれ q U q、q U qq U qと other 3 6 4 5 4 6 なる。
[0185] 図 18によって、ステップ S811の手続き「σ による状態遷移の補正」について説明 other
する。本手続きでは、拡張入力アルファベット σ E∑の集合、 CharSetを用いる。
[0186] まず CharSetを空に初期化し、ステップ S902に進む(ステップ S901)。
[0187] 次に、 tを Source(t )を起点とする最初の状態遷移とし、ステップ S903に進む (ステ other
ップ S902)。
[0188] Source(t )を起点とするすべての状態遷移を処理した場合は、ステップ S907に進 other
む。それ以外の場合は、ステップ S904に進む (ステップ S903)。
[0189] Char(t)が入力アルファベット∑に含まれる、すなわち、 Char(t)≠ σ かつ Char(t)≠ any
σ の場合はステップ S906に進む。それ以外の場合はステップ S905に進む (ステツ other プ S904)。
[0190] CharSetに Char(t)を加え、ステップ S906に進む(ステップ S905)。
[0191] tを Source(t )を起点とする次の状態遷移とし、ステップ S903に進む (ステップ S906 other
) o
[0192] ステップ S903で Source(t )を起点とするすべての状態遷移を処理した場合は、 tを other
状態 qを起点とする最初の状態遷移とし、ステップ S908に進む (ステップ S907)。
[0193] 状態 qを起点とするすべての状態遷移 qを処理した場合は終了する。それ以外の場 合はステップ S909に進む(ステップ S908)。
[0194] Destination(t)≠Source(t )の場合はステップ S910に進む。それ以外の場合はス other
テツプ S916に進む(ステップ S909)。
[0195] t を Destination(t)を起点とする最初の状態遷移とし、ステップ S911に進む (ステップ
1
S910)。
[0196] Destination(t)を起点とするすべての状態遷移 t を処理した場合はステップ S916に
1
進む。それ以外の場合はステップ S912に進む (ステップ S911)。
[0197] Char(t )が入力アルファベット∑に含まれる、すなわち、 Char(t )≠ σ かつ Char(t )
1 1 any 1 半 σ の場合はステップ S913に進む。それ以外の場合はステップ S915に進む (ステ otner
ップ S912)。
[0198] Char(t )が CharSetに含まれる場合はステップ S915に進む。それ以外の場合はステ
1
ップ S914に進む(ステップ S913)。
[0199] 状態遷移 trans(q , Destination^ ), Char(t》ETでなければ Tに trans(q ,
n other 1 n
Destination^ ), Char(t》をカ卩え、ステップ S915に進む(ステップ S914)。
other 1
[0200] t を Destination(t)を起点とする次の状態遷移とし、ステップ S911に進む (ステップ
1
S915)。
[0201] ステップ S909にて Destination(t)≠Source(t )でなかった場合、あるいはステップ other
S911にて Destination(t)を起点とするすべての状態遷移 t を処理した場合は、 tを状
1
態 qを起点とする次の状態遷移とし、ステップ S908に進む (ステップ S916)。
[0202] 以上の手順により、手続き「σ による状態遷移の補正」を行うことができる。
other
[0203] 次に、ステップ S105の「未使用状態の除去」の手続きについて説明する。本手続き では、これまでの処理の結果発生した、状態遷移の終点とならない状態、すなわち、 どのような入力に対しても決して到達しな 、状態を削除する。
[0204] 図 19によって、ステップ S105の「未使用状態の除去」の手続きについて説明する。
本手続きでは変数 Foundを用いる。変数 Foundは TRUEまたは FALSEの!、ずれかの 値をとることができる。
[0205] まず、変数 Foundを FALSEにし、ステップ S1002に進む(ステップ S1001)。
[0206] 次に、 qを状態集合 Qに含まれる最初の状態とし、ステップ S1003に進む (ステップ S1002) o
[0207] 状態集合 Qに含まれるすべての状態 qを処理した場合はステップ S1017に進む。そ れ以外の場合はステップ S1004に進む(ステップ S1003)。
[0208] qが初期状態 qの場合はステップ S1016に進む。それ以外の場合はステップ S1005
0
に進む(ステップ S 1004)。
[0209] qを終点とする状態遷移が存在する場合はステップ S1016に進む。それ以外の場合 はステップ S 1006に進む(ステップ S 1005)。
[0210] 変数 Foundを TRUEにし、ステップ S1007に進む(ステップ S1006)。
[0211] tを qを起点とする最初の状態遷移とし、ステップ S1008に進む (ステップ S1007)。
[0212] qを起点とするすべての状態遷移 tを処理した場合はステップ S1011に進む。それ以 外の場合はステップ S1009に進む(ステップ S1008)。
[0213] 状態遷移 tを状態遷移集合 Tから取り除き、ステップ S1010に進む (ステップ S1009)。
[0214] tを qを起点とする次の状態遷移とし、ステップ S 1008に進む (ステップ S 1010)。
[0215] ステップ S1008で qを起点とするすべての状態遷移 tを処理した場合は、 dを qを出力 状態とする最初の出力記述とし、ステップ S1012に進む (ステップ 1011)。
[0216] qを出力状態とするすべての出力記述 dを処理した場合はステップ S1015に進む。そ れ以外の場合はステップ 1013に進む (ステップ 1012)。
[0217] 出力記述 dを出力記述集合 Dから削除し、ステップ S1014に進む (ステップ S1013)。
[0218] dを qを出力状態とする次の出力記述とし、ステップ S1012に進む (ステップ S1014)。
[0219] ステップ S1012にて qを出力状態とするすべての出力記述 dを処理した場合は、状態 qを状態集合 Qから削除し、ステップ S1012に進む (ステップ S1015)。 [0220] qを状態集合 Qに含まれる次の状態とし、ステップ S1003に進む (ステップ S1016)。
[0221] ステップ 1003にて状態集合 Qに含まれるすべての状態 qを処理した場合は、変数
Foundを調べ Foundが TRUEの場合はステップ S1002に進む。それ以外の場合は終了 する(ステップ 1017)。
[0222] 以上の手順により、手続き「未使用状態の除去」を行うことができる。
[0223] なお、手続き「未使用状態の除去」は、状態遷移表を格納するのに必要なメモリ容 量を削減することを目的としている。従って、本手続きを省略しても手続き「入力文書 の照合」を実行することは可能であり、省略することにより、「照合条件のコンパイル」 に要する時間を短縮することができる。
[0224] 次に、図 20によって、ステップ S106の「冗長状態の除去」の手続きについて説明す る。本手続きでは、 2種類の不要な状態を除去する。第 1の場合は、 σ による状態 other 遷移と同一の終点の状態を持つ状態遷移である。図 42に一例を示す。図 42におい て、遷移文字 bによる qを終点とする状態遷移を削除しても SDFAオートマトンの動作
3
は同じであり、この状態遷移を削除することにより、状態遷移の総数を削減し、状態遷 移表を格納するのに必要なメモリ容量を削減することができる。第 2の場合は、すべ ての遷移文字に対する状態遷移の終点が等しい複数の状態の併合である。図 43に 一例を示す。図 43において、状態 qと状態 qではすベての遷移文字に対する状態
1 2
遷移の終点が等しいため、状態 qと状態 qを併合した q =q U qで置換することがで
1 2 n 1 2
きる。これらの 2種類の場合の一方によって状態または状態遷移が削除されると、そ れにより他方による状態または状態遷移の削除が可能になる場合があるため、新た に状態または状態遷移が削除されなくなるまでこれら 2種類を繰り返す。
[0225] 図 20によって、ステップ S106の「冗長状態の除去」の手続きについて説明する。本 手続きでは変数 StateRemovedおよび TransitionRemovedを用いる。変数
StateRemovedおよび TransitionRemovedは TRUEまたは FALSEのいずれかの値をとる ことができる。
[0226] まず、 StateRemovedに TRUEを設定し、ステップ S1102に進む(ステップ S1101)。
[0227] 手続き「冗長な状態遷移の削除」を呼び出し、ステップ S1103に進む。本手続きの中 で TransitionRemovedが設定される(ステップ S1102)。 [0228] TransitionRemoved=FALSEかつ StateRemoved=FALSEの場合は終了する。それ以 外の場合はステップ S1104に進む(ステップ S1103)
[0229] 手続き「冗長な状態の併合」を呼び出し、ステップ S1105に進む (ステップ S1104)。
[0230] TransitionRemoved=FALSEかつ StateRemoved=FALSEの場合は終了する。それ以 外の場合はステップ S1102に進む(ステップ S1105)。
[0231] 以上の手順により、手続き「冗長状態の除去」を行うことができる。
[0232] なお、手続き「冗長状態の除去」は、状態遷移表を格納するのに必要なメモリ容量 を削減することを目的としている。従って、本手続きを省略しても手続き「入力文書の 照合」を実行することは可能であり、省略することにより、「照合条件のコンパイル」に 要する時間を短縮することができる。
[0233] 次に、ステップ S1102の手続き「冗長な状態遷移の削除」について説明する。本手 続きは、「冗長状態の除去」の第 1の場合に相当し、図 42に示すような、 σ による
other 状態遷移と同一の終点の状態を持つ状態遷移を削除する。
[0234] 図 21によって、ステップ S1102の手続き「冗長な状態遷移の削除」について説明す る。
[0235] まず、変数 TransitionRemovedを FALSEに設定し、ステップ S 1202に進む(ステップ S1201) o
[0236] 次に、 tを状態遷移集合 Tに含まれる最初の状態遷移とし、ステップ S1203に進む (ス テツプ S 1202)。
[0237] 状態遷移集合 Tに含まれるすべての状態 tを処理した場合は終了する。それ以外の 場合は、ステップ S1204に進む(ステップ S1203)。
[0238] Char(t)が σ である場合にはステップ S1205に進む。それ以外の場合はステップ
other
S1210に進む(ステップ S1204)。
[0239] 次に、 tを Source(t)を起点とする最初の状態遷移とし、ステップ S1206に進む (ステツ
1
プ S1205)。
[0240] Source(t)を起点とするすべての状態遷移 tを処理した場合はステップ S1210に進む
1
。それ以外の場合は、ステップ S1207に進む (ステップ S1206)。
[0241] t≠tかつ Destination^ )=Destination(t)の場合はステップ S1208に進む。それ以外 の場合はステップ S1209に進む(ステップ S1207)。
[0242] 状態遷移 tを状態遷移集合 Tから削除し、ステップ S1209に進む (ステップ S1208)。
1
[0243] tを Source(t)を起点とする次の状態遷移とし、ステップ S1206に進む(ステップ S1209
1
) o
[0244] ステップ 31204にて01&1 1:)が σ でなかった場合、またはステップ S1206にて
other
SourCe(t)を起点とするすべての状態遷移 tを処理した場合は、 tを状態遷移集合丁に
1
含まれる次の状態遷移とし、ステップ S1203に進む (ステップ S1210)。
[0245] 以上の手順により、手続き「冗長な状態遷移の削除」を行うことができる。
[0246] 次に、ステップ 1104の手続き「冗長な状態の併合」について説明する。本手続きは、
「冗長状態の除去」の第 2の場合、すなわち、図 43に示すような、すべての遷移文字 に対する状態遷移の終点が等しい複数の状態を併合する。
[0247] ステップ 1104の手続き「冗長な状態の併合」は、例えば、非特許文献 1などに記載さ れている公知の手順により実行可能である。この手順によって、 1つ以上の状態が併 合されたときは変数 StateRemovedを TRUEに設定する。それ以外の場合は変数
StateRemovedを FALSEに設定する。
[0248] 次に、図 22によりステップ S107の「状態遷移表と出力表の生成」について説明する
。本手続きでは、状態集合 25、状態遷移集合 26、および出力記述集合 27から、状 態遷移 11と出力記述 12を取り出し、それぞれ状態遷移表格納部 4、出力表格納部 1
2に格納する。
[0249] まず、状態集合 Qに含まれている状態の総数を Nとするとき、各状態 qに 0— N-1の 一意の状態番号 Stateld(q)を対応づける(ステップ S1301)。
[0250] 状態遷移集合 Tから最初の状態遷移 tを取り出す (ステップ S1302)。
[0251] 状態遷移集合 Tに含まれるすべての状態遷移 tを処理したらステップ S1307に進む。
それ以外の場合はステップ S1304に進む (ステップ S1303)。
[0252] 現状態 Source(t)、入力文字 Char(t)の組に対してハッシュ値計算部 31でハッシュ値
32を計算し、ステップ S1305に進む(ステップ S1304)。
[0253] ノ、ッシュ値 32をオフセットとする状態遷移ハッシュポインタ 33に現状態 Source(t)、 入力文字 Char(t)、次状態 Destination(t)の組力 成る状態遷移ハッシュチェイン 34 を追カロし、ステップ S 1306に進む (ステップ S 1305)。
[0254] tを状態遷移集合 Tに含まれる次の状態遷移とし、ステップ S1303に進む (ステップ S1306)。
[0255] ステップ S1303にて状態遷移集合 Tに含まれるすべての状態遷移を処理した場合は
、出力記述集合から最初の出力記述 dを取り出す (ステップ S1307)。
[0256] 出力記述集合 Dに含まれるすべての出力記述 dを処理したら終了する。それ以外の 場合はステップ S130に進む(ステップ S1308)。
[0257] State(d)の状態番号 StateId(State(d))に対応する条件番号インデックス 41に条件番 号チェイン 42として Result(d)を追加しステップ S1310に進む(ステップ S1309)。
[0258] dを出力記述集合 Dに含まれる次の出力記述とし、ステップ S1308に進む (ステップ
S1310)。
[0259] 以上に示した手順により、手続き「状態遷移表と出力表の生成」を実行することがで きる。
[0260] 次いで、図 23によって、手続き「入力文書の照合」について説明する。
[0261] まず、状態 qに初期状態 qを設定し、ステップ S2002に進む (ステップ S2001)。
0
[0262] 出力表格納部 5を探索し、 qに関連する条件番号 16を出力する。この手順は、条件 番号インデックス 41の現状態 13の状態番号 Stateld(q)に対応する条件番号チェイン 42へのポインタを順に探索することによって実現される。すべての条件番号チェイン 42の探索が終わったらステップ S2003に進む(ステップ S2002)。
[0263] 入力がすべて終了したら終了する。それ以外の場合はステップ S2004に進む (ステ ップ S2003)。
[0264] 入力文字読み取り部 7から次の入力文字 14を受け取り、 σとし、ステップ S2005に進 む(ステップ S2004)。
[0265] 状態遷移表格納部 4を探索し、状態 qから遷移文字 σによる遷移先 qが存在するか d
否カゝ、すなわち、 trans(q, q , σ )ΕΤなる qが存在するかどうか調べ、ステップ S2006に d d
進む(ステップ S2005)。
[0266] 遷移先 qが存在する場合はステップ S2007に進む。それ以外の場合はステップ d
S2008に進む(ステップ S2006)。 [0267] qに qを設定し、ステップ S2002に進む (ステップ S2007)。
d
[0268] ステップ S2006で qが存在しない場合は、状態 qから遷移文字 σ による遷移先 q d other d が存在するか否か、すなわち、 trans(q, q , σ )ΕΤなる qが存在するかどうか調べ d other d
、ステップ S2009に進む(ステップ S2008)。
[0269] 遷移先 qが存在する場合はステップ S2007に進む。それ以外の場合はステップ d
S2010に進む(ステップ S2009)。
[0270] 状態 qに qを設定し、ステップ S2006に進む。
0
[0271] 以上の手順により、手続き「入力文書の照合」を行うことができる。
[0272] 以下、図 44に示す照合条件 2と図 54に示す入力文字列の場合を例にとって、本実 施の例の文字列照合装置の動作を説明する。図 44の照合条件は特許文献 3に示さ れていた図 52の照合条件の表記を本実施の例の形式にあわせたものであり、図 52 と論理的に等価な照合条件である。
[0273] ステップ S51に示した手続き「照合条件コンパイル」を実行することにより、図 44の照 合条件 2から、図 45に示す状態遷移表と、図 46に示す出力表が生成される。なお、 初期状態の状態番号を 0とする。
[0274] 図 45の状態遷移表は状態遷移表格納部 4に格納される現状態 13、入力文字 14 に対する次状態 15を表で表現したものであり、例えば、現状態の状態番号が 6で入 力文字「d」の時、次状態は 10となることを示している。図中で「一」は、次状態 15が存 在しな 、ことを示しており、このような組み合わせに対しては状態遷移表格納部 4はメ モリを消費することなく格納することができる。従来の出力つき有限状態オートマトン では図 53に示す通り、 90個の組み合わせを必要とするのに対し、図 45の例では、 4 6個の状態遷移につき情報を格納すればよく、状態遷移表を格納するのに必要なメ モリを削減すると 、う効果が得られて 、る。
[0275] 図 46の出力表は出力表格納部 5に格納される現状態 13に対応する条件番号 16 の集合を表で表現したものであり、例えば、現状態力 のとき、条件番号 0を出力する ことを示している。
[0276] 一例として入力文字列「aaCa」を入力とした場合の動作を図 47に示す。まず、状態 q を初期状態 (状態 0)に設定する。次いで 1文字目の文字「a」を読み、状態 0における 文字「a」の遷移先である状態 2に遷移する。文字「a」による遷移先が定義されている ので σ の参照は不要であり、このことを図 47中では(不要)と表記している。次に、 other
2文字目の文字「a」を読み、状態 2における文字「a」の遷移先である状態 5に遷移す る。次に、 3文字目の文字「c」を読み、状態 5における文字「c」の遷移先である状態 9 に遷移する。次に、 4文字目の文字「a」を読み、状態 9における文字「a」の遷移先で ある状態 12に遷移する。ここで入力が終了する。
[0277] 特許文献 3に記載された従来の技術では同等の条件に対して 7回の状態遷移表の 参照を必要としていた力 本実施の例では 4回で済む。このように、本発明によれば、 遷移の失敗による状態遷移表の参照回数を 1文字当り 2回以下とし、遷移の失敗が 繰り返されることによる性能低下による性能低下を防止し、高速な文字列照合を可能 にすることを目的とする。
[0278] なお、図 44の照合条件は、特許文献 3に記載の技術との比較のために記載したも のであるが、初期状態力 すべての文字による遷移が可能であると言う特殊な条件を 持っている。図 44の照合条件の目的とするところは照合対象文字列「abcd」のうち一 文字が変化してもその文字列を検出できるようにすることである力 その目的および 照合条件の意味をほとんど変更せずに図 48の照合条件に変換することができる。こ のような場合には、状態遷移に必要なメモリを更に削減し、本実施の例の効果をより 発揮することができる。
[0279] ステップ S51に示した手続き「照合条件コンパイル」を実行することにより、図 48の照 合条件 2から、図 49に示す状態遷移表と、図 50に示す出力表が生成される。なお、 初期状態の状態番号を 0とする。
[0280] 図 49の状態遷移表の意味は図 45と同様であり、状態遷移表格納部 4に格納が必 要な状態遷移の数は 23個に削減され、更に必要なメモリを削減するという効果が得 られている。
[0281] また、図 48の照合条件 2について、入力「xabxd」に対する動作を図 51に示す。状 態 0において 1文字目の「x」の遷移先は定義されていないので、 σ を参照する力
other
それでも遷移先が定義されて 、な 、ので次状態は初期状態、すなわち状態 0とする 。このとき状態遷移表の参照は 2回行われる。以下、 2文字目の「a」で状態 3、 3文字 目の「b」で状態 6に遷移する。 4文字目の「幻では、「x」の遷移先は定義されていない ので、 σ を参照し、次状態 1を得る。このとき状態遷移表の参照は 2回である。更 other
に、 5文字目の「d」で状態 2に遷移する。状態 2は出力となる条件番号 16として番号 0 が存在しているので、これを出力する。この場合、状態遷移表の参照回数は 7回とな る。
[0282] なお、非特許文献 1など記述されて 、るように、出力を持たな!、一般の DFAは、出 力アルファベットとして「受理した」「受理しない」という 2種類の情報を出力する特殊な Moore機械とみなすことができる。本実施の例でも、単に照合結果に条件番号が存 在する力否かを判定することにより、「受理した」「受理しない」という 2種類の情報を出 力する文字列照合装置を構成できる。
[0283] なお、以上の実施の例では、入力および照合の対象は「文字」であるとしてきた力 「文字」は人間に可読な文字列に限定されず、任意の記号列、データ列に対して適 用が可能である。例えば遺伝子配列やセンサなどにより計測されたデータの識別に 適用しても良い。
[0284] なお、以上の実施の例では、状態遷移表格納部 4に状態遷移ハッシュ表 35を使用 するものとしたが、配列、木構造、など 2次元構造の表を論理的に表現可能ないかな るデータ構造によって実現しても良い。
[0285] また、初期状態など使用頻度の高い状態に対してはアクセス速度の高速な配列な どのデータ構造を使用し、使用頻度の低い状態に対してはメモリ容量の効率の高い ノ、ッシュ表や木構造などのデータ構造を併用しても良い。
[0286] なお、以上の実施の例では、出力表格納部 5に条件番号インデックス 41を使用す るものとした力 木構造やハッシュ表など、 1次元構造の表を論理的に表現可能ない かなるデータ構造によって実現してもよ 、。
産業上の利用可能性
[0287] この発明は、文字列照合装置に適用することが可能である。

Claims

請求の範囲
[1] 正規表現で記述された照合条件に基づ!、て状態遷移表を生成する状態遷移表生 成部と、
前記状態遷移表生成部により生成された状態遷移表に基づいて遷移するオートマ トンとを備えるとともに、
前記オートマトンは、前記照合条件に基づいて生成された状態遷移表において、 現状態と入力文字の組に対する次の遷移先状態が存在しな 、場合、入力文字を読 み進めずに初期状態へ遷移することを特徴とする文字列照合装置。
[2] 前記状態遷移表生成部は、複数の照合条件が入力された場合、状態の併合に基 づいて出力記述の併合を行い、出力表作成し、
前記オートマトンは、前記出力表に基づいて出力することを特徴とする請求項 1記 載の文字列照合装置。
[3] 前記状態遷移表生成部は、状態遷移表を生成する際、初期状態 q
0から所定の遷 移文字 σにより所定の状態 qに遷移可能であり、かつ、任意の状態 qから前記所定の
1
遷移文字 σにより遷移可能であるとき、前記任意の状態 qから前記所定の遷移文字 σによる前記所定の状態 qへの状態遷移を追加することを特徴とする請求項 1に記
1
載の文字列照合装置。
[4] 前記状態遷移表生成部は、前記状態遷移表をハッシュ表により構成することを特 徴とする請求項 1記載の文字列照合装置。
[5] 正規表現で記述された照合条件に基づ!、て状態遷移表を生成する状態遷移表生 成部と、
前記状態遷移表生成部により生成された状態遷移表に基づいて遷移するオートマ トンとを備えるとともに、
前記状態遷移表生成部は、前記照合条件に基づ!、て生成された状態遷移表にお いて、現状態と入力文字の組に対する次の遷移先状態が存在しない場合、入力文 字を読み進めずに所定の状態へ遷移する除外文字を設定して状態遷移表を作成す ることを特徴とする文字列照合装置。
[6] 前記状態遷移表生成部は、前記照合条件に基づ!、て生成された状態遷移表にお いて、現状態と入力文字の組に対する次の遷移先状態が存在しない場合、入力文 字を読み進めずに初期状態へ遷移する状態遷移表を作成することを特徴とする請 求項 5記載の文字列照合装置。
[7] 前記状態遷移表生成部は、複数の照合条件が入力された場合、状態の併合に基 づいて出力記述の併合を行い、出力表作成し、
前記オートマトンは、前記出力表に基づいて出力することを特徴とする請求項 5記 載の文字列照合装置。
[8] 前記状態遷移表生成部は、ある状態力 任意文字による遷移先 q
1と所定の遷移文 字 σによる遷移先 qが存在するとき、前記任意文字を前記除外文字で置き換え、前
2
記所定の遷移文字 σによる遷移先を qと qを併合した状態で置き換えることを特徴と
1 2
する請求項 5記載の文字列照合装置。
[9] 前記状態遷移表生成部は、ある状態から前記除外文字による遷移先の状態が複 数存在するとき、それら複数の状態を併合した状態で置き換えることを特徴とする請 求項 5記載の文字列照合装置。
[10] 前記状態遷移表生成部は、所定の状態 q ,q
1 2を併合する際に、 q
2から前記除外文字 により q
3に状態遷移する場合、 q
1を起点とする状態遷移先と q
3を併合することを特徴と する請求項 5記載の文字列照合装置。
[11] 前記状態遷移表生成部は、 NFAを生成する際に、 r.jによる遷移を任意文字遷移と する状態遷移を生成することを特徴とする請求項 5記載の文字列照合装置。
[12] 前記状態遷移表生成部は、 NFAを生成する際に、「a]による遷移を、文字 aによる遷 移と除外文字 σ による遷移とに置き換えることを特徴とする請求項 5記載の文字 other
列照合装置。
[13] 前記状態遷移表生成部は、通常の文字と除外文字 σ が同一の状態に遷移する other
ときに、通常の文字による状態遷移を削除することを特徴とする請求項 5記載の文字 列照合装置。
[14] 通常の文字と除外文字 σ とが同一の状態に遷移するときに、通常の文字による other
状態遷移を削除した後に、すべての文字に対して同一の状態に遷移する複数の状 態を併合し、さらに、すべての文字に対して同一の状態に遷移する複数の状態を併 合した後に、通常の文字と除外文字 σ とが同一の状態に遷移するときに、通常の
other
文字による状態遷移を削除することを特徴とする請求項 13記載の文字列照合装置。
[15] 前記状態遷移表生成部は、前記状態遷移表をハッシュ表により構成することを特 徴とする請求項 5記載の文字列照合装置。
[16] コンピュータを制御して、文字列の照合を行うプログラムであって、
正規表現で記述された照合条件に基づいて状態遷移表を生成する処理と、 前記状態遷移表生成部により生成された状態遷移表に基づいて遷移するとともに 、前記照合条件に基づいて生成された状態遷移表において、現状態と入力文字の 組に対する次の遷移先状態が存在しな!、場合、入力文字を読み進めずに初期状態 へ遷移する処理とを前記コンピュータに実行させることを特徴とする文字列照合プロ グラム。
[17] コンピュータを制御して、文字列の照合を行うプログラムであって、
正規表現で記述された照合条件に基づいて状態遷移表を生成するとともに、前記 照合条件に基づいて生成された状態遷移表において、現状態と入力文字の組に対 する次の遷移先状態が存在しな!、場合、入力文字を読み進めずに所定の状態へ遷 移する除外文字を設定して状態遷移表を作成する処理と、
前記状態遷移表生成部により生成された状態遷移表に基づいて遷移する処理とを 前記コンピュータに実行させることを特徴とする文字列照合プログラム。
PCT/JP2004/018348 2004-12-09 2004-12-09 文字列照合装置および文字列照合プログラム WO2006061899A1 (ja)

Priority Applications (5)

Application Number Priority Date Filing Date Title
BRPI0419214-1A BRPI0419214B1 (pt) 2004-12-09 Sistema e método de correspondência de sequência
CNB2004800445705A CN100524301C (zh) 2004-12-09 2004-12-09 字符串对照装置
PCT/JP2004/018348 WO2006061899A1 (ja) 2004-12-09 2004-12-09 文字列照合装置および文字列照合プログラム
JP2007531511A JP4535130B2 (ja) 2004-12-09 2004-12-09 文字列照合装置および文字列照合プログラム
US11/792,564 US8032479B2 (en) 2004-12-09 2004-12-09 String matching system and program therefor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2004/018348 WO2006061899A1 (ja) 2004-12-09 2004-12-09 文字列照合装置および文字列照合プログラム

Publications (2)

Publication Number Publication Date
WO2006061899A1 true WO2006061899A1 (ja) 2006-06-15
WO2006061899A8 WO2006061899A8 (ja) 2007-08-30

Family

ID=36577729

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2004/018348 WO2006061899A1 (ja) 2004-12-09 2004-12-09 文字列照合装置および文字列照合プログラム

Country Status (4)

Country Link
US (1) US8032479B2 (ja)
JP (1) JP4535130B2 (ja)
CN (1) CN100524301C (ja)
WO (1) WO2006061899A1 (ja)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007034777A (ja) * 2005-07-28 2007-02-08 Nec Corp データ検索装置及び方法、並びにコンピュータ・プログラム
WO2008084594A1 (ja) * 2007-01-12 2008-07-17 Nec Corporation パターンマッチング装置及び方法
JP2010026689A (ja) * 2008-07-17 2010-02-04 Internatl Business Mach Corp <Ibm> 情報処理装置、情報処理方法およびプログラム

Families Citing this family (31)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070226362A1 (en) * 2006-03-21 2007-09-27 At&T Corp. Monitoring regular expressions on out-of-order streams
US8903840B2 (en) * 2006-08-31 2014-12-02 International Business Machines Corporation System and method for launching a specific program from a simple click on a string of characters
US7630982B2 (en) 2007-02-24 2009-12-08 Trend Micro Incorporated Fast identification of complex strings in a data stream
US20090006316A1 (en) * 2007-06-29 2009-01-01 Wenfei Fan Methods and Apparatus for Rewriting Regular XPath Queries on XML Views
FR2939535B1 (fr) * 2008-12-10 2013-08-16 Canon Kk Procede et systeme de traitement pour la configuration d'un processseur exi
US8862603B1 (en) * 2010-11-03 2014-10-14 Netlogic Microsystems, Inc. Minimizing state lists for non-deterministic finite state automatons
US9858051B2 (en) * 2011-06-24 2018-01-02 Cavium, Inc. Regex compiler
US8990259B2 (en) 2011-06-24 2015-03-24 Cavium, Inc. Anchored patterns
CN103858386B (zh) 2011-08-02 2017-08-25 凯为公司 用于通过优化的决策树执行包分类的方法和装置
JP5554304B2 (ja) * 2011-09-16 2014-07-23 株式会社東芝 オートマトン決定化方法、オートマトン決定化装置およびオートマトン決定化プログラム
US8818783B2 (en) * 2011-09-27 2014-08-26 International Business Machines Corporation Representing state transitions
US8775393B2 (en) * 2011-10-03 2014-07-08 Polytechniq Institute of New York University Updating a perfect hash data structure, such as a multi-dimensional perfect hash data structure, used for high-speed string matching
CN102542038A (zh) * 2011-12-27 2012-07-04 浪潮通信信息系统有限公司 一种通用可配置的标准局数据入库方法
US9336194B2 (en) 2012-03-13 2016-05-10 Hewlett Packard Enterprises Development LP Submatch extraction
US9558299B2 (en) 2012-04-30 2017-01-31 Hewlett Packard Enterprise Development Lp Submatch extraction
US8725749B2 (en) * 2012-07-24 2014-05-13 Hewlett-Packard Development Company, L.P. Matching regular expressions including word boundary symbols
US8793251B2 (en) * 2012-07-31 2014-07-29 Hewlett-Packard Development Company, L.P. Input partitioning and minimization for automaton implementations of capturing group regular expressions
US8938454B2 (en) * 2012-10-10 2015-01-20 Polytechnic Institute Of New York University Using a tunable finite automaton for regular expression matching
US9268881B2 (en) 2012-10-19 2016-02-23 Intel Corporation Child state pre-fetch in NFAs
US9117170B2 (en) 2012-11-19 2015-08-25 Intel Corporation Complex NFA state matching method that matches input symbols against character classes (CCLs), and compares sequence CCLs in parallel
US9665664B2 (en) 2012-11-26 2017-05-30 Intel Corporation DFA-NFA hybrid
US9304768B2 (en) 2012-12-18 2016-04-05 Intel Corporation Cache prefetch for deterministic finite automaton instructions
US9251440B2 (en) * 2012-12-18 2016-02-02 Intel Corporation Multiple step non-deterministic finite automaton matching
US9268570B2 (en) 2013-01-23 2016-02-23 Intel Corporation DFA compression and execution
US9931785B2 (en) 2013-03-15 2018-04-03 3D Systems, Inc. Chute for laser sintering systems
US9086688B2 (en) * 2013-07-09 2015-07-21 Fisher-Rosemount Systems, Inc. State machine function block with user-definable actions on a transition between states
WO2015084360A1 (en) * 2013-12-05 2015-06-11 Hewlett-Packard Development Company, L.P. Regular expression matching
US9275336B2 (en) 2013-12-31 2016-03-01 Cavium, Inc. Method and system for skipping over group(s) of rules based on skip group rule
US9544402B2 (en) 2013-12-31 2017-01-10 Cavium, Inc. Multi-rule approach to encoding a group of rules
US9667446B2 (en) 2014-01-08 2017-05-30 Cavium, Inc. Condition code approach for comparing rule and packet data that are provided in portions
US11782983B1 (en) * 2020-11-27 2023-10-10 Amazon Technologies, Inc. Expanded character encoding to enhance regular expression filter capabilities

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10105576A (ja) * 1996-06-27 1998-04-24 Fujitsu Ltd スパースな状態遷移表に基づく複数記号列の照合装置および方法

Family Cites Families (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4764863A (en) * 1985-05-09 1988-08-16 The United States Of America As Represented By The Secretary Of Commerce Hardware interpreter for finite state automata
JP2702927B2 (ja) * 1987-06-15 1998-01-26 株式会社日立製作所 文字列検索装置
US5309358A (en) * 1992-02-18 1994-05-03 International Business Machines Corporation Method for interchange code conversion of multi-byte character string characters
JP2994926B2 (ja) 1993-10-29 1999-12-27 松下電器産業株式会社 有限状態機械作成方法とパターン照合機械作成方法とこれらを変形する方法および駆動方法
JP4021832B2 (ja) 1996-06-27 2007-12-12 富士通株式会社 スパースな状態遷移表に基づく複数記号列の照合装置および方法
JP4056962B2 (ja) 1996-06-27 2008-03-05 富士通株式会社 スパースな状態遷移表に基づく複数記号列の照合装置および方法
US5995963A (en) * 1996-06-27 1999-11-30 Fujitsu Limited Apparatus and method of multi-string matching based on sparse state transition list
JP3231673B2 (ja) 1996-11-21 2001-11-26 シャープ株式会社 文字,文字列検索方法及び該方法に用いる記録媒体
EP1436936A4 (en) * 2001-09-12 2006-08-02 Safenet Inc RECOGNITION OF FORMS OF HIGH-SPEED DATA FLOW
ATE373846T1 (de) * 2001-09-12 2007-10-15 Safenet Inc Verfahren zur generierung eines dfa-automaten, wobei übergänge zwecks speichereinsparung in klassen gruppiert werden
US7346511B2 (en) * 2002-12-13 2008-03-18 Xerox Corporation Method and apparatus for recognizing multiword expressions
US7552051B2 (en) * 2002-12-13 2009-06-23 Xerox Corporation Method and apparatus for mapping multiword expressions to identifiers using finite-state networks
US7305391B2 (en) * 2003-02-07 2007-12-04 Safenet, Inc. System and method for determining the start of a match of a regular expression
WO2004107404A2 (en) * 2003-05-23 2004-12-09 Sensory Networks, Inc. Apparatus and method for large hardware finite state machine with embedded equivalence classes
US20050273450A1 (en) * 2004-05-21 2005-12-08 Mcmillen Robert J Regular expression acceleration engine and processing model
US7539681B2 (en) * 2004-07-26 2009-05-26 Sourcefire, Inc. Methods and systems for multi-pattern searching
US7356663B2 (en) * 2004-11-08 2008-04-08 Intruguard Devices, Inc. Layered memory architecture for deterministic finite automaton based string matching useful in network intrusion detection and prevention systems and apparatuses

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10105576A (ja) * 1996-06-27 1998-04-24 Fujitsu Ltd スパースな状態遷移表に基づく複数記号列の照合装置および方法

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007034777A (ja) * 2005-07-28 2007-02-08 Nec Corp データ検索装置及び方法、並びにコンピュータ・プログラム
WO2008084594A1 (ja) * 2007-01-12 2008-07-17 Nec Corporation パターンマッチング装置及び方法
JP5120263B2 (ja) * 2007-01-12 2013-01-16 日本電気株式会社 パターンマッチング装置及び方法
US8626688B2 (en) 2007-01-12 2014-01-07 Nec Corporation Pattern matching device and method using non-deterministic finite automaton
JP2010026689A (ja) * 2008-07-17 2010-02-04 Internatl Business Mach Corp <Ibm> 情報処理装置、情報処理方法およびプログラム

Also Published As

Publication number Publication date
CN100524301C (zh) 2009-08-05
JPWO2006061899A1 (ja) 2009-09-03
CN101076798A (zh) 2007-11-21
BRPI0419214A (pt) 2008-04-15
JP4535130B2 (ja) 2010-09-01
WO2006061899A8 (ja) 2007-08-30
US20080109431A1 (en) 2008-05-08
US8032479B2 (en) 2011-10-04

Similar Documents

Publication Publication Date Title
JP4535130B2 (ja) 文字列照合装置および文字列照合プログラム
EP0293161B1 (en) Character processing system with spelling check function
JP5381710B2 (ja) ε遷移を含まない非決定性有限オートマトン生成システムと方法およびプログラム
JP2726568B2 (ja) 文字認識方法及び装置
JP2014235454A (ja) 文字列探索方法、文字列探索装置および文字列探索プログラム
JP5077380B2 (ja) 文字列照合装置および文字列照合プログラム
US7107205B2 (en) Method and apparatus for aligning ambiguity in finite state transducers
US5412567A (en) Augmenting a lexical transducer by analogy
KR100904835B1 (ko) 문자열 대조 장치 및 문자열 대조 프로그램을 기록한 컴퓨터 판독 가능한 기억 매체
JP4402169B1 (ja) コード列検索装置、検索方法及びプログラム
Atig et al. Emptiness of ordered multi-pushdown automata is 2etime-complete
JP4856573B2 (ja) 要約文生成装置及び要約文生成プログラム
JP2010225137A (ja) 検索プログラム及び検索方法
KR101645890B1 (ko) 비결정적 유한 오토마타의 상태 축소 방법 및 장치
JP5807592B2 (ja) 符号化方法、符号化装置及びコンピュータプログラム
JP5041003B2 (ja) 検索装置および検索方法
Berwick Mind the gap
TWI443538B (zh) Multi - hierarchical parallel multi - character string alignment device
Messerschmidt et al. A hierarchy of monotone deterministic non-forgetting restarting automata
JP6986309B1 (ja) データ処理装置、データ処理方法、及びプログラム
WO2010095179A1 (ja) コード列検索装置、検索方法及びプログラム
JP2747443B2 (ja) 類似検索装置
Finkel et al. Descriptive Set Theory and $\omega $-Powers of Finitary Languages
Cohen-Sygal Computational implementation of non-concatenative morphology
JP2006079494A (ja) コンパイラ

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 2007531511

Country of ref document: JP

AK Designated states

Kind code of ref document: A1

Designated state(s): AE AG AL AM AT AU AZ BA BB BG BR BW BY BZ CA CH CN CO CR CU CZ DE DK DM DZ EC EE EG ES FI GB GD GE GH GM HR HU ID IL IN IS KE KG KP KR KZ LC LK LR LS LT LU LV MA MD MG MK MN MW MX MZ NA NI NO NZ OM PG PH PL PT RO RU SC SD SE SG SK SL SY TJ TM TN TR TT TZ UA UG US UZ VC VN YU ZA ZM ZW

AL Designated countries for regional patents

Kind code of ref document: A1

Designated state(s): BW GH GM KE LS MW MZ NA SD SL SZ TZ UG ZM ZW AM AZ BY KG KZ MD RU TJ TM AT BE BG CH CY CZ DE DK EE ES FI FR GB GR HU IE IS IT LT LU MC NL PL PT RO SE SI SK TR BF BJ CF CG CI CM GA GN GQ GW ML MR NE SN TD TG

121 Ep: the epo has been informed by wipo that ep was designated in this application
WWE Wipo information: entry into national phase

Ref document number: 11792564

Country of ref document: US

Ref document number: 1020077012822

Country of ref document: KR

WWE Wipo information: entry into national phase

Ref document number: 200480044570.5

Country of ref document: CN

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 04822547

Country of ref document: EP

Kind code of ref document: A1

WWW Wipo information: withdrawn in national office

Ref document number: 4822547

Country of ref document: EP

ENP Entry into the national phase

Ref document number: PI0419214

Country of ref document: BR

WWP Wipo information: published in national office

Ref document number: 11792564

Country of ref document: US