반응형
반응형

[ChatScript] ChatScript 에서 Harry를 Dorothy로 바꾸고, 한글인사하기 


참고 : http://exagen.tistory.com/45


맥에선 설치가 안되고, 윈도우에서 잘되네. 이런. ComEmu는 원래 써오던거라 최신으로 업데이트 한번.


참고 글에서의 설명과 달리 버전이 변경되었는지 일단 느낌적으로 해봄. 


/RAWDATA/에 도로시를 Harry 카피해서 만든다. 

그리고, RAWDATA에 filesHarry.txt를 카피해서 filesDorothy.txt를 만든다. 

filesDorothy에서 RAWDATA/QUIBBLE/은 삭제. 삭제권고하셔서 삭제. 근데 build하면 왜 연결안하냐고 경고 나옴. 


CMD에서 >chatscript 실행. 

그리고, 빌드 >:build Dorothy

뭔가 안되서 보니 filesDorothy.txt 에  엉뚱한 내용이 있음. 


#underlying conversation system

RAWDATA/Dorothy/


위의 폴더 경로만 txt 파일에 들어있으면됨. 


다시 빌드하니 도로시가 인사를 한다. "Hi"  


"what is your name?" 이라고 하니까 "내 이름은  도로시에요." 라고 나온다. 

근데, 또 물어보면 딴 얘기함. 

그럴땐 리셋!!!


> :build Dorothy reset


introduction.top에서 영어를 국문으로 바꾸면 한국말 한다. ㅋㅋㅋ





...

반응형
반응형

[ChatScript] ChatScript - https://github.com/bwilcox-1234/ChatScript


Natural Language tool/dialog manager


ChatScript

Natural Language tool/dialog manager

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.

Above example mentioned in article How to build your first chatbot using ChatScript.

Basic Features

  • Powerful pattern matching aimed at detecting meaning.
  • Simple rule layout combined with C-style general scripting.
  • Built-in WordNet dictionary for ontology and spell-checking.
  • Extensive extensible ontology of nouns, verbs, adjectives, adverbs.
  • Data as fact triples enables inferencing and supports JSON representation.
  • Rules can examine and alter engine and script behavior.
  • Planner capabilities allow a bot to act in real/virtual worlds.
  • Remembers user interactions across conversations.
  • Document mode allows you to scan documents for content.
  • Ability to control local machines via popen/tcpopen/jsonopen.
  • Ability to read structured JSON data from websites.
  • Postgres and Mongo databases support for big data or large-user-volume chatbots.

OS Features

  • Runs on Windows or Linux or Mac or iOS or Android
  • Fast server performance supports a thousand simultaneous users.
  • Multiple bots can cohabit on the same server.

Support Features

  • Mature technology in use by various parties around the world.
  • Integrated tools to support maintaining and testing large systems.
  • UTF8 support allows scripts written in any language
  • User support forum on chatbots.org
  • Issues or bugs on this repo

Getting started

Installation

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.

git clone https://github.com/bwilcox-1234/ChatScript

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.

Full Documentation

ChatScript Wiki (user guides, tutorials, papers)

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Last releases

changes.md

Author


반응형
반응형

[ChatScript] ChatScript start & stop


설치 디렉토리 에서  ./BINARIES/의 CHARSCRIPT 명령어 실행. 


>chatscript 


Enter user name : 이름


한참 대화 후 종료할때 명령어. 


:quit


>:quit  

Exiting ChatScript via Quit


D:\>  



반응형
반응형

[ChatScript]  ChatScript 를 Mac에 설치하기.


https://sourceforge.net/projects/chatscript/ 에서 다운받아서 설치. 


* 설치 설명 : http://exagen.tistory.com/42


맥에서 설치하면 기존 컴파일이 안되기 때문에 다른 방법이 필요함. 실행파일이 바이너리라 별도 작업 필요. 


폴더에 압축을 풀거나 직접 github에서 cloing을 한 후에는 src를 SRC로 컴파일해야합니다.

예제 / 기본 명령 줄 컴파일은 NON-WINDOWS NON-C / MAC / MacCompile.sh에 있습니다. 자세한 내용은 해당 디렉토리의 compile-on-osx.html을 읽으십시오.



mac install & run  참조 : https://github.com/bwilcox-1234/ChatScript/blob/master/WIKI/OVERVIEWS-AND-TUTORIALS/ChatScript-on-a-Mac.md





...


반응형

+ Recent posts