|
@@ -24,12 +24,12 @@ discard block |
|
|
block discarded – undo |
|
24
|
24
|
include_once INCLUDESPATH . "easyparliament/searchengine.php"; |
|
25
|
25
|
|
|
26
|
26
|
class GLOSSARY { |
|
27
|
|
- public $num_terms; // how many glossary entries do we have |
|
|
27
|
+ public $num_terms; // how many glossary entries do we have |
|
28
|
28
|
// (changes depending on how GLOSSARY is called |
|
29
|
|
- public $hansard_count; // how many times does the phrase appear in hansard? |
|
30
|
|
- public $query; // search term |
|
31
|
|
- public $glossary_id; // if this is set then we only have 1 glossary term |
|
32
|
|
- public $current_term; // will only be set if we have a valid epobject_id |
|
|
29
|
+ public $hansard_count; // how many times does the phrase appear in hansard? |
|
|
30
|
+ public $query; // search term |
|
|
31
|
+ public $glossary_id; // if this is set then we only have 1 glossary term |
|
|
32
|
+ public $current_term; // will only be set if we have a valid epobject_id |
|
33
|
33
|
public $current_letter; |
|
34
|
34
|
|
|
35
|
35
|
// constructor... |
|
@@ -72,7 +72,7 @@ discard block |
|
|
block discarded – undo |
|
72
|
72
|
|
|
73
|
73
|
// These stop stupid submissions. |
|
74
|
74
|
// everything should be lowercase. |
|
75
|
|
- $this->stopwords = [ "the", "of", "to", "and", "for", "in", "a", "on", "is", "that", "will", "secretary", "are", "ask", "state", "have", "be", "has", "by", "with", "i", "not", "what", "as", "it", "hon", "he", "which", "from", "if", "been", "this", "s", "we", "at", "government", "was", "my", "an", "department", "there", "make", "or", "made", "their", "all", "but", "they", "how", "debate" ]; |
|
|
75
|
+ $this->stopwords = ["the", "of", "to", "and", "for", "in", "a", "on", "is", "that", "will", "secretary", "are", "ask", "state", "have", "be", "has", "by", "with", "i", "not", "what", "as", "it", "hon", "he", "which", "from", "if", "been", "this", "s", "we", "at", "government", "was", "my", "an", "department", "there", "make", "or", "made", "their", "all", "but", "they", "how", "debate"]; |
|
76
|
76
|
|
|
77
|
77
|
} |
|
78
|
78
|
|
|
@@ -365,7 +365,7 @@ discard block |
|
|
block discarded – undo |
|
365
|
365
|
if ($return_expansions) { |
|
366
|
366
|
global $expansions; |
|
367
|
367
|
$expansions = []; |
|
368
|
|
- $body = preg_replace_callback($findwords, function ($matches) { |
|
|
368
|
+ $body = preg_replace_callback($findwords, function($matches) { |
|
369
|
369
|
print($matches[0] . ", "); |
|
370
|
370
|
global $expansions, $replacemap, $titlemap; |
|
371
|
371
|
$lc_match = strtolower($matches[0]); |