public IntentMatcher generateMatcher(IntentConfig intentConfig, TypeConfig typeConfig) { if (intentConfig.MatcherType() == "verbatim") { return(new VerbatimMatcher(intentConfig.Name, intentConfig.Patterns())); } else if (intentConfig.MatcherType() == "template") { return(new TemplateMatcher(intentConfig.Name, intentConfig.Patterns(), intentConfig.Slots(), typeConfig)); } else { throw new ArgumentException("No matcher type as " + intentConfig.MatcherType()); } }
public ConfigurationBuilder() { this.intentConfigs = new List <IntentConfig>(); this.typeConfigs = new TypeConfig(); this.responderConfigs = new List <ResponderConfig>(); }
public Configuration(List <IntentConfig> intentConfigs, TypeConfig typeConfigs, List <ResponderConfig> responderConfigs) { this.intentConfigs = intentConfigs; this.typeConfigs = typeConfigs; this.responderConfigs = responderConfigs; }