|
|
Experienced member
Total posts: 48
Joined: Oct 5, 2012
|
http://www.projectenglishtv.com/schl/hari/
I decided to start my own AI project, and began on Oct 6th. After two days, It can recognize sentence types and word types, so the grammar analysis will go on from here.
It is done in javascript so far. Please play with it for a minute and give feedback. I am absolutely green to all this and could use some pumpin up, or some knockin down as the case may be.
Thanks
|
|
|
|
|
Posted: Oct 7, 2012 |
[ # 1 ]
|
|
Administrator
Total posts: 2048
Joined: Jun 25, 2010
|
Do we have to follow the script exactly as shown? It couldn’t respond to anything I asked even the test questions unless they were in exactly that order.
|
|
|
|
|
Posted: Oct 8, 2012 |
[ # 2 ]
|
|
Experienced member
Total posts: 48
Joined: Oct 5, 2012
|
Steve Worswick - Oct 7, 2012: Do we have to follow the script exactly as shown? It couldn’t respond to anything I asked even the test questions unless they were in exactly that order.
Yes Steve. The only real responsiveness it is now capable of is simply identifying the sentence type and the word types in the sentence. That response currently appears in the grammar dev textarea.
Since there is no current platform that I am working with, I decided to build my own starting with grammar recog first. Once I achieve a certain level of incoming grammatical analytics, I need to begin building some true responsiveness, again, grammatically first. The system for grammar recognition and grammar formulation are completely unrelated, the second being the more programmatically (logic) challenging of the two. In other words, there is no AI yet.
I haven’t decided where to start with that. Grammatically, I think it will be with interrogative question response… who, what, where, when, how. Check back on it in a few days.
|
|
|
|
|
Posted: Oct 8, 2012 |
[ # 3 ]
|
|
Guru
Total posts: 1297
Joined: Nov 3, 2009
|
Hello Jeff
Very good. Here are just a few basic tweaks that came to mind…
Please read the following as an informal chat, not as criticism.
Since you have HTML as output you may swap the TEXTAREA tag
with something like a P tag and add a border and padding in the style.
This way all your bold and underline and linebreaks show nicely.
Keep the same ID or NAME for the P tag as you did the textarea.
It may be read-only, but you have no need to edit the response.
Another thing you may do is turn your list of inputs into links, that
when clicked automatically fill-in your text input using JavaScript.
This may save typing and typing errors, without changing your design.
Lastly, JavaScript supports regular expresssions which may let you
vary your text inputs, and still match, without needing to be exact.
Very good choice, JavaScript may be one of the most powerful
programmng languages for chatbots. Overall, the site layout looks neat.
|
|
|
|
|
Posted: Oct 8, 2012 |
[ # 4 ]
|
|
Experienced member
Total posts: 48
Joined: Oct 5, 2012
|
Hi 8PLA:
I appreciate your feedback, and will make those suggested changes. That will keep the markup out of my javascript code. Great suggestion.
Links are also a good idea. A little attention to the DOM could make it much easier. Thanks for that.
Today I was able to id the subject in a simple sentence (don’t put more than one pronoun or noun ahead of the verb yet), so now with subject and verb in my control, real responses can begin to be shaped. Also, roughing out the SUBJECT ID sytem accomplished at the same time, the rough structure for further inter sentence analysis. I should be able to finish a crude intup reader by the end of the week.
And yes, regular expressions are a headache, but will become more and more necessary for a comfortable experience.
Thank you so much for you advice. Please give more as I update the application.
Sincerely,
Jeff…
|
|
|
|
|
Posted: Oct 8, 2012 |
[ # 5 ]
|
|
Experienced member
Total posts: 48
Joined: Oct 5, 2012
|
http://www.projectenglishtv.com/schl/hari/
UPDATE::
Just to say that the subject analizer is well formed up, though there are details to work out (a lot).
As I mentioned above, just don’t use more than one subject candidate to the left of the verb in your sentence. Try not to use more than one verb either. Right now it is just taking the first one it finds and looking down the array from there to find the first noun or pronoun.
I still have’t done any response programming, although now I actually can!!! The progam just throws an alert identifying the subject. I know - not very cool. Just wait a few days though.
Thanks for the good feedback. It is encouraging.
Jeff…
|
|
|
|
|
Posted: Oct 8, 2012 |
[ # 6 ]
|
|
Senior member
Total posts: 370
Joined: Oct 1, 2012
|
Very Nice Jeff,
look forward to seeing more!
VIncent Gilbert
|
|
|
|
|
Posted: Oct 9, 2012 |
[ # 7 ]
|
|
Experienced member
Total posts: 48
Joined: Oct 5, 2012
|
Thanks Vincent.
I got rid of the alert boxes and have some real responses now, though simplistic is an understatement. More work on the subject identifier is next, and then I have to start looking at processing verb forms based the form of the subject.
I’ve been teetering on the cusp of formalizing some data format for available words, but I think I need to keep using simple arrays for a while, until the basic clause parsing is worked out. However the logic will all work in teh end will have a bearing on the way the final data is structured.
Anyway. Please look at it again later, as it developes, and give me helpful suggestions as they come to you.
Jeff
|
|
|
|
|
Posted: Oct 9, 2012 |
[ # 8 ]
|
|
Senior member
Total posts: 623
Joined: Aug 24, 2010
|
Hi Jeff, welcome to the world of parsing! Nice to see what you’ve put together in such a short period of time. I am also building a parser (well, it’s pretty much complete) so I’m interested to see how your project develops.
Clause parsing can be grammatically quite ambiguous—the deeper you dive into it, the more you see the importance of context. My parser, for example, can generate dozens of grammatically correct parses for a given input sentence. I’m in the process of integrating the parser with my knowledge base so that context—previous and current conversations, as well as general knowledge—can be used to rank and discard parses.
As in your case, the structure of my knowledge base has also evolved along with the parser. Each phrase in the database has a unique identifier so that different facts (declarative sentences) that use that phrase can be linked together. Each fact is also broken down into its constituent parts: smaller phrases, single parts-of-speech, etc. Each of these also has a unique identifier. In this way, the knowledge base can be queried at multiple levels, depending on the input, to seek out words, phrases, and even whole sentences.
|
|
|
|
|
Posted: Oct 9, 2012 |
[ # 9 ]
|
|
Experienced member
Total posts: 48
Joined: Oct 5, 2012
|
Here is a quick update on the project:
As per 8PLA’s suggestions, I have modified the interface in two of the three areas mentioned. Regular expressions are for a later date.
Harri’s output is now in a paragraph instead of a textarea
The test script strings are now clickable
Thanks again for the great feedback.
|
|
|
|
|
Posted: Oct 9, 2012 |
[ # 10 ]
|
|
Senior member
Total posts: 623
Joined: Aug 24, 2010
|
Your bot has quite a restricted vocabulary at the moment. Have you considered integrating WordNet (or another word database) into your project?
|
|
|
|
|
Posted: Oct 10, 2012 |
[ # 11 ]
|
|
Experienced member
Total posts: 48
Joined: Oct 5, 2012
|
Hi CR HUNT
Thanks for the rich input. It is interesting how this process forces you to think thorugh the cranial knothole backwards in order to programmatically comprehend input before you have to format output. Your comments above were quite interesting, and I have many questions for you later, after I’ve finished beating my forhead on this for a while. I’m especially interested in how you are integrate the contextural markers with your knowledge base.
Regarding a richer vocabulary, right now I think I’ll keep it very simple for myself and focus just on the grammar in a microcosm. Next week I might be getting far enough along to think of tying a database it, but I am an English Teacher living in Korea, so I have another HUGE school application of which this piece will be just one showcase component. It will teach all sciences (1st yr univ level) as well as language, in English with Korean translative support, so my own dictionary database will be a primary resource. How I tie other resources in is an area for later thought.
|
|
|
|
|
Posted: Oct 10, 2012 |
[ # 12 ]
|
|
Experienced member
Total posts: 48
Joined: Oct 5, 2012
|
Jeff Rogers
Member
Total posts: 10
Joined: Oct 5, 2012
E-mail Jeff
http://www.projectenglishtv.com/schl/hari/
Another quick update.
Now I can start with pattern matching for true responses.
|
|
|
|
|
Posted: Oct 15, 2012 |
[ # 13 ]
|
|
Experienced member
Total posts: 48
Joined: Oct 5, 2012
|
Update on the project
I put a new version of harri on the link. I have his db table insert query formatted, and it is working on my local machine. You can test it though, and it will echo the formatted input string for you.
I have to do some edit capability over the next day or two, and then I’ll put a live db up to play with. It won’t do much right away because I have to start integrating logic, the conversant interface, and the memory interface. I hope to have something at least a little responsive by the end of this week, time permitting… I do have a real life.
|
|
|
|
|
Posted: Oct 20, 2012 |
[ # 14 ]
|
|
Experienced member
Total posts: 48
Joined: Oct 5, 2012
|
The DB is live now. You can insert tables and fields, and they will show up in the readout area. I am having some cross browser issues with my AJAX drill into fields. It all works in IE on my local server, but not in firefox. I thought is was a header issue with the send(null) needing to be send(’‘) so firefox would recognize a body, but that hasn’t fixed it, and I decided to get the value insertion done before getting too involved in that bug.
I havn’t tested the AJAX drill live yet, either on IE or a w3c browser. I had huge knots in the field value insertion because I want hari’s brain to be able to distingish whether to insert one, two, three or four values, and to know if there are only one or two relations for each of the four. That represents 16 decision permutations, each involving seven data units. With that worked out, I am ready for the sql insertion statements, and that should be done today.
Next will be the delete protocol, and last the edit functionality. It looks like one more controller will be needed in order to edit relations of existing values.
In writing all of this at the start, I am trying to embrace the potentiality of working self organizing capability into the program. A few posts above, CR was describing the decision process that her bot goes through in making variable determinations regarding grammar usage. I feel that process can be taken to a higher level, looking for patterns and making decisions about how to organize AND SAVE them, not just how to organize alone.
But organizing, and saving ALONE is not enough. The logic agent needs to be able to RECONSIDER it’s own knowldge base, and to REORGANIZE as well, what it has already organized once, or twice, or 1000 times already.
|
|
|
|
|
Posted: Oct 21, 2012 |
[ # 15 ]
|
|
Senior member
Total posts: 147
Joined: Oct 30, 2010
|
Jeff Rogers - Oct 20, 2012: But organizing, and saving ALONE is not enough. The logic agent needs to be able to RECONSIDER it’s own knowldge base, and to REORGANIZE as well, what it has already organized once, or twice, or 1000 times already.
The following dialog illustrates one way of approaching the reconsideration and reorganization issues (from http://subbot.org/logicagent/README.txt):
—-
> All metals are solid.
> Mercury is a metal.
> a metal is all metals
> is Mercury solid?
Yes, Mercury is solid.
> why is Mercury solid?
Mercury is solid because: mercury is a metal, and a metal is all metals, and all metals are solid
> Mercury is not solid.
Okay, Mercury is not solid.
> Iron is a metal.
> Is iron solid?
Yes, iron is solid.
> is Mercury solid?
No, Mercury is not solid.
> is mercury a metal?
Yes, mercury is a metal.
> is iron a metal?
Yes, iron is a metal. —-
So, if the bot learns a generalization that all metals are solid, it can then learn an exception to the rule. “All metals are solid” is generally true, but not in the exceptional case of mercury. If the bot learns enough exceptions it might then reconsider the “all metals” and recast it to “most metals”...
|
|
|
|