You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lucenenet.apache.org by Christian Setzkorn <ch...@setzkorn.eu> on 2012/02/24 11:00:02 UTC

[Lucene.Net] word breaking

Hi,

 

I am using this code to break some words in a Text:

 

stringReader = new StringReader(Text);

tokenStream = StandardAnalyzer.TokenStream("defaultFieldName",
stringReader); // removes standard stopwords too

Lucene.Net.Analysis.Token token = tokenStream.Next();

 

This works very well but it swallows up some critical/exceptional words. Is
there an easy way to prevent it to swallow up words that start with d+ or
v+. Thanks.

 

Christian


Re: [Lucene.Net] word breaking

Posted by Anders Lybecker <an...@lybecker.com>.
Hi,

The StandardAnalyzer ctor accepts a list of stopwords.

:-)
Anders Lybecker

On Fri, Feb 24, 2012 at 11:00 AM, Christian Setzkorn
<ch...@setzkorn.eu>wrote:

> Hi,
>
>
>
> I am using this code to break some words in a Text:
>
>
>
> stringReader = new StringReader(Text);
>
> tokenStream = StandardAnalyzer.TokenStream("defaultFieldName",
> stringReader); // removes standard stopwords too
>
> Lucene.Net.Analysis.Token token = tokenStream.Next();
>
>
>
> This works very well but it swallows up some critical/exceptional words. Is
> there an easy way to prevent it to swallow up words that start with d+ or
> v+. Thanks.
>
>
>
> Christian
>
>