Custom Modules
These modules will be provided in the next few releases with easier and more controllable ways.
I. Rule Selection Module
- Create a
.pyfile named_<name>_strategy.py, and place it under theal_inference_engine/control/grounding_selector/_rule_stragetiesdirectory; - Inherit from the
RuleSelectionStrategyclass, and declare at least the functions required by this Protocol; - Register your strategy class with
@register_strategy('<name>'). Afterwards, you can use the strategy viagrounding_rule_strategy; - Remember to adjust the type annotation of
grounding_rule_strategy(add a candidate value to theLiteral).
II. Fact Selection Module
Since the engine performs reasoning at the item level, this is effectively term selection. The creation process is the same as the previous module, but you need to inherit from the TermSelectionStrategy class.