Research Article
Universal Keyword Classifier on Public Key Based Encrypted Multikeyword Fuzzy Search in Public Cloud
Input: Two strings where | Output: Minimum edit distance | (1) Declare the integer variables length1, length2, ed; | (2) Declare the character variables char1, char2; | (3) Declare the integer variables substitution, insertion, deletion, minimum; | (4) length1 = size of ; | (5) length2 = size of ; | (6) ed = new int[length1 + 1][length2 + 1]; | (7) for ( to length1) | (8) ed; | (9) end for // loop | (10) for ( to length2) | (11) ed; | (12) end for // loop | (13) for ( to length1) | (14) char1 = .charAt(); | (15) for ( to length2) | (16) char2 = .charAt(); | (17) if (char1 = = char2) then | (18) ed = ed; | (19) else | (20) | (21) substitution = ed; | (22) insertion = ed; | (23) deletion = ed; | (24) minimum = (substitution > insertion ? insertion: substitution); | (25) minimum = (deletion > minimum ? minimum: deletion); | (26) ed = minimum; | (27) | (28) end if; | (29) end for // loop | (30) end for // loop | (31) return ed[length1, length2] |
|