How to install link-grammar in Ubuntu

431 views
Skip to first unread message

amit

unread,
Apr 12, 2010, 3:54:25 PM4/12/10
to link-grammar
Hi,
I have downloaded the latest version (http://www.abisource.com/
downloads/link-grammar/4.6.6/link-grammar-4.6.6.tar.gz) but don't know
how to install it. Could anyone please guide me through proper
installation?

I was thinking of sth like $ make

Thanks,

Vamsi Krishna Davuluri

unread,
Apr 12, 2010, 4:45:16 PM4/12/10
to link-g...@googlegroups.com
Ubuntu already has this package[1], you would
just have to install it using:
$ sudo apt-get install liblink-grammar4

If you insist on source builds, it would be better
if you go through README in the root directory
of your software. If not at least go through
INSTALL(when available). After following them,
if you still have problems show us a trace/log of
it, and we will try to help.
you.

Cheers,
Vamsi

[1]http://packages.ubuntu.com/karmic/link-grammar

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

frostshoxx

unread,
Apr 12, 2010, 5:23:08 PM4/12/10
to link-grammar
My trick on getting the latest version link-grammar to install on
ubuntu is

1. Using the apt-get just like what Vamsi has suggested.
2. The apt-get would install all dependencies for the link-grammar
before install it.
3. If the link-grammar is an older version than what you want to do,
remove it, but keep the dependencies.
4. Install the latest link-grammar. Voila! :)

Anyhow, RTFM is still the way to solve most of the problem in the
universe.

On Apr 12, 4:45 pm, Vamsi Krishna Davuluri <vamsi.davul...@gmail.com>
wrote:

amit

unread,
Apr 13, 2010, 3:15:11 AM4/13/10
to link-grammar
Thanks to both of you for letting me know about this. I was installing
it separately. I need to include this parser in one of the perl
modules ( Lingua::LinkParser) but I keep getting error about the link-
grammar. It looks like link-grammar hasn't been included properly.

The content of Makefile.PL for this LinkParser module is:

WriteMakefile(
'NAME' => "Lingua::LinkParser",
'VERSION_FROM' => "lib/Lingua/LinkParser.pm",
'DEFINE' => "-DDICTIONARY_DIR=\\\".\\\"",

## if your libs are in a nonstandard location, changes these,
i.e.:
# 'LIBS' => "-L/dbrian/link-grammar-4.4.3/link-grammar/.libs/
-llink-grammar",
# 'INC' => "-I/dbrian/link-grammar-4.4.3/link-grammar/",
'LIBS' => "-llink-grammar",
'INC' => "-I/usr/local/include/link-grammar/",
'OBJECT' => "",
);

Could you please let me know what should the path of LIBS and INC be
for the link-grammar?

Thank you for your time in advance.

Vamsi Krishna Davuluri

unread,
Apr 13, 2010, 9:25:32 AM4/13/10
to link-g...@googlegroups.com
Reading the makefile, it tells me that its looking in your default
dynamic library and the default link-grammar include paths.

If you have done a standard install of link-grammar:
$ ./configure
$ make
$ sudo make install

This should work.

You might want to see (afterwards) if the linkgrammar .so files are in 
any of the default LD library locations in your system.

I think they should be listed in /etc/ld.so.conf.

--Vamsi

Danny Brian

unread,
Apr 13, 2010, 11:28:10 AM4/13/10
to link-g...@googlegroups.com
Hi amit -

Per the README with Lingua::LinkParser:

INSTALLATION

Before you build this package, it is highly recommended that you install
the link parser package with 'make install', which will put the libs,
headers, and dictionary files in standard locations. This build no longer
prompts for package directories, so if you want to build with non-standard
locations, you'll need to edit Makefile.PL to make that happen. In
particular,
pay attention to the INCLUDE parameter.

Do a standard installation of the link grammar package (like Vamsi
said), and then try to build Lingua::LinkParser.

- Danny

amit

unread,
Apr 15, 2010, 9:24:04 AM4/15/10
to link-grammar
Hi,
I can run link-grammar easily from shell which confirms that have
correctly installed link-grammar. It's just that I am not able to
provide a correct INC and LIB path to this perl module
(Lingua:LinkParser). I don't know where i can find these link-grammar
includes and libs. I searched for link-grammar from root directory and
found these places only:

