ChatScript is a combination Natural Language engine and dialog management system designed initially for creating chatbots, but is currently also used for various forms of NL processing.
[3] In general ChatScript aims to author extremely concisely, since the limiting scalability of hand-authored chatbots is how much/fast one can write the script.
Because ChatScript is designed for interactive conversation, it automatically maintains user state across volleys.
Patterns range from extremely simplistic to deeply complex (analogous to Regex but aimed for NL).
Output of a rule intermixes literal words to be sent to the user along with common C-style programming code.
The simple pattern (~fruit) reacts if any fruit is mentioned immediately after the chatbot asks for favorite food.
ChatScript code supports standard if-else, loops, user-defined functions and calls, and variable assignment and access.
Internally all data is represented as text and is automatically converted to a numeric form as needed.
In addition to variables, ChatScript supports facts – triples of data, which can also be transient or permanent.
ChatScript embeds the Curl library and can directly read and write facts in JSON to a website.
A common use case is to use a centralized database to host the user files and multiple servers to scale the ChatScript engine.
ChatScript has built-in automatic spell checking, which can be augmented in script as both simple word replacements or context sensitive changes.