5 // 11 January 2007 -- tds
8 #ifndef GALAGO_STOPPER_HPP
9 #define GALAGO_STOPPER_HPP
15 std::set
<std::string
> _terms
;
18 Stopper( indri::api::Parameters
& parameters
) {
19 indri::api::Parameters stopwords
= parameters
["stopper"]["word"];
21 for( size_t i
=0; i
<stopwords
.size(); i
++ ) {
22 _terms
.insert( (std::string
) stopwords
[i
] );
26 bool isStopword( const std::string
& word
) {
27 return _terms
.find(word
) != _terms
.end();
30 void process( std::string
& word
) {
31 if( isStopword(word
) ) {
37 #endif // GALAGO_STOPPER_HPP