Menu

Using Agent.Interpret()

Help
Jim Nolan
2001-01-12
2001-01-12
  • Jim Nolan

    Jim Nolan - 2001-01-12

    Hi,
    I am attenmpting to use the Grok API for some basic parsing.  I have looked at the grokkit.Run class as advised by Gann & Jason to understand on how to use the Agent for parsing.  My question is, there seem to be some things (Parameters?) I need to set up prior to calling Agent.Interpret().  I am getting alot of errors currently.  Can you please advise me on how I need to set up my environment prior to calling Agent.Interpret()?

    Thanks,
    Jim Nolan

     
    • Jim Nolan

      Jim Nolan - 2001-01-12

      Here is the stack trace:

      Unable to parse
              at quipu.grok.parse.CKY.createResult(CKY.java:78)
              at quipu.grok.parse.CKY.parse(CKY.java:91)
              at quipu.grok.parse.CKY.parse(CKY.java:130)
              at quipu.grok.parse.ParserAdapter.parse(ParserAdapter.java:98)
              at quipu.grok.Agent.understand(Agent.java:285)
              at quipu.grok.Agent.Interpret(Agent.java:269)

       
      • Gann Bierner

        Gann Bierner - 2001-01-12

        What are you trying to parse?  Does it work through the gui?

        You are correct that Grok uses some parameters, but the defaults should usually be ok.   Anyway, the Agent class should load them up automatically.

        Gann

         
        • Jim Nolan

          Jim Nolan - 2001-01-12

          I am just trying to parse any old sentence.  Like "Here is my query", or "Where is Pakistan?".

          No, it does not work through the GUI.  At the bottom of the GUI I get the "Unable to parse" message with any sentence I submit.

          Jim

           
    • Gann Bierner

      Gann Bierner - 2001-01-12

      Ok, the problem, then, is just that the grammar does not capture the sentences you are trying to parse. 

      If you are using the default setup, that's to be expected because Grok comes configured with just a toy grammar.  If you click the History->Samples menu buttons, you'll see the list of sentences that can be parsed for that grammar.  If you would like a larger grammar (which can parse a lot, but clearly not everything), you should go to the grok homepage (http:/grok.sourceforge.net) and look at the "Getting Started" page.  There is a section on setting up the wide coverage grammar.

      If you've already done this, let me know.  If you haven't, I apologize that these extra steps need to be taken, but we haven't gotten around to fancy installation packages.  :-)

      Gann

       
      • Jim Nolan

        Jim Nolan - 2001-01-12

        Yes, I loaded the wide grammer this morning.  It is probably worth mentioning that I am using a Win2K machine, JDK1.3.

        Jim

         
        • Gann Bierner

          Gann Bierner - 2001-01-12

          Well, others claim to have gotten everything to work on Win2k.  Have you changed your settings to use the new grammar?  This can be done under the "languages" menu by selecting "English". 

          If you've done that, are you getting any database errors?

          Gann

          P.S.  We should probably take things off line at this point to avoid flooding people's mailboxes further.

           

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.