Giter Site home page Giter Site logo

alicebot's Introduction

AliceBot聊天机器人

AliceBot是一款Java版的AIML1.0实现

本项目支持中文/英文聊天。需要导入对应的预料。详细的需要学习AIML语言

使用

将数据库sql导入到MySQL中,并在Alice项目根目录中修改robot.properties里面的数据库配置信息。

关于程序在eclipse控制台的运行: 1.其主函数入口在com.context包中的,Robot.java类中 2.用户的输入不是从控制台输入(这是因为考虑到编码问题),而是从Alice根目录下的myinput.txt文件中输入。

你先想好你将要说什么, 比如你在myinput.txt文件中输入: 你好 今天天气不错 你是谁 ...

然后你运行Robot.java这个类 机器人就会对myinput.txt中的每一句做一个回答,并输出到控制台。

这样做可能不太方便,但因为之前从控制台输入,会因为编码问题导致机器人的学习功能不能正常工作,所以暂时先这么做,以后有需要在做修改。

alicebot's People

Contributors

wuweiit avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

alicebot's Issues

在elipse中启动的时候报错

在elipse中启动的时候报错 ,lucene报错但是,我没有找到要写lucene索引文件的地方,只是在调用数据库的时候才会出现这个问题,是不是这个功能目前没有完成,如果在robot.properties中将DBAvailable改为false可以执行。但是只能读取aimi文件,无法做到索引文件一起使用
具体报错如下:
四月 08, 2018 10:56:33 上午 org.ansj.util.MyStaticValue
警告: not find library.properties in classpath use it by default !
四月 08, 2018 10:56:33 上午 org.ansj.library.UserDefineLibrary loadLibrary
警告: init userLibrary waring :library/default.dic because : not find that file or can not to read !
四月 08, 2018 10:56:33 上午 org.ansj.library.UserDefineLibrary initAmbiguityLibrary
警告: init ambiguity waring :library/ambiguity.dic because : not find that file or can not to read !
四月 08, 2018 10:56:34 上午 org.ansj.library.InitDictionary init
信息: init core library ok use time :1085
四月 08, 2018 10:56:35 上午 org.ansj.library.NgramLibrary
信息: init ngram ok use time :806
org.apache.lucene.index.IndexNotFoundException: no segments* file found in MMapDirectory@D:\alicebot\AliceBot\Index lockFactory=org.apache.lucene.store.NativeFSLockFactory@2cb4c3ab: files: [write.lock]
at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:637)
at org.apache.lucene.index.StandardDirectoryReader.open(StandardDirectoryReader.java:50)
at org.apache.lucene.index.DirectoryReader.open(DirectoryReader.java:63)
at com.aiml.IndexResource.buildIndexReader(IndexResource.java:70)
at com.aiml.IndexResource.init(IndexResource.java:36)
at com.aiml.IndexResource.(IndexResource.java:29)
at com.aiml.IndexResource.getInstance(IndexResource.java:117)
at com.aiml.IndexSearchService.(IndexSearchService.java:21)
at com.aiml.AskToDB.(AskToDB.java:11)
at com.context.ChartManager.(ChartManager.java:19)
at com.context.ChartManager.getInstance(ChartManager.java:27)
at com.context.Robot.(Robot.java:14)
at com.context.Robot.main(Robot.java:23)
Exception in thread "main" java.lang.NullPointerException
at org.apache.lucene.search.IndexSearcher.(IndexSearcher.java:120)
at org.apache.lucene.search.IndexSearcher.(IndexSearcher.java:105)
at com.aiml.IndexResource.buildIndexSearcher(IndexResource.java:84)
at com.aiml.IndexResource.init(IndexResource.java:37)
at com.aiml.IndexResource.(IndexResource.java:29)
at com.aiml.IndexResource.getInstance(IndexResource.java:117)
at com.aiml.IndexSearchService.(IndexSearchService.java:21)
at com.aiml.AskToDB.(AskToDB.java:11)
at com.context.ChartManager.(ChartManager.java:19)
at com.context.ChartManager.getInstance(ChartManager.java:27)
at com.context.Robot.(Robot.java:14)
at com.context.Robot.main(Robot.java:23)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.