/usr/share/doc/link-grammar
/usr/share/link-grammar
/usr/share/menu/link-grammar
/etc/perl/link-grammar

Looking forward to you response soon.

Thanks,
Amit

Linas Vepstas

unread,
Apr 15, 2010, 11:42:16 AM4/15/10
to link-g...@googlegroups.com
On 15 April 2010 08:24, amit <joshiami...@gmail.com> wrote:
Hi,
 I can run link-grammar easily from shell which confirms that  have
correctly installed link-grammar.

what does "which link-parser" say?  It should say /usr/local/bin/link-parser

If you indeed "install correctly", the libraries should be in /usr/local/lib
and the include files in /usr/local/include.

--linas

Danny Brian

unread,
Apr 15, 2010, 1:05:13 PM4/15/10
to link-g...@googlegroups.com
Amit -

If you have not done a normal install, I don't know where your lib and
include files would be. Assuming you have followed the link parser
instructions (make installing to default locations), can you provide
the output of these?

% perl -v
% uname -a
% perl Makefile.PL
% ldconfig; ldconfig -p | grep link

Rich Elk

unread,
Apr 15, 2010, 2:03:41 PM4/15/10
to link-g...@googlegroups.com

Hi Link Grammar Parsers,

 

I am now using Simon Stuart's excellent Windows dll, along with some GUI stuff to manage it in Windows Vista, using Delphi 7.  Delphi 7 is rumored to port well to a variety of Linuxes, but I haven't personally done so.  

 

Now that I can generate parses and examine sentences, my next goal is to generate an evaluatable expression that matches the parse structure.  For example:

 

                          +-------MXs------+          

              +-----Os----+     +----Xd----+          

    +----Wi---+    +--Ds--+     |  +---Ds--+----Xc----+

    |         |    |      |     |  |       |          |

LEFT-WALL choose.v a sentence.n , any sentence.n RIGHT-WALL

 

I want to translate the linkage data structure, as shown above, into something that looks like this:

 

(MXs (Os ‘(Wi LEFT-WALL choose.v)

         ‘(Ds a sentence.n))

     (Xd ‘, ‘(+ ‘(Ds any sentence.n)

                ‘(Xc sentence.n RIGHT-WALL))))

 

Sorry for the lisp, it could just as well be interpreted using Delphi 7 procedure calls as lisp calls, but the data structure describing the parse is what I am most interested in. 

 

Has anyone else gotten interested in this kind of representation for LGP parses?  It would nice to know what issues and successes you had.  

 

Curiously,

-Rich

 

Sincerely,

Rich Cooper

EnglishLogicKernel.com

Rich AT EnglishLogicKernel DOT com

9 4 9 \ 5 2 5 - 5 7 1 2

Linas Vepstas

unread,
Apr 15, 2010, 3:55:39 PM4/15/10
to link-g...@googlegroups.com
On 15 April 2010 13:03, Rich Elk <richco...@gmail.com> wrote:
 

Now that I can generate parses and examine sentences, my next goal is to generate an evaluatable expression that matches the parse structure.  For example:

 

                          +-------MXs------+          

              +-----Os----+     +----Xd----+          

    +----Wi---+    +--Ds--+     |  +---Ds--+----Xc----+

    |         |    |      |     |  |       |          |

LEFT-WALL choose.v a sentence.n , any sentence.n RIGHT-WALL

 

I want to translate the linkage data structure, as shown above, into something that looks like this:

 

(MXs (Os ‘(Wi LEFT-WALL choose.v)

         ‘(Ds a sentence.n))

     (Xd ‘, ‘(+ ‘(Ds any sentence.n)

                ‘(Xc sentence.n RIGHT-WALL))))



Huh. That's an interesting way to do it.

From personal experience, one can spend an endless amount of time thinking about the
"best" way to represent  this kind of data, with no obvious answer in sight. I've personally
discovered the need for several features in the representation:

a) the need to annotate a word instance with additional data -- e.g. "choose.v is a verb"
   and "choose.v is present tense" and "the meaning of choose.v is wordnet entry choose::2:001:1"

b) the need to assign floating point scores to relations e.g.    "the meaning of choose.v
    is wordnet entry choose::2:001:1 with probability 0.7" and "the meaning of choose.v
    is wordnet entry choose::2:023:4" with probability 0.3"

