Sascha.Wojewsky at heinze.de
2008-Mar-12 09:26 UTC
[Xapian-discuss] how can i use stopwords?
Hi,
I do not understand the stopword function...
I've set the termgenerator like this:
$self->{'Stemmer'} = new Search::Xapian::Stem(german2);
$self->{'Stopper'} = new Search::Xapian::SimpleStopper();
$self->{'TermGenerator'} = new Search::Xapian::TermGenerator;
$self->{'TermGenerator'}->set_stemmer(
$self->{'Stemmer'} );
$self->{'TermGenerator'}->set_stopper(
$self->{'Stopper'} );
I've thought that xapian now exclude the stopwords automatic by the
stemming-language.
Could someone explain the stopword function?
Thanks.
Greetings
Sascha
Sascha.Wojewsky at heinze.de wrote:> Hi, > > I do not understand the stopword function... > > I've set the termgenerator like this: > $self->{'Stemmer'} = new Search::Xapian::Stem(german2); > $self->{'Stopper'} = new Search::Xapian::SimpleStopper(); > $self->{'TermGenerator'} = new Search::Xapian::TermGenerator; > $self->{'TermGenerator'}->set_stemmer( $self->{'Stemmer'} ); > $self->{'TermGenerator'}->set_stopper( $self->{'Stopper'} ); > > I've thought that xapian now exclude the stopwords automatic by the stemming-language.No, it's still up to users to set the list of stopwords to use.> Could someone explain the stopword function?You need to call SimpleStopper->add() for each word you want to be in the stopword list. -- Richard