2018-07-15 12:31:52 +00:00
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.Text;
|
2018-08-08 21:39:00 +00:00
|
|
|
|
using System.Threading.Tasks;
|
2018-07-15 12:31:52 +00:00
|
|
|
|
using BotSharp.Core.Models;
|
|
|
|
|
|
|
|
|
|
|
|
namespace BotSharp.Core.Engines.BotSharp
|
|
|
|
|
|
{
|
|
|
|
|
|
public class BotSharpAi : BotEngineBase, IBotPlatform
|
|
|
|
|
|
{
|
2018-08-08 21:39:00 +00:00
|
|
|
|
public override async Task Train()
|
2018-07-15 12:31:52 +00:00
|
|
|
|
{
|
2018-08-01 20:25:50 +00:00
|
|
|
|
agent.Corpus = GetIntentExpressions();
|
|
|
|
|
|
var trainer = new BotTrainer(agent.Id, dc);
|
2018-08-08 21:39:00 +00:00
|
|
|
|
await trainer.Train(agent);
|
2018-07-15 12:31:52 +00:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|