[Zope-dev] Re: Spitter.c Hack
Jason Spisak
444@hiretechs.com
Sat, 06 Jan 2001 01:41:45 GMT
Casey Duncan:
It truely is nothing more than cutting out the two parts that eliminate
single letter words and numbers:
*** Zope-2.2.4-src/lib/python/SearchIndex/Splitter.c
--- Zope-2.2.4-src/lib/python/SearchIndex/Splitter_Old.c
***************
*** 169,192 ****
len = PyString_Size(word) - 1;
len = PyString_Size(word);
- /*if(len < 2) Single-letter words are stop words!
- {
- Py_INCREF(Py_None);
- return Py_None;
- } */
-
- /*************************************************************
- Test whether a word has any letters. */
for (; --len >= 0 && ! isalpha((unsigned char)cword[len]); );
- /*if (len < 0)
- {
- Py_INCREF(Py_None);
- return Py_None;
- }
-
- * If no letters, treat it as a stop word.
- *************************************************************/
Py_INCREF(word);
--- 169,176 ----
All my best,
Jason Spisak
CIO
__ ___ ______ __
/ // (_)_____/_ __/__ ____/ / ___ _______ __ _
/ _ / / __/ -_) / / -_) __/ _ \(_-<_/ __/ _ \/ ' \
/_//_/_/_/ \__/_/ \__/\__/_//_/___(_)__/\___/_/_/_/
6151 West Century Boulevard
Suite 900
Los Angeles, CA 90045
P. 310.665.3444
F. 310.665.3544
Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email
address may not be added to any commercial mail list with out my
permission. Violation of my privacy with advertising or SPAM will
result in a suit for a MINIMUM of $500 damages/incident, $1500 for
repeats.