[ Index ]

PHP Cross Reference of Moodle 1.9.3 [Build 15-Oct-2008]

title

Body

[close]

/search/Zend/Search/Lucene/Analysis/TokenFilter/ -> StopWords.php (summary)

Zend Framework LICENSE

Copyright: Copyright (c) 2005-2007 Zend Technologies USA Inc. (http://www.zend.com)
License: http://framework.zend.com/license/new-bsd New BSD License
File Size: 101 lines (3 kb)
Included or required:0 times
Referenced: 1 time
Includes or requires: 0 files

Defines 1 class

Zend_Search_Lucene_Analysis_TokenFilter_StopWords:: (3 methods):
  __construct()
  normalize()
  loadFromFile()


Class: Zend_Search_Lucene_Analysis_TokenFilter_StopWords  - X-Ref

Token filter that removes stop words. These words must be provided as array (set), example:
$stopwords = array('the' => 1, 'an' => '1');

We do recommend to provide all words in lowercase and concatenate this class after the lowercase filter.

__construct($stopwords = array()   X-Ref
Constructs new instance of this filter.

param: array $stopwords array (set) of words that will be filtered out

normalize(Zend_Search_Lucene_Analysis_Token $srcToken)   X-Ref
Normalize Token or remove it (if null is returned)

param: Zend_Search_Lucene_Analysis_Token $srcToken
return: Zend_Search_Lucene_Analysis_Token

loadFromFile($filepath = null)   X-Ref
Fills stopwords set from a text file. Each line contains one stopword, lines with '#' in the first
column are ignored (as comments).

You can call this method one or more times. New stopwords are always added to current set.

param: string $filepath full path for text file with stopwords



Generated: Wed Jan 14 11:33:29 2009 Cross-referenced by PHPXref 0.7