반응형

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


로컬에 APM 설치하고, 127.0.0.1/testbot.php 를 실행해보았다. 

그런데, chatscript에 보니까 이미 서버를 구현하는게 있던걸. 이런...



ChatScript port=1024 userlog  이렇게 하면 된다는걸~ 


서버측을 실행히켰는데 어떤 입력도 CMD에선 적용이 안됨. 


"I don't know what to say." 만 난발하고. 


암튼 어떻게 할지 모르다가, 웹 대화창에 입력한데로 챗봇이 실행되는걸 보고 입력창에 빌드명령어 다시 넣고.  빌드 한번 더 해보니 한글 답변을 볼 수 있었음. 


이제 첫번째 콘솔창에서 :build Dorothy reset을 실행하고, 컴파일이 끝나면 수정한 내용을 반영할 수 있도록 CS서버를 새로 기동시킨다. CS서버를 새로 기동시키기 위해서는 웹브라우저의 메시지 창에 :restart를 입력하고 send 함으로써 가능하다.

여기서 메시지 창을 통해 명령어를 전송할 수 있다는 점에 의아해 할 수 있는데, 이는 테스트 하는 동안의 편의를 위한 것이고 테스트가 끝난 후에는 메시지 창을 통한 명령어의 전송을  차단하거나 미리 등록한 사용자만 가능하도록 바꿀 수 있다. 현재는 모두에게 허락되어 있는데 등록한 사용자에게만 가능하도록 하겠다면 다음과 같이 수정하면 된다.

 

l  수정할 파일 : chatscript/authorizedIP.txt

l  현재 내용 : all

l  수정할 내용 : L_t8e3s7t8

 

수정할 내용에는 대문자 L_로 시작하여 뒤에 사용자 이름을 적으면 되는데, 쉽게 추측할 수 없는 사용자 이름을 쓰는 것이 좋을 것이다. 위와 같이 적었다면 브라우저로 로그인하는 ID가 t8e3s7t8일 경우에만 메시지 창의 명령어를 서버에 전송할 수 있다. 이제 다시 돌아와서 시스템이 restart를 하면, 곧이어 :reset 명령을 준다.



반응형
반응형

[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





...


반응형
반응형






Botkit is a toolkit for making bot applications 


Botkit - Building Blocks for Building Bots


https://github.com/howdyai/botkit



Botkit은 메시징 플랫폼 내부에있는 유용하고 창조적 인 봇을 설계하고 실행하는 프로세스를 용이하게하기 위해 설계되었습니다. 봇은 메시지를 보내고받을 수있는 응용 프로그램으로, 대부분의 경우 사람과 함께 사용자로 표시됩니다.

일부 봇은 사람들처럼 말하고, 다른 봇들은 백그라운드에서 조용히 일하고, 다른 봇들은 현대 모바일 애플리케이션과 같은 인터페이스를 제공합니다. Botkit은 개발자에게 어떤 종류의 봇이라도 구축하는 데 필요한 도구를 제공합니다! 개발자가 API 엔드 포인트를 처리하는 대신 새로운 애플리케이션 및 경험을 개발하는 데 집중할 수 있도록 메시지를주고받는 인터페이스를 제공합니다.

Botkit을 사용하는 우리의 목표는 봇 건물을 쉽고 재미있게 만들고 말하기 기계로 가득차있는 미래를 창조하고자하는 욕구를 가진 누구나 쉽게 접근 할 수있게 만드는 것입니다! 우리는이 비전을 현실로 만들기위한 몇 가지 도구를 제공합니다.

Botkit은 다음을 비롯하여 널리 사용되는 메시징 플랫폼을 처리 할 수있는 포괄적 인 도구 세트를 제공합니다.



반응형

+ Recent posts