forked from arnaudsj/ChatScript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME.html
More file actions
128 lines (120 loc) · 7.1 KB
/
README.html
File metadata and controls
128 lines (120 loc) · 7.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta name="generator" content="pandoc" />
<title></title>
<style type="text/css">code{white-space: pre;}</style>
</head>
<body>
<h1 id="chatscript">ChatScript</h1>
<p>Natural Language tool/dialog manager</p>
<p>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.</p>
<p>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:</p>
<pre><code>#
# 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.</code></pre>
<p>Above example mentioned in article <a href="https://medium.freecodecamp.com/chatscript-for-beginners-chatbots-developers-c58bb591da8#.2qdxjuyvs">How to build your first chatbot using ChatScript</a>.</p>
<h2 id="basic-features">Basic Features</h2>
<ul>
<li>Powerful pattern matching aimed at detecting meaning.</li>
<li>Simple rule layout combined with C-style general scripting.</li>
<li>Built-in WordNet dictionary for ontology and spell-checking.</li>
<li>Extensive extensible ontology of nouns, verbs, adjectives, adverbs.</li>
<li>Data as fact triples enables inferencing and supports JSON representation.</li>
<li>Rules can examine and alter engine and script behavior.</li>
<li>Planner capabilities allow a bot to act in real/virtual worlds.</li>
<li>Remembers user interactions across conversations.</li>
<li>Document mode allows you to scan documents for content.</li>
<li>Ability to control local machines via popen.</li>
<li>Ability to read structured JSON data from websites.</li>
<li>Postgres and Mongo support for big data or large-user-volume chatbots.</li>
</ul>
<h2 id="os-features">OS Features</h2>
<ul>
<li>Runs on Windows or Linux or Mac or iOS or Android</li>
<li>Fast server performance supports a thousand simultaneous users.</li>
<li>Multiple bots can cohabit on the same server.</li>
</ul>
<h2 id="support-features">Support Features</h2>
<ul>
<li>Mature technology in use by various parties around the world.</li>
<li>Integrated tools to support maintaining and testing large systems.</li>
<li>UTF8 support allows scripts written in any language</li>
<li>User support forum on <a href="https://www.chatbots.org/ai_zone/viewforum/44/">Chatbots.org</a> and <a href="https://github.com/bwilcox-1234/ChatScript/issues">here</a></li>
</ul>
<h1 id="getting-started">Getting started</h1>
<h2 id="installation">Installation</h2>
<p>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.</p>
<pre><code>git clone https://github.com/bwilcox-1234/ChatScript</code></pre>
<h2 id="how-to-run-locally-on-a-console-for-developementtest">How to run locally on a console (for developement/test)</h2>
<h3 id="windows">Windows</h3>
<p>Go to the BINARIES directory and type <code>ChatScript</code>:</p>
<pre><code>cd BINARIES && ChatScript</code></pre>
<h3 id="linux">Linux</h3>
<pre><code>cd BINARIES && ./LinuxChatScript64 local</code></pre>
<h3 id="macos">MacOS</h3>
<pre><code>cd BINARIES && ./MacChatScript local</code></pre>
<p>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 <code>Harry</code>.</p>
<h2 id="how-to-run-as-a-server-for-production">How to run as a server (for production)</h2>
<h3 id="windows-1">Windows</h3>
<p>Go to the BINARIES directory and type <code>ChatScript port=1024</code></p>
<pre><code>cd BINARIES && ChatScript port=1024</code></pre>
<h3 id="linux-1">Linux</h3>
<pre><code>cd BINARIES && ./LinuxChatScript64</code></pre>
<h3 id="macos-1">MacOS</h3>
<pre><code>cd BINARIES && ./MacChatScript</code></pre>
<p>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 <code>ChatScript client=localhost:1024</code> if you are on Windows, or type <code>./LinuxChatScript64 client=localhost:1024</code> if you are on Linux. This will cause ChatScript to load as a client and you can talk to the server.</p>
<h2 id="how-to-build-the-engine.">How to build the engine.</h2>
<p>On windows if you have Visual Studio installed, launch <code>VS2010/chatscript.sln</code> or <code>VS2015/chatscript.sln</code> and do a build. The result will go in the <code>BINARIES</code> directory.</p>
<p>On Linux, go stand in the SRC directory and type <code>make server</code> (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.</p>
<h2 id="how-to-build-a-bot">How to build a bot</h2>
<p>Run ChatScript locally. From the ChatScript command prompt, type</p>
<pre><code>:build Harry</code></pre>
<p>or whatever other preinstalled bot exists. If you have revised basic data, you can first do <code>:build 0</code> .</p>
<h1 id="full-documentation">Full Documentation</h1>
<p><a href="/WIKI/README.md">ChatScript Wiki (user guides, tutorials, papers)</a></p>
<h1 id="contributing">Contributing</h1>
<ol style="list-style-type: decimal">
<li>Fork it</li>
<li>Create your feature branch (git checkout -b my-new-feature)</li>
<li>Commit your changes (git commit -am 'Add some feature')</li>
<li>Push to the branch (git push origin my-new-feature)</li>
<li>Create new Pull Request</li>
</ol>
<h1 id="last-releases">Last releases</h1>
<p><a href="/changes.md">changes.md</a></p>
<h1 id="author">Author</h1>
<ul>
<li>Bruce Wilcox</li>
<li>home website: <a href="http://www.brilligunderstanding.com">BrilligUnderstanding.com</a></li>
<li>mail: <a href="mailto:gowilcox@gmail.com">gowilcox@gmail.com</a></li>
</ul>
</body>
</html>