Currently if the custom entity parser uses stems, injected values are add with their stemmed version in the CustomEntityParser
Solution
Stems are added to the custom entity parser depending on the custom entity parser CustomEntityParserUsage
Replaced the inject_entity_values function with a NluInjector class that adds more flexibility for testing (it lets us mocked the share resources used in the injection for instance)
Added a load_engine_shared_resources function that loads a the shared resources from the NLU engine directory path
Added a from_resources_with_path method to the NLUEngine struct to be able to load a NLU engine with mocked shared resources
Fixed
the bug with the NLU where the path to the builtin gazetteer parser was wrongly built
Handle stemming in NLU injection
Problem
Currently if the custom entity parser uses stems, injected values are add with their stemmed version in the
CustomEntityParser
Solution
CustomEntityParserUsage
inject_entity_values
function with aNluInjector
class that adds more flexibility for testing (it lets us mocked the share resources used in the injection for instance)load_engine_shared_resources
function that loads a the shared resources from the NLU engine directory pathfrom_resources_with_path
method to theNLUEngine
struct to be able to load a NLU engine with mocked shared resourcesFixed
Note: this is a breaking change