1 Star 0 Fork 1

Chatopera / superscript

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

Build Status Dependencies Status Slack Chat Code Climate

SuperScript

SuperScript is a dialog system and bot engine for creating human-like conversation chat bots. It exposes an expressive script for crafting dialogue and features text-expansion using WordNet and information retrieval using a fact system built on a Level interface.

Note: This version (v1.x) is designed to work with and tested against the latest Node 6.x and above.

Why SuperScript?

SuperScript's power comes in its topics and conversations, which mimic typical human conversations. If you're looking to create complex conversations with branching dialogue, or recreate the natural flow of talking about different topics, SuperScript is for you!

What comes in the box

  • Dialog engine.
  • Multi-user platform for easy integration with group chat systems like Slack.
  • Message pipeline with NLP tech such as POS tagging, sentence analysis and question tagging.
  • Extensible plugin architecture to call your own APIs or do your own NLP if you want to!
  • A built in graph database using LevelDB. Each user has their own sub-level, allowing you to define complex relationships between entities.
  • WordNet, a database for word and concept expansion.

Install

npm install superscript

Getting Started

bot-init

If you've installed superscript globally (npm install -g superscript), a good way to get your new bot up and running is by running the bot-init script:

bot-init myBotName --clients telnet,slack

This will create a bot in a new 'myBotName' folder in your current directory. You can specify the clients you want with the --clients flag.

Then all you need to do is run:

cd myBotName
npm install
parse
npm run build
npm run start-[clientName]

This will start the server. You then need to connect to a client to be able to talk to your bot! If you're using the telnet client, you'll need to open up a new Terminal tab, and run telnet localhost 2000.

Note: The parse step is a bin script that will compile your SuperScript script. By default, it will look at the chat folder in your current directory.

Clone a template

Alternatively, check out the hello-superscript repo for a clean starting point to building your own bot. There's no guarantee at present that this is using the latest version of SuperScript.

Using Heroku's one-click deploy

Thanks to @bmann we now have a one-click deploy to Heroku! More info can be found over at superscript-heroku.

Express Client

Deploy

Slack Client

The slack-client branch creates a superscript powered bot that sits in your Slack. You'll need to create a bot and give it a name in the Slack apps directory in order to get a token that lets your bot connect to your Slack.

Deploy

Creating the bot in the Slack directory means you'll see the bot appear in your Slack as offline. When your server from above is running correctly, the status of the bot will go green, and you can say "Hi" to it and it will respond.

Upgrading to v1.x

Information on upgrading to v1.x can be found on the wiki.

Documentation

Visit superscriptjs.com for all the details on how to get started playing with SuperScript. Or read the wiki

Example Script - Script Authoring

+ hello human
- Hello Bot

+ matches all input types

- Is the reply sent back to the user.

Optional and Alternates - Script Authoring

+ [hey] hello (nice|mean) human
- Hello Bot

[] are for optional words, they may or may not appear in the input match

() are alternate words. One MUST appear.

Capturing results - Script Authoring (wildcards)

+ * should *~2 work *1
- I have no idea.

* Matches ZERO or more words or tokens

*~n Matches ZERO to N words or tokens

*n Matches exactly N number of words or tokens

And More

The above is just a tiny fraction of what the system is capable of doing. Please see the full documentation to learn more.

Additional Resources

Further Reading

Further Watching

Thanks

SuperScript is based off of a fork of RiveScript with idiom brought in from ChatScript. Without the work of Noah Petherbridge and Bruce Wilcox, this project would not be possible.

License

The MIT License (MIT)

Copyright © 2014-2017 Rob Ellis

Copyright © 2014-2015 Rob Ellis Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ”Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

A dialogue engine for creating chat bots 展开 收起
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/chatopera/superscript.git
git@gitee.com:chatopera/superscript.git
chatopera
superscript
superscript
master

搜索帮助