|
@@ -14,35 +14,17 @@ namespace Yuuna
|
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
using Microsoft.Extensions.Logging;
|
|
using Microsoft.Extensions.Logging;
|
|
|
using Yuuna.Contracts.Optimization;
|
|
using Yuuna.Contracts.Optimization;
|
|
|
- using Yuuna.Interaction.AspNetCore;
|
|
|
|
|
- using RestSharp;
|
|
|
|
|
|
|
+ using Yuuna.Interaction.AspNetCore;
|
|
|
using Yuuna.TextSegmention;
|
|
using Yuuna.TextSegmention;
|
|
|
using Yuuna.Contracts.Interaction;
|
|
using Yuuna.Contracts.Interaction;
|
|
|
|
|
+ using Yuuna.Common.Serialization;
|
|
|
|
|
|
|
|
internal class EntryPoint
|
|
internal class EntryPoint
|
|
|
{
|
|
{
|
|
|
public static async Task Main(string[] args)
|
|
public static async Task Main(string[] args)
|
|
|
{
|
|
{
|
|
|
- //await WebHost.RunAsync();
|
|
|
|
|
- var actor = new Actor(new JiebaTextSegmenter(), new Response[]
|
|
|
|
|
- {
|
|
|
|
|
- (Moods.Sad, "我不清楚你想做什麼 OvQ"),
|
|
|
|
|
- (Moods.Sad, "我不懂你想幹嘛 QAQ"),
|
|
|
|
|
- (Moods.Sad, "我不知道你想幹嘛 OHQ"),
|
|
|
|
|
- }, new Strategy(), ModuleManager.Instance.Modules);
|
|
|
|
|
-
|
|
|
|
|
- while (true)
|
|
|
|
|
- {
|
|
|
|
|
- Console.Write("Me: ");
|
|
|
|
|
- if (actor.Accept(Console.ReadLine(), out var response))
|
|
|
|
|
- {
|
|
|
|
|
- Console.WriteLine("Bot: " + response.Message);
|
|
|
|
|
- }
|
|
|
|
|
- else
|
|
|
|
|
- {
|
|
|
|
|
- Console.CursorTop--;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ await WebHost.RunAsync();
|
|
|
|
|
+
|
|
|
|
|
|
|
|
//while (true)
|
|
//while (true)
|
|
|
//{
|
|
//{
|