coordination links

25 views
Skip to first unread message

Ben Goertzel

unread,
Apr 23, 2013, 11:18:01 AM4/23/13
to link-grammar, Word Grammar
Linas, etc.,

[mostly about link grammar, but a comment about word grammar at the end...]

Ruiting and I have been wondering if the coordination links in the
link grammar really need to be as they are...

For instance, in

"Call me when you are ready"

there is a link

when --- Cs --- you

Why not instead a link like, say,

when --- Cv --- ready

??


In

"Apparently, she loves cheese."

there is a link

Apparently -- CO --- she

Why not instead a link, say

Apparently --- COv --- loves

Or in

"I left soon after I saw you"

why not link "after" to "saw" instead of "I"?

??

Linking the to the verb of the clause seems linguistically much more
natural than linking to the first word of the clause

RelEx has to do a bunch of gymastics to work around this feature of
the link parser.... For instance, RelEx gives

after(leave, see)

from the latter sentence...

Our question is: If these clausal/coordinative links went to the main
verb of the clause, rather than to the first word of the clause, what
would go wrong?

Ruiting is trying to map link parses into trees in a simple way, in
which each word is a node of the tree. And she is trying to assign a
natural "head" to each link parser link. These coordinative links,
that point to the first word of the clause instead of the linguistic
head of the clause, are screwing up these processes.... It is not
clear to me what would go wrong if we just changed the coordinative
liks to point to the head of the clause...

As a perhaps related comment, I believe that in word grammar, the
analogous links would point to the obvious linguistic head of the
clause...

Any thoughts?

Ben



--
Ben Goertzel, PhD
http://goertzel.org

"My humanity is a constant self-overcoming" -- Friedrich Nietzsche

Linas Vepstas

unread,
Apr 23, 2013, 12:55:18 PM4/23/13
to link-grammar, Word Grammar
Hi Ben,

On 23 April 2013 10:18, Ben Goertzel <b...@goertzel.org> wrote:

Ruiting and I have been wondering if the coordination links in the
link grammar really need to be as they are...

For instance, in

"Call me when you are ready"

there is a link

when --- Cs --- you

Why not instead a link like, say,

when --- Cv --- ready

??

I dunno.  Way back when sleator, temperley etal decided to do it that way, and so it stands.  I've seen annoying stuff like this in other cases to; I don't think they held any firm ideas about head-words or ruling words or anything like that, and instead tried to build a grammar that was almost a linear chain of links.

Anyway, a lot of the complexity in RelEx has to do with "fixing" this -- when faced with such a linkage, relex crawls around to find the head-verb, and go from there.

 _predadj(you, ready)
when(call, ready)
_obj(call, me)

The correct fix is probably not to create a Cv link, but instead some variant of a B link, which is already used to connect to the head word of relative clauses.  (Notice that in many examples for the B link, we see that the "R" link functions like C above, connecting to the first word, while the B link connects to the head word.  Extending B would "supplement" C, and maybe allow C to be retired one day?)

In

"Apparently, she loves cheese."

there is a link

Apparently -- CO --- she

Why not instead a link, say

Apparently --- COv --- loves

Similar remarks.  CO is "Clause Opener", and it attaches to the first word of the main sentence, much the same way that LEFT-WALL attaches to the first word (instead of the head word).  CO is generically used to handle exclamations at the start of sentences:   "Dude, she loves ...", "Ahem, she loves ... ", "Yes, ..." 

Again, relex devotes a lot of complex logic to discovering the head-verb of a sentence.

The correct fix would be to first fix LEFT-WALL so that it identifies the head verb, and then to change CO in a similar fashion.  Unfortunately, this would be a fairly significant undertaking.

Or in

"I left soon after I saw you"

why not link "after" to "saw" instead of "I"?

Well, given that the B link already "does the right thing" in many similar situations, the correct set of fixes would be to:
-- extend B to handle your first example sentence
-- extend B or create a new BW link to handle the left-wall, roughly modeled on the above extensions
-- alter CO to be B-like/wall-like.

Linking the to the verb of the clause seems linguistically much more
natural than linking to the first word of the clause

Yes.
 

RelEx has to do a bunch of gymastics to work around this feature of
the link parser.... For instance, RelEx gives

after(leave, see)

from the latter sentence...

Heh. I wrote  the top half of this email before reading the bottom half.
 

Our question is: If these clausal/coordinative links went to the main
verb of the clause, rather than to the first word of the clause, what
would go wrong?

