add Last-Modified header
[lhc/web/wiklou.git] / includes / FulltextStoplist.php
1 <?php
2
3 # This is the MySQL fulltext search stoplist, copied from the
4 # source file "myisam/ft_static.c" in the MySQL source distribution.
5 # If you use a new version of MySQL, this might have to be changed.
6
7 global $wgFulltextStoplist;
8 /* private */ $wgFulltextStoplist = array(
9
10 "a",
11 "a's",
12 "able",
13 "about",
14 "above",
15 "according",
16 "accordingly",
17 "across",
18 "actually",
19 "after",
20 "afterwards",
21 "again",
22 "against",
23 "ain't",
24 "all",
25 "allow",
26 "allows",
27 "almost",
28 "alone",
29 "along",
30 "already",
31 "also",
32 "although",
33 "always",
34 "am",
35 "among",
36 "amongst",
37 "an",
38 "and",
39 "another",
40 "any",
41 "anybody",
42 "anyhow",
43 "anyone",
44 "anything",
45 "anyway",
46 "anyways",
47 "anywhere",
48 "apart",
49 "appear",
50 "appreciate",
51 "appropriate",
52 "are",
53 "aren't",
54 "around",
55 "as",
56 "aside",
57 "ask",
58 "asking",
59 "associated",
60 "at",
61 "available",
62 "away",
63 "awfully",
64 "b",
65 "be",
66 "became",
67 "because",
68 "become",
69 "becomes",
70 "becoming",
71 "been",
72 "before",
73 "beforehand",
74 "behind",
75 "being",
76 "believe",
77 "below",
78 "beside",
79 "besides",
80 "best",
81 "better",
82 "between",
83 "beyond",
84 "both",
85 "brief",
86 "but",
87 "by",
88 "c",
89 "c'mon",
90 "c's",
91 "came",
92 "can",
93 "can't",
94 "cannot",
95 "cant",
96 "cause",
97 "causes",
98 "certain",
99 "certainly",
100 "changes",
101 "clearly",
102 "co",
103 "com",
104 "come",
105 "comes",
106 "concerning",
107 "consequently",
108 "consider",
109 "considering",
110 "contain",
111 "containing",
112 "contains",
113 "corresponding",
114 "could",
115 "couldn't",
116 "course",
117 "currently",
118 "d",
119 "definitely",
120 "described",
121 "despite",
122 "did",
123 "didn't",
124 "different",
125 "do",
126 "does",
127 "doesn't",
128 "doing",
129 "don't",
130 "done",
131 "down",
132 "downwards",
133 "during",
134 "e",
135 "each",
136 "edu",
137 "eg",
138 "eight",
139 "either",
140 "else",
141 "elsewhere",
142 "enough",
143 "entirely",
144 "especially",
145 "et",
146 "etc",
147 "even",
148 "ever",
149 "every",
150 "everybody",
151 "everyone",
152 "everything",
153 "everywhere",
154 "ex",
155 "exactly",
156 "example",
157 "except",
158 "f",
159 "far",
160 "few",
161 "fifth",
162 "first",
163 "five",
164 "followed",
165 "following",
166 "follows",
167 "for",
168 "former",
169 "formerly",
170 "forth",
171 "four",
172 "from",
173 "further",
174 "furthermore",
175 "g",
176 "get",
177 "gets",
178 "getting",
179 "given",
180 "gives",
181 "go",
182 "goes",
183 "going",
184 "gone",
185 "got",
186 "gotten",
187 "greetings",
188 "h",
189 "had",
190 "hadn't",
191 "happens",
192 "hardly",
193 "has",
194 "hasn't",
195 "have",
196 "haven't",
197 "having",
198 "he",
199 "he's",
200 "hello",
201 "help",
202 "hence",
203 "her",
204 "here",
205 "here's",
206 "hereafter",
207 "hereby",
208 "herein",
209 "hereupon",
210 "hers",
211 "herself",
212 "hi",
213 "him",
214 "himself",
215 "his",
216 "hither",
217 "hopefully",
218 "how",
219 "howbeit",
220 "however",
221 "i",
222 "i'd",
223 "i'll",
224 "i'm",
225 "i've",
226 "ie",
227 "if",
228 "ignored",
229 "immediate",
230 "in",
231 "inasmuch",
232 "inc",
233 "indeed",
234 "indicate",
235 "indicated",
236 "indicates",
237 "inner",
238 "insofar",
239 "instead",
240 "into",
241 "inward",
242 "is",
243 "isn't",
244 "it",
245 "it'd",
246 "it'll",
247 "it's",
248 "its",
249 "itself",
250 "j",
251 "just",
252 "k",
253 "keep",
254 "keeps",
255 "kept",
256 "know",
257 "knows",
258 "known",
259 "l",
260 "last",
261 "lately",
262 "later",
263 "latter",
264 "latterly",
265 "least",
266 "less",
267 "lest",
268 "let",
269 "let's",
270 "like",
271 "liked",
272 "likely",
273 "little",
274 "look",
275 "looking",
276 "looks",
277 "ltd",
278 "m",
279 "mainly",
280 "many",
281 "may",
282 "maybe",
283 "me",
284 "mean",
285 "meanwhile",
286 "merely",
287 "might",
288 "more",
289 "moreover",
290 "most",
291 "mostly",
292 "much",
293 "must",
294 "my",
295 "myself",
296 "n",
297 "name",
298 "namely",
299 "nd",
300 "near",
301 "nearly",
302 "necessary",
303 "need",
304 "needs",
305 "neither",
306 "never",
307 "nevertheless",
308 "new",
309 "next",
310 "nine",
311 "no",
312 "nobody",
313 "non",
314 "none",
315 "noone",
316 "nor",
317 "normally",
318 "not",
319 "nothing",
320 "novel",
321 "now",
322 "nowhere",
323 "o",
324 "obviously",
325 "of",
326 "off",
327 "often",
328 "oh",
329 "ok",
330 "okay",
331 "old",
332 "on",
333 "once",
334 "one",
335 "ones",
336 "only",
337 "onto",
338 "or",
339 "other",
340 "others",
341 "otherwise",
342 "ought",
343 "our",
344 "ours",
345 "ourselves",
346 "out",
347 "outside",
348 "over",
349 "overall",
350 "own",
351 "p",
352 "particular",
353 "particularly",
354 "per",
355 "perhaps",
356 "placed",
357 "please",
358 "plus",
359 "possible",
360 "presumably",
361 "probably",
362 "provides",
363 "q",
364 "que",
365 "quite",
366 "qv",
367 "r",
368 "rather",
369 "rd",
370 "re",
371 "really",
372 "reasonably",
373 "regarding",
374 "regardless",
375 "regards",
376 "relatively",
377 "respectively",
378 "right",
379 "s",
380 "said",
381 "same",
382 "saw",
383 "say",
384 "saying",
385 "says",
386 "second",
387 "secondly",
388 "see",
389 "seeing",
390 "seem",
391 "seemed",
392 "seeming",
393 "seems",
394 "seen",
395 "self",
396 "selves",
397 "sensible",
398 "sent",
399 "serious",
400 "seriously",
401 "seven",
402 "several",
403 "shall",
404 "she",
405 "should",
406 "shouldn't",
407 "since",
408 "six",
409 "so",
410 "some",
411 "somebody",
412 "somehow",
413 "someone",
414 "something",
415 "sometime",
416 "sometimes",
417 "somewhat",
418 "somewhere",
419 "soon",
420 "sorry",
421 "specified",
422 "specify",
423 "specifying",
424 "still",
425 "sub",
426 "such",
427 "sup",
428 "sure",
429 "t",
430 "t's",
431 "take",
432 "taken",
433 "tell",
434 "tends",
435 "th",
436 "than",
437 "thank",
438 "thanks",
439 "thanx",
440 "that",
441 "that's",
442 "thats",
443 "the",
444 "their",
445 "theirs",
446 "them",
447 "themselves",
448 "then",
449 "thence",
450 "there",
451 "there's",
452 "thereafter",
453 "thereby",
454 "therefore",
455 "therein",
456 "theres",
457 "thereupon",
458 "these",
459 "they",
460 "they'd",
461 "they'll",
462 "they're",
463 "they've",
464 "think",
465 "third",
466 "this",
467 "thorough",
468 "thoroughly",
469 "those",
470 "though",
471 "three",
472 "through",
473 "throughout",
474 "thru",
475 "thus",
476 "to",
477 "together",
478 "too",
479 "took",
480 "toward",
481 "towards",
482 "tried",
483 "tries",
484 "truly",
485 "try",
486 "trying",
487 "twice",
488 "two",
489 "u",
490 "un",
491 "under",
492 "unfortunately",
493 "unless",
494 "unlikely",
495 "until",
496 "unto",
497 "up",
498 "upon",
499 "us",
500 "use",
501 "used",
502 "useful",
503 "uses",
504 "using",
505 "usually",
506 "v",
507 "value",
508 "various",
509 "very",
510 "via",
511 "viz",
512 "vs",
513 "w",
514 "want",
515 "wants",
516 "was",
517 "wasn't",
518 "way",
519 "we",
520 "we'd",
521 "we'll",
522 "we're",
523 "we've",
524 "welcome",
525 "well",
526 "went",
527 "were",
528 "weren't",
529 "what",
530 "what's",
531 "whatever",
532 "when",
533 "whence",
534 "whenever",
535 "where",
536 "where's",
537 "whereafter",
538 "whereas",
539 "whereby",
540 "wherein",
541 "whereupon",
542 "wherever",
543 "whether",
544 "which",
545 "while",
546 "whither",
547 "who",
548 "who's",
549 "whoever",
550 "whole",
551 "whom",
552 "whose",
553 "why",
554 "will",
555 "willing",
556 "wish",
557 "with",
558 "within",
559 "without",
560 "won't",
561 "wonder",
562 "would",
563 "would",
564 "wouldn't",
565 "x",
566 "y",
567 "yes",
568 "yet",
569 "you",
570 "you'd",
571 "you'll",
572 "you're",
573 "you've",
574 "your",
575 "yours",
576 "yourself",
577 "yourselves",
578 "z",
579 "zero" );
580
581 class FulltextStoplist {
582
583 /* static */ function inList( $word )
584 {
585 global $wgFulltextStoplist;
586 # FIXME: this will fail badly in many circumstances
587 $w = strtolower( $word );
588 $w = preg_replace( "/[^a-z']+/", "", $w );
589 return in_array( $w, $wgFulltextStoplist );
590 }
591 }
592
593 ?>