Skip to content

Merge for CRFsuite algrithm #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 1, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/BotSharp.UnitTest/bin/Debug/netcoreapp2.0/BotSharp.UnitTest.dll",
"program": "${workspaceFolder}/BotSharp.WebHost/bin/Debug/netcoreapp2.1/BotSharp.WebHost.dll",
"args": [],
"cwd": "${workspaceFolder}/BotSharp.UnitTest",
"cwd": "${workspaceFolder}/BotSharp.WebHost",
// For more information about the 'console' field, see https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md#console-terminal-window
"console": "internalConsole",
"stopAtEntry": false,
Expand Down
6 changes: 5 additions & 1 deletion BotSharp.Core/Agents/Agent.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using BotSharp.Core.Entities;
using BotSharp.Core.Engines;
using BotSharp.Core.Entities;
using BotSharp.Core.Intents;
using EntityFrameworkCore.BootKit;
using Newtonsoft.Json;
Expand Down Expand Up @@ -73,6 +74,9 @@ public String Birthday
[ForeignKey("AgentId")]
public AgentMlConfig MlConfig { get; set; }

[NotMapped]
public TrainingCorpus Corpus { get; set; }

[ForeignKey("AgentId")]
public List<AgentIntegration> Integrations { get; set; }
}
Expand Down
3 changes: 1 addition & 2 deletions BotSharp.Core/Engines/BotEngineBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,7 @@ join ees in dc.Table<EntrySynonym>() on ee.Id equals ees.EntityEntryId

public virtual void Train()
{
var trainer = new BotTrainer(agent.Id, dc);
trainer.Train(agent);

}

}
Expand Down
5 changes: 3 additions & 2 deletions BotSharp.Core/Engines/BotSharp/BotSharpAi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@ public AIResponse TextRequest(AIRequest request)
{
throw new NotImplementedException();
}

public override void Train()
{

agent.Corpus = GetIntentExpressions();
var trainer = new BotTrainer(agent.Id, dc);
trainer.Train(agent);
}
}
}
Loading