"probably nothing" except that tinkering with this stuff tends to expose a lot of loose ends, exceptions, tricky bits, etc. that can take a good long while to clean up.   

Its clearly more than a few days worth of work; how much more is not clear.  Sometimes, changing things in link-grammar is surprisingly easy, and sometimes its a tedious walk through a long list of exceptions.


Ruiting is trying to map link parses into trees in a simple way, in
which each word is a node of the tree.  And she is trying to assign a
natural "head" to each link parser link.  These coordinative links,
that point to the first word of the clause instead of the linguistic
head of the clause, are screwing up these processes....  It is not
clear to me what would go wrong if we just changed the coordinative
links to point to the head of the clause...

Yes, understood. In terms of  time and effort, its probably wiser and easier to fix link-grammar to "do the right thing", instead of trying to work around this in higher layers of code. 

--linas

Ben Goertzel

unread,
Apr 24, 2013, 12:58:26 AM4/24/13
to link-g...@googlegroups.com, Word Grammar
Thanks for the detailed reply.... It seems you're right that
extending B-links is the way to go, if the link grammar dictionary is
to be modified to fix these issues...

ben
> --
> You received this message because you are subscribed to the Google Groups
> "link-grammar" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to link-grammar...@googlegroups.com.
> To post to this group, send email to link-g...@googlegroups.com.
> Visit this group at http://groups.google.com/group/link-grammar?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.

Ben Goertzel

unread,
Apr 24, 2013, 3:25:40 AM4/24/13
to link-g...@googlegroups.com, Word Grammar
My feeling is that all the coordination links could/should be changed
to (basically) point to the main verb rather than the start of the
phrase/clause being coordinated.... I think this would be a big step
toward making the link grammar into an implementation of (some
variation on) word grammar, actually.... (Another part is assigning a
head to each link parser link, but Ruiting is making good headway on
that already...)

However, what Ruiting really needs to do right now is not necessarily
that thoroughgoing. What she needs to do is to elegantly map each
link grammar parse into a directed tree, with a word at each node.
The CO links clearly are an obstacle to this (with CO links as
currently implemented, one can map a link parse into a tree, but then
once one adds arrows to the links, there is no single root to the
tree). But it's not clear that *all* the awkward coordination links
need to be fixed in order to enable the mapping of parses into
trees.... Maybe more than just CO needs to be fixed, but I think a
lot of the awkward coordination stuff can stay...

So what she is likely to do is: Fix whatever needs to be fixed to
nicely map link parses into directed trees with a word at each node...
and leave other fixes for later...

If the link parses can be sensibly mapped into trees in this way, then
automated mining of corpuses of link parses can be straightforwardly
done using frequent subtree mining tools, which will be very helpful
for multiple reasons...

-- Ben G

Linas Vepstas

unread,
Apr 24, 2013, 12:52:28 PM4/24/13
to link-grammar, Word Grammar, Ruiting Lian
Hi Ben,

Sounds reasonable to me.  Procedures: If Ruiting is going to do this, she should talk to me early and often.   I do NOT want to see one giant, huge patch a year from now: I want a bunch of small, simple changes, with example sentences, etc.  I can help (a lot) with explanations of how things currently work, how they should work, etc.

I believe that the easiest way to do this is in the order I mentioned before: 

1) Change/enhance the B link to get the desired linkage for the demo sentences.  This should be a small-enough task to be good warm-up exercise (although its still a fairly large and tricky task, especially for someone who has never had to modify link-grammar dictionaries before).  It would be a lot better if we could find some easier tasks for Ruiting to get her feet wet.  Sometimes this stuff is easy, an sometimes its hard.

2) Invent a new link, lets say "BW", that connects between the LEFT-WALL and the root verb.  

3) Modify the CO link to behave like this new BW: i.e. it connects the clause-opener to the root verb of the main clause.

I'm making 3) be the last step, not the first, because CO already behaves a lot like a wall-link, and its fairly isolated in how it appears in the dicts, and therefor will be easy to implement, once one has learned, from steps 1&2, how to correctly find the root verb.

OK?

-- Linas


Ben Goertzel

unread,
Apr 24, 2013, 1:01:06 PM4/24/13
to link-g...@googlegroups.com, Word Grammar, Ruiting Lian
Sounds reasonable to me... I will discuss with Ruiting tomorrow ;)

ben

Lian Ruiting

unread,
Apr 25, 2013, 4:29:26 AM4/25/13
to Linas Vepstas, link-grammar
Hi Linas,

