[Zope-Checkins] CVS: Zope/lib/python/Products/PluginIndexes/TextIndexNG - StemmerWrapper.py:1.1.2.1
Andreas Jung
andreas@digicool.com
Tue, 19 Feb 2002 19:27:22 -0500
Update of /cvs-repository/Zope/lib/python/Products/PluginIndexes/TextIndexNG
In directory cvs.zope.org:/tmp/cvs-serv3996
Added Files:
Tag: ajung-textindexng-branch
StemmerWrapper.py
Log Message:
added
=== Added File Zope/lib/python/Products/PluginIndexes/TextIndexNG/StemmerWrapper.py ===
##############################################################################
#
# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE
#
##############################################################################
__version__ = "$Id: StemmerWrapper.py,v 1.1.2.1 2002/02/20 00:27:22 andreasjung Exp $"
__doc__=""" wrapper around Stemmer """
from Persistence import Persistent
from Stemmer import Stemmer
class StemmerWrapper(Persistent):
_stemmer = None
def __init__(self, stemmer):
self._stemmer = Stemmer(stemmer)
def availableAlgorithms(self):
return Stemmer.availableAlgorithms
def stem(self, args):
if self._stemmer:
return self._stemmer.stem( args )
else:
raise UnboundMethodType