Dim stopWords(319) As String MTN README.uncgi cgi-bin cgi-lib.pl core dead.letter error.out form_data getvotes.pl global httpd_errors local log_tails mmdata personal results scripts.tar test uncgi uncgi.old uncgi_test www 12 Dim prefixes(9) As String MTN README.uncgi cgi-bin cgi-lib.pl core dead.letter error.out form_data getvotes.pl global httpd_errors local log_tails mmdata personal results scripts.tar test uncgi uncgi.old uncgi_test www 6 Dim suffixes2(22, 2) As String MTN README.uncgi cgi-bin cgi-lib.pl core dead.letter error.out form_data getvotes.pl global httpd_errors local log_tails mmdata personal results scripts.tar test uncgi uncgi.old uncgi_test www 7 Dim suffixes3(8, 2) As String MTN README.uncgi cgi-bin cgi-lib.pl core dead.letter error.out form_data getvotes.pl global httpd_errors local log_tails mmdata personal results scripts.tar test uncgi uncgi.old uncgi_test www 7 Dim suffixes4(21) As String MTN README.uncgi cgi-bin cgi-lib.pl core dead.letter error.out form_data getvotes.pl global httpd_errors local log_tails mmdata personal results scripts.tar test uncgi uncgi.old uncgi_test www 5 Public Sub InitConflater() stopWords(1) = "a" stopWords(2) = "about" stopWords(3) = "above" stopWords(4) = "across" stopWords(5) = "after" stopWords(6) = "afterwards" stopWords(7) = "again" stopWords(8) = "against" stopWords(9) = "all" stopWords(10) = "almost" stopWords(11) = "alone" stopWords(12) = "along" stopWords(13) = "already" stopWords(14) = "also" stopWords(15) = "although" stopWords(16) = "always" stopWords(17) = "am" stopWords(18) = "among" stopWords(19) = "amongst" stopWords(20) = "amoungst" stopWords(21) = "amount" stopWords(22) = "an" stopWords(23) = "and" stopWords(24) = "another" stopWords(25) = "any" stopWords(26) = "anyhow" stopWords(27) = "anyone" stopWords(28) = "anything" stopWords(29) = "anyway" stopWords(30) = "anywhere" stopWords(31) = "are" stopWords(32) = "around" stopWords(33) = "as" stopWords(34) = "at" stopWords(35) = "back" stopWords(36) = "be" stopWords(37) = "became" stopWords(38) = "because" stopWords(39) = "become" stopWords(40) = "becomes" stopWords(41) = "becoming" stopWords(42) = "been" stopWords(43) = "before" stopWords(44) = "beforehand" stopWords(45) = "behind" stopWords(46) = "being" stopWords(47) = "below" stopWords(48) = "beside" stopWords(49) = "besides" stopWords(50) = "between" stopWords(51) = "beyond" stopWords(52) = "bill" stopWords(53) = "both" stopWords(54) = "bottom" stopWords(55) = "but" stopWords(56) = "by" stopWords(57) = "call" stopWords(58) = "can" stopWords(59) = "cannot" stopWords(60) = "cant" stopWords(61) = "co" stopWords(62) = "computer" stopWords(63) = "con" stopWords(64) = "could" stopWords(65) = "couldnt" stopWords(66) = "cry" stopWords(67) = "de" stopWords(68) = "describe" stopWords(69) = "detail" stopWords(70) = "do" stopWords(71) = "done" stopWords(72) = "down" stopWords(73) = "due" stopWords(74) = "during" stopWords(75) = "each" stopWords(76) = "eg" stopWords(77) = "eight" stopWords(78) = "either" stopWords(79) = "eleven" stopWords(80) = "else" stopWords(81) = "elsewhere" stopWords(82) = "empty" stopWords(83) = "enough" stopWords(84) = "etc" stopWords(85) = "even" stopWords(86) = "ever" stopWords(87) = "every" stopWords(88) = "everyone" stopWords(89) = "everything" stopWords(90) = "everywhere" stopWords(91) = "except" stopWords(92) = "few" stopWords(93) = "fifteen" stopWords(94) = "fify" stopWords(95) = "fill" stopWords(96) = "find" stopWords(97) = "fire" stopWords(98) = "first" stopWords(99) = "five" stopWords(100) = "for" stopWords(101) = "former" stopWords(102) = "formerly" stopWords(103) = "forty" stopWords(104) = "found" stopWords(105) = "four" stopWords(106) = "from" stopWords(107) = "front" stopWords(108) = "full" stopWords(109) = "further" stopWords(110) = "get" stopWords(111) = "give" stopWords(112) = "go" stopWords(113) = "had" stopWords(114) = "has" stopWords(115) = "hasnt" stopWords(116) = "have" stopWords(117) = "he" stopWords(118) = "hence" stopWords(119) = "her" stopWords(120) = "here" stopWords(121) = "hereafter" stopWords(122) = "hereby" stopWords(123) = "herein" stopWords(124) = "hereupon" stopWords(125) = "hers" stopWords(126) = "herself" stopWords(127) = "him" stopWords(128) = "himself" stopWords(129) = "his" stopWords(130) = "how" stopWords(131) = "however" stopWords(132) = "hundred" stopWords(133) = "i" stopWords(134) = "ie" stopWords(135) = "if" stopWords(136) = "in" stopWords(137) = "inc" stopWords(138) = "indeed" stopWords(139) = "interest" stopWords(140) = "into" stopWords(141) = "is" stopWords(142) = "it" stopWords(143) = "its" stopWords(144) = "itself" stopWords(145) = "keep" stopWords(146) = "last" stopWords(147) = "latter" stopWords(148) = "latterly" stopWords(149) = "least" stopWords(150) = "less" stopWords(151) = "ltd" stopWords(152) = "made" stopWords(153) = "many" stopWords(154) = "may" stopWords(155) = "me" stopWords(156) = "meanwhile" stopWords(157) = "might" stopWords(158) = "mill" stopWords(159) = "mine" stopWords(160) = "more" stopWords(161) = "moreover" stopWords(162) = "most" stopWords(163) = "mostly" stopWords(164) = "move" stopWords(165) = "much" stopWords(166) = "must" stopWords(167) = "my" stopWords(168) = "myself" stopWords(169) = "name" stopWords(170) = "namely" stopWords(171) = "neither" stopWords(172) = "never" stopWords(173) = "nevertheless" stopWords(174) = "next" stopWords(175) = "nine" stopWords(176) = "no" stopWords(177) = "nobody" stopWords(178) = "none" stopWords(179) = "noone" stopWords(180) = "nor" stopWords(181) = "not" stopWords(182) = "nothing" stopWords(183) = "now" stopWords(184) = "nowhere" stopWords(185) = "of" stopWords(186) = "off" stopWords(187) = "often" stopWords(188) = "on" stopWords(189) = "once" stopWords(190) = "one" stopWords(191) = "only" stopWords(192) = "onto" stopWords(193) = "or" stopWords(194) = "other" stopWords(195) = "others" stopWords(196) = "otherwise" stopWords(197) = "our" stopWords(198) = "ours" stopWords(199) = "ourselves" stopWords(200) = "out" stopWords(201) = "over" stopWords(202) = "own" stopWords(203) = "part" stopWords(204) = "per" stopWords(205) = "perhaps" stopWords(206) = "please" stopWords(207) = "put" stopWords(208) = "rather" stopWords(209) = "re" stopWords(210) = "same" stopWords(211) = "see" stopWords(212) = "seem" stopWords(213) = "seemed" stopWords(214) = "seeming" stopWords(215) = "seems" stopWords(216) = "serious" stopWords(217) = "several" stopWords(218) = "she" stopWords(219) = "should" stopWords(220) = "show" stopWords(221) = "side" stopWords(222) = "since" stopWords(223) = "sincere" stopWords(224) = "six" stopWords(225) = "sixty" stopWords(226) = "so" stopWords(227) = "some" stopWords(228) = "somehow" stopWords(229) = "someone" stopWords(230) = "something" stopWords(231) = "sometime" stopWords(232) = "sometimes" stopWords(233) = "somewhere" stopWords(234) = "still" stopWords(235) = "such" stopWords(236) = "system" stopWords(237) = "take" stopWords(238) = "ten" stopWords(239) = "than" stopWords(240) = "that" stopWords(241) = "the" stopWords(242) = "their" stopWords(243) = "them" stopWords(244) = "themselves" stopWords(245) = "then" stopWords(246) = "thence" stopWords(247) = "there" stopWords(248) = "thereafter" stopWords(249) = "thereby" stopWords(250) = "therefore" stopWords(251) = "therein" stopWords(252) = "thereupon" stopWords(253) = "these" stopWords(254) = "they" stopWords(255) = "thick" stopWords(256) = "thin" stopWords(257) = "third" stopWords(258) = "this" stopWords(259) = "those" stopWords(260) = "though" stopWords(261) = "three" stopWords(262) = "through" stopWords(263) = "throughout" stopWords(264) = "thru" stopWords(265) = "thus" stopWords(266) = "to" stopWords(267) = "together" stopWords(268) = "too" stopWords(269) = "top" stopWords(270) = "toward" stopWords(271) = "towards" stopWords(272) = "twelve" stopWords(273) = "twenty" stopWords(274) = "two" stopWords(275) = "un" stopWords(276) = "under" stopWords(277) = "until" stopWords(278) = "up" stopWords(279) = "upon" stopWords(280) = "us" stopWords(281) = "very" stopWords(282) = "via" stopWords(283) = "was" stopWords(284) = "we" stopWords(285) = "well" stopWords(286) = "were" stopWords(287) = "what" stopWords(288) = "whatever" stopWords(289) = "when" stopWords(290) = "whence" stopWords(291) = "whenever" stopWords(292) = "where" stopWords(293) = "whereafter" stopWords(294) = "whereas" stopWords(295) = "whereby" stopWords(296) = "wherein" stopWords(297) = "whereupon" stopWords(298) = "wherever" stopWords(299) = "whether" stopWords(300) = "which" stopWords(301) = "while" stopWords(302) = "whither" stopWords(303) = "who" stopWords(304) = "whoever" stopWords(305) = "whole" stopWords(306) = "whom" stopWords(307) = "whose" stopWords(308) = "why" stopWords(309) = "will" stopWords(310) = "with" stopWords(311) = "within" stopWords(312) = "without" stopWords(313) = "would" stopWords(314) = "yet" stopWords(315) = "you" stopWords(316) = "your" stopWords(317) = "yours" stopWords(318) = "yourself" stopWords(319) = "yourselves" prefixes(1) = "kilo" prefixes(2) = "micro" prefixes(3) = "milli" prefixes(4) = "intra" prefixes(5) = "ultra" prefixes(6) = "mega" prefixes(7) = "nano" prefixes(8) = "pico" prefixes(9) = "pseudo" suffixes2(1, 1) = "ational" suffixes2(1, 2) = "ate" suffixes2(2, 1) = "tional" suffixes2(2, 2) = "tion" suffixes2(3, 1) = "enci" suffixes2(3, 2) = "ence" suffixes2(4, 1) = "anci" suffixes2(4, 2) = "ance" suffixes2(5, 1) = "izer" suffixes2(5, 2) = "ize" suffixes2(6, 1) = "iser" suffixes2(6, 2) = "ize" suffixes2(7, 1) = "abli" suffixes2(7, 2) = "able" suffixes2(8, 1) = "alli" suffixes2(8, 2) = "al" suffixes2(9, 1) = "entli" suffixes2(9, 2) = "ent" suffixes2(10, 1) = "eli" suffixes2(10, 2) = "e" suffixes2(11, 1) = "ousli" suffixes2(11, 2) = "ous" suffixes2(12, 1) = "ization" suffixes2(12, 2) = "ize" suffixes2(13, 1) = "isation" suffixes2(13, 2) = "ize" suffixes2(14, 1) = "ation" suffixes2(14, 2) = "ate" suffixes2(15, 1) = "ator" suffixes2(15, 2) = "ate" suffixes2(16, 1) = "alism" suffixes2(16, 2) = "al" suffixes2(17, 1) = "iveness" suffixes2(17, 2) = "ive" suffixes2(18, 1) = "fulness" suffixes2(18, 2) = "ful" suffixes2(19, 1) = "ousness" suffixes2(19, 2) = "ous" suffixes2(20, 1) = "aliti" suffixes2(20, 2) = "al" suffixes2(21, 1) = "iviti" suffixes2(21, 2) = "ive" suffixes2(22, 1) = "biliti" suffixes2(22, 2) = "ble" suffixes3(1, 1) = "icate" suffixes3(1, 2) = "ic" suffixes3(2, 1) = "ative" suffixes3(2, 2) = "" suffixes3(3, 1) = "alize" suffixes3(3, 2) = "al" suffixes3(4, 1) = "alise" suffixes3(4, 2) = "al" suffixes3(5, 1) = "iciti" suffixes3(5, 2) = "ic" suffixes3(6, 1) = "ical" suffixes3(6, 2) = "ic" suffixes3(7, 1) = "ful" suffixes3(7, 2) = "" suffixes3(8, 1) = "ness" suffixes3(8, 2) = "" suffixes4(1) = "al" suffixes4(2) = "ance" suffixes4(3) = "ence" suffixes4(4) = "er" suffixes4(5) = "ic" suffixes4(6) = "able" suffixes4(7) = "ible" suffixes4(8) = "ant" suffixes4(9) = "ement" suffixes4(10) = "ment" suffixes4(11) = "ent" suffixes4(12) = "sion" suffixes4(13) = "tion" suffixes4(14) = "ou" suffixes4(15) = "ism" suffixes4(16) = "ate" suffixes4(17) = "iti" suffixes4(18) = "ous" suffixes4(19) = "ive" suffixes4(20) = "ize" suffixes4(21) = "ise" End Sub Public Sub ToLowerCase(kwd As String) ToLowerCase = LCase(kwd) End Sub 'ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ } Public Function IsValid(l) If InStr(1, "abcdefghijklmnopqrstuvwxyz", l) <> 0 Then IsValid = True ElseIf InStr(1, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", l) <> 0 Then IsValid = True ElseIf InStr(1, "0123456789", l) <> 0 Then IsValid = True Else IsValid = False End If End Function 'ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ } Public Function Clean(kwd As String) Dim newKwd As String Dim i As Integer newKwd = "" For i = 1 To Len(kwd) If IsValid(mid(kwd, i, 1)) Then newKwd = newKwd & mid(kwd, i, 1) End If Next Clean = newKwd 'WATCH End Function 'ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ } Public Function StopWordTest(bottom, top As Integer, word As String) Dim mmid As Integer Dim midWord As String If bottom > top Then StopWordTest = False Else mmid = ((top - bottom) / 2) + bottom midWord = stopWords(mmid) If word < midWord Then StopWordTest = StopWordTest(bottom, mmid - 1, word) ElseIf word > midWord Then StopWordTest = StopWordTest(mmid + 1, top, word) Else StopWordTest = True End If End If End Function 'ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ} Public Function StripPrefixes(strng As String) Dim i As Integer For i = 1 To 9 If mid(strng, 1, Len(prefixes(i))) = prefixes(i) Then strng = mid(strng, Len(prefixes(i)) + 1, Len(strng) - Len(prefixes(i))) GoTo last End If Next last: StripPrefixes = strng End Function 'ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ} Public Function HasSuffix(word As String, suffix As String, stem As String) As Boolean If Len(word) <= Len(suffix) Then HasSuffix = False GoTo last End If If Len(suffix) > 1 Then If mid(word, (Len(word) - 1), 1) <> mid(suffix, Len(suffix) - 1, 1) Then HasSuffix = False GoTo last End If End If stem = mid(word, 1, Len(word) - Len(suffix)) If stem & suffix = word Then HasSuffix = True Else HasSuffix = False End If last: End Function 'ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ} Public Function Vowel(ch, prev) Select Case ch Case "a", "e", "i", "o", "u": Vowel = True Case "y": Vowel = (Vowel(prev, "?")) Case Else Vowel = False End Select End Function 'ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ} Public Function Cvc(strng As String) Dim lenn As Integer Dim l As String lenn = Len(strng) If lenn < 3 Then Cvc = False ElseIf (Vowel(mid(strng, lenn, 1), mid(strng, lenn - 1, 1)) = False) And (InStr("wxy", mid(strng, lenn, 1) <> 0) And (Vowel(mid(strng, lenn - 1, 1), mid(strng, lenn - 2, 1)) = True)) Then If lenn = 3 Then If Vowel(mid(strng, 1, 1), "?") = False Then Cvc = True Else Cvc = False End If Else If Vowel(mid(strng, lenn - 2, 1), mid(strng, lenn - 3, 1)) = False Then Cvc = True Else Cvc = False End If End If Else Cvc = False End If End Function 'ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ} Public Function Measure(stem As String) Dim i, count, lenn lenn = Len(stem) count = 0 i = 1 Do While i <= lenn Do While i <= lenn If i > 1 Then If Vowel(mid(stem, i, 1), mid(stem, i - 1, 1)) = True Then GoTo l1 End If ElseIf Vowel(mid(stem, i, 1), "?") = True Then GoTo l1 End If i = i + 1 Loop l1: i = i + 1 Do While i <= lenn If i > 1 Then If Vowel(mid(stem, i, 1), mid(stem, i - 1, 1)) = False Then GoTo l2 End If ElseIf Vowel(mid(stem, i, 1), "?") = False Then GoTo l2 End If i = i + 1 Loop l2: If i <= lenn Then count = count + 1 i = i + 1 End If Loop Measure = count End Function 'ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ} Public Function ContainsVowel(word As String) Dim i As Integer Dim sstop As Boolean sstop = False i = 1 Do While (Not sstop) And (i <= Len(word)) If i > 1 Then If Vowel(mid(word, i, 1), mid(word, i - 1, 1)) = True Then sstop = True End If ElseIf Vowel(mid(word, i, 1), "?") = True Then sstop = True End If i = i + 1 Loop ContainsVowel = sstop End Function 'ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ} Public Function Step1(strng As String) Dim stem As String Dim lenn As Integer If mid(strng, Len(strng), 1) = "s" Then If (HasSuffix(strng, "sses", stem) = True) Then strng = mid(strng, 1, Len(strng) - 2) ElseIf (HasSuffix(strng, "ies", stem) = True) Then strng = mid(strng, 1, Len(strng) - 2) ElseIf mid(strng, Len(strng) - 1, 1) <> "s" Then 'if its an 's' then lob if off} strng = mid(strng, 1, Len(strng) - 1) End If End If If HasSuffix(strng, "eed", stem) = True Then If Measure(stem) > 0 Then strng = mid(strng, 1, Len(strng) - 1) End If ElseIf ((HasSuffix(strng, "ed", stem) = True) Or (HasSuffix(strng, "ing", stem) = True)) And (ContainsVowel(stem) = True) Then strng = mid(strng, 1, Len(stem)) If (HasSuffix(strng, "at", stem) = True) Or (HasSuffix(strng, "bl", stem) = True) Or (HasSuffix(strng, "iz", stem) = True) Then strng = strng & "e" Else lenn = Len(strng) If lenn > 1 Then If (mid(strng, lenn, 1) = mid(strng, lenn - 1, 1)) And (mid(strng, lenn, 1) <> "l'") And (mid(strng, lenn, 1) <> "s") And (mid(strng, lenn, 1) <> "z") Then strng = mid(strng, 1, lenn - 1) End If ElseIf Measure(strng) = 1 Then If Cvc(strng) = True Then strng = strng & "e" End If End If End If End If 'End of Step 1b 'Beggining of Step 1c If HasSuffix(strng, "y", stem) Then If ContainsVowel(stem) Then tmp_strng = mid(strng, 1, Len(strng) - 1) tmp_strng = tmp_strng & "i" strng = tmp_strng End If End If Step1 = strng 'End of Step 1c End Function 'ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ} Public Function Step2(strng As String) Dim stem As String Dim index As Integer For index = 1 To 22 If HasSuffix(strng, suffixes2(index, 1), stem) = True Then If Measure(stem) > 0 Then strng = stem & suffixes2(index, 2) GoTo l1 End If End If Next l1: Step2 = strng End Function 'ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ} Public Function Step3(strng As String) Dim stem As String Dim index As Integer For index = 1 To 8 If HasSuffix(strng, suffixes3(index, 1), stem) = True Then If Measure(stem) > 0 Then strng = stem & suffixes3(index, 2) GoTo l1 End If End If Next l1: Step3 = strng End Function 'ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ} Public Function Step4(strng As String) Dim index As Integer Dim stem As String For index = 1 To 21 If HasSuffix(strng, suffixes4(index), stem) = True Then If Measure(stem) > 1 Then strng = stem 'GoTo l1 Exit For End If End If Next l1: Step4 = strng End Function 'ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ} Public Function Step5(strng As String) Dim stem As String 'Beggining of Step 5a} 'If strng <> "" Then If mid(strng, Len(strng), 1) = "e" Then If Measure(strng) > 1 Then strng = mid(strng, 1, Len(strng) - 1) ElseIf Measure(strng) = 1 Then stem = mid(strng, 1, Len(strng) - 1) If Cvc(stem) = False Then strng = mid(strng, 1, Len(strng) - 1) End If End If End If 'End If 'End of Step 5a} 'Beggining of Step 5b} 'If strng <> "" Then If (mid(strng, Len(strng), 1) = "l") And (mid(strng, Len(strng) - 1, 1) = "l") And (Measure(strng) > 1) Then strng = mid(strng, 1, Len(strng) - 1) End If 'End If 'End of Step 5b} Step5 = strng End Function 'ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ} Public Function StripSuffixes(strng As String) strng = Step1(strng) strng = Step2(strng) strng = Step3(strng) strng = Step4(strng) strng = Step5(strng) StripSuffixes = strng End Function 'ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ} Public Function StripAffixes(strng As String) strng = LCase(strng) strng = Clean(strng) If (strng <> "") And (Len(strng) > 2) Then If Not (StopWordTest(1, 319, strng)) Then strng = StripPrefixes(strng) If strng <> "" Then strng = StripSuffixes(strng) End If Else strng = "" End If Else strng = "" End If StripAffixes = strng End Function