Thanks a lot for the instructions in details. 

At first, I thought about ignoring the LEFT-WALL to generate a parsed tree from the Link Parser output, but after running a bunch of examples, it appeared "LEFT-WALL" is useful for many cases, which made me think more about the connection between LEFT-WALL and the root verb...

For 2), I noticed there's "Wd" in the current dictionary, which connects between the LEFT-WALL and the noun/pronoun/.. and "Ws/Wq/Wj" for connection between "LEFT-WALL" and the "question word", as the same principle as "C" link, it seems.  So I wonder if it's necessary to create a new link to connect LEFT-WALL with the root verb rather than modify the "W*" link.

I'll ask more questions after I run through all the link types from the current dictionary ;-) 

Thanks.

--
Ruiting Lian

Linas Vepstas

unread,
Apr 25, 2013, 11:40:36 AM4/25/13
to Lian Ruiting, link-grammar

I do not want to modify the W link because it risks breaking too much stuff.  That is, I'd like to leave W the way it is, for "backwards compatibility".   I believe that it would be simpler/clearer to just create a new link that does connect to the root verb.   

Yes, W and C and R are all similar to one another.

The new link should be similar to the B link.  Notice how B brackets, or creates a loop over C and R -- likewise the new link would do the same, but for W.

While looking over the examples, I found this:

  "Jane screamed and Fred ran"

which begs a question: how should it be linked?  (it works today; how would it look after changes?)

-- Linas

Dick Hudson

unread,
Apr 25, 2013, 4:40:46 PM4/25/13
to link-g...@googlegroups.com
Hello linkers - I've read this exchange, and although I don't understand much I can see that you're trying to modify your parse structures in the direction of WG structures, so I'm very keen to help if I can. Here's a nice concrete question I can comment on:

    "Jane screamed and Fred ran"

An incremental WG parse would treat "Jane screamed" as normal, but "and" would create the end of one 'word string' (a continuous string of words) just before it and the start of another one after it:

    "Jane <-s- screamed] and [Fred ran"

As the parse continues to the right, one aim will be to find an analysis of the whole sentence which has two word strings which share the same external relations; so the parser tries to enclose as little as possible within the brackets, so as to maximize the sharing. If the next word after "and" had been "ran", we can enclose just "screamed" and "ran" so that they both share the subject link to "Jane":

    "Jane <-s- [screamed] and [ran]"

But in fact the next word is "Fred", which can't share any relations with "screamed", so we have to extend the second bracket to include "ran", with nothing at all shared:

    "[Jane <-s- screamed] and [Fred <-s- ran]"

I don't know whether that helps, but I hope it does.

Dick
Richard Hudson (dickhudson.com)

Linas Vepstas

unread,
Apr 25, 2013, 5:30:41 PM4/25/13
to link-grammar
Dick, 

link-grammar has a special 'word', called LEFT-WALL, which is always the first word in any sentence.  From the parser's point of view, its just another, ordinary word, and the rules of the game are that the parser must find some way of attaching all words to one-another, including this one.

I don't know why this concept was introduced; it presumably make some or another parse rule work more easily, or directly, or correctly, whatever.   It might be possible to get rid of it; but, for historical and backwards compatibility reasons, I'd rather not; at least, not yet.

Now, due to a historical accident aka stupidity, LEFT-WALL usually links to the first (real) word of a sentence. In retrospect, it should have linked to the root verb of the sentence, and the proposal on the table is to fix that.  Viz:

    +-- BW -> ------+
    |               |
    |       +- <-S -+          
    |       |       |          
LEFT-WALL Jane screamed

We're entirely in agreement that "[Jane <-s- screamed] and [Fred <-s- ran]",  but my question was what to do with that dangling "and".  

Perhaps the right solution is to have an arrow that points from LEFT-WALL to "and", and then have two arrows from "and", one arrow pointing to "screamed", the other pointing to "ran".   Or perhaps something else.

It wasn't meant to be a hard question;  frankly, the above solution seems to be "too obvious to be wrong".  But "obvious" is not a reliable friend.

-- Linas

Ben Goertzel

unread,
Apr 25, 2013, 8:14:07 PM4/25/13
to link-g...@googlegroups.com
> Now, due to a historical accident aka stupidity, LEFT-WALL usually links to
> the first (real) word of a sentence.

Sort of. For

"The hungry Ruiting ate the entire cheesecake!"

