I just started working with PyLucene (1.0.1) a couple of weeks ago
and have it working well building indexes using either
StandardAnalyzer, SimpleAnalyzer or WhitespaceAnalyzer. However, when
I tried to use my own analyzer, I got an error: "NameError: global
name 'WhitespaceTokenizer' is not defined". Below is the code I was
using for the analyzer - is there something I'm doing wrong, or is
this particular tokenizer not available to PyLucene?
class MyAnalyzer(object):
def tokenStream(self, fieldName, reader):
result = WhitespaceTokenizer(reader)
result = LowerCaseFilter(result)
result = StopFilter(result, stopwords)
return result
alf.
_______________________________________________
pylucene-dev mailing list
[email protected]
http://lists.osafoundation.org/mailman/listinfo/pylucene-dev