<s>
ChatScript	B-Language
is	O
a	O
combination	O
Natural	O
Language	O
engine	O
and	O
dialog	O
management	O
system	O
designed	O
initially	O
for	O
creating	O
chatbots	B-Application
,	O
but	O
is	O
currently	O
also	O
used	O
for	O
various	O
forms	O
of	O
NL	B-Language
processing	I-Language
.	O
</s>
<s>
It	O
is	O
written	O
in	O
C++	B-Language
.	O
</s>
<s>
The	O
engine	O
is	O
an	O
open	O
source	O
project	O
at	O
SourceForge	B-Application
.	O
</s>
<s>
and	O
GitHub	B-Application
.	O
</s>
<s>
ChatScript	B-Language
was	O
written	O
by	O
Bruce	O
Wilcox	O
and	O
originally	O
released	O
in	O
2011	O
,	O
after	O
Suzette	O
(	O
written	O
in	O
ChatScript	B-Language
)	O
won	O
the	O
2010	O
Loebner	O
Prize	O
,	O
fooling	O
one	O
of	O
four	O
human	O
judges	O
.	O
</s>
<s>
In	O
general	O
ChatScript	B-Language
aims	O
to	O
author	O
extremely	O
concisely	O
,	O
since	O
the	O
limiting	O
scalability	O
of	O
hand-authored	O
chatbots	B-Application
is	O
how	O
much/fast	O
one	O
can	O
write	O
the	O
script	O
.	O
</s>
<s>
Because	O
ChatScript	B-Language
is	O
designed	O
for	O
interactive	O
conversation	O
,	O
it	O
automatically	O
maintains	O
user	O
state	O
across	O
volleys	O
.	O
</s>
<s>
A	O
volley	O
is	O
any	O
number	O
of	O
sentences	O
the	O
user	O
inputs	O
at	O
once	O
and	O
the	O
chatbots	B-Application
response	O
.	O
</s>
<s>
Gambits	O
are	O
something	O
a	O
chatbot	B-Application
might	O
say	O
when	O
it	O
has	O
control	O
of	O
the	O
conversation	O
.	O
</s>
<s>
Rejoinders	O
are	O
rules	O
that	O
respond	O
to	O
a	O
user	O
remark	O
tied	O
to	O
what	O
the	O
chatbot	B-Application
just	O
said	O
.	O
</s>
<s>
Responders	O
are	O
rules	O
that	O
respond	O
to	O
arbitrary	O
user	O
input	O
which	O
is	O
not	O
necessarily	O
tied	O
to	O
what	O
the	O
chatbot	B-Application
just	O
said	O
.	O
</s>
<s>
ChatScript	B-Language
contains	O
some	O
2000	O
predefined	O
concepts	O
and	O
scripters	O
can	O
easily	O
write	O
their	O
own	O
.	O
</s>
<s>
The	O
simple	O
pattern	O
(	O
~	O
fruit	O
)	O
reacts	O
if	O
any	O
fruit	O
is	O
mentioned	O
immediately	O
after	O
the	O
chatbot	B-Application
asks	O
for	O
favorite	O
food	O
.	O
</s>
<s>
ChatScript	B-Language
code	O
supports	O
standard	O
if-else	O
,	O
loops	O
,	O
user-defined	O
functions	O
and	O
calls	O
,	O
and	O
variable	O
assignment	O
and	O
access	O
.	O
</s>
<s>
Some	O
data	O
in	O
ChatScript	B-Language
is	O
transient	O
,	O
meaning	O
it	O
will	O
disappear	O
at	O
the	O
end	O
of	O
the	O
current	O
volley	O
.	O
</s>
<s>
In	O
addition	O
to	O
variables	O
,	O
ChatScript	B-Language
supports	O
facts	O
–	O
triples	O
of	O
data	O
,	O
which	O
can	O
also	O
be	O
transient	O
or	O
permanent	O
.	O
</s>
<s>
Fact	O
retrieval	O
is	O
very	O
quick	O
and	O
efficient	O
the	O
number	O
of	O
available	O
in-memory	O
facts	O
is	O
largely	O
constrained	O
to	O
the	O
available	O
memory	O
of	O
the	O
machine	O
running	O
the	O
ChatScript	B-Language
engine	O
.	O
</s>
<s>
Facts	O
can	O
represent	O
record	O
structures	O
and	O
are	O
how	O
ChatScript	B-Language
represents	O
JSON	O
internally	O
.	O
</s>
<s>
ChatScript	B-Language
embeds	O
the	O
Curl	O
library	O
and	O
can	O
directly	O
read	O
and	O
write	O
facts	O
in	O
JSON	O
to	O
a	O
website	O
.	O
</s>
<s>
A	O
ChatScript	B-Language
engine	O
can	O
run	O
in	O
local	O
or	O
server	O
mode	O
.	O
</s>
<s>
ChatScript	B-Language
comes	O
with	O
a	O
copy	O
of	O
English	O
WordNet	B-General_Concept
embedded	O
within	O
,	O
including	O
its	O
ontology	O
,	O
and	O
creates	O
and	O
extends	O
its	O
own	O
ontology	O
via	O
concept	O
declarations	O
.	O
</s>
<s>
In	O
addition	O
to	O
an	O
internal	O
fact	O
database	O
,	O
ChatScript	B-Language
supports	O
PostgreSQL	B-Application
and	O
MongoDB	B-Application
both	O
for	O
access	O
by	O
scripts	O
,	O
but	O
also	O
as	O
a	O
central	O
filesystem	O
if	O
desired	O
so	O
ChatScript	B-Language
can	O
be	O
scaled	O
horizontally	O
.	O
</s>
<s>
A	O
common	O
use	O
case	O
is	O
to	O
use	O
a	O
centralized	O
database	O
to	O
host	O
the	O
user	O
files	O
and	O
multiple	O
servers	O
to	O
run	O
the	O
ChatScript	B-Language
engine	O
.	O
</s>
<s>
ChatScript	B-Language
also	O
embeds	O
DukTape	O
,	O
ECMAScript	O
E5/E5.1	O
compatibility	O
,	O
with	O
some	O
semantics	O
updated	O
from	O
ES2015+	O
.	O
</s>
<s>
A	O
chatbot	B-Application
's	O
control	O
flow	O
is	O
managed	O
by	O
the	O
control	O
script	O
.	O
</s>
