Skip to content

MiguelMJ/TASCHE

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

logo

Text Adventure and Simple CHatbot Engine

dependencies documentation license GitHub repo size

Léeme en español 🇪🇸

Description

TASCHE is a tool for specifying text-based applications that seeks flexibility in the input recognition and response generation. For a detailed guide see the wiki .

Basic example

Given the specification file example0.json from below, this are two possible conversations.

Conversation A Conversation B
Hello!
>hi
Hello there!
>My name is Miguel
nice to meet you, Miguel!
>My name is TASCHE
No way! That's my name too!
Hello!
>My name is TASCHE
That's my name too!
>My name is Roberto
I am confused, you said your name was TASCHE!
nice to meet you, Roberto!
>My name is Jose
But you said your name was Roberto!
Mine is TASCHE, nice to meet you, Jose!

example0.json

{
"init":"Hello!\n",
"responses":[
    {
        "input":"(hello|hi)",
        "condition":"1",
        "output":"Hello[ there][!]"
    },{
        "input":"my name is >name",
        "condition":"1",
        "question":"$name",
        "responses":[
            {
                "input":"TASCHE",
                "condition":"1",
                "output":"[No way! ]''That's my name too!''{@known_name = @name}"
            },{
                "input":"$known_name",
                "condition":"1",
                "output":"I know! Its a (beautiful|cool) name."
            },{
                "condition":"@known_name",
                "output":"[([Now ]I am confused, |But )]you said your name was $known_name!"
            },{
                "condition":"1",
                "output":"[(Mine|My name|I am) is TASCHE, ]nice to meet you, $name!{@known_name = @name}"
            }]
    }]
}

Build TASCHE

TASCHE has no dependencies, but to build it you must have Flex and Bison in your computer. To build the project use plain make:

cd /project/path
make

To do

  • Embed Lua to replace the expressions.
  • Allow an edit distance in the input matching (Levenshtein Automata)
  • Debug the interaction between dynamic variables and omisible patterns (branch dynamic_and_omisibles).
  • Implement more verbose and debug options.
  • Module for knowledge bases.
  • Extend documetation.
  • Optimize the comparison algorithms (too many substr).