c) The need for cross-text relations "the word she in sentence 2 is probably Jane in
   sentence 1 with probability 0.7"

The opencog infrastructure currently allows me to do the above, although it has many
drawbacks: it remains hard-to-use, seems bloated, and isn't parallel/distributed. But its
the best I've got.

I have one problem which I have *NOT* yet solved, but which I would very much like do:
condensing multiple parses into one.   Some sentences are ambiguous: e.g. "I saw the man
with the telescope". I'd like to have a notation which indicates which parts are the same for
all parses, and which parts vary.   There are currently no interfaces in link-grammar to
spit this out. I'd like to have these.

--linas

amit

unread,
Apr 15, 2010, 6:16:07 PM4/15/10
to link-grammar
Thanks for the useful suggestion.
output of "which-link-parser"
/usr/bin/link-parser

I searched for link-grammar/link-parser inside usr/lib/ and usr/local/
lib but couldn't find. Similarly no link-grammar inside usr/include
and user/local/include


On 15 Apr, 16:42, Linas Vepstas <linasveps...@gmail.com> wrote:
> On 15 April 2010 08:24, amit <joshiamitkris...@gmail.com> wrote:
>
> > Hi,
> >  I can run link-grammar easily from shell which confirms that  have
> > correctly installed link-grammar.
>
> what does "which link-parser" say?  It should say /usr/local/bin/link-parser
>
> If you indeed "install correctly", the libraries should be in /usr/local/lib
> and the include files in /usr/local/include.
>
> --linas

Linas Vepstas

unread,
Apr 15, 2010, 7:55:48 PM4/15/10
to link-g...@googlegroups.com
On 15 April 2010 17:16, amit <joshiami...@gmail.com> wrote:
Thanks for the useful suggestion.
output of "which-link-parser"
/usr/bin/link-parser

I searched for link-grammar/link-parser inside usr/lib/ and usr/local/
lib but couldn't find. Similarly no link-grammar inside usr/include
and user/local/include


What does "ldd  /usr/bin/link-parser" say?

Mine says:


    linux-gate.so.1 =>  (0x007a0000)
    libedit.so.2 => /usr/lib/libedit.so.2 (0x007f7000)
    libncurses.so.5 => /lib/libncurses.so.5 (0x00bf8000)
    liblink-grammar.so.4 => /usr/local/lib/liblink-grammar.so.4 (0x00262000)
    libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0x00cbe000)
    libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0x002a4000)
    libbsd.so.0 => /lib/libbsd.so.0 (0x00570000)
    libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0x00110000)
    /lib/ld-linux.so.2 (0x00116000)


Notice the fourth line down ...


--linas

Dan Brian

unread,
Apr 15, 2010, 8:02:02 PM4/15/10
to link-g...@googlegroups.com
Linas -

My understanding is that he is able to run link-parser without
trouble, but that his installation of Lingua::LinkParser is failing.

Rich Elk

unread,
Apr 15, 2010, 8:03:55 PM4/15/10
to link-g...@googlegroups.com

Hi Linas,

 

Yes, that is an interesting thing to learn;  I am looking at a method, but first I have to figure out just which parses to keep and which to throw away:

 

LV:>I have one problem which I have *NOT* yet solved, but which I would very much like do:


condensing multiple parses into one.   Some sentences are ambiguous: e.g. "I saw the man
with the telescope". I'd like to have a notation which indicates which parts are the same for
all parses, and which parts vary.   There are currently no interfaces in link-grammar to
spit this out. I'd like to have these.

 

Actually, I think keeping all VALUABLE parses would be the best approach, though only experience will show what metrics to sort by, which segments to keep, and how to merge them into a single structure for long term storage.  

 

I’ve started by counting things in the parse diagram.  I’ve presently got the number of terminal bars in the line above the parsed text (i.e., the number of terminal symbols actually bound by the parse), the number of total terminal symbols (to divide the first number by for scaling), and the number of nonterminal bars above the last two diagram lines (an inadequate measure of parse tree complexity, it turns out, but more to follow).  

 

Thanks for helping Simon get the Windows version working – it makes things a lot easier for us windows folks who can’t park our pipes uncrossed!  Here is an image you might be interested in:

 

 

