ChatScript is the next generation chatbot engine that has won the Loebner's 4 times and is the basis for natural language company for a variety of tech startups.
ChatScript is a rule-based engine, where rules are created by humans writers in program scripts through a process called dialog flow scripting. These use a scripting metalanguage (simply called a "script") as their source code. Here what a ChatScript script file looks like:
#
# file: food.top
#
topic: ~food []
#! I like spinach
s: ( I like spinach ) Are you a fan of the Popeye cartoons?
a: ( ~yes ) I used to watch him as a child. Did you lust after Olive Oyl?
b: ( ~no ) Me neither. She was too skinny.
b: ( yes ) You probably like skinny models.
a: ( ~no ) What cartoons do you watch?
b: ( none ) You lead a deprived life.
b: ( Mickey Mouse ) The Disney icon.
#! I often eat chicken
u: ( ![ not never rarely ] I * ~ingest * ~meat ) You eat meat.
#! I really love chicken
u: ( !~negativeWords I * ~like * ~meat ) You like meat.
#! do you eat bacon?
?: ( do you eat _ [ ham eggs bacon] ) I eat '_0
#! do you like eggs or sushi?
?: ( do you like _* or _* ) I don't like '_0 so I guess that means I prefer '_1.
#! I adore kiwi.
s: ( ~like ~fruit ![~animal _bear] ) Vegan, you too...
#! do you eat steak?
?: ( do you eat _~meat ) No, I hate _0.
#! I eat fish.
s: ( I eat _*1 > )
$food = '_0
I eat oysters.
Take this project and put it into some directory on your machine (typically we call the directory ChatScript, but you can name it whatever). That takes care of installation.
Standalone mode - run locally on a console (for developement/test)
From your ChatScript home directory, go to the BINARIES directory:
cd BINARIES
And run the ChatScript engine
Windows
ChatScript
Linux
./LinuxChatScript64 local
Note: to set the file executable: chmod a+x ./LinuxChatScript64
MacOS
./MacChatScript local
This will cause ChatScript to load and ask you for a username. Enter whatever you want. You are then talking to the default demo bot Harry.
Server Mode (for production)
From your ChatScript home directory, go to the BINARIES directory and run the ChatScript engine as server
Run the server on Windows
ChatScript port=1024
Run the server on Linux
./LinuxChatScript64
Run the server on MacOS
./MacChatScript
This will cause ChatScript to load as a server. But you also need a client (to test client-server communication). You can run a separate command window and go to the BINARIES directory and type
Run a client (test) on Windows
ChatScript client=localhost:1024
Run a client (test) on Linux
./LinuxChatScript64 client=localhost:1024
Run a client (test) on MacOS
./MacChatScript client=localhost:1024
This will cause ChatScript to load as a client and you can talk to the server.
How to build a bot
Run ChatScript locally. From the ChatScript command prompt, type
:build Harry
or whatever other preinstalled bot exists. If you have revised basic data, you can first:
:build 0
How to compile the engine.
On windows if you have Visual Studio installed, launch VS2010/chatscript.sln or VS2015/chatscript.sln and do a build. The result will go in the BINARIES directory.
On Linux, go stand in the SRC directory and type make server (assuming you have make and g++ installed). This creates BINARIES/ChatScript, which can run as a server or locally. There are other make choices for installing PostGres or Mongo.
With unique multitasking productivity, effortless navigation and defence-ready security, Ubuntu raises the bar on tablet design and sets a new standard for the post-PC era. Bright. Brilliant. Beautiful. And naturally neat.
Ubuntu’s unique side stage places a phone and a tablet app on the same screen at the same time for amazing tablet productivity. True multitasking comes to the tablet.
Take calls in Skype while you work in a document, make notes on the side while you surf the web, tweet while you watch a movie.
Or use apps collaboratively – drag content from one app to another for a super-productive day. We’ve reinvented the tablet as a bridge between phone and PC.
Safer sharing
Your Ubuntu tablet has multiple secure user accounts, and a guest account. Perfect for families and friends, and ideal for the office, with secure multi-user logins that make using and sharing devices safe.
Data protection is world class with full disk encryption, and additional encryption for personal data, making Ubuntu perfect for sensitive environments and regulatory compliance in the medical, military, industrial and finance sectors.
Effortless navigation with magic edges
Use all four edges of the screen to navigate between apps, settings and controls. There are no buttons on the Ubuntu tablet, you don’t have to keep returning to the home screen every time you want to switch apps – everything is available at a swipe. Leaner, cleaner, more elegant hardware designs are possible with Ubuntu – the result is a joy to use.
Instant launch
The left edge holds your favourite apps, so all the things you use most are only a touch away. Here you can see what’s running, switch between apps or launch your favourites quickly.
The system at your service
Swipe through the top for any system service, search or setting. Switch networks, turn mobile data on, mute the volume, respond to incoming messages or block notifications without leaving your application. In fact, any system setting can be changed directly, without losing your place in the app. That makes Ubuntu the best tablet for staying focused in a connected world.
Celebrate content not controls
Ubuntu feels cleaner, more spacious and less cluttered because we don’t need buttons on every screen – your content is king. Swiping up from the bottom edge reveals app controls. Don’t swipe, you don’t see any buttons or toolbars. You’re free to focus on the stuff that matters – your photos, web pages, music, messages and apps.
A gorgeous gallery for your digital life
The Gallery app is a stylish native Ubuntu application that lets you organise and share photos. It’s a great example of convergent app design and engineering: one app works on phone, tablet and desktop and it’s equally beautiful and usable in every environment.
On the phone, you can browse photos, and on the tablet, you can create albums – Ubuntu will organise your pictures into events by date, or you can create custom collections.
Your photos are all instantly uploaded to your personal cloud, and available on all your devices – including those running iOS, Android and Windows. Share them with one touch.
Voice control in the HUD
The Ubuntu HUD makes complex application workflows simple on touch devices. This brings all the power of the PC to your touch device. And with voice control, it’s as if you had an extra set of hands – a truly personal assistant.
Take the tablet where it has never been before – image manipulation, movie editing, document management, CAD. With an interface that scales from the tablet to a PC, Ubuntu brings potent apps into focus on touch devices.
Instant share and cloud connections
Sharing is now built-in, with support for all the major networks. So any app can let you share with friends, family and co-workers. One touch is all it takes.
Facebook and Twitter aren’t the only ways to share. Ubuntu One already has millions of users on Ubuntu, Android, Windows and Mac. Deeply integrated on Ubuntu devices, it provides free storage, paid-for music streaming services and a foundation for cloud-based services from operators and device makers.
A whole world of apps
Web applications sit alongside native apps as equal citizens on Ubuntu – with their own icons and access to system services. Facebook, Twitter, Google Maps, Gmail and Spotify are all available from day one – thanks to Ubuntu’s brilliant web app system, developers can easily make their site install on the tablet as an app.
We aren’t limited to HTML5. Native apps are blazingly fast, taking advantage of the full capabilities of the tablet’s processor and graphics hardware. A mobile SDK does most of the work for you, giving you that Ubuntu style. It’s easy for Android and Blackberry developers to publish for the Ubuntu audience too, and since you’re already running Ubuntu on your development workstations, everything you need is at your fingertips.
Ubuntu presents results from hundred of sources in one gorgeous page, saving you the trouble of comparison shopping or hunting down the right provider. You’ll see information from your email and phone contacts alongside Facebook friends and followers on Twitter.
Looking for music? Ubuntu doesn’t just search the tunes on your tablet, it also searches online, giving you a choice of tracks you don’t yet own. It’s really one search to rule them all.
Naturally neat home screen
The stylish home screen organises all your most important information, selected from hundreds of sources – online or on board.
You can customise the screen and search for any kind of content. Watch what you want with a single touch – no need to worry which app to find it in.
Convergence that just clicks
Today’s tablets are as powerful as ultra-light laptops. Ubuntu uniquely supports a new category of convergence device – add a keyboard and mouse and your Ubuntu tablet becomes a full PC and thin client, with access to Windows apps over standard protocols from Microsoft, Citrix, VMware and Wyse. That lets enterprise IT deploy a single, secure, portable corporate device for all kinds of applications.
Since it is pure Ubuntu, the tablet can be managed via Landscape, giving enterprises complete control over the users, apps, updated and access using the same tool they use for Ubuntu servers and desktops today.
Build a tablet with us
Perfect for partners
Canonical and Ubuntu enable industry partners to build devices that span the range, from low-BOM consumer electronics to enterprise-grade convergence devices for the office, ruggedized, industrial and military. Fully customisable with branding, content and apps, Ubuntu is the best choice for whatever tablet you want to make.
Create gorgeous apps easily with our SDK: HTML5, OpenGL and a native toolkit giving you a full range of options for modern app development. With one OS for all form factors, you can build a single app with interfaces for the tablet, PC and phone – all published in a single upload. That’s why leading game engines support Ubuntu, and why we’re the favourite developer desktop for both cloud and mobile.