the LEFT-WALL links to Ruiting not The or Hungry (or Ate)... at least
according to the old, online CMU link parser...

>In retrospect, it should have linked to
> the root verb of the sentence, and the proposal on the table is to fix that.

Right...

ben

Linas Vepstas

unread,
Apr 25, 2013, 8:22:43 PM4/25/13
to link-grammar
On 25 April 2013 19:14, Ben Goertzel <b...@goertzel.org> wrote:
> Now, due to a historical accident aka stupidity, LEFT-WALL usually links to
> the first (real) word of a sentence.

Sort of.  For

"The hungry Ruiting ate the entire cheesecake!"

the LEFT-WALL links to Ruiting not The or Hungry (or Ate)... at least
according to the old, online CMU link parser...

I over-simplified. It links to the first noun.  Usually.  So its not totally stupid. The full explanation/set of examples is at  


 "Jane screamed and Fred ran" is mentioned on that page.

-- Linas

Dick Hudson

unread,
Apr 26, 2013, 3:54:03 PM4/26/13
to link-g...@googlegroups.com
But how to find the root verb of the sentence? Does that mean that you'd
first name the left wall, then find the root verb, and then fill in
everything else? I'd have thought you'd need to fill in all the rest as
part of the procedure for finding the root verb?

Dick

Richard Hudson (dickhudson.com)

Linas Vepstas

unread,
Apr 26, 2013, 6:06:29 PM4/26/13
to link-grammar
No, that's not how it works ... if you read the very first paper (and some of the later ones) on link-grammar, you see this analogy with puzzle-pieces.   The link-grammar 'dictionary' (lexicon) is a box of puzzle-pieces, with different words written on them.  Sometimes, the same word is written on many different shapes.  Some words only occur on only a few shapes.  Whatever.  

The parsing algorithm proceeds like so: when presented with a sentence, it looks up each word in the dictionary, and pulls out all puzzle pieces with that word written on it. It then tries fitting these together, _in every possible way_.  If it finds one (or more) combinations that fit, the parse is declared 'successful', and the puzzle pieces that actually fit are reported.  Else, the sentence is declared 'ungrammatical'.

The craftsmanship here is in designing the shapes of the puzzle pieces.  In this case, its making a modification to various verb-pieces, so that they can attach to the left-wall (and a modification to the left wall such that it is required to connect to verbs).

The parsing algo itself is rather dumb-n-brute-force; it explores all possibilities.  The viterbi algo would work slightly differently, not exploring all possibilities, but pursuing certain likely ones; but that's an unrelated matter.  I suppose one could invent yet other parsing algos, that start with sub-phrases, or nouns, or verbs, or whatever, trying to be more efficient in the search of puzzle-pieces.  But this efficiency-of-search is distinct and mostly unrelated from the shapes of the pieces themselves.

-- Linas

p.s. I'm not sure, you might recoil in shock and horror at how this works.  But the point is that it does work, and that correctly-designed puzzle-pieces will generate dependency parses.  Conversations about things like pied-piping turn into craftsmanship questions, of 'how can I design pieces that can only be hooked together in this one particular way, and block/prevent all other incorrect hookups.'  Its a different mind-set than what you might be expecting...

--
You received this message because you are subscribed to the Google Groups "link-grammar" group.
To unsubscribe from this group and stop receiving emails from it, send an email to link-grammar+unsubscribe@googlegroups.com.

Ben Goertzel

unread,
Apr 26, 2013, 9:59:11 PM4/26/13
to link-g...@googlegroups.com, Word Grammar, opencog
As I understand it:

In both (the syntactic layer of) word grammar and link grammar, each
word comes along with a set of
requirements and a set of options, with both requirement & options of
the form "may/must have a link of type T
going to the right or left" ...

In both cases, parsing is basically an inference process, of the form
"How can I find a way of drawing
typed links between words, that meets all the requirements of all the
words in the sentence, and obeys
certain general constraints as well"

The differences seem to be

-- the general constraints in link grammar are a bit more simplistic
(e.g. link grammar retains planarity,
which word grammar dropped as an absolute requirement some time ago)

-- the links in word grammar (unlike link grammar) are directed (with
an explicitly defined head and tail), which plays into
some of the general constraints in word grammar (e.g. landmark transitivity)

-- the requirements/options in word grammar have been worked out with
cognitive plausibility in mind,
whereas in link grammar they have been worked out with a goal of
making a parser that will accept/parse
grammatical sentences, and reject ungrammatical ones

