lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steven Rowe <>
Subject Re: I want to develop an analyzer based on StandardAnalyzer
Date Tue, 28 Nov 2006 19:22:09 GMT
Hello Cristophe,

christophe leroy wrote:
> I need an Analyzer which doesn't separate the
> underscored words and with the StandardAnalyzer
> functionnalities.
> So, the solution is to create a new Analyzer .
> I have seen several mails about that. I tried to apply
> the proposed solutions but I have a problem.
> C:\Documents and
> Settings\CLEROY\Bureau\pb_lucene2\lucene-1.4.3-src\lucene-1.4.3
> \src\java\org\apache\lucene\analysis\standard>"C:\Documents
> and Settings\CLEROY\
> Bureau\pb_lucene2\javacc-4.0\javacc-4.0\bin\javacc"
> StandardTokenizer.jj

I don't know if your problem is being caused by this (though I suspect
it is -- see below), but the standard way to rebuild the JavaCC-based
parsers is via an ant target -- from Lucene's BUILD.txt:

  - After JavaCC is installed, create a file
    [...] and add the line


    where this points to the root directory of your javacc
    installation (the directory that contains bin/lib/javacc.jar).

  - To rebuild any of the JavaCC-based parsers, run "ant javacc".

So, your should contain (all on one line):

   javacc.home = C:/Documents and


The "javacc" ant target calls the "javacc-StandardAnalyzer" target,
which generates the source files in a temporary directory, then copies
them back where they need to be for compilation, in the process getting
rid of

  <target name="javacc-StandardAnalyzer"
    <!-- generate this in a build directory so we can exclude
         ParseException -->
    <mkdir dir="${build.dir}/gen/org/apache/lucene/analysis/standard"/>


    <copy todir="src/java/org/apache/lucene/analysis/standard">
        <include name="*.java"/>
        <exclude name=""/>

Good luck,

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message