|
From: creedon <icr...@us...> - 2005-08-13 20:37:17
|
Update of /cvsroot/frontierkernel/odbs/mainResponderRoot/mainResponder/search/utilities In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20917 Modified Files: compactText Log Message: replace searchEngine.cleanText with mainResponder.search.utilities.cleanText Index: compactText =================================================================== RCS file: /cvsroot/frontierkernel/odbs/mainResponderRoot/mainResponder/search/utilities/compactText,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** compactText 26 Mar 2005 21:46:13 -0000 1.1.1.1 --- compactText 13 Aug 2005 20:37:10 -0000 1.2 *************** *** 1,3 **** FrontierVcsFile:1:scpt:mainResponder.search.utilities.compactText ! on compactText (s) { ÇRemove punctuation (but not spaces) from text. ÇChanges: Ç07/19/00; 11:29:59 AM by PBS ÇDon't do the char-by-char loop, it's redundant, as searchEngine.cleanText does most of the text clean-up. s = string.lower (s); bundle { //a few punctuation characters aren't handled by searchEngine.cleanText s = string.replaceAll (s, "\"", " "); s = string.replaceAll (s, "'", " "); s = string.replaceAll (s, ",", " "); s = string.replaceAll (s, "~", " "); s = string.replaceAll (s, " ", " ", false)}; s = searchEngine.cleanText (s); s = string.replaceAll (s, ">", " "); s = string.replaceAll (s, "<", " "); local (i = sizeOf (s)); Çloop Çif i == 0 Çbreak Ç Çif string.isPunctuation (s [i]) Çdelete (@s [i]) Ç Çif mod (I, 500) == 0 Çsys.systemTask () Ç Çi-- s = string.trimWhiteSpace (s); return (s)} \ No newline at end of file --- 1,3 ---- FrontierVcsFile:1:scpt:mainResponder.search.utilities.compactText ! on compactText (s) { ÇRemove punctuation (but not spaces) from text. ÇChanges Ç8/12/05; 11:14:07 AM by TAC Çreplace searchEngine.cleanText with mainResponder.search.utilities.cleanText Ç07/19/00; 11:29:59 AM by PBS ÇDon't do the char-by-char loop, it's redundant, as searchEngine.cleanText does most of the text clean-up. s = string.lower (s); bundle { //a few punctuation characters aren't handled by searchEngine.cleanText s = string.replaceAll (s, "\"", " "); s = string.replaceAll (s, "'", " "); s = string.replaceAll (s, ",", " "); s = string.replaceAll (s, "~", " "); s = string.replaceAll (s, " ", " ", false)}; s = mainResponder.search.utilities.cleanText (s); s = string.replaceAll (s, ">", " "); s = string.replaceAll (s, "<", " "); local (i = sizeOf (s)); Çloop Çif i == 0 Çbreak Ç Çif string.isPunctuation (s [i]) Çdelete (@s [i]) Ç Çif mod (I, 500) == 0 Çsys.systemTask () Ç Çi-- s = string.trimWhiteSpace (s); return (s)} \ No newline at end of file |