Link Grammar

Ken Ray kray at sonsothunder.com
Wed Jan 26 22:26:17 EST 2005


On 1/26/05 10:09 PM, "S. Tripp" <tripp at u-aizu.ac.jp> wrote:

> On 1/26/05 3:29 AM, "Ken Ray" <kray at sonsothunder.com> wrote:
> 
>>> Problem: I wanted to put a MetaCard front end on it by using the
>>> shell(".../parse") command.  It works halfway.  The Link Parser attempts to
>>> start but says it can't find some stuff.
>> 
>> Can you post what your code is and the result?
> 
> Code:
> on mouseUp
>   put shell("~/link-4.1b/parse") into fld "data-out"
>   put shell("I like chicken.") after fld "data-out"
> end mouseUp

Well, I see at least *one* problem... you can't run two shells() and expect
them to work together; actually what is happening is the same as if you'd
typed each of those commands separately at the command line in the terminal.

I downloaded the code, compiled it, and got the help... the usage is:

Usage: ./parse [dict_file] [-pp pp_knowledge_file]
          [-c constituent_knowledge_file] [-a affix_file]
          [-ppoff] [-coff] [-aoff] [-batch] [-<special "!" command>]

So at a minimum you need to execute:

  ./parse 4.0.dict 

The rest of it I don't know about... you should read the docs on the site
and see what files/commands you need to pass. But make sure it's all in one
command. For example, suppose you just needed to pass a string as the next
param after the "dict_file" (I *know* that's not the case, but I'm using it
as an illustration). In that case you'd call:

  put shell("~/link-4.1b/parse 4.0.dict" && quote & "I like chicken." &
quote) into tVar

Of course, the example above won't work, but you get the idea... you need to
call on the the parse command with all the parameters it needs in *one*
call.

HTH,

Ken Ray
Sons of Thunder Software
Web site: http://www.sonsothunder.com/
Email: kray at sonsothunder.com




More information about the metacard mailing list