At this point, I’ve implemented the three metrics above for the Nth parse, which display on the form when the Nth button is pressed at top (right under “Mary had ..” at the top of the form).  So the above is the 21st parse of the sentence “Mary had a little lamb, its fleece were white as snow, and everywhere that Mary went the lamb was sure to go”.  

 

Other useful measures might include the number of verbs, nouns, adjectives as a percentage of total symbols.  But I will have to experiment for a while to see what works best in selecting a really good parse or five from a set of many, many parses which need not be stored.  

 

Thanks for a great dll to work with!

 

HTH,

-Rich

 

Sincerely,

Rich Cooper

EnglishLogicKernel.com

Rich AT EnglishLogicKernel DOT com

9 4 9 \ 5 2 5 - 5 7 1 2

--

You received this message because you are subscribed to the Google Groups "link-grammar" group.
To post to this group, send email to link-g...@googlegroups.com.
To unsubscribe from this group, send email to link-grammar...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/link-grammar?hl=en.

image001.jpg

Linas Vepstas

unread,
Apr 15, 2010, 8:12:53 PM4/15/10
to link-g...@googlegroups.com
On 15 April 2010 19:02, Dan Brian <d...@brians.org> wrote:
Linas -

My understanding is that he is able to run link-parser without
trouble, but that his installation of Lingua::LinkParser is failing.


I'm thinking that he installed an older apt-get package, which
would work but not have the header files.

(The solution would be to uninstall the package, and then,
as root, "make install", which would put the binary into
/usr/local/bin instead of /usr/bin, and would put the header
files in the expected location, and eventually lead to a
successful perl install).

However, the fact that he can't find the libraries is bizarre.

--linas

Linas Vepstas

unread,
Apr 15, 2010, 8:22:11 PM4/15/10
to link-g...@googlegroups.com
On 15 April 2010 19:03, Rich Elk <richco...@gmail.com> wrote:

Hi Linas,

 

Yes, that is an interesting thing to learn;  I am looking at a method, but first I have to figure out just which parses to keep and which to throw away:

Actually, I think keeping all VALUABLE parses would be the best approach, though only experience will show what metrics to sort by,


Well, the default sort order is such that it already tries to present the "best" parse first.  How it determines this is fairly technical, but suffice it to say, I beleive that this will be hard to improve on without employing *very* sophisticated techniques.

--linas

Linas Vepstas

unread,
Apr 15, 2010, 8:29:37 PM4/15/10
to link-g...@googlegroups.com
On 15 April 2010 19:03, Rich Elk <richco...@gmail.com> wrote:

Thanks for helping Simon get the Windows version working –


What version?  I notice that the example you sent is from an older version, from at least 1/2 year ago or older.  Or, at least, if the binary is the newest, that binary is using an older dictionary.

--linas

Rich Cooper

unread,
Apr 16, 2010, 12:20:38 AM4/16/10
to link-g...@googlegroups.com

Linas,

 

How do you know the version from that example?  I have no idea what version I am using, so it would be useful to know.  

 

Also, in that version, the first half of the linkages (numbered 0 to 14 or so) are very bad, with very low coverage, but the 19th and 21st linkages are fully 100% covering every symbol in “Mary ..” – all 24 of them!

 

So I don’t think its necessarily true that the first linkage is the best, or even very good, compared to others.  

 

-Rich

 

Sincerely,

Rich Cooper

EnglishLogicKernel.com

Rich AT EnglishLogicKernel DOT com

9 4 9 \ 5 2 5 - 5 7 1 2


From: link-g...@googlegroups.com [mailto:link-g...@googlegroups.com] On Behalf Of Linas Vepstas
Sent: Thursday, April 15, 2010 5:30 PM
To: link-g...@googlegroups.com
Subject: Re: [Link Grammar] Generating an evaluatable expression from a parse linkage

 

 

On 15 April 2010 19:03, Rich Elk <richco...@gmail.com> wrote:

Mike Ross

unread,
Apr 16, 2010, 12:38:57 AM4/16/10
to link-g...@googlegroups.com
> I have one problem which I have *NOT* yet solved, but which I would very
> much like do:
> condensing multiple parses into one. Some sentences are ambiguous: e.g. "I
> saw the man
> with the telescope". I'd like to have a notation which indicates which parts
> are the same for
> all parses, and which parts vary. There are currently no interfaces in
> link-grammar to
> spit this out. I'd like to have these.
>
> --linas

