Skip to content

Program AB is the reference implementation of the AIML 2.0 - Artificial Intelligence Markup Language. AIML is a widely adopted standard for creating chat bots and virtual assistants like ALICE, Mitsuku, English Tutor, The Professor, S.U.P.E.R. and many more.

License

Notifications You must be signed in to change notification settings

mattdanbrown/program-ab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Program AB

Program AB is the reference implementation of the AIML 2.0 draft specification. AIML is a widely adopted standard for creating chat bots and mobile virtual assistants like ALICE, Mitsuku, English Tutor, The Professor, S.U.P.E.R. and many more. Forked from: https://code.google.com/p/program-ab/

Installation

Add to your pom.xml:

    <repositories>
        <repository>
            <id>jitpack.io</id>
            <url>https://jitpack.io</url>
        </repository>
	</repositories>

	<dependencies>
        <dependency>
            <groupId>com.github.haggaishachar</groupId>
            <artifactId>program-ab</artifactId>
            <version>v1.0</version>
        </dependency>
	</dependencies>

Install the 'ALICE' and 'Super' AIML files (optional)

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>2.10</version>
                <executions>
                    <execution>
                        <id>unpack-dependencies</id>
                        <phase>install</phase>
                        <goals>
                            <goal>unpack-dependencies</goal>
                        </goals>
                        <configuration>
                            <includes>bots/**</includes>
                            <outputDirectory>${user.dir}</outputDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

Usage

        String path = System.getProperty("user.dir"); // or any other directory with the AIML files.
        String name = "alice2";
        String action = "chat";

        Bot bot = new Bot(name, path, action);
        Chat chatSession = new Chat(bot);

        while (true) {
            System.out.print("human: ");
            String textLine = IOUtils.readInputTextLine();

            if (textLine == null || textLine.equals("q")) {
                bot.writeQuit();
                System.exit(0);
            }

            String response = chatSession.multisentenceRespond(textLine);
            System.out.println(name + ": " +  response);

        }

License

GNU Lesser General Public License

About

Program AB is the reference implementation of the AIML 2.0 - Artificial Intelligence Markup Language. AIML is a widely adopted standard for creating chat bots and virtual assistants like ALICE, Mitsuku, English Tutor, The Professor, S.U.P.E.R. and many more.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages