lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phan The Dai <thienthanhom...@gmail.com>
Subject Re: Recommend a example to implement an analyzer with parsing Camelcase
Date Sun, 07 Feb 2010 17:16:45 GMT
They are more details.
Thank you very much !

On Mon, Feb 8, 2010 at 1:37 AM, Ahmet Arslan <iorixxx@yahoo.com> wrote:

>
> > Hi Ahmet,
> > I have ever known WordDelimiterFilterFactory, but never use
> > Solr.
> > But how to download this class.
>
> http://repo1.maven.org/maven2/org/apache/solr/solr-core/1.4.0/
>
> > Can I use it in Lucene 3.0, or extends Analyzer with
> > overloading its
> > methods.
>
> It is not using new token stream API yet, but you can use it.
> WordDelimiterFilter is package-private but you can use its factory as
> follows:
>
> Map<String, String> delimeterArgs = new HashMap<String, String>(9);
>
>  delimeterArgs.put("generateWordParts", "1");
>  delimeterArgs.put("generateNumberParts", "0");
>  delimeterArgs.put("catenateWords", "0");
>  delimeterArgs.put("catenateNumbers", "0");
>  delimeterArgs.put("catenateAll", "0");
>  delimeterArgs.put("splitOnCaseChange", "0");
>  delimeterArgs.put("splitOnNumerics", "1");
>  delimeterArgs.put("preserveOriginal", "1");
>  delimeterArgs.put("stemEnglishPossessive", "0");
>
> WordDelimiterFilterFactory wordDelimiterFactory = new
> WordDelimiterFilterFactory();
>
> wordDelimiterFactory.init(delimeterArgs);
>
> You can appned it to your analyzer chain:
>
> result = wordDelimiterFactory.create(result);
>
> Explanations of parameters are explained in the wiki.
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message