Hey Linas --

Just peeked in on the group and saw your comment. Once you extract a
set of relations from the parse why not just index which parses each
relation appears in? For "I saw the man with the telescope" you have:

subj(saw, I) [1.0]
obj(saw, man) [1.0]
with(man, telescope) [0.5]
with(saw, telescope) [0.5]

you can also use these numbers as rough confidence indicators. Im
pretty sure relex had code which did this at one point, though it
probably has not survived to today. Its trivial to implement though.

You can also do the same thing with the linkparser links (MXs, Os,
etc) but you will get far fewer links in common amongst the parses
since many different link patterns might simplify to the same set of
relations.

Mike Ross

Vamsi Krishna Davuluri

unread,
Apr 15, 2010, 11:38:43 PM4/15/10
to link-g...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 16/04/10 5:42 AM, Linas Vepstas wrote:
> On 15 April 2010 19:02, Dan Brian <d...@brians.org> wrote:
>
>> Linas -
>>
>> My understanding is that he is able to run link-parser without
>> trouble, but that his installation of Lingua::LinkParser is failing.
>>
>
> However, the fact that he can't find the libraries is bizarre.
>
> --linas
>

Could be that his make install didn't go successfully, and he might
have a partial install with him at the moment.

It would be nice if he showed us the log of his
make; make install.

- --Vamsi
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJLx9vDAAoJEEwVkZ/pIYk2aRAH+wWGu5c+QBobEETiCsY+mbie
J7l891Fb4gt3U+2pvf1mmMcXHrOS3ywEf7gZhUVnWp4NjmGO8zWColBV5PotnyVT
SbZlthBLFtPPOZo5Bv8OGUCKCiM9/Q0pacLr3+/oDiJWctO1KT/B+jS6w9cdDikk
BgK4+nHy5pra1GvdM64fvJZM6HIAon+cL+jCdE/IzGHL6iDa/r4cNY5wsipT4Wu+
ZQ3dLeoLAzFdwtPs7lue58rYPVdnL67ix/oZi9urjuSNfEPQqb0ZjdzxCh2Vb7N4
SRfNhlT9uJ27IFmbDHuqJ5Ud87YAUP0xYKft9rkumuTo4/Xw7dkwuZKqZkOB0hw=
=oswW
-----END PGP SIGNATURE-----

amit

unread,
Apr 16, 2010, 2:23:22 AM4/16/10
to link-grammar
I got it working finally. It's the old apt-get package. I fetched the
link-grammar manually and then installed it successfully. I could then
easily install Lingua::LinkParser without requiring any modification
in Makefile.PL.

Thanks all of you for wonderful help and proper guidance!

Simon Stuart

unread,
Apr 16, 2010, 9:42:32 AM4/16/10
to link-g...@googlegroups.com

Linas,

Rich Cooper is currently using an older version of the DLL. The one I think he's saying "thanks" about is the code changes made recently which allow the LGP to build successfully in Windows without the necessity to make modifications ourselves.

I have to update my wrapper from that old version to the most up-to-date source (mainly the Structures used to represent options etc.) to allow him to switch to the latest version.

I believe he is saying "thanks" not just to you, but also to Borislav.... if not, then he should be ;)

Regards,
Simon J Stuart

------Original Mail------
From: "Linas Vepstas" <linasv...@gmail.com>
To: <link-g...@googlegroups.com>
Sent: Thu, 15 Apr 2010 19:29:37 -0500


Subject: Re: [Link Grammar] Generating an evaluatable expression from a parse linkage



____________________________________________________________________________
E-Mail scanned by Kaspersky Antivirus (Up To Date)

Simon Stuart

unread,
Apr 16, 2010, 9:44:01 AM4/16/10
to link-g...@googlegroups.com

Rich,

He can tell what version you're using by the parse diagram itself I believe. It is my understanding that since that version of the binary you are currently using was produced, more than a few significant changes have been made which may be quite apparent in the resulting linkage diagrams. I'll get the wrapper I produced for you up to the latest binary in the next few days (time permitting).

Regards,

Simon

------Original Mail------
From: "Rich Cooper" <ri...@englishlogickernel.com>
To: <link-g...@googlegroups.com>
Sent: Thu, 15 Apr 2010 21:20:38 -0700
Subject: RE: [Link Grammar] Generating an evaluatable expression from a parse linkage



