예제 #1
0
 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());
     }
 }
예제 #2
0
 public ConfigurationBuilder()
 {
     this.intentConfigs    = new List <IntentConfig>();
     this.typeConfigs      = new TypeConfig();
     this.responderConfigs = new List <ResponderConfig>();
 }
예제 #3
0
 public Configuration(List <IntentConfig> intentConfigs, TypeConfig typeConfigs, List <ResponderConfig> responderConfigs)
 {
     this.intentConfigs    = intentConfigs;
     this.typeConfigs      = typeConfigs;
     this.responderConfigs = responderConfigs;
 }