|
|
Member
Total posts: 14
Joined: Oct 17, 2012
|
Hi guys,
I am trying to build a chattbot but I am facing some issues and need help !!
in realtion to the grammar rule to build is there any some websites or links to show me and giving explanation ??
hope finds help
cheers,
|
|
|
|
|
Posted: Oct 17, 2012 |
[ # 1 ]
|
|
Senior member
Total posts: 623
Joined: Aug 24, 2010
|
Hi “Scarycaspir”,
I assume you are attempting to build your own parser. I recommend looking up some standard techniques: LR parsers, GLR parsers, and chart parsers. There are also some novel methods, such as the link grammar parser.
If you’d like to use an already established parser, you can check out the link grammar parser above, or the Stanford parser, or the parsers available as a part of the python Natural Language Toolkit, NLTK.
|
|
|
|
|
Posted: Oct 17, 2012 |
[ # 2 ]
|
|
Senior member
Total posts: 498
Joined: Oct 3, 2008
|
> http://www.meta-guide.com/home/bibliography/google-scholar/stanford-nlp-dialog-systems
> http://www.meta-guide.com/home/bibliography/google-scholar/nltk-dialog-systems
CR, what I am not clear about is the interpreter for a parsed grammar…. There is a HUGE body of work on grammar parsing, but I’m having trouble finding anything on natural language interpreters for parsed grammars. Basically, what the heck do you do with a grammar once it’s parsed? I mean, how do you get from parsed grammar to natural language interpretation and interactive chatbot? Where are the tools for doing this? I’ve never seen a tool where you can just upload a parsed grammar and talk to it….
|
|
|
|
|
Posted: Oct 18, 2012 |
[ # 3 ]
|
|
Senior member
Total posts: 147
Joined: Oct 30, 2010
|
Here’s how I talk to my grammar agents:
[21:46:00] <anekant> what agents are loaded?
[21:46:08] <lexparser> lexagent, linkagent, bartagent, logicagent, monty, isragent, restartagent
[21:46:14] <anekant> link: what is the subject of: John ate an apple.
[21:46:22] <lexparser> John
[21:46:22] <anekant> monty: what is the verb in: John ate an apple.
[21:46:30] <lexparser> ate
[21:46:31] <anekant> lex: object: John ate an apple.
[21:46:39] <lexparser> an apple
[21:46:40] <anekant> parse John ate an apple.
[21:46:48] <lexparser> (S (: -)
[21:46:49] <lexparser> (NP (NNP John))
[21:46:50] <lexparser> (VP (VBD ate)
[21:46:51] <lexparser> (NP (DT an) (NN apple)))
[21:46:52] <lexparser> (. .)))
[21:47:03] <anekant> In America, John eats an apple.
[21:47:11] <lexparser> In Soviet Russia, the apple eats YOU!
http://subbot.org/lexagent
Another dialog: http://subbot.org/lexagent/dialogs/freewheeling.txt
Note I can get the bot’s response time down to 3 seconds, maybe faster if I want to play with the delays some more. Note also it gets some of the classic linguistic example sentences wrong, so my task is to teach it to get those right…
|
|
|
|
|
Posted: Oct 18, 2012 |
[ # 4 ]
|
|
Senior member
Total posts: 697
Joined: Aug 5, 2010
|
CR, what I am not clear about is the interpreter for a parsed grammar…. There is a HUGE body of work on grammar parsing, but I’m having trouble finding anything on natural language interpreters for parsed grammars. Basically, what the heck do you do with a grammar once it’s parsed? I mean, how do you get from parsed grammar to natural language interpretation and interactive chatbot? Where are the tools for doing this? I’ve never seen a tool where you can just upload a parsed grammar and talk to it….
I use decision trees for this.
|
|
|
|
|
Posted: Oct 18, 2012 |
[ # 5 ]
|
|
Member
Total posts: 14
Joined: Oct 17, 2012
|
Thanks alot guys that would help me ..
I have another questions:
how can I know more about grammar rules + generative grammars as I am trying to do my project so I can use it to generate the dialogue when I talk with the agent and doing the semantic represnetation ??
which chatterbot is a good example and considered as a best chatterbot created untill now ??
|
|
|
|
|
Posted: Oct 18, 2012 |
[ # 6 ]
|
|
Senior member
Total posts: 498
Joined: Oct 3, 2008
|
> http://www.meta-guide.com/home/about/best-of-the-best-videos/best-natural-language-parsing-videos
I recently put together a Meta Guide webpage on “Best Natural Language Parsing Videos”, with links to other pages on various kinds of parsers.
> http://www.meta-guide.com/home/about/best-of-the-best-videos/100-best-decision-tree-videos
I’ve also put together a webpage on “100 Best Decision Tree Videos”, with links to pages on other kinds of “trees”.
= = =
I like Robert’s term “grammar agents” to describe these kinds of conversational agents; but, there is almost nothing in the academic literature referring directly to “grammar agents” as such.
Jan, can you briefly describe in general terms (or post a link) how your “decision trees” work with your “neural network” to generate a natural language response?
And, what is the relation of trees to graphs, if any?
|
|
|
|
|
Posted: Oct 18, 2012 |
[ # 7 ]
|
|
Member
Total posts: 14
Joined: Oct 17, 2012
|
Brilliant
Jan please can you explain more about decision tree I am thinking to use induction decsion trees as well and some of machine learning methods as well
|
|
|
|
|
Posted: Oct 18, 2012 |
[ # 8 ]
|
|
Senior member
Total posts: 697
Joined: Aug 5, 2010
|
Decision trees are simply an easy model to create in my neural network. Basically, one part of the network forms the data section, structured in a tree, another part of the network is responsible for interpreting the structure (the code).
There are data trees to match against the thesaurus, patterns, spell checker, or you can automatically build trees for doing statistical machine learning
I’ve included a few images of some data structures.
Image Attachments
|
|
|
|
|
Posted: Oct 18, 2012 |
[ # 9 ]
|
|
Senior member
Total posts: 697
Joined: Aug 5, 2010
|
Image Attachments
|
|
|
|
|
Posted: Oct 18, 2012 |
[ # 10 ]
|
|
Senior member
Total posts: 697
Joined: Aug 5, 2010
|
Image Attachments
|
|
|
|
|
Posted: Oct 18, 2012 |
[ # 11 ]
|
|
Senior member
Total posts: 498
Joined: Oct 3, 2008
|
> http://www.meta-guide.com/home/bibliography/google-scholar/decision-tree-dialog-systems-2011
Okay, I made a new Meta Guide webpage for “Decision Tree & Dialog Systems 2011”.
> http://www.meta-guide.com/home/bibliography/google-scholar/random-forest-dialog-systems
And, I also made one for “Random Forest & Dialog Systems”.
= = =
Basically, these pages represent a quick and dirty recent literature review. It was interesting for me that just in 2011 there were over 200 papers mentioning decision trees and dialog systems, which is a large number; to me, this means that this technique is much more popular than I had realized.
Perhaps logically enough, a random forest can be defined as many decision trees. There were not that many papers from the past ten years mentioning random forests and dialog systems; however, as usual I ran a word cloud on my results, and fascinatingly EMOTION popped out on top. I interpret this to mean that random forests are most often used in dialog systems for the purpose of computing affect.
|
|
|
|
|
Posted: Oct 18, 2012 |
[ # 12 ]
|
|
Senior member
Total posts: 498
Joined: Oct 3, 2008
|
So then, can it be said that there are three main kinds of dialog systems?
1) Pattern matching
2) Probabilistic
3) Grammar agents
I’m still not clear about what the major examples of “grammar agents” are. For instance, are there examples of open source dialog systems based on “grammar parsing”, or implemented “grammar parsing” dialog systems presented online in an interactive format??
|
|
|
|
|
Posted: Oct 19, 2012 |
[ # 13 ]
|
|
Senior member
Total posts: 697
Joined: Aug 5, 2010
|
Perhaps logically enough, a random forest can be defined as many decision trees. There were not that many papers from the past ten years mentioning random forests and dialog systems; however, as usual I ran a word cloud on my results, and fascinatingly EMOTION popped out on top. I interpret this to mean that random forests are most often used in dialog systems for the purpose of computing affect.
Yep, a random forest is just a big set of automatically generated decision trees. The best explanation I have come across is this video. (I think the narrator also Australian)
Since it was originally developed as a statistical tool, most often it is used to classify a true-false kind of thing, so emotions are an easy thing to tag. Though with some adjustments to the structures, you should be able to use it for more than just yes-no kind of things (testing this at the moment).
So then, can it be said that there are three main kinds of dialog systems?
1) Pattern matching
2) Probabilistic
3) Grammar agents
I think 3 is just an advanced version of 1. A grammar definition is a pattern, though a bit more complex (and internally, it can be done a little different).
finally, for good results, you also need nr 2, so perhaps a good bot has some of all 3.
|
|
|
|
|
Posted: Oct 19, 2012 |
[ # 14 ]
|
|
Senior member
Total posts: 147
Joined: Oct 30, 2010
|
Marcus Endicott - Oct 18, 2012: there is almost nothing in the academic literature referring directly to “grammar agents” as such.
I think it’s because academics would rather write papers and talk at conferences than talk to programs. I want to talk to programs, so I try to write agent wrappers for their programs that I can interact with in natural language.
Then I can have another agent ask the grammar agents that wrap the lexparser, link grammar, and montylingua programs things like “what is the object in X”, and use the answer to transform the object into a subject, and make an “In Soviet Russia” joke.
I also want to use the grammar agents to split input sentences such as “Was Abraham Lincoln once president of the United States?” Right now I have to use explicit delimiters:
—-
> Abraham Lincoln was once president of the United States.
Okay, Abraham Lincoln is once president of the United States.
> Was Abraham Lincoln once president of the United States?
Default response.
> Was “Abraham Lincoln” “once president of the United States”?
Yes, Abraham Lincoln is once president of the United States. —-
The idea is to use grammar parsers to find the linguistic delimiters in sentences so I don’t have to use quotation marks to group phrases. (I also need to fix the tense of the answer.) The logicagent should be able to send a string to the lexagent (see http://subbot.org/lexagent/README.txt): “split: Was Abraham Lincoln once president of the United States?” and use the response to look up “Abraham Lincoln” in the graph and see if there’s a path leading to “once president of the United States”.
|
|
|
|
|
Posted: Oct 21, 2012 |
[ # 15 ]
|
|
Member
Total posts: 14
Joined: Oct 17, 2012
|
Hi
guys have a question as well :
in which way the construction grammar related to dialogue generation ??
still dnt get it !! can anyone upload any to help me in that ??
|
|
|
|