Linas,



How do you know the version from that example? I have no idea what version
I am using, so it would be useful to know.



Also, in that version, the first half of the linkages (numbered 0 to 14 or
so) are very bad, with very low coverage, but the 19th and 21st linkages are

fully 100% covering every symbol in "Mary .." - all 24 of them!





So I don't think its necessarily true that the first linkage is the best, or
even very good, compared to others.



-Rich



Sincerely,

Rich Cooper

EnglishLogicKernel.com

Rich AT EnglishLogicKernel DOT com

9 4 9 5 2 5 - 5 7 1 2

_____

From: link-g...@googlegroups.com [mailto:link-g...@googlegroups.com]
On Behalf Of Linas Vepstas
Sent: Thursday, April 15, 2010 5:30 PM
To: link-g...@googlegroups.com
Subject: Re: [Link Grammar] Generating an evaluatable expression from a
parse linkage





On 15 April 2010 19:03, Rich Elk <richco...@gmail.com> wrote:



Thanks for helping Simon get the Windows version working -




What version? I notice that the example you sent is from an older version,
from at least 1/2 year ago or older. Or, at least, if the binary is the
newest, that binary is using an older dictionary.

--linas

--
You received this message because you are subscribed to the Google Groups
"link-grammar" group.
To post to this group, send email to link-g...@googlegroups.com.
To unsubscribe from this group, send email to
link-grammar...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/link-grammar?hl=en.

--
You received this message because you are subscribed to the Google Groups "link-grammar" group.
To post to this group, send email to link-g...@googlegroups.com.
To unsubscribe from this group, send email to link-grammar...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/link-grammar?hl=en.



____________________________________________________________________________
E-Mail scanned by Kaspersky Antivirus (Up To Date)

--

Linas Vepstas

unread,
Apr 16, 2010, 3:18:17 PM4/16/10
to link-g...@googlegroups.com
On 15 April 2010 23:20, Rich Cooper <ri...@englishlogickernel.com> wrote:
>
> How do you know the version from that example?  I have no idea what version
> I am using, so it would be useful to know.

Newer versions print the version number on startup.

> Also, in that version, the first half of the linkages (numbered 0 to 14 or
> so) are very bad, with very low coverage, but the 19th and 21st linkages are
> fully 100% covering every symbol in “Mary ..” – all 24 of them!

I'm guessing that you don't have "union" linkage turned on, and are
mis-interpreting standard disjunct processing for "low coverage".

Try "Mike and Joe looked at it" and ponder the resulting output for a while.

The first parses usually the best. You can toggle display of union linkage
with !union at the command line. Try !help for other options.

Linas Vepstas

unread,
Apr 16, 2010, 3:27:18 PM4/16/10
to link-g...@googlegroups.com
On 15 April 2010 23:38, Mike Ross <mik...@gmail.com> wrote:
>> I have one problem which I have *NOT* yet solved, but which I would very
>> much like do:
>> condensing multiple parses into one.
>
> Just peeked in on the group and saw your comment.  Once you extract a
> set of relations from the parse why not just index which parses each
> relation appears in?  For "I saw the man with the telescope" you have:
>
> subj(saw, I) [1.0]
> obj(saw, man) [1.0]
> with(man, telescope) [0.5]
> with(saw, telescope) [0.5]
>
> you can also use these numbers as rough confidence indicators.

Yes.

I was being too off-handed. What I really want to do is to solve
the O(N^3) performance for long sentences. I think that the best way
to do this is to use viterbi decoding, and thus spit out final results
for the parse of the early parts of the sentence, even if the later parts
of the sentence haven't been fully digested yet.

Done properly, I think this would also help minimize the impact of the
combinatorial explosion of parse alternatives.

Rich Elk

unread,
Apr 16, 2010, 7:29:18 PM4/16/10
to link-g...@googlegroups.com

From the comment below:

On 15 April 2010 23:38, Mike Ross <mik...@gmail.com> wrote:

>> I have one problem which I have *NOT* yet solved, but which I would

>> very much like do:

>> condensing multiple parses into one.

> 

> Just peeked in on the group and saw your comment.  Once you extract a

> set of relations from the parse why not just index which parses each

> relation appears in?  For "I saw the man with the telescope" you have:

> 

> subj(saw, I) [1.0]

