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 .
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}"
}]
}]
}
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
- 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).