[pylucene-dev] is it possible to write a custom analyzer?

Andi Vajda vajda at osafoundation.org
Tue Jan 4 10:13:28 PST 2005


Yes, you can write an Analyzer implementation in python, take a look at the 
test_PositionIncrement.py unit test suite. The very first unit test in there, 
testSetPosition, does that. Basically, any python class with a method called 
tokenStream that takes self, fieldName and reader as arguments can be passed 
to Lucene as an Analyzer.
The same applies for a number of Lucene classes. The complete list is defined 
by the classes in the java/org/osafoundation source tree whose name starts 
with 'Python'.

Andi..

On Tue, 4 Jan 2005, Victor Ng wrote:

> Is it possible to write a custom analyzer in Python for PyLucene?
>
> I want to have an analyzer that is similar to the StandardAnalyzer,
> but with a different set of stopwords.
>
> vic
> _______________________________________________
> pylucene-dev mailing list
> pylucene-dev at osafoundation.org
> http://lists.osafoundation.org/mailman/listinfo/pylucene-dev
>


More information about the pylucene-dev mailing list