> obj(saw, man) [1.0]

> with(man, telescope) [0.5]

> with(saw, telescope) [0.5]

> 

> you can also use these numbers as rough confidence indicators.

 

How do you extract the relations from the parse?  If that involves RelEx, I only have the LGP dll, and not the RelEx inclusion, which isn’t available to me immediately.  

 

Also, what do the “[0.5]” or “[1.0]” markers mean?

 

But getting relational info from the parse is a great thing if it can be done easily, even on Windows.  

 

Thanks for the suggestion!  Every one helps me gain perspective on the software available for LGP.  

 

-Rich

 

 

 

Sincerely,

Rich Cooper

EnglishLogicKernel.com

Rich AT EnglishLogicKernel DOT com

9 4 9 \ 5 2 5 - 5 7 1 2

 

-----Original Message-----
From: link-g...@googlegroups.com [mailto:link-g...@googlegroups.com] On Behalf Of Linas Vepstas
Sent: Friday, April 16, 2010 12:27 PM
To: link-g...@googlegroups.com
Subject: Re: [Link Grammar] Generating an evaluatable expression from a parse linkage

 

On 15 April 2010 23:38, Mike Ross <mik...@gmail.com> wrote:

Rich Cooper

unread,
Apr 16, 2010, 7:33:53 PM4/16/10
to link-g...@googlegroups.com

Sincerely,

Rich Cooper

EnglishLogicKernel.com

Rich AT EnglishLogicKernel DOT com

9 4 9 \ 5 2 5 - 5 7 1 2

-----Original Message-----
From: link-g...@googlegroups.com [mailto:link-g...@googlegroups.com] On Behalf Of Linas Vepstas
Sent: Friday, April 16, 2010 12:18 PM
To: link-g...@googlegroups.com
Subject: Re: [Link Grammar] Generating an evaluatable expression from a parse linkage

 

On 15 April 2010 23:20, Rich Cooper <ri...@englishlogickernel.com> wrote:

> 

> How do you know the version from that example?  I have no idea what version

> I am using, so it would be useful to know.

 

Newer versions print the version number on startup.

 

> Also, in that version, the first half of the linkages (numbered 0 to 14 or

> so) are very bad, with very low coverage, but the 19th and 21st linkages are

> fully 100% covering every symbol in “Mary ..” – all 24 of them!

 

I'm guessing that you don't have "union" linkage turned on, and are

mis-interpreting standard disjunct processing for "low coverage".

 

Try "Mike and Joe looked at it" and ponder the resulting output for a while.

 

RGC: Here are the options setting and the parse for “Mike and Joe ..”

 

 

 

If you are referring to the “display_union” property, yes, I haven’t gotten a driver in place to set it yet, just to look at the settings as in the figures above for that parse.  

 

Notice that there is only one parse for that sentence with the default options and dictionary in place.

 

-Rich

 

 

The first parses usually the best. You can toggle display of union linkage

with !union at the command line.  Try !help for other options.

 

--linas

 

--

You received this message because you are subscribed to the Google Groups "link-grammar" group.

To post to this group, send email to link-g...@googlegroups.com.

To unsubscribe from this group, send email to link-grammar...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/link-grammar?hl=en.

 

image003.jpg
image004.jpg

Rich Cooper

unread,
Apr 16, 2010, 7:49:26 PM4/16/10
to link-g...@googlegroups.com

In this case, display_union was changed to 1, but the parse is unaffected for “Mike ..”:

 

 

 

So perhaps there is more to change than just the display_union property?  Could there be other factors that make it work with better coverage?

 

But with display_union=1, the “Mary .. lamb ..” sentence still parses the same also:

 

Is there something else that should be set for the Options?

 

Thanks,

-Rich

 

Sincerely,

Rich Cooper

EnglishLogicKernel.com

Rich AT EnglishLogicKernel DOT com

9 4 9 \ 5 2 5 - 5 7 1 2

image003.jpg
image004.jpg
image008.jpg
image009.jpg
image010.jpg

Linas Vepstas

unread,
Apr 16, 2010, 8:06:24 PM4/16/10
to link-g...@googlegroups.com
On 16 April 2010 18:33, Rich Cooper <ri...@englishlogickernel.com> wrote:

 

> Also, in that version, the first half of the linkages (numbered 0 to 14 or

> so) are very bad, with very low coverage, but the 19th and 21st linkages are

