1 | <?php |
||
26 | class StopWords |
||
27 | { |
||
28 | |||
29 | /** |
||
30 | * mbstring encoding |
||
31 | */ |
||
32 | const ENCODING = 'UTF-8'; |
||
33 | |||
34 | /** @var string[] */ |
||
35 | protected $stopwordList = array(); |
||
36 | |||
37 | /** |
||
38 | * StopWords constructor - load stop words for current locale |
||
39 | * |
||
40 | * @todo specify locale to constructor, will require shift away from defined constant |
||
41 | */ |
||
42 | public function __construct() |
||
52 | |||
53 | /** |
||
54 | * check - look up a word in a list of stop words and |
||
55 | * classify it as a significant word or a stop word. |
||
56 | * |
||
57 | * @param string $key the word to check |
||
58 | * |
||
59 | * @return bool True if word is significant, false if it is a stop word |
||
60 | */ |
||
61 | 1 | public function check($key) |
|
68 | } |
||
69 |