Closed sam-writer closed 4 years ago
Let's say you only want to match if the following word is in ["height", "value", "size", "number"]. You might try adding to your match.json:
["height", "value", "size", "number"]
"match_hook": [ { "name": "succeeded_by_phrase", "args": ["height", "value", "size", "number"], "match_if_predicate_is": true } ]
This will raise when it tries to call lower() on args, since it assumes it gets a string. Maybe you try
lower()
args
"match_hook": [ { "name": "succeeded_by_phrase", "args": "height", "match_if_predicate_is": true }, { "name": "succeeded_by_phrase", "args": "value", "match_if_predicate_is": true }, { "name": "succeeded_by_phrase", "args": "size", "match_if_predicate_is": true }, { "name": "succeeded_by_phrase", "args": "number", "match_if_predicate_is": true } ]
This also doesn't work (empirically), and the syntax is horrible and verbose.
Action: make the first syntax work.
Let's say you only want to match if the following word is in
["height", "value", "size", "number"]
. You might try adding to your match.json:This will raise when it tries to call
lower()
onargs
, since it assumes it gets a string. Maybe you tryThis also doesn't work (empirically), and the syntax is horrible and verbose.
Action: make the first syntax work.