From f01016dab5433e5121ad54b5d40cf72b017d02ce Mon Sep 17 00:00:00 2001 From: Bolo Date: Wed, 1 Aug 2018 16:40:51 -0500 Subject: [PATCH] move ner.cs and crfutils.cs from Engine to Machine Learning --- .../Engines/CRFsuite/CRFsuiteEntityRecognizer.cs | 4 ++-- .../CRFsuite/Crfutils.cs | 9 +-------- .../Engines => BotSharp.MachineLearning}/CRFsuite/Ner.cs | 9 +-------- 3 files changed, 4 insertions(+), 18 deletions(-) rename {BotSharp.Core/Engines => BotSharp.MachineLearning}/CRFsuite/Crfutils.cs (96%) rename {BotSharp.Core/Engines => BotSharp.MachineLearning}/CRFsuite/Ner.cs (98%) diff --git a/BotSharp.Core/Engines/CRFsuite/CRFsuiteEntityRecognizer.cs b/BotSharp.Core/Engines/CRFsuite/CRFsuiteEntityRecognizer.cs index 6d6cd635..7058db0e 100644 --- a/BotSharp.Core/Engines/CRFsuite/CRFsuiteEntityRecognizer.cs +++ b/BotSharp.Core/Engines/CRFsuite/CRFsuiteEntityRecognizer.cs @@ -47,7 +47,7 @@ namespace BotSharp.Core.Engines.CRFsuite sw.Close(); fs.Close(); - new Ner().NerStart(); + new MachineLearning.CRFsuite.Ner().NerStart(); Runcmd(); @@ -132,7 +132,7 @@ namespace BotSharp.Core.Engines.CRFsuite } } - + public class TrainingData { public String Token { get; set; } diff --git a/BotSharp.Core/Engines/CRFsuite/Crfutils.cs b/BotSharp.MachineLearning/CRFsuite/Crfutils.cs similarity index 96% rename from BotSharp.Core/Engines/CRFsuite/Crfutils.cs rename to BotSharp.MachineLearning/CRFsuite/Crfutils.cs index e201a702..c3db9e11 100644 --- a/BotSharp.Core/Engines/CRFsuite/Crfutils.cs +++ b/BotSharp.MachineLearning/CRFsuite/Crfutils.cs @@ -1,10 +1,3 @@ -using BotSharp.Core.Abstractions; -using BotSharp.Core.Agents; -using BotSharp.MachineLearning.NLP; -using EntityFrameworkCore.BootKit; -using Microsoft.Extensions.Configuration; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; using System; using System.Collections; using System.Collections.Generic; @@ -13,7 +6,7 @@ using System.Linq; using System.Text; using System.Text.RegularExpressions; -namespace BotSharp.Core.Engines.CRFsuite +namespace BotSharp.MachineLearning.CRFsuite { public class Crfutils { diff --git a/BotSharp.Core/Engines/CRFsuite/Ner.cs b/BotSharp.MachineLearning/CRFsuite/Ner.cs similarity index 98% rename from BotSharp.Core/Engines/CRFsuite/Ner.cs rename to BotSharp.MachineLearning/CRFsuite/Ner.cs index c926ec08..904fe423 100644 --- a/BotSharp.Core/Engines/CRFsuite/Ner.cs +++ b/BotSharp.MachineLearning/CRFsuite/Ner.cs @@ -1,10 +1,3 @@ -using BotSharp.Core.Abstractions; -using BotSharp.Core.Agents; -using BotSharp.MachineLearning.NLP; -using EntityFrameworkCore.BootKit; -using Microsoft.Extensions.Configuration; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; using System; using System.Collections; using System.Collections.Generic; @@ -12,7 +5,7 @@ using System.IO; using System.Text; using System.Text.RegularExpressions; -namespace BotSharp.Core.Engines.CRFsuite +namespace BotSharp.MachineLearning.CRFsuite { public class Ner {