|
Hi, I'd like to make a program that talking(reply) to user
example
User: How do you do!
Computer : How do you do!
User: I'm tired
Computer : Have a rest !
& soon ,,,,,, thanks
|
|
|
|
|
You're not going to be able to (realistically speaking) make a true talking program. Much work is still being done of that field to make real talking computers.
However, you can have a go at something that looks like it. Start, for instance, by creating a 'database' of Question/Response pairs, where if the user asks Question, you read the corresponding Response from the database and output it.
Then you can work on string matching, such that minor changes in the typed question still match to a predefined question in your database, e.g. "What are you doing?" and "What you doing?" should probably be considered the same question.
You can then continue by defining keywords, that when seen in a question trigger a certain response. For instance, in your example the user says "I'm tired". If that specific question isn't in your database, but the keyword 'tired' is, then you can have a guess from seeing this keyword that the user is tired, and you say something like "Have a rest". Of course, the user could have asked "Are you tired?", in which case "Have a rest" wasn't the right response.
You could add a check for if the user ended with a question mark (?), in which case you can assume that whatever typed was a question.
At any rate, I'd say have at it, try experimenting, combining things. Come up with ways to understand the users intentions as well as possible. It's quite a fun thing to try, and also quite challenging.
|
|
|
|
|
There should be some ELIZA[^]-like open source applications out there, and some MSN-chatbots of course
Bastard Programmer from Hell
|
|
|
|
|
Eliza is open source, if you don't mind Lisp.
/ravi
|
|
|
|
|
If she talks with a Lisp, that might be a problem for the OP...
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
Manfred R. Bihy: "Looks as if OP is learning resistant."
|
|
|
|
|
special , thanks to all who answered the question
& in your opinions how to solve the problem of "lisp"????
thanks
|
|
|
|
|
I have a reprint of Weizenbaum's original paper published in Jan 1966 and now in the public domain. I can email it to you if you like.
/ravi
|
|
|
|
|
OriginalGriff wrote: If she talks with a Lisp, that might be a problem for the OP...
Do you see some kind of Scheme in this response?
Cheers!
"With sufficient thrust, pigs fly just fine."
Ross Callon, The Twelve Networking Truths, RFC1925
|
|
|
|
|
What you are looking for an AI program.
These are never easy to make. If you do a search, you will find some good articles / whitepapers on such types of programs.
Too much of heaven can bring you underground
Heaven can always turn around
Too much of heaven, our life is all hell bound
Heaven, the kill that makes no sound
|
|
|
|
|
please help me out to understand in simple way..........
thank you in advance.......!!!!!!!!!!
|
|
|
|
|
Threads and delegates are two completely seperate things. A delegate is a like a variable for a function. In other languages they are called function pointers. These variables can reference one or more functions. Threads allow for multiple execution paths to in application to exist at the same time. So you can be doing more than one thing at the same time in your application.
Here are some links to some documentation
Threading - http://msdn2.microsoft.com/en-us/library/ms173178(VS.80).aspx
Delegates - http://msdn2.microsoft.com/en-us/library/ms173171(VS.80).aspx
http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/a328d794-56cc-46c0-b039-c91c3cd5896b/[^]
|
|
|
|
|
A delegate, very simply put, is an address to a function that needs to be invoked at a certain time.
Delegates in C# are type safe.
E.g. HandlerMethod handler1 = FirstHandler;
where FirstHandler is a method.
Thread functions (like SetThreadPriority ,Sleep etc) are functions that can be invoked on an existing thread.
E.g. Thread.ExitProcess()
Too much of heaven can bring you underground
Heaven can always turn around
Too much of heaven, our life is all hell bound
Heaven, the kill that makes no sound
|
|
|
|
|
I downloaded this project from this website itself..While running in the any of the higher version of Visual studio i.e either 2005 or 2010 facing an error in the client side
Client side Error is:cross thread operation not valid
Server side Error is: Cannot access a disposed object. Object name: 'Form1'.
teju
|
|
|
|
|
You download which project? this one? Word Building Network Game With Intelligence[^]
Why don't you ask the question in the message area for which it relates?
On the client side error, it looks like a thread is attempting to access an object in another thread
On the server side, it looks like the client died, and the server can no longer communicate with it.
Put the code in debug and watch it crash, and check where the threading error occurs and sort out the Delgates needed for the cross threading.
|
|
|
|
|
|
hello sir this is ramakrishna. I want to store and retrive the image from database(Access) throgh c# code.please give me the solution.
|
|
|
|
|
Google will give you more results (and code) than any expert in CP. This[^] is the third result in the search.'
[EDIT]Use a meaningful title for your posts that explains your problem. 'C#' doesn't make a good title.[/EDIT]
|
|
|
|
|
|
The OP clearly mentioned Access as the database, yet you gave him a link to SQL Server.
|
|
|
|
|
|
Search here on CP. You should be able to find some good examples.
A similar question[^] was answered some time ago.
Too much of heaven can bring you underground
Heaven can always turn around
Too much of heaven, our life is all hell bound
Heaven, the kill that makes no sound
|
|
|
|
|
Hi Friends
I'm Trying To Create A Custom Form Using System.Drawing Namespace's Classes
But I Don't Know How To Create Event Logic Such As Onclick
And I Don't Know How To Create Any Behaviors That a Visual Form Can Do.(Such as Moving , Painting,Activateing and So on).
How To Do it.
Thanks
|
|
|
|
|
I suggest you start by making your own custom Control first. That way you can learn the answer to such questions in a 'safe environment'. There's probably plenty of guides on how to build a custom control, with its own specific events and painting.
Once you've got the hang of that, you can try at an actual form.
|
|
|
|
|
Thank You For Your Answer
there Are Three Basic Techniques For Creating A control.We Can
1.Inherit From An Existing Control
2. Inherit From User Control
3.Inherit From Control
Each Of Techniques Above has Advantages And Defects.I Don't Know Which Of Techniques Is better For My Solution.
I Want to Create A New Shell Like Windows Themes. Is a Reference That I Can Use It To Find Out Any Answer.
Thanks To All Answers.
|
|
|
|
|
Which is best depends on your situation.
1) Inheriting from an existing control. Use this approach if there already exists a control which does most of what you want, and you want to add to it and/or change some of its functionality. A lot of the standard controls in .NET allow most of their functionality to be overwritten by virtual functions, in effect allowing a great deal of customisation, building on existing blocks. It requires you to familiarise yourself with the control in question. A great advantage to this approach is that a lot of the functionality you want is already implemented and you only need to work on the parts you want added or different. How far you can go in customisation (and how easy) depends on the specific control.
2) Inheriting from UserControl allows you to begin with 'a clean slate'. It has basic functionality to help you start a new control, such as auto-scrollbars and it's a control container out of the box. You create a custom control from this typically by combining existing controls. Since you express interest in mostly changing the look of the controls, this is probably not the best for you.
3) This allows you the most power, starting from scratch. Some functionality is right out of the box, but most you're going to have to build yourself. It's very powerful, but also the most work of the three. Best suited if you are creating an entirely new control that 1) doesn't behave like an existing control, or a group of existing controls and 2) has a unique look, so it needs to do all of its own drawing. This is the most advanced of the three.
I'm guessing you're best of with method Nr 1 - inheriting from existing controls. You can override the paint event to do your own drawing. That way, you can change the looks while preserving the functionality. But it's up to you to decide.
There are plenty of articles about creating a custom control, also here on CodeProject. Look for articles like "Custom <name> control", where name is the name of an existing control, e.g. "Custom progressbar control".
Good luck!
|
|
|
|