writing a custom anaylzer in pylucene/inheritance using jcc?
问题 I want to write a custom analyzer in pylucene. Usually in java lucene , when you write a analyzer class , your class inherits lucene's Analyzer class. but pylucene uses jcc , the java to c++/python compiler. So how do you let a python class inherit from a java class using jcc ,and especially how do you write a custom pylucene analyzer? Thanks. 回答1: Here's an example of an Analyzer that wraps the EdgeNGram Filter. import lucene class EdgeNGramAnalyzer(lucene.PythonAnalyzer): ''' This is an