Fix Spotify unit test path issue.

This commit is contained in:
Oceania2018 2018-09-26 20:55:21 -05:00
parent a211a6a8c7
commit e591a4965b
5 changed files with 6 additions and 13 deletions

View file

@ -73,7 +73,7 @@ namespace BotSharp.Core.UnitTest.Performance
}, intent.Intent));
});
//Samples.Shuffle();
Samples.Shuffle();
var samples = String.Join("\r\n", Samples.Select(x => $"__label__{x.Item2} {x.Item1.Query[0]}").ToList());

View file

@ -20,7 +20,7 @@ namespace BotSharp.Core.UnitTest
contentRoot = $"{Directory.GetCurrentDirectory()}{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}BotSharp.WebHost{Path.DirectorySeparatorChar}";
contentRoot = Path.GetFullPath(contentRoot);
ConfigurationBuilder configurationBuilder = new ConfigurationBuilder();
var settings = Directory.GetFiles(contentRoot + $"..{Path.DirectorySeparatorChar}Settings{Path.DirectorySeparatorChar}", "*.json");
var settings = Directory.GetFiles(Path.Combine(contentRoot, "Settings"), "*.json");
settings.ToList().ForEach(setting =>
{
configurationBuilder.AddJsonFile(setting, optional: false, reloadOnChange: true);

View file

@ -57,7 +57,7 @@ namespace BotSharp.Core.Engines
// pipe process
var pipelines = provider.Configuration.GetValue<String>($"Pipe:predict")
var pipelines = provider.Configuration.GetValue<String>($"Pipe")
.Split(',')
.Select(x => x.Trim())
.ToList();

View file

@ -89,7 +89,7 @@ namespace BotSharp.Core.Engines
};
// pipe process
var pipelines = provider.Configuration.GetValue<String>($"Pipe:train")
var pipelines = provider.Configuration.GetValue<String>($"pipe")
.Split(',')
.Select(x => x.Trim())
.ToList();

View file

@ -6,21 +6,14 @@
"BotSharpProvider": {
},
"Pipe": {
"train": "BotSharpTokenizer, BotSharpTagger, BotSharpCRFNer, BotSharpIntentClassifier",
"predict": "BotSharpTokenizer, BotSharpTagger, BotSharpCRFNer, BotSharpIntentClassifier"
},
"Pipe": "BotSharpTokenizer, BotSharpTagger, BotSharpCRFNer, BotSharpIntentClassifier",
"BotSharpTokenizer": {
"tokenizer": "TreebankTokenizer"
},
"BotSharpIntentClassifier": {
"classifer": "NaiveBayesClassifier"
},
"BotSharpSVMClassifier": {
"wordvec": ""
"classifer": "SVMClassifier"
},
"BotSharpTagger": {