Added more search synonyms.

master
Pacman Ghost 3 years ago
parent cd2fdffe68
commit 23698718dd
  1. 4
      asl_rulebook2/webapp/config/search-aliases.json
  2. 2
      asl_rulebook2/webapp/config/search-replacements.json
  3. 15
      asl_rulebook2/webapp/config/search-synonyms.json
  4. 4
      asl_rulebook2/webapp/tests/test_linkify_ruleids.py

@ -3,13 +3,13 @@
"_comment_": "This file defines search aliases.",
"_comment_": "Keys that appear in a query string will match itself or any of its associated values.",
"_comment_": " e.g. searching for 'entrenchments' will actually search for 'entrenchments OR foxhole OR trench OR ditch'",
"_comment_": "These differ from search synonyms in that only the key word will trigger the replacement, not any word from the set.",
"_comment_": "These differ from search synonyms in that *only* the key word will trigger the replacement, not any word from the set.",
"_comment_": "A user-defined version of this file in the data directory will also be loaded.",
"latw": [
"atmm", "atr", "baz", "mol-p", "mol-projector", "piat", "pf", "pfk", "psk"
],
"fortification/foritifcations": [
"fortification/fortifications": [
"cave", "a-t ditch", "foxhole", "sangar", "trench", "bunker", "minefield", "mines", "booby trap", "panji", "pillbox", "roadblock", "tetrahedron", "wire"
],
"entrenchment/entrenchments": [

@ -1,7 +1,7 @@
{
"_comment_": "This file defines search replacements.",
"_comment_": "Keys that appear in a query string will be replaced by the value.",
"_comment_": "Keys that appear in a query string will be *replaced* by the value.",
"_comment_": " e.g. searching for '1/2 MF' will actually search for '½ MF'",
"_comment_": "A user-defined version of this file in the data directory will also be loaded.",

@ -3,7 +3,7 @@
"This file defines search synonyms.",
"If a word appears in a query string, it will match any of the words in its set.",
" e.g. searching for 'finn gun' will actually search for '(finn OR finnish) AND gun'",
"These differ from search aliases in that any word from a set will trigger the replacement.",
"These differ from search aliases in that *any* word from a set will trigger the replacement.",
"A user-defined version of this file in the data directory will also be loaded.",
[ "u.s.", "america", "american" ],
@ -19,8 +19,8 @@
[ "ft", "flamethrower", "flame-thrower" ],
[ "baz", "bazooka" ],
[ "pf", "panzerfaust" ],
[ "psk", "panzershreck" ],
[ "wp", "white phosphorous" ],
[ "psk", "panzerschreck" ],
[ "wp", "white phosphorus" ],
[ "mol", "molotov cocktail" ],
[ "ovr", "overrun" ],
[ "cc", "close combat" ],
@ -31,9 +31,17 @@
[ "firelane", "fire-lane", "fire lane" ],
[ "firegroup", "fire-group", "fire group" ],
[ "lc", "landing craft" ],
[ "dp", "damage points" ],
[ "ht", "halftrack", "half-track" ],
[ "wa", "wall advantage" ],
[ "hob", "heat of battle" ],
[ "ch", "critical hit" ],
[ "ti", "temporarily immobilized" ],
[ "ammo", "ammunition" ],
[ "malf", "malfunction" ],
[ "resid", "residual", "rfp" ],
[ "voluntary", "voluntarily" ],
[ "hth", "hand-to-hand" ],
[ "cg", "campaign game" ],
[ "pbm", "pbem" ],
@ -44,7 +52,6 @@
[ "brt", "br:t", "blood reef tarawa" ],
[ "pb", "pegasus bridge" ],
[ "ammo", "ammunition" ],
[ "armor", "armour" ],
[ "color", "colour" ]

@ -53,8 +53,8 @@ def test_qa( webdriver, webapp ):
# test ruleid's in a Q+A entry's search result
results = _do_search( "wp", True )
assert len(results) == 3
sr_elem = find_children( "#search-results .sr" )[ 1 ]
assert len(results) == 5
sr_elem = find_children( "#search-results .sr" )[ 3 ]
_check_ruleid( find_child(".caption",sr_elem), ("asl-rulebook!","A24.31") )
_dismiss_rule_info_popup()
_check_ruleid( find_child(".question",sr_elem), ("asl-rulebook!","A24.3") )

Loading…
Cancel
Save