Giter VIP home page Giter VIP logo

program-ab's Introduction

Program-AB

Automatically exported from https://code.google.com/p/program-ab

Link to Ab.jar

Add the Ab.jar library to your application. In your Java files, use

import org.alicebot.ab.*;

Create a bot

Create a bot with

String botname="mybot"; Bot bot = new Bot(botname);

You can also specify a root path for the bot's files with

String botname="mybot"; String path="c:/example"; Bot bot = new Bot(botname, path);

If the Program AB bot files are in a directory c:/example then a bot named named mybot should use the directories:

| Directory | Contents | |:----------|:---------| | c:/example/bots/mybot/aiml | AIML Files | | c:/example/bots/mybot/aimlif | AIMLIF format files | | c:/example/bots/mybot/config | Bot configuration Files | | c:/example/bots/mybot/sets | AIML Sets | | c:/example/bots/mybot/maps | AIML Maps |

The constructor method will load all the bot's categories, substitutions, configuration files, and set and map definitions.

Create a chat session

Create a client chat session with

Chat chatSession = new Chat(bot);

Chat with the bot

Use the method multisentenceResponse to get the bot's replies to multiple-sentence (one or more sentence) inputs:

String request = "Hello. Are you alive? What is your name?" String response = chatSession.multisentenceRespond(request); System.out.println(response);

program-ab's People

Contributors

yohanesgultom avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.