One lesson I draw from the link grammar parser is that: There seem to
be many different grammar theories that will explain
which sentences are grammatical and which are not... and some these
theories are cognitively plausible and
others are not.... The various theories are likely mathematically
equivalent, but nevertheless have significant differences
from a practical perspective (e.g. an AI perspective).... In many
cases, the link grammar dictionary is not WRONG,
but it's cognitively implausible, and then one has to make complex
combinations of links (as is done in RelEx) to milk
something cognitively plausible out of it.

Word grammar seems to have a much more cognitively plausible lexicon,
but it hasn't been fully written out in a systematic
way...

Thus the project I suggested a number of years ago:

1)
Modify the link grammar dictionary to embody word grammar's
requirements/constraints instead of the link grammar ones. Actually
they are largely the same; the biggest difference I've seen is in
coordination... and then various other weird cases like pied piping
etc. For 80% of grammatical phenomena they are the same...

2)
Modify the link grammar parser to use word grammar's constraints
instead. The standard link grammar parser is not flexible enough for
this, but the Viterbi and SAT link parser are...

...

Unfortunately I have yet not found time for this, nor spare $$ to pay
someone to do it...

However, Getnet Aseffa and I are currently developing a low-cost AI
development shop in Addis Ababa, and once that is fully up and running
later in the year, we may be able to hire someone for this task...
(The first 5 programmers are already on staff, but until July are
mostly being trained in AI, as they have lots of coding experience
plus algorithm/data-structure knowledge, but not much AI
background...).... Medium term, after making a functional word
grammar parser for English, we have an ambition to extend the approach
to African languages, beginning with Amharic.... Hope all this
happens; I'm working to make it so ;)

-- Ben





According to my understanding, word grammar has a similar approach, except
that it's phrased in terms of "inference"..... One views the
constraints and options
associated with each word as logical propositions, and then parsing is
a matter of
finding a logically consistent way of fulfilling all the requirements
of all the words in the
sentence...

Most of the time, this comes out the same way as in link grammar....
But in some cases,
the word grammar constraints are
>> email to link-grammar...@googlegroups.com.
>> To post to this group, send email to link-g...@googlegroups.com.
>> Visit this group at http://groups.google.com/group/link-grammar?hl=en.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "link-grammar" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to link-grammar...@googlegroups.com.
> To post to this group, send email to link-g...@googlegroups.com.
> Visit this group at http://groups.google.com/group/link-grammar?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>



Ben Goertzel

unread,
Apr 28, 2013, 12:22:30 PM4/28/13
to Dick Hudson, link-g...@googlegroups.com, Word Grammar, opencog
On Sun, Apr 28, 2013 at 11:32 PM, Dick Hudson <r.hu...@ucl.ac.uk> wrote:
> That's all very interesting, Ben, and your last paragraph is riveting for me
> because I did my PhD on a language distantly related to Amharic and from
> that part of the world: Beja, spoken mostly in the NE Sudan, but also a bit
> in Eritrea. I applaud your ambition to bring African languages into the
> world of AI.

Ah, very cool!

I don't know any Amharic at all, though I find the writing system
quite beautiful ;) .... However, our "Addis AI Lab" Ethiopia office
is up and running in Addis Ababa as of 2 weeks ago, staffed by 6
Amharic-speakers, so this line of research seems fairly likely to go
forward, in time..

-- Ben

Dick Hudson

unread,
Apr 28, 2013, 11:32:36 AM4/28/13
to link-g...@googlegroups.com, Ben Goertzel, Word Grammar, opencog
That's all very interesting, Ben, and your last paragraph is riveting
for me because I did my PhD on a language distantly related to Amharic
and from that part of the world: Beja, spoken mostly in the NE Sudan,
but also a bit in Eritrea. I applaud your ambition to bring African
languages into the world of AI.

Thanks too to Linas for the very easy explanation of the link-grammar
parser. The database is very much like a WG lexico-grammar, where every
word and every word-class has an entry with various properties including
its dependency needs, and the parser's job is to 'marry' words by
getting them to satisfy each other's needs. But I think the WG
incremental approach is likely to be faster because most words in any
corpus are located right next to the word they depend on, so you'd only
consider more distant links when local ones don't work. And, of course,
according to WG languages are designed so that incremental parsing is
possible, because that's obviously how humans do it. So it'll be
exciting to work with you when you get to that stage of your rethinking.

Best wishes, Dick

Richard Hudson (dickhudson.com)
Reply all
Reply to author
Forward
0 new messages