Menu

I couldn't launch tccg

Help
Leonel
2007-03-01
2019-05-11
  • Leonel

    Leonel - 2007-03-01

    Hi! First of all, congratulations for your brilliant idea in creating OpenCCG. I'm a "normal" linguist (i.e. no computer scientist, but with good knowledge in Prolog, PCPATR, Python, NLTK, etc.) working with formal grammar theories and their computer implementations (mainly LFG and PATR-II). I'm writing a chapter about parsers based on Categorial Grammar for a computational linguics coursebook to be published in Brazil next year. The chapter will discuss (among other things) CUG and some of its implementations in the PATR-II formalism. I found your project on the Web and I'm considering including some discussion of it in this chapter, which should focuss preferably on the most recent developments. So it would be very important to include OpenCCG.
    I successfully installed the OpenCCG system with the Apache Ant build tool. However, I couldn't launch the tccg tool. Instead, I got error reports from Windows XP cmd.exe: "ccg-env" and "opennlp.ccg.TextCCG" were not recognized. I guess these errors have something to do with environment variables. I followed your instructions in the readme file, but I don't know how to set the variables necessary for tccg!
    Could you please give me detailed (i.e. suited for "dummies")instructions? I use Windows XP and have jdk1.6.0 installed.
    Many thanks in advance.
    Best regards,
    Leonel

     
    • Jason Baldridge

      Jason Baldridge - 2007-03-01

      I'm afraid I can't help you with the Windows set up. However, you might be interested in a project we have at the University of Texas at Austin for creating a GUI for OpenCCG:

      http://comp.ling.utexas.edu/ccggui/

      Right now, we have a web interface that you can try out, including a mini-tutorial:

      http://comp.ling.utexas.edu/ccggui/frontend/

      An advantage here is that you can try out some simple grammars without installing anything on your own machine.

      We're also creating example grammars and tutorials. We hope to have a first prototype of the GUI ready toward the end of March.

      Jason

       
    • davor

      davor - 2007-05-30

      I have exactly the same problem, I am under Windows XP, and I have made the three steps explained on the Readme.txt
      First of all update the path of java
      Second The JAVA_HOME enviroment variable
      And finally the OPENCCG_HOME enviroment variable pointing to the top directory of the library
      Windows do not recognize: "ccg-env" and "opennlp.ccg.TextCCG"

      The only possible cause I thought was on the Readme.txt was written:
      change to the directory for the "tiny" sample grammar and run "tccg"

      cd grammars
        cd tiny
        tccg (Windows/Unix)

      The problem I found the tccg.bat is not on /grammars/tiny but is placed on /bin

       
      • Michael White

        Michael White - 2007-05-30

        I suspect that your environment variables are not set up correctly.  One possibility is that you have not set the PATH variable correctly.  I think you can verify this by executing tccg using the fully-qualified path name, as follows:

          $OPENCCG_HOME/bin/tccg   (Unix)
          %OPENCCG_HOME%\bin\tccg  (Windows)

        If this command executes without errors, then the problem is that openccg's bin directory is not on the path.  (Of course, this assumes you have set OPENCCG_HOME correctly.)

        Googling yields many pages that talk about env vars for Windows; you might try these:

          http://support.microsoft.com/kb/310519
          http://vlaurie.com/computers2/Articles/environment.htm

        Good luck

        -Mike

         
      • Theresa Schmidt

        Theresa Schmidt - 2019-05-11

        Hi there everybody,

        I had a similar problem under Windows and thought I should add this here for others who might encounter this, too.
        I did set my environment and Path variable correctly but it still didn't work. I made the following two mistakes:
        1) It took me ages to get that there was a major difference between the windows for editing system environment variables and environment variables for the current user (I hope i translated this understandably; in German these windows can be found from the windows search bar as "Systemumgebungsvariablen bearbeiten" and "Umgebungsvariablen für dieses Konto bearbeiten". When you are editing user variables from a non-admin user in the system variable window, you are not editing them for the active user but for the admin. So: only ever edit for user in the window that you get for editing environment variables for the CURRENT user.
        2) My windows tends to ignore Path variables. I regularly forget to double-check that, so it also took me quite some time to figure this out. I had to change call ccg-env into call %OPENCCG_HOME%\bin\ccg-env in ccg-build.bat and in tccg.bat. Instead of calling tccgI have to call %OPENCCG_HOME%\bin\tccgbut now at least it works.

        Greetings,
        May your code live long and prosper!

         
    • LeoFerres

      LeoFerres - 2007-05-30

      Hello, all;

      Davor, I think you only need to put the bin/ folder of openccg into the path variable. I have this in my path file: C:\openccg\bin, change "c:\openccg" for the folder you downloaded or built openccg into.

      Hope this helps.

      Leo

       
    • davor

      davor - 2007-05-31

      First of all thank to you the effort you are making to help me

      I show you the enviroment variables OPENCCG_HOME and JAVA_HOME

      C:\proyecto_07\desarrollo_libreria\openccg-0.9.1\openccg\bin>%OPENCCG_HOME%
      "C:\proyecto_07\desarrollo_libreria\openccg-0.9.1\openccg" no se reconoce como u
      n comando interno o externo,programa o archivo por lotes ejecutable.

      So I can see the path is ok.

      C:\proyecto_07\desarrollo_libreria\openccg-0.9.1\openccg\bin>%JAVA_HOME%
      "C:\java\bin" no se reconoce como un comando interno o externo,
      programa o archivo por lotes ejecutable.

      The JAVA_HOME is placed there, so is ok.

      C:\proyecto_07\desarrollo_libreria\openccg-0.9.1\openccg\bin>%JAVA_CMD%
      El sistema no puede hallar la ruta especificada.

      When I open tccg.bat I can see this sentence:

      %JAVA_CMD% opennlp.ccg.TextCCG %*
      C:\ant\bin>%JAVA_CMD% opennlp.ccg.TextCCG %*

      "%JAVA_CMD%" no se reconoce como un comando interno o externo,programa o archivo por lotes ejecutable.

      And this fail could be sensate because the enviroment variable JAVA_CMD is not set by me, instead I set JAVA_HOME.

      This was what you told me to proof, and seem not to work.

      C:\proyecto_07\desarrollo_libreria\openccg-0.9.1\openccg\bin>%OPENCCG_HOME%\bin\tccg
      El sistema no puede hallar la ruta especificada.

      This sentence does not cause any problem and is written on tccg.bat
      C:\proyecto_07\desarrollo_libreria\openccg-0.9.1\openccg\bin>call ccg-env

      and of course the build of the library was succesfull

       
      • Michael White

        Michael White - 2007-05-31

        Looks like a problem with JAVA_HOME:

           C:\proyecto_07\desarrollo_libreria\openccg-0.9.1\openccg\bin>%JAVA_HOME%
           "C:\java\bin" no se reconoce como un comando interno o externo,
           programa o archivo por lotes ejecutable.

        The JAVA_HOME env var should be set to the root dir of the java installation, and thus should not include the bin directory.

        On unix, I can execute

           $JAVA_HOME/bin/java -version

        to see the version of java that is running.  On Windows, the equiv command should be:

           %JAVA_HOME%\bin\java -version

        or if JAVA_HOME has spaces in it,

           "%JAVA_HOME%\bin\java" -version

        You can see where JAVA_HOME is used in ccg-env.

        -Mike

         
    • davor

      davor - 2007-05-31

      What I have on the compiled directory is:

      C:\openccg\output\classes\opennlp\ccg>dir

      Directorio de C:\openccg\output\classes\opennlp\ccg

      31/05/2007  17:49    <DIR>          .
      31/05/2007  17:49    <DIR>          ..
      31/05/2007  17:49    <DIR>          grammar
      31/05/2007  17:49    <DIR>          grammardoc
      31/05/2007  17:49    <DIR>          hylo
      31/05/2007  17:49    <DIR>          lexicon
      31/05/2007  17:49    <DIR>          ngrams
      31/05/2007  17:49    <DIR>          parse
      31/05/2007  17:49    <DIR>          realize
      31/05/2007  17:49             7.844 Realize.class
      31/05/2007  17:49    <DIR>          synsem
      31/05/2007  17:49    <DIR>          test
      31/05/2007  17:49            23.097 <b>TextCCG.class</b>
      31/05/2007  17:49    <DIR>          unify
      31/05/2007  17:49    <DIR>          util
      31/05/2007  17:49             5.783 WebCCG.class
                     3 archivos         36.724 bytes
                    13 dirs     284.258.304 bytes libres

      and my new location of openccg is C:\openccg

      C:\openccg\bin>tccg
      El sistema no puede hallar la ruta especificada.

      and

      C:\openccg>%OPENCCG_HOME%\bin\tccg
      El sistema no puede hallar la ruta especificada.
      C:\openccg>%OPENCCG_HOME%
      "C:\openccg" no se reconoce como un comando interno o externo,
      programa o archivo por lotes ejecutable.

      C:\openccg>cd ..

      C:\&gt;%OPENCCG_HOME%\bin\tccg
      El sistema no puede hallar la ruta especificada.

      ¿any idea?

       
    • davor

      davor - 2007-05-31

      After changing all the imaginable things, I decided to Install JRE and Magically it runs!!
      I am happy!! And I found another problem because I had not grammar but executing tccg on the folder /grammar/tiny as explained on README.txt it takes one grammar for proving.
      Thanks.

       

Log in to post a comment.