ACRS}R'+xc`d``e`f@  (" < | @6 s1XAAHE$g(`YAxHU}zﺻmw9g7 D.1BFf&%!2$ɲ1pKDdȒ5lU""!cI &cX!!F=oǽs>cӸW\q> x/kx {Vjr֨uΚU+juv9{NʩvNp;#3\res׹$BJ!{>DH'!"c,Hfdjyʼ1;2H?O=ryE@L GhHδu(E87gZ18o|hZ6Z7ZC-֚3hkM?B-:Ke+đw(es 1+_W|?!xc`/ggPh X>H3PzI( Aœx!|ku ՞q$ ٽ!:P:, /so V "na [Ai(m#v.P JCiO( [+}K/Q0 F( ([=xVkAfSvդڃ]l=TP? œHK!*) (*$WO%=+BbKLJ1,Xi%Z0RoPm$*^86mG|PT}"F,7mZΰ5k6ss[=,)`}v4xj(Ur/*a2mUh]9E\%qυ Nl~丰'ԡGJ18I,7]3|U~'OәAhXcvxz|~ Z|Z###(b)p)~)23KKhLvLLLNNOPQRSTUVWXZ[ \\\]]]]]]]]] ]"]$]&](]*],].]0]2]4]6]8]:]<]>]@]B]D]F]H]J]L]N]P]R]T]V]X]Z]\]^]`]b]d]f]h]j]l]n]p]r]t]v]x]z]|]~]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]^^^^^ ^ ^^^^^^^^^^ ^"^$^&^(^*^,^.^0^2^4^6^8^:^<^>^@^B^D^F^H^J^L^N^P^R^T^V^X^Z^\^^^`^b^d^f^h^j^l^n^p^r^t^v^x^z^|^~^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ContinueP; 'hT #Q>Soundex Search Example5 ? ; This program is a brief demonstration of Soundex searchs and; highlighting the results. Run the program and click the Read Me ; button for detailed information.; The program was inspired by an article in the June 2000 Visual Basic; Programmers Journal, "Search With Soundex", by Stan Schultes.; You are free to use this code as is or modified in any program you; create. However, you do so at your own risk. GanTek Multimedia; makes no claims as to its accuracy, completeness, etc. so GanTek ; won't be liable for any problems you experience.; Send questions/comments to: info@gantekmultimedia.comd5 A hBFPVCGJKQSXZDTLMNR  " ; The Soundex code translates letters to codes by their phonetic sounds (phonemes).; The code is made up of the initial letter of the word followed by 3 digits representing; the word's phonetic pronunciation. Add zeros for padding if the code is less than 4; characters.; The numeric codes for each letter are as follows:; 1 ... B, F, P, V; 2 ... C, G, J, K, Q, S, X, ,Z; 3 ... D, T; 4 ... L; 5 ... M, N; 6 ... R; all vowels, the letters "H", "W", "Y" and all other characters are to be omitted; We'll use a list to store the pertinent characters. The index of each string ; (list entry) will be what we use to identify the code number. That is, since; "D" is in the 3rd slot in the list below, it will have a code of '3'.5BFPV& CGJKQSXZ& DT& L& MN& R65 lopyy      ; For highlights to work, you must use a non-proportionately spaced font; such as Courier. That is, the height and width of a lower case "i" must; take up the same amount of space as the height and width of an upper; case "W". Specify your font size below. You may have to do some; fiddling to accommodate whatever font you use. The pixel width/height; for the plain ol' Courier font (15 pt) that ships with Windows is used here.; The width and height of a 15 pt Courier font was determined manually; by doing a screen grab of sample text and viewing it in Photoshop.; Read the "Read Me" for further info.  20  12; Set color of highlight. Use the RGB function in the SetFill function to; specify any color you want for the highlight. We'll use yellow to start.; SetFill(1, RGB(0,0,255)) -- blue -- Color=1; SetFill(1, RGB(255,0,0)) -- red -- Color=2; SetFill(1, RGB(0,255,0)) -- green -- Color=3!y!1& !y!255&255&0 ; yellow -- Color=4   45 z,He unlocked the door, and I cleared out up the river bank. I noticed some pieces of limbs and such things floating down, and a sprinkling of bark; so I knowed the river had begun to rise. I reckoned I would have great times now if I was over at the town. The June rise used to be always luck for me; because as soon as that rise begins here comes cordwood floating down, and pieces of log rafts -- sometimes a dozen logs together; so all you have to do is to catch them and sell them to the wood yards and the sawmill.   ams #   #  %17 #   #   #  KW] # ; Enter your text into a variable that will be embedded into a display icon.; Run the program and click the Read Me button for more info.; From Huckelberry Finn by Mark Twain  He unlocked the door, and I cleared out up the river bank. I noticed some pieces of    # limbs and such things floating down, and a sprinkling of bark; so I knowed the    # river had begun to rise. I reckoned I would have great times now if I was over    # at the town. The June rise used to be always luck for me; because as soon as    # that rise begins here comes cordwood floating down, and pieces of log rafts --    # sometimes a dozen logs together; so all you have to do is to catch them and sell    # them to the wood yards and the sawmill.%% /%%    ǡ  %%    %%!! !!K%% [15 X$`,K,  5 A A e$   y-y$y-y-y$y -y$y-y-yy3y   $  *6  <HN T  X  ^  dp | c   7 P     & M*0 O, 1=IO  Yek o{ ; Get pixel width of text display (you could have hilite positioning problems if ; you include non-text elements outside of this area in the same display icon!)   ; Get coordinates of upper left corner of text display      ; With the width of the text display area, we can now calculate the maximum; number of characters that will fit on a line:  !y!; Determine how many lines and how many characters on each line.; Each line will likely have a different number of characters because of; word wrap and/or hard returns so this procedure is necessary if we're; going to be able to highlight matched words. Of course you could; manually insert hard returns and count characters per line visually but,; oh, what a pain!  0  1  . /    !-y! ; Get next line of text   !$y!& 1&  ; Check to see if last character of current line is a space or carriage return  ; and keep removing characters from end, one by one, until it is a space. . / !$y!& !-y!& !-y!             !$y!& 1& !-y!1 *    !-y!     + 0 - . ; Make a note of how many characters we've gone through so far ; by appending a linear list. Each successive slot in the list is the ; equivalent line number of the displayed text and is filled with the ; cumulative number of characters found in that line.     !-y! !y!&  ; Update TempText by removing line of text just worked on. ; Eventually, there will be nothing left to evaluate as TempText will be a null string.   !3y!& & - . Return c*j c,>c,}Zmp m  /h5 ?e  yy yy yyyy ry     $ 0 6:?D +JN?X 8^b?fjtz; Increment color number      1; If the line above causes the highest color number to be; exceeded, we need to reset it.$   5&    1; Now change the fill color for our highlight*    1 + !y!1& !y!0&0&255 ; blue , *    2 + !y!1& !y!255&0&0 ; red, *    3 + !y!1& !y!0&255&0 ; green, !y!1& !y!255&255&0 ; yellow- *; Jump back to the Search algorithm so the highlight is ; redrawn in new color (Ok, Ok, yeah, "GoTo" is a no-no; but you'll use a framework instead so you won't need it!!ry! l44(        ^E44(         Qs Xh5 | S +y-y$yy1y-y-y$y$y-y$y0-y0y$y   "  ####  /5 A 9###   ?EQ]cmy> >  # ?   #  %+ / #  3?E ; Get search string. We want to compare apples to apples so; we'll make it all uppser case for now.  !+y! ; Start with a fresh code  ; Loop through every character of search string. Assign numeric code; where appropriate; skip vowels, "H", "W", "Y" and non alpha characters.. 2   1 3 !-y! ; Loop through the 6 strings in the CodeList linear list to see if there is a match . 2   1 3 6 * !1y!!$y!& & & !y!&  + ; Add numeric code if it's not the previous code value (i.e., you can't have "22") * !$y!& !-y!& !-y!    +    #  0 . ; No need to continue the loop; we can go on to next letter - * - * - .- .; First character of code is first character of search string, always, so we'll replace; the first number in the soundex code to the first letter in the search string.  !$y!& 1& 1 # !$y!& 2& !-y!; Pad the soundex code with zeros if it doesn't contain 3 numerals.; We do this by using the RepeatString function. The number of zeros to repeat (add); is 4 minus the number of characters already in the SoundEx string (the first letter; plus 3 digits).   # !0y!0& 4!-y!; A Soundex code only has 4 characters so we need to strip off any extras.  !$y!& 1& 4d5 gaWWh 5y 6y+y  -y $yy1y -y -y$y  $y -y$y 0 -y0y $y  yyy$y+y 1y 1y5y 6y5y -yZy   # ##    ".:@D  HN  O#%##  [a U e#3##   Sq}R R  # S/!  )/3 #  7CIQW [ #  _kq {     ###           %+ /;GM  Q###  ]c my                   '-  9EQ]c; Initialize Match counter   0; Loop through every word in text body.. 2   1 3 !5y! ; Get current word. We want to compare apples to apples so we'll make it all upper case.    !+y!!6y!&  ; Start with a fresh code     ; Loop through every character of search string. Assign numeric code ; where appropriate; skip vowels, "H", "W", "Y" and non alpha characters. . 2   1 3 !-y!  ; Loop through the 6 strings in the CodeList linear list to see if there is a match . 2   1 3 6 * !1y!!$y! & & & !y!&  + ; Add numeric code if it's not the previous code value (i.e., you can't have "22") * !$y! & !-y! & !-y!     +      #  0 . ; No need to continue the loop; we can go on to next letter - * - * - . - . ; First character of code is first character of current word, always, so we'll replace ; the first number in the current code to the first letter in the current word.    !$y! & 1& 1 # !$y! & 2& !-y!  ; Pad the current code with zeros if it doesn't contain 3 numerals. ; We do this by using the RepeatString function. The number of zeros to repeat (add) ; is 4 minus the number of characters already in the CurrentCode string (the first letter ; plus 3 digits).      # !0y!0& 4!-y!  ; A Soundex code only has 4 characters so we need to strip off any extras.    !$y! & 1& 4 ; Check for match. Increment match counter if found. *     +     1 ; Get line number that matched word is on. We need to check ; to see if the word ending up getting word wrapped . 2   1 3 !y!      !+y!!$y!& !y!& 11& !y!& 1 * !1y! &  +   !1y! &  ; We need to make sure the word found isn't erroneously just a portion of ; a larger word (e.g., if we're looking for "he" we don't want to highlight ; the "he" in "here". . 2   1 3 !5y! *    !6y!&  + 0 . - . ; Don't draw highlight if we couldn't find a full word match in the line we're working with *   !5y!  1 + 1 .; if ((CharNum <> 1) & (SubStr(TempLine, CharNum-1, CharNum-1)) <> " ") then next repeat -- check letter just before start of word; bail out if not a space or first character in line; if ((CharNum <> CharCount(TempLine)) & (SubStr(TempLine, CharNum+CharCount(CurrentWord), CharNum+CharCount(CurrentWord)+1) <> " " & <> "." & <>"," & <> ";" & <> "!")) then next repeat --  ; Determine highlight box coordinates       6     !-y!          1    2      ; Draw highlight beneath matched word(s). !Zy!0& & & &  - * - . - *- .5 b;;(RightArrowOy!Oy!RightArrow015 wC66$      _Kj Returnl + ?.25115 __ "allways cleard dore Joon limbas notised peices raftz reckined rever rize some times yardz    ; Null entry text   ; Compile a list of sample mispelled words to try out"  allways cleard dore Joon limbas notised peices raftz reckined rever rize some times yardz%%"" ""*K, Returnl;;(""ay !ay!"&1"*K15 oo D!"" ay $ !  !ay!"&  ;;(""ay !ay!"&2"1:K5 oo D!"" ay $ !  !ay!"&  ;;(""ay !ay!"&3"1JK5 2 oo D!"" ay $ !  !ay!"&  ;;(""ay !ay!"&4"1ZK5 H oo D!"" ay $ !  !ay!"&  ;;(""ay !ay!"&5"1jK5 H oo D!"" ay $ !  !ay!"&  ;;(""ay !ay!"&6"zK15 H oo D!"" ay $ !  !ay!"&  ;;(""ay !ay!"&7"1K5 H oo D!"" ay $ !  !ay!"&  ;;(""ay !ay!"&8"1K5 H oo D!"" ay $ !  !ay!"&  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> (TF,b e Vs hu ds>nF , |xc`tgc000d`c``8n1Ld| @Px(> PC-P, UCY0 "0@ 0д@`}.P݌ XT3cy!pxc`tgc000d`c``8^1Ld @P(> PC-P, UCY0 "0@ 0д@TvF>nF ,W!Uxc`@BF6QQ_t@Jj$@ @v@ @T%@^^&@fg @3Ok @kPl @:l @um @nn @",n@o@v*o @o@dr4@s!@av"@K^w(@cw4@z4@u}4@*4~4@54@4@54@|4@|04@}4@}) 4@!4@%"4@#4@}#$4@}%4@&4@'@iO<number of characters that will fit on a line:  !y!; Determine how many lines and how many characters on each line.; Each line will likely have a different number of characters because of; word wrap and/or hard returns so this procedure is necessary if we'rvrpnP otPeCaP PPRrglEst1eci2 Q PurmnotPeSaP  PPbrhlOstLedi7 Q PxrpnR F- sometimes a dozen logs together; so all you have to do is to