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.
처음에 ID와 비밀번호를 users라는 사전에 담았습니다. 그리고 users.txt라는 파일을 새로 열어서 f라고 했구요. 그 다음에는 오이지(pickle^^;) 모듈의 덤프(dump)를 사용했습니다.
여러분 덤프 트럭 다 아시죠? 왜 공사장에서 흙 싣고 다니는 무지 큰 트럭 있잖아요. 그런 차는 뒤쪽 짐칸을 들어올려서 흙을 와르르 쏟아내지 않습니까? 여기서 보시는 dump도 마찬가지입니다. users라는 리스트의 내용을 파일 f에 와르르 쏟아붓는 거지요. 음, 이렇게까지 설명할 필요는 없을 텐데… 오늘 쓸 것이 없다보니…
이제 메모장으로 users.txt 파일을 열어보시면 모양이 좀 지저분하긴 해도 데이터가 다 들어있는 걸 보실 수 있을 거예요.
그렇다면 이 파일에 들어있는 것을 원래대로 돌려볼까요? 원래대로 돌리는 것도 역시 오이지 모듈이 할 일이겠죠.
>>> f = open('d:/python21/exam/users.txt')
>>> a = pickle.load(f)
>>> print a
{'sun80': '393948', 'kim': '3kid9', 'ljm': 'py90390'}
사실 방금 보여드린 것은 그리 복잡할 것도 없지만 pickle 모듈은 파이썬에서 만들어지는 것은 뭐든지 다 파일에 적을 수 있다고 합니다. '그게 뭐 어때서'라고 생각하실지 모르겠지만 이건 놀라운 기능이라고 튜토리얼에 쓰여있습니다.
오이지는 이쯤 해두고, 전에 잠깐 구경했던 glob 모듈에 대해 알아보도록 하죠. glob는 파일들의 목록을 뽑을 때 사용하는데, 파일의 경로명을 이용해서 입맛대로 요리할 수 있답니다.
ConEmu-Maximus5 is a Windows console emulator with tabs, which presents multiple consoles and simple GUI applications as one customizable GUI window with various features.
Initially, the program was created as a companion to Far Manager (FAR in Wikipedia), my favorite shell replacement - file and archive management, command history and completion, powerful editor.
Today, ConEmu can be used with any other console application or simple GUI tools (like PuTTY for example). ConEmu is an active project, open to suggestions.
ConEmu is not a shell, so it does not provide "shell features" like remote access, tab-completion, command history and others. ConEmu is advanced console window where you can run any shell of your choice. However, some of these features placed in RoadMap. Also you may try Clink for bash-style completion in cmd.exe and PSReadLine or PowerTab in powershell.exe.
Or even choose bash or any other unix-like shell from cygwin, msysgit, msys2, mingw and others.
All settings are read from the registry or ConEmu.xml file (multiple named configurations are supported), after which the command line parameters are applied. Parameters /Config and /BufferHeight can only be specified on the command line. Most settings are configured using the Settings dialog, not from the command line.
Requirements
Windows 2000 or later.
Installation
In general, ConEmu installation is easy. Just unpack or install to any folder and run `ConEmu.exe`.
For more information about installation options refer to Installation page.