Re: [Zope] Ignore stopwords/characters in alphabetical results

2006-02-07 Thread Ken Ara
Thanks Dieter and others for helping me understand
this problem. 

In the end I added the following code to my product:

def norm_title(self):
Returns a normalized copy of the title for
sorting purposes

nt = ''

if hasattr(self, 'title'):
nt = re.sub('^A |^An |^The |\W', ' ',
self.title)
nt = join(split(nt))

return nt

I then added a norm_title index to my ZCatalog for
sorting. I'm a regex newbie so any improvements are
welcome!

Thanks,

Ken


--- Dieter Maurer [EMAIL PROTECTED] wrote:

 Ken Ara wrote at 2006-2-2 00:41 -0800:
 I have been asked to improve the order of search
 results, so that stop words and certain characters
 at
 the beginning of a title are ignored. Final
 Report,
 The Final Report and [Final] Report all need to
 appear under the letter 'F'. 
 
 Thus, you only want the change the result order.
 
 Unless you want relevancy ranking (which is not the
 case,
 depending on your description), ordering has nothing
 to
 do with the indexes (at least not the text indexes).
 
 Ordering can be done with sequence.sort
 (documented in
 the Zope Online help system) or with Python's sort
 method.
 In both cases, you can provide your own comparison
 function.
 The comparison faction to use the vocabulary to
 check for
 stopwords (words not known by the vocabulary are
 stopwords).
 
 -- 
 Dieter
 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Ignore stopwords/characters in alphabetical results

2006-02-02 Thread Ken Ara
Hi,

I have been asked to improve the order of search
results, so that stop words and certain characters at
the beginning of a title are ignored. Final Report,
The Final Report and [Final] Report all need to
appear under the letter 'F'. 

We are running Zope 2.7.8-final with python 2.3.5,
under FreeBSD6. Until I was hit with this request, the
default ZCatalog and  ZCTextIndexes have given good
results.

I did try to install TextIndexNG3, according to the
instructions in the readme but was unable to restart
Zope (no message was left in event.log). 

Would this product make the difference I need?

Thanks,

Ken

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Ignore stopwords/characters in alphabetical results

2006-02-02 Thread Andreas Jung



--On 2. Februar 2006 00:41:38 -0800 Ken Ara [EMAIL PROTECTED] wrote:




I did try to install TextIndexNG3, according to the
instructions in the readme but was unable to restart
Zope (no message was left in event.log).


As documented: TXNG 3 does not work with pre-Zope 2.8
installation unless you have proper Five installation.

-aj

pgpVMKiIXBYup.pgp
Description: PGP signature
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Ignore stopwords/characters in alphabetical results

2006-02-02 Thread Jonathan

I have been asked to improve the order of search
results, so that stop words and certain characters at
the beginning of a title are ignored. Final Report,
The Final Report and [Final] Report all need to
appear under the letter 'F'.

We are running Zope 2.7.8-final with python 2.3.5,
under FreeBSD6. Until I was hit with this request, the
default ZCatalog and  ZCTextIndexes have given good
results.


ZCTextIndex has a list of stop words that you could probably modify.  This 
should get you pointed in the right direction:


http://www.zope.org/Members/dedalu/ZCTextIndex_python


hth

Jonathan 


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Ignore stopwords/characters in alphabetical results

2006-02-02 Thread Dieter Maurer
Ken Ara wrote at 2006-2-2 00:41 -0800:
I have been asked to improve the order of search
results, so that stop words and certain characters at
the beginning of a title are ignored. Final Report,
The Final Report and [Final] Report all need to
appear under the letter 'F'. 

Thus, you only want the change the result order.

Unless you want relevancy ranking (which is not the case,
depending on your description), ordering has nothing to
do with the indexes (at least not the text indexes).

Ordering can be done with sequence.sort (documented in
the Zope Online help system) or with Python's sort method.
In both cases, you can provide your own comparison function.
The comparison faction to use the vocabulary to check for
stopwords (words not known by the vocabulary are stopwords).

-- 
Dieter
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] ignore

2000-09-12 Thread Matthew Burleigh

me
-- 
Matt Burleigh
Systems Administrator, Digital Creations - publishers of Zope.

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] ignore

2000-09-12 Thread Matthew Burleigh

me
-- 
- Matthew Burleigh
- Systems Administrator, Digital Creations - publishers of Zope.
- (888)344-4332 -- http://www.digicool.com - http://www.zope.org

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] ignore

2000-09-12 Thread Matthew Burleigh


-- 
- Matthew Burleigh
- Systems Administrator, Digital Creations - publishers of Zope.
- (888)344-4332 -- http://www.digicool.com - http://www.zope.org

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] ignore

2000-09-12 Thread Matthew Burleigh

me
-- 
- Matthew Burleigh
- Systems Administrator, Digital Creations - publishers of Zope.
- (888)344-4332 -- http://www.digicool.com - http://www.zope.org

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] Ignore

2000-06-03 Thread Matthew Burleigh

Ignore this...

--
- Matthew Burleigh
- Systems Administrator, Digital Creations - publishers of Zope.
- (888)344-4332 -- http://www.digicool.com - http://www.zope.org




___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )