Hey Jeff, I chaired your session and wanted to remind you of my offer: to host the AJAX app on a DreamHost server.
If you can get permission to release the source code, provide some basic setup/install info, then I can get this puppy running on a public ip address for you.
My apologies for the delay in responding. Things have been a bit crazy around here. I am working on separating the Link Grammar portion of the project so we can deploy it. We may host it ourselves, but if not I will definitely hit you up.
Thanks for the talk. It was very accessible, which is something I find as a culture in the python community! Can you please share the slides for this talk?
In your presentation, you briefly mentioned “common coverage link grammar” for efforts in enhancing Link Grammars based on training data as opposed to hand-crafted rules. I have not been able to find much on this. Could you please provide some pointers to more information on this?
I’m no expert in this area. I understand the Linas Vepstas has been doing some work on this as part of a rewrite of LinkGrammar. You can find his homepage here: http://linas.org/
I’d also suggest joining the linkgrammar mailing list and asking your question there. Lots of knowledgeable folks and Linas will generally respond to such questions. https://groups.google.com/forum/#!forum/link-grammar
Thanks for the good introduction to link grammar.
I have a question: is it possible to traverse the parse tree using pylinkgrammar? because it seems that Linkage and Link objects contain links and words as strings not as pointers or references to other sentences.
You can access a nested constituent phrase structure from a Linkage object like so:
>>> from pylinkgrammar.linkgrammar import Parser
>>> p = Parser()
>>> linkage = p.parse_sent('The quick brown fox jumped over the lazy dog.')[0]
>>> linkage.constituent_phrases_nested
For some reason, WordPress won’t display the result, but basically it’s a nested list of lists with the constituent phrases. Try it and let me know if you run into any problems.
Thanks Jeff.
This displays the constituent structure, but it lacks some important information that exists in the linkage like whether a noun is a subject or object etc.
For example:
in the constituent structure generated: (NP The quick brown fox) and (NP the lazy dog) both means that these phrases are Noun Phrases.
But linkages show more information: “the quick.a brown.a fox” is linked to the verb “jumped” using the “Ss” link which means it’s a subject. (http://www.link.cs.cmu.edu/link/dict/section-S.html)
while “the lazy dog” is conencted to “Js” which means it’s an object (http://www.link.cs.cmu.edu/link/dict/section-J.html).
The Linkage objects generated in the python library have the links in form of strings so it’s tricky to use them.
Link Grammar can’t be transversed like a tree because it doesn’t have a head node. It is just a collection of links that meet certain criteria. It might be possible to bring some more of the “link” information into the tree structure of the constituent data structure, but that seems non-trivial to me (and I’m not the developers of Link Grammar, just the Python bindings).
You can, of course, access all of the link information through the Linkage and Link objects, like:
from pylinkgrammar.linkgrammar import Parser
p = Parser()
l = p.parse_sent('The quick brown fox jumps over a lazy dog.')[0]
print l.links
I’ve thought about it some more since my last comment. I see what you’re asking for now..
Unfortunately, the way the bindings are written now, what you get from the C library is just the words, not like an index or something which would allow you to link to the specific words. Which is bad, because then if you have the same word twice, you don’t know which word is which.
Obviously the library has this information since it can produce the parse tree diagram.
It’s definitely something worth looking into. I haven’t been doing as much lately with LinkGrammar, but I would be happy to entertain a pull request. Here is the public repo: https://bitbucket.org/metametrics/pylinkgrammar/
hey i would your help as i m trying to install link grammar with pip on fedora but it keeps on giving errors any idea how it can be done as i m new to python and fedora
Hey Jeff, I chaired your session and wanted to remind you of my offer: to host the AJAX app on a DreamHost server.
If you can get permission to release the source code, provide some basic setup/install info, then I can get this puppy running on a public ip address for you.
Let me know!
Hey Duncan, thanks for following up!
My apologies for the delay in responding. Things have been a bit crazy around here. I am working on separating the Link Grammar portion of the project so we can deploy it. We may host it ourselves, but if not I will definitely hit you up.
Thanks again.!
Hey Jeff –
Thanks for your presentation at PyCon2012. You were going to look into making your localhost “lexile lab” available. Any progress on that?
We are working on separating the components that we can release publicly.
I’ll make a post on this blog when we put something up!
Hi Jeff,
Thanks for the talk. It was very accessible, which is something I find as a culture in the python community! Can you please share the slides for this talk?
Thanks
Hi Jeff,
In your presentation, you briefly mentioned “common coverage link grammar” for efforts in enhancing Link Grammars based on training data as opposed to hand-crafted rules. I have not been able to find much on this. Could you please provide some pointers to more information on this?
Thanks
I’m no expert in this area. I understand the Linas Vepstas has been doing some work on this as part of a rewrite of LinkGrammar. You can find his homepage here: http://linas.org/
I’d also suggest joining the linkgrammar mailing list and asking your question there. Lots of knowledgeable folks and Linas will generally respond to such questions. https://groups.google.com/forum/#!forum/link-grammar
Good luck!
Thanks for the good introduction to link grammar.
I have a question: is it possible to traverse the parse tree using pylinkgrammar? because it seems that Linkage and Link objects contain links and words as strings not as pointers or references to other sentences.
thanks
You can access a nested constituent phrase structure from a Linkage object like so:
>>> from pylinkgrammar.linkgrammar import Parser
>>> p = Parser()
>>> linkage = p.parse_sent('The quick brown fox jumped over the lazy dog.')[0]
>>> linkage.constituent_phrases_nested
For some reason, WordPress won’t display the result, but basically it’s a nested list of lists with the constituent phrases. Try it and let me know if you run into any problems.
Thanks Jeff.
This displays the constituent structure, but it lacks some important information that exists in the linkage like whether a noun is a subject or object etc.
For example:
in the constituent structure generated: (NP The quick brown fox) and (NP the lazy dog) both means that these phrases are Noun Phrases.
But linkages show more information: “the quick.a brown.a fox” is linked to the verb “jumped” using the “Ss” link which means it’s a subject. (http://www.link.cs.cmu.edu/link/dict/section-S.html)
while “the lazy dog” is conencted to “Js” which means it’s an object (http://www.link.cs.cmu.edu/link/dict/section-J.html).
The Linkage objects generated in the python library have the links in form of strings so it’s tricky to use them.
Ahh, I think I understand your question now.
Link Grammar can’t be transversed like a tree because it doesn’t have a head node. It is just a collection of links that meet certain criteria. It might be possible to bring some more of the “link” information into the tree structure of the constituent data structure, but that seems non-trivial to me (and I’m not the developers of Link Grammar, just the Python bindings).
You can, of course, access all of the link information through the Linkage and Link objects, like:
This yields
You can access the left link, right link, left word, right word, etc. from the Link object.
I’ve thought about it some more since my last comment. I see what you’re asking for now..
Unfortunately, the way the bindings are written now, what you get from the C library is just the words, not like an index or something which would allow you to link to the specific words. Which is bad, because then if you have the same word twice, you don’t know which word is which.
Obviously the library has this information since it can produce the parse tree diagram.
It’s definitely something worth looking into. I haven’t been doing as much lately with LinkGrammar, but I would be happy to entertain a pull request. Here is the public repo: https://bitbucket.org/metametrics/pylinkgrammar/
Hope this helps!
Sorry to not be able to provide more.
hey i would your help as i m trying to install link grammar with pip on fedora but it keeps on giving errors any idea how it can be done as i m new to python and fedora
The LinkGrammer folks have moved beyond my initial attempt at Python bindings.
Check https://github.com/opencog/link-grammar for the latest version which include Python bindings that better map to core functionality of LinkGrammar
hey i m trying to install link grammar on fedora but i am getting alot of errors and as i am new to both fedora and python if you can help me with it
The LinkGrammer folks have moved beyond my initial attempt at Python bindings.
Check https://github.com/opencog/link-grammar for the latest version which include Python bindings that better map to core functionality of LinkGrammar