I would like to make a bot that can carry on a simple conversation. I would like to be able to supply the bot with parameters about the things it knows and how it responds to certain subjects. I am wondering if anyone knows of any freely available source code or an API for a decent conversational bot.
I would like to use this to facilitate gaming by having computer-controlled characters that interact with the real players without having completely pre-scripted, static dialog. I am hoping that I can find something capable of holding a simple, generic conversation unless asked about a specific topic, at which point it can give specific replies to a pre-set list of specific topics.
I am asking more about the conversational-processing aspect and not so much about a front end or hooks to other apps or anything like that. Initially, I will just make this a local command-line based thing, then if satisfied I am looking into libpurple as an API to access various communication networks once I have the dialog processing ready.
So, does anyone know of any source code or API for something like this? Google brings up mostly tools for things like imified. I'm not expecting there to be a lot. A source code for something that exists that can handle various emotions and topics and such would be awesome, but I'd be happy with something that just holds the simplest of conversations, as there should be something somewhere that does this, seeing how there are multiple IM bots in existence.
In the absence of a good source or API, would anyone happen to know of any good materials about programming an AI that can have a conversation? Again, I'm not talking about PhD papers discussing robots that can pass believably as humans or anything like that; I mean materials that discuss some simple programming techniques that common conversational bots use to hold rudimentary conversations.
Because of the libpurple API, I'll probably be doing this in C++. So C++ resources are preferable but not required.
(edit) I just stumbled onto AIML (Artificial Intelligence Markup Language). I am currently looking into that, and it sounds like it might be promising, especially if there are any pre-made conversational resources available for it, as then I could just add topics to it in the manner I mentioned, if I am understanding it correctly.
AIML is old, obsolete and is a torture to create his database. I suggest you follow this gamasutra's article about chatbot languages. This article describes the ChatScript language, is a great alternative for AIML.
Another language is RiveScript that have a cool clean style, but it seem like a copy of AIML with the same bad concepts.
I'm developing the Aerolito language that is based on YAML, it's just a hobby project and it's not usable yet. =]
In my opinion, ChatScript is the best option for now.
I understand this question is old, but things have changed in the time since the question has posted. Check out the following projects, these bots learn from either text files, irc chat logs or in the case of triplie, they can read websites (albeit not perfectly).
triplie-ng: https://github.com/spion/triplie-ng
cobe: https://github.com/pteichman/cobe
Giorgio Robino mentioned http://superscriptjs.com/ but it's more than just chatscript - it's a superset of rivescript and chatscript and also includes a built-in triple store to implement WordNet etc.
Related
I am making a website application to support factory automation, which will have users from various countries knowing different languages. I have internationalized all the string in the website so it is understandable by all users. However users have to write comments on the website related to factory operations, which they will write in their own language and it may not be understandable by users in other countries.
I wanted to know what are the best practices to help with this scenario.
One way I was thinking to not let users write comments- rather I provide possibilities of comments in a drop down which they can select. And I can internationalize those possibilities. But this is not an elegant solution, since the 'possible comments' may not be comprehensive.
There isn't really a solid no-fail solution available for this kind of problem, but here are some possibilities:
Leverage a translation engine and computer-translate the comments. How well this works depends on the engine used and the language, but it gives the reader a gist of the meaning. This solution loses a lot of use when there are a lot of technical or proprietary terms used. A lot of international webshops actually use this technique.
Encourage your users to post comments in a common language, or a language that most of your users will know, like English, Chinese of Spanish, depending on your markets.
Employ translators to regularly translate essential comments
The solution you mentioned is also pretty decent when the possible text is limited, otherwise it will spin out of control very fast.
When creating a AI talking bot what kind of methods of design should I use? Should it be one function, multiple modules, should it have classes?
Understanding language is complicated, so the goal you need to determine first is what aspect of language you want to understand.
An AI must be able to understand what the person says to it, then relate it to what it already knows, and then generate a legitimate response.
These three steps can all be thought of as nearly independent, so you need to address each on its own.
The brain, the world's best language processor, uses a Neural Network, but that's not likely to work well for you.
A logic-based proof solving system, where facts that follow from facts are derived would probably work best, and I know of at least one system that uses it fairly effectively.
I'd start with an existing AI program (like the famous Eliza) and run its output through a speech synthesizer.
Some source for Eliza is available here. One open source speech synthisizer is FreeTTS.
If you're using a language other than Java, there are similar candidates AI bots and text-to-speech code out there.
I've started to do some work in this space using this open source project called Talkify:
https://github.com/manthanhd/talkify
It is a bot framework intended to help orchestrate flow of information between bot providers like Microsoft (Skype), Facebook (Messenger) etc and your backend services. The framework doesn't really provide implementation for the bot providers yet but does provide hooks into its natural language recognition engine.
The built in natural language recognition library can be used to classify sentences to topics which you can then map to skill functions.
Give it a try! I'd really like people's input to see if how it can be improved.
I'm building an application as part of a course project which allows users to rate an place/event .
My basic question is how should I proceed in this ?
In what language should I write my code ?
If a user provides a 5-star rating, how do I collect it and put it in the database ?
Any guidelines on how to put the initial steps would be very helpful as my knowledge relating to web services is very weak.
Any help/pointers to more information would be very appreciated
Your question is overly vague and isn't related to system administration, so it's probably going to get closed once someone comes along with the appropriate privileges. However, as long as it's here...
My basic question is how should I proceed in this ?
If you are completely at a loss you may want to spend some time consulting with your instructor, who may be able to suggest likely sources of information and provide some direction for your work.
In what language should I write my code ?
You should write your code in a language with which you are familiar that allows you to fulfill the requirements of the project. Anything else will needlessly extend the amount of time it takes to complete the project. If your goal is to learn a new language, you face a mind-numbing number of choices. Python, Ruby, and PHP are all see wide use in web applications. On Microsoft platforms, .NET is quite popular. You will find proponents and detractors for all of them.
If a user provides a 5-star rating, how do I collect it and put it in the database ?
This looks suspiciously like you're asking us to do your assignment for you.
I'm working on a project at the moment where it would be really useful to be able to detect when a certain topic/idea is mentioned in a body of text. For instance, if the text contained:
Maybe if you tell me a little more about who Mr Jones is, that would help. It would also be useful if I could have a description of his appearance, or even better a photograph?
It'd be great to be able to detect that the person has asked for a photograph of Mr Jones. I could take a really naïve approach and just look for the word "photo" or "photograph", but this would obviously be no good if they wrote something like:
Please, never send me a photo of Mr Jones.
Does anyone know where to start with this? Is it even possible?
I've looked into things like nltk, but I've yet to find an example of someone doing something similar and am still not entirely sure what this kind of analysis is called. Any help that can get me off the ground would be great.
Thanks!
The best thing out there that might be useful to you is automatic sentiment analysis. This is used, for example, to judge whether, say, a customer review is positive or negative. I cannot give you direct pointers to available tools, but this is what you are looking for.
I must say, though, that this is a current hot topic in natural language processing and I’ve seen a number of papers at conferences. It’s definitely quite a complex matter and if you’re starting from scratch, it might take quite some time before you get the results that you want.
NLTK is not a bad framework for parsing natural language but beware that this is not a simple matter. Doing stuff like this is really research level programming.
A good thing that makes it much easier is if you have a very limited domain - say your application focuses on information about famous writers, then you can avoid some complexities of natural language like certain types of ambiguities.
Where to start? Good question. I don't know of any tutorials on the topic (and I presume you tried the Google option) but I'd imagine that iTunes U would have a course on the topic. If not I can post a link to a course I've done that mentions the subject and wasn't completely horrible: http://www.inf.ed.ac.uk/teaching/courses/inf2a/lecturematerials/index.html#lecture01
The problem that u tackle is very challenging.
I would start by first identifying the entities in the text (problem referred as Named Entity Recognition, google it), and then a I would try to identify concepts.
If want to roughly identify what is the text about, I suggest that you start by using WordNet and according to the words and their places in the hierarchy to identify the concepts involved.
If you want to produce a system which show real intelligence than you should start researching about resources such as CYC (OpenCYC) which will allow you to convert the sentences into FOL sentences.
This hardcore AI, approach to solving your problem. For simple chat bot, it would be easier to rely on simple statistical methods.
good luck
I have a small course project that would best have a user-friendly front end.
It's a network sniffer, I coded the program with C and Linux. And now I am hoping to make it more ``user-friendly".
In c: Getopt
In c++, if relevant: Boost program options
Try to behave like other programs (at the very least provide a useful --help message, and print some sort of simple usage description for invalid arguments). I find the easiest way to understand how to use a program is when its manual page, or even --help message gives examples of common usage cases.
If by user friendly you mean you want to make a gui for it then I would definitely recommend GTK. GTK is one of the more widely use Xserver tool kits and it is written in C. Another plus is that it is written in an object oriented manner. IMO being exposed to how OO programming is accomplished in C is a great thing for all CS students.
If your sniffer has a command line front end, have a look at Eric S. Raymond's The of Unix Programming. In chapter 10, there's a whole section on how to name and format your command line arguments. There's also a POSIX standard for utility syntax.
These approaches won't directly make your program user friendly, only research on your users and analysis of your interfaces will help with this. However, providing an interface that works in ways that users expect will certainly help.
Im no expert in UI Design, or anything in that matter, but taking an interest in the quality of User Interface Design, I came across Aza Raskin, an interface design expert that is head of design for Mozilla Labs. I have followed some lectures and conventions that Aza has done on UI Design, and he said something that is simple, yet makes more sense then anything I have ever learned with UI Design...I may butcher it but its along the lines of
If The User has to think about the design,then it is a bad design
This may seem like an insult to everybody's intelligence, but it makes sense. Something that is user friendly cant be ambiguous to the user. This means that when a user is performing some task/operation, the UI should be presented to them corresponding to the current event or situation.
The UI should be designed so that anybody who picks up your software should be able to navigate through it. This DOESNT mean that they should understand the underlying problem domain, but it does mean that if asked to find a certain functional part of the software, that they could generally navigate themselves there.
Some things to things to think about when using your software:
1) -Do you ever ask yourself, "Do I go here or here?
2) -Do I use tools like bold fonts and italicizing to show emphasis?
3) -Am I sacrificing anything by making certain features "idiot proof"(Read Below)
4) -Am I trying to do too much anywhere just to save time(programming time)
These are just some things that can help straighten out some of your design decisions. In no way is this following any pattern. Like I said, my education in this field is minimal, it is just an interest I have followed.
Regarding #3, It is important that you don't sacrifice any feature or design decision when implementing certain accommodations. If you have something where 99% of your users are using a certain feature, but 1% can be expected to make a different decision, then take this into consideration. Don't sacrifice the design for the 99% of the users to accommodate the other 1%. This doesn't mean don't accommodate the other users, I just mean don't sacrifice the integrity of the design.
If you don't need to interact with the app "live" or only need limited interaction as a command line app then you can write a frontend using PyGTK. If you need to access C libraries then you can use Cython to load and call them.
But regardless of what you choose, be sure to find a professional interface designer. A bad interface can destroy the potential popularity of any app.