> fully 100% covering every symbol in “Mary ..” – all 24 of them!

 

I'm guessing that you don't have "union" linkage turned on, and are

mis-interpreting standard disjunct processing for "low coverage".

 

Try "Mike and Joe looked at it" and ponder the resulting output for a while.

 

If you are referring to the “display_union” property, yes, I haven’t gotten a driver in place to set it yet, just to look at the settings as in the figures above for that parse.  


Why don't you try the command-line tool? Its simple, and does the right thing.  Its a good
fallback for comparing fancier systems, such as yours, to what 'should' happen.
  

Notice that there is only one parse for that sentence with the default options and dictionary in place.


Yes, and that parse produces two linkages. The first linkage is "Mike looked at it"
and the second linkage is "Joe looked at it."

 
It seems that your tool fails to print out all of the linkages.
If you print only the first linkage for a sentence that has
conjunctions (and, or, but, ...), it will look as if many of the
words were "skipped".

Again, please use the command line tool to verify the
correctness of your programs.


--linas

Mike Ross

unread,
Apr 17, 2010, 9:18:35 AM4/17/10
to link-g...@googlegroups.com
> How do you extract the relations from the parse?  If that involves RelEx, I
> only have the LGP dll, and not the RelEx inclusion, which isn’t available to
> me immediately.

Yes, relex. Otherwise, you can just extract the links and do the same
thing. But it sounds like Linas's issue wasn't about representation
but about how to compute multiple parses efficiently.

>
>
> Also, what do the “[0.5]” or “[1.0]” markers mean?
>

Percentage of parses the relation appears in. 0.5 means the relation
appeared in 50% or 1 out of the 2 parses.

Cheers,
Mike

Rich Elk

unread,
Apr 17, 2010, 9:00:28 PM4/17/10
to link-g...@googlegroups.com
Thanks Mike and Linas that clears up what I can expect when I get RelEx.

One more question; does RelEx maintain the relational expression of the
parse? Or does it combine those relations without keeping a transactional
set of entries for the sentence?

In other words, with the RelEx output, is there nested structure in the
relational output list, or is it just singular facts about the existing
words in the sentence?

-Rich

Sincerely,
Rich Cooper
EnglishLogicKernel.com
Rich AT EnglishLogicKernel DOT com
9 4 9 \ 5 2 5 - 5 7 1 2
-----Original Message-----
From: link-g...@googlegroups.com [mailto:link-g...@googlegroups.com]
On Behalf Of Mike Ross
Sent: Saturday, April 17, 2010 6:19 AM
To: link-g...@googlegroups.com
Subject: Re: [Link Grammar] Generating an evaluatable expression from a
parse linkage

Linas Vepstas

unread,
Apr 19, 2010, 12:26:09 PM4/19/10
to link-g...@googlegroups.com
On 17 April 2010 20:00, Rich Elk <richco...@gmail.com> wrote:
> Thanks Mike and Linas that clears up what I can expect when I get RelEx.
>
> One more question; does RelEx maintain the relational expression of the
> parse?  Or does it combine those relations without keeping a transactional
> set of entries for the sentence?
>
> In other words, with the RelEx output, is there nested structure in the
> relational output list, or is it just singular facts about the existing
> words in the sentence?

Relex creates a graphical representation of the parse. The graph
is a directed labelled graph, it consists of nodes that hold data
(strings), and labelled links pointing to the nodes. The graph
is in the form of frames-n-slots (i.e. like a filesystem, where
"directories" are "frames" or "links", and nodes are "files" or
"slots"). The graph can contain cycles.

A sequence of rules are applied to the graph, which transform the graph
by adding or removing nodes and links. Each rule is in the form of an
if-then structure. When a subgraph is found that matches the "if" clause,
then the graph is altered; the alterations are found for all matching
subgraphs. In this sense, Relex is "just a rule engine", somewhat like
opencog, and somewhat like any rule engine. The core difference
between this and most other forward chainers is that the relex rule
engine operates on graphs rather than on lists of clauses.

Relex doesn't have any output, but it does have a half-dozen different
"output" modules, which traverse the final graph, and print out bits
and pieces of it in various formats. You can create your own output
module by starting with one that is close to your needs, and modifying that.

--linas
Reply all
Reply to author
Forward
0 new messages