Aiml.NET is a .NET library for running chat robots using AIML Artificial Intelligence Markup Language.
NuGet Package
Install-Package Aiml.NET
https://nuget.org/packages/Aiml.NET
using Aiml.NET;
var bot = new Bot(botPath);
//load bot config files
bot.LoadConfig();
// load bot aiml files
bot.LoadAIML();
var user = new User("User", bot);
while (true)
{
Console.Write("> ");
var message = Console.ReadLine();
var response = bot.Chat(new Request(message, user, bot), trace);
Console.WriteLine($"{bot.Properties.GetValueOrDefault("name", "Robot")}: {response}");
}
<?xml version="1.0" encoding="UTF-8"?>
<aiml version="2">
<category>
<pattern>HI</pattern>
<template>
<random>
<li>Hello!</li>
<li>Hi there!</li>
<li>Greetings!</li>
</random>
</template>
</category>
</aiml>
You can learn and code your own AIML Files from PandoraBots